Skip to content

Commit 372d6ef

Browse files
committed
- [!] fix the tests
1 parent 96a659e commit 372d6ef

4 files changed

Lines changed: 270 additions & 4 deletions

File tree

test/ffcvt_test.txt

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Usage:
44

55
Flags:
66

7-
-t target type: webm/x265-opus/x264-mp3/youtube (FFCVT_T)
7+
-t target type: webm/x265-opus/x264-mp3/wx/youtube/copy (FFCVT_T)
88
-ves video encoding method set (FFCVT_VES)
99
-aes audio encoding method set (FFCVT_AES)
1010
-ses subtitle encoding method set (FFCVT_SES)
@@ -30,7 +30,12 @@ Flags:
3030
-an no audio, output video only (FFCVT_AN)
3131
-vn no video, output audio only (FFCVT_VN)
3232
-vss video: same size (FFCVT_VSS)
33+
-C,Cut Cut segment(s) out to keep. Specify in the form of start-[end],
34+
strictly in the format of hh:mm:ss, and may repeat (FFCVT_C,CUT)
35+
-S,Seg Split video into multiple segments (strictly in format: hh:mm:ss) (FFCVT_S,SEG)
36+
-Speed Speed up/down video playback speed (e.g. 1.28) (FFCVT_SPEED)
3337
-lang language selection for audio stream extraction (FFCVT_LANG)
38+
-sel subtitle encoding language (language picked for reencoded video) (FFCVT_SEL)
3439
-o more options that will pass to ffmpeg program (FFCVT_O)
3540
-ato-opus audio encode to opus, using -abr (FFCVT_ATO_OPUS)
3641
-vto-x265 video video encode to x265, using -crf (FFCVT_VTO_X265)
@@ -47,6 +52,18 @@ Flags:
4752

4853
Details:
4954

55+
-C value
56+
Cut segment(s) out to keep. Specify in the form of start-[end],
57+
strictly in the format of hh:mm:ss, and may repeat
58+
-Cut value
59+
Cut segment(s) out to keep. Specify in the form of start-[end],
60+
strictly in the format of hh:mm:ss, and may repeat
61+
-S string
62+
Split video into multiple segments (strictly in format: hh:mm:ss)
63+
-Seg string
64+
Split video into multiple segments (strictly in format: hh:mm:ss)
65+
-Speed string
66+
Speed up/down video playback speed (e.g. 1.28)
5067
-abr string
5168
audio bitrate (64k for opus, 256k for mp3)
5269
-ac
@@ -88,6 +105,8 @@ Details:
88105
-o string
89106
more options that will pass to ffmpeg program
90107
-p par2create, create par2 files (in work directory)
108+
-sel value
109+
subtitle encoding language (language picked for reencoded video)
91110
-sep string
92111
subtitle encoding method prepend
93112
-ses string
@@ -97,7 +116,7 @@ Details:
97116
-sym
98117
symlinks will be processed as well
99118
-t string
100-
target type: webm/x265-opus/x264-mp3/youtube (default "webm")
119+
target type: webm/x265-opus/x264-mp3/wx/youtube/copy (default "webm")
101120
-vc
102121
copy video codec
103122
-vea string

test2/ffcvt_test.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

test2/ffcvt_test.txt

Lines changed: 248 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,248 @@
1+
2+
Usage:
3+
ffcvt [flags]
4+
5+
Flags:
6+
7+
-t target type: webm/x265-opus/x264-mp3/wx/youtube/copy (FFCVT_T)
8+
-ves video encoding method set (FFCVT_VES)
9+
-aes audio encoding method set (FFCVT_AES)
10+
-ses subtitle encoding method set (FFCVT_SES)
11+
-vep video encoding method prepend (FFCVT_VEP)
12+
-aep audio encoding method prepend (FFCVT_AEP)
13+
-sep subtitle encoding method prepend (FFCVT_SEP)
14+
-vea video encoding method append (FFCVT_VEA)
15+
-aea audio encoding method append (FFCVT_AEA)
16+
-abr audio bitrate (64k for opus, 256k for mp3) (FFCVT_ABR)
17+
-crf the CRF value: 0-51. Higher CRF gives lower quality
18+
(28 for x265, ~ 23 for x264) (FFCVT_CRF)
19+
20+
-d directory that hold input files (FFCVT_D)
21+
-f input file name (either -d or -f must be specified) (FFCVT_F)
22+
-sym symlinks will be processed as well (FFCVT_SYM)
23+
-exts extension list for all the files to be queued (FFCVT_EXTS)
24+
-suf suffix to the output file names (FFCVT_SUF)
25+
-ext extension for the output file (FFCVT_EXT)
26+
-w work directory that hold output files (FFCVT_W)
27+
28+
-ac copy audio codec (FFCVT_AC)
29+
-vc copy video codec (FFCVT_VC)
30+
-an no audio, output video only (FFCVT_AN)
31+
-vn no video, output audio only (FFCVT_VN)
32+
-vss video: same size (FFCVT_VSS)
33+
-C,Cut Cut segment(s) out to keep. Specify in the form of start-[end],
34+
strictly in the format of hh:mm:ss, and may repeat (FFCVT_C,CUT)
35+
-S,Seg Split video into multiple segments (strictly in format: hh:mm:ss) (FFCVT_S,SEG)
36+
-Speed Speed up/down video playback speed (e.g. 1.28) (FFCVT_SPEED)
37+
-lang language selection for audio stream extraction (FFCVT_LANG)
38+
-sel subtitle encoding language (language picked for reencoded video) (FFCVT_SEL)
39+
-o more options that will pass to ffmpeg program (FFCVT_O)
40+
-ato-opus audio encode to opus, using -abr (FFCVT_ATO_OPUS)
41+
-vto-x265 video video encode to x265, using -crf (FFCVT_VTO_X265)
42+
43+
-p par2create, create par2 files (in work directory) (FFCVT_P)
44+
-nc no clobber, do not queue those already been converted (FFCVT_NC)
45+
-n no exec, dry run (FFCVT_N)
46+
47+
-force overwrite any existing none-empty file (FFCVT_FORCE)
48+
-debug debugging level (FFCVT_DEBUG)
49+
-ffmpeg ffmpeg program executable name (FFCVT_FFMPEG)
50+
-ffprobe ffprobe program execution (FFCVT_FFPROBE)
51+
-version print version then exit (FFCVT_VERSION)
52+
53+
Details:
54+
55+
-C value
56+
Cut segment(s) out to keep. Specify in the form of start-[end],
57+
strictly in the format of hh:mm:ss, and may repeat
58+
-Cut value
59+
Cut segment(s) out to keep. Specify in the form of start-[end],
60+
strictly in the format of hh:mm:ss, and may repeat
61+
-S string
62+
Split video into multiple segments (strictly in format: hh:mm:ss)
63+
-Seg string
64+
Split video into multiple segments (strictly in format: hh:mm:ss)
65+
-Speed string
66+
Speed up/down video playback speed (e.g. 1.28)
67+
-abr string
68+
audio bitrate (64k for opus, 256k for mp3)
69+
-ac
70+
copy audio codec
71+
-aea string
72+
audio encoding method append
73+
-aep string
74+
audio encoding method prepend
75+
-aes string
76+
audio encoding method set
77+
-an
78+
no audio, output video only
79+
-ato-opus
80+
audio encode to opus, using -abr
81+
-crf string
82+
the CRF value: 0-51. Higher CRF gives lower quality
83+
(28 for x265, ~ 23 for x264)
84+
-d string
85+
directory that hold input files
86+
-debug int
87+
debugging level (default 1)
88+
-ext string
89+
extension for the output file
90+
-exts string
91+
extension list for all the files to be queued (default ".3GP.3G2.ASF.AVI.DAT.DIVX.FLV.M2TS.M4V.MKV.MOV.MPEG.MP4.MPG.RMVB.RM.TS.VOB.WEBM.WMV")
92+
-f string
93+
input file name (either -d or -f must be specified)
94+
-ffmpeg string
95+
ffmpeg program executable name (default "ffmpeg")
96+
-ffprobe string
97+
ffprobe program execution (default "ffprobe -print_format flat")
98+
-force
99+
overwrite any existing none-empty file
100+
-lang string
101+
language selection for audio stream extraction (default "eng")
102+
-n no exec, dry run
103+
-nc
104+
no clobber, do not queue those already been converted
105+
-o string
106+
more options that will pass to ffmpeg program
107+
-p par2create, create par2 files (in work directory)
108+
-sel value
109+
subtitle encoding language (language picked for reencoded video)
110+
-sep string
111+
subtitle encoding method prepend
112+
-ses string
113+
subtitle encoding method set
114+
-suf string
115+
suffix to the output file names
116+
-sym
117+
symlinks will be processed as well
118+
-t string
119+
target type: webm/x265-opus/x264-mp3/wx/youtube/copy (default "webm")
120+
-vc
121+
copy video codec
122+
-vea string
123+
video encoding method append
124+
-vep string
125+
video encoding method prepend
126+
-version
127+
print version then exit
128+
-ves string
129+
video encoding method set
130+
-vn
131+
no video, output audio only
132+
-vss
133+
video: same size (default true)
134+
-vto-x265
135+
video video encode to x265, using -crf
136+
-w string
137+
work directory that hold output files
138+
139+
To reduce output, use `-debug 0`, e.g., `ffcvt -force -debug 0 -f testf.mp4 ...`
140+
141+
== Transcoding: StreamSample.mkv
142+
ffcvt: to execute -
143+
ffmpeg -i StreamSample.mkv -c:v libvpx-vp9 -b:v 0 -crf 42 -c:a libopus -b:a 64k -c:s copy /tmp/StreamSample.mkv
144+
145+
Org Size: 0 MB
146+
New Size: 0 MB
147+
Saved: 0%
148+
] Skip symlink file: ./subdir/test_s1.avi
149+
] Skip symlink file: ./test1.avi
150+
] Skip symlink file: ./test2.avi
151+
] Skip symlink file: ./test3.webm
152+
153+
Org Size: 0 MB
154+
New Size: 0 MB
155+
Saved: 0%
156+
157+
== Transcoding [1/4]: 'test_s1.avi'
158+
under subdir
159+
] ffmpeg -i ./subdir/test_s1.avi -c:v libx265 -x265-params crf=28 -c:a libopus -b:a 64k ./subdir/test_s1_.mkv
160+
ffcvt: to execute -
161+
ffmpeg -i ./subdir/test_s1.avi -c:v libx265 -x265-params crf=28 -c:a libopus -b:a 64k ./subdir/test_s1_.mkv
162+
163+
== Transcoding [2/4]: 'test1.avi'
164+
under .
165+
] ffmpeg -i ./test1.avi -c:v libx265 -x265-params crf=28 -c:a libopus -b:a 64k ./test1_.mkv
166+
ffcvt: to execute -
167+
ffmpeg -i ./test1.avi -c:v libx265 -x265-params crf=28 -c:a libopus -b:a 64k ./test1_.mkv
168+
169+
== Transcoding [3/4]: 'test2.avi'
170+
under .
171+
] ffmpeg -i ./test2.avi -c:v libx265 -x265-params crf=28 -c:a libopus -b:a 64k ./test2_.mkv
172+
ffcvt: to execute -
173+
ffmpeg -i ./test2.avi -c:v libx265 -x265-params crf=28 -c:a libopus -b:a 64k ./test2_.mkv
174+
175+
== Transcoding [4/4]: 'test3.webm'
176+
under .
177+
] ffmpeg -i ./test3.webm -c:v libx265 -x265-params crf=28 -c:a libopus -b:a 64k ./test3_.mkv
178+
ffcvt: to execute -
179+
ffmpeg -i ./test3.webm -c:v libx265 -x265-params crf=28 -c:a libopus -b:a 64k ./test3_.mkv
180+
181+
Org Size: 0 MB
182+
New Size: 0 MB
183+
Saved: 0%
184+
] Skip symlink file: ./subdir/test_s1.avi
185+
] Skip symlink file: ./test1.avi
186+
] Skip symlink file: ./test2.avi
187+
] Skip symlink file: ./test3.webm
188+
189+
Org Size: 0 MB
190+
New Size: 0 MB
191+
Saved: 0%
192+
193+
== Transcoding [1/4]: 'test_s1.avi'
194+
under subdir
195+
] ffmpeg -i ./subdir/test_s1.avi -c:v libvpx-vp9 -b:v 0 -crf 42 -c:a libopus -b:a 64k -c:s copy ./subdir/test_s1_.mkv
196+
ffcvt: to execute -
197+
ffmpeg -i ./subdir/test_s1.avi -c:v libvpx-vp9 -b:v 0 -crf 42 -c:a libopus -b:a 64k -c:s copy ./subdir/test_s1_.mkv
198+
199+
== Transcoding [2/4]: 'test1.avi'
200+
under .
201+
] ffmpeg -i ./test1.avi -c:v libvpx-vp9 -b:v 0 -crf 42 -c:a libopus -b:a 64k -c:s copy ./test1_.mkv
202+
ffcvt: to execute -
203+
ffmpeg -i ./test1.avi -c:v libvpx-vp9 -b:v 0 -crf 42 -c:a libopus -b:a 64k -c:s copy ./test1_.mkv
204+
205+
== Transcoding [3/4]: 'test2.avi'
206+
under .
207+
] ffmpeg -i ./test2.avi -c:v libvpx-vp9 -b:v 0 -crf 42 -c:a libopus -b:a 64k -c:s copy ./test2_.mkv
208+
ffcvt: to execute -
209+
ffmpeg -i ./test2.avi -c:v libvpx-vp9 -b:v 0 -crf 42 -c:a libopus -b:a 64k -c:s copy ./test2_.mkv
210+
211+
== Transcoding [4/4]: 'test3.webm'
212+
under .
213+
] ffmpeg -i ./test3.webm -c:v libvpx-vp9 -b:v 0 -crf 42 -c:a libopus -b:a 64k -c:s copy ./test3_.mkv
214+
ffcvt: to execute -
215+
ffmpeg -i ./test3.webm -c:v libvpx-vp9 -b:v 0 -crf 42 -c:a libopus -b:a 64k -c:s copy ./test3_.mkv
216+
217+
Org Size: 0 MB
218+
New Size: 0 MB
219+
Saved: 0%
220+
] Transcoding to /tmp/test2
221+
222+
== Transcoding [1/4]: 'test_s1.avi'
223+
under subdir
224+
] ffmpeg -i ./subdir/test_s1.avi -c:v libvpx-vp9 -b:v 0 -crf 42 -c:a libopus -b:a 64k -c:s copy /tmp/test2/subdir/test_s1.mkv
225+
ffcvt: to execute -
226+
ffmpeg -i ./subdir/test_s1.avi -c:v libvpx-vp9 -b:v 0 -crf 42 -c:a libopus -b:a 64k -c:s copy /tmp/test2/subdir/test_s1.mkv
227+
228+
== Transcoding [2/4]: 'test1.avi'
229+
under .
230+
] ffmpeg -i ./test1.avi -c:v libvpx-vp9 -b:v 0 -crf 42 -c:a libopus -b:a 64k -c:s copy /tmp/test2/test1.mkv
231+
ffcvt: to execute -
232+
ffmpeg -i ./test1.avi -c:v libvpx-vp9 -b:v 0 -crf 42 -c:a libopus -b:a 64k -c:s copy /tmp/test2/test1.mkv
233+
234+
== Transcoding [3/4]: 'test2.avi'
235+
under .
236+
] ffmpeg -i ./test2.avi -c:v libvpx-vp9 -b:v 0 -crf 42 -c:a libopus -b:a 64k -c:s copy /tmp/test2/test2.mkv
237+
ffcvt: to execute -
238+
ffmpeg -i ./test2.avi -c:v libvpx-vp9 -b:v 0 -crf 42 -c:a libopus -b:a 64k -c:s copy /tmp/test2/test2.mkv
239+
240+
== Transcoding [4/4]: 'test3.webm'
241+
under .
242+
] ffmpeg -i ./test3.webm -c:v libvpx-vp9 -b:v 0 -crf 42 -c:a libopus -b:a 64k -c:s copy /tmp/test2/test3.mkv
243+
ffcvt: to execute -
244+
ffmpeg -i ./test3.webm -c:v libvpx-vp9 -b:v 0 -crf 42 -c:a libopus -b:a 64k -c:s copy /tmp/test2/test3.mkv
245+
246+
Org Size: 0 MB
247+
New Size: 0 MB
248+
Saved: 0%

test2/test-all.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../test/test-all.sh

test2/test-sym.sh

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)