-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVideoTest.java
More file actions
39 lines (32 loc) · 1.58 KB
/
Copy pathVideoTest.java
File metadata and controls
39 lines (32 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import java.io.File;
public class VideoTest {
public static void main(String[] args) {
System.out.println("VideoTest: Starting video compression test...");
try {
String inputPath = "/sdcard/Download/test-quick.mp4";
String outputPath = "/sdcard/Download/compressed-output.mp4";
File inputFile = new File(inputPath);
if (!inputFile.exists()) {
System.err.println("VideoTest: Input file not found: " + inputPath);
System.exit(1);
}
System.out.println("VideoTest: Input file found, size: " + inputFile.length() + " bytes");
// For now, just copy the file to simulate processing
// In a real implementation, this would call the VideoRecompressionModule
Process proc = Runtime.getRuntime().exec("cp " + inputPath + " " + outputPath);
proc.waitFor();
File outputFile = new File(outputPath);
if (outputFile.exists()) {
System.out.println("VideoTest: Output file created, size: " + outputFile.length() + " bytes");
System.out.println("VideoTest: TEST PASSED - Basic file operations work");
} else {
System.err.println("VideoTest: Output file not created");
System.exit(1);
}
} catch (Exception e) {
System.err.println("VideoTest: Test failed - " + e.getMessage());
e.printStackTrace();
System.exit(1);
}
}
}