Repository navigation
Expand file tree
/
Copy pathTests.java
More file actions
81 lines (57 loc) · 2.2 KB
/
Copy pathTests.java
File metadata and controls
81 lines (57 loc) · 2.2 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
package org.ffmpeg.android.test;
import java.io.File;
import org.ffmpeg.android.Clip;
public class Tests {
/**
* @param args
*/
public static void main(String[] args) throws Exception {
String[] testpaths = {
// "/home/n8fr8/Desktop/smcampmovie",
// "/home/n8fr8/Desktop/smcampmovie2",
"/home/n8fr8/Desktop/sm3"
};
int idx = -1;
double fadeLen = 1;
for (String testpath : testpaths)
{
idx++;
System.out.println ("************************************");
System.out.println ("CONCAT TEST: " + testpath);
File fileVideoOutput = new File("/tmp/test" + idx + ".mp4");
fileVideoOutput.delete();
ConcatTest.test(testpath, "/tmp", fileVideoOutput.getCanonicalPath(), fadeLen);
if (!fileVideoOutput.exists())
{
System.out.println("FAIL!! > output file did not get created: " + fileVideoOutput.getCanonicalPath());
continue;
}
else
System.out.println("SUCCESS!! > " + fileVideoOutput.getCanonicalPath());
System.out.println ("************************************");
System.out.println ("CROSSFADE TEST: " + testpath);
File fileAudioOutput = new File("/tmp/test" + idx + ".3gp");
fileAudioOutput.delete();
CrossfadeTest.test(testpath, "/tmp", fileAudioOutput.getCanonicalPath(),fadeLen);
if (!fileAudioOutput.exists())
{
System.out.println("FAIL!! > output file did not get created: " + fileAudioOutput.getCanonicalPath());
continue;
}
else
System.out.println("SUCCESS!! > " + fileAudioOutput.getCanonicalPath());
System.out.println ("************************************");
System.out.println ("MIX TEST: " + testpath);
File fileMix = new File("/tmp/test" + idx + "mix.mp4");
fileMix.delete();
Clip clipMixOut = new Clip(fileMix.getCanonicalPath());
MixTest.test("/tmp", fileVideoOutput.getCanonicalPath(), fileAudioOutput.getCanonicalPath(), clipMixOut);
if (!fileMix.exists())
System.out.println("FAIL!! > output file did not get created: " + fileMix.getCanonicalPath());
else
System.out.println("SUCCESS!! > " + fileMix.getCanonicalPath());
}
System.out.println("**********************");
System.out.println("*******FIN**********");
}
}