Skip to content

Commit 345b92c

Browse files
committed
- [+] add karaoke option tests
1 parent 2521f0f commit 345b92c

3 files changed

Lines changed: 54 additions & 0 deletions

File tree

test/ffcvt_test.txt

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ Flags:
3535
strictly in the format of hh:mm:ss, and may repeat (FFCVT_C,CUT)
3636
-S,Seg Split video into multiple segments (strictly in format: hh:mm:ss) (FFCVT_S,SEG)
3737
-Speed Speed up/down video playback speed (e.g. 1.28) (FFCVT_SPEED)
38+
-k,karaoke Add a karaoke audio track to .mp4 MTV (FFCVT_K,KARAOKE)
3839
-tkf Transpose song's key from (e.g. C/C#/Db/D etc) (FFCVT_TKF)
3940
-tkt Transpose song's key to (e.g. -tkf C -tkt Db) (FFCVT_TKT)
4041
-lang language selection for audio stream extraction (FFCVT_LANG)
@@ -102,6 +103,9 @@ Details:
102103
ffprobe program execution (default "ffprobe -print_format flat")
103104
-force
104105
overwrite any existing none-empty file
106+
-k Add a karaoke audio track to .mp4 MTV
107+
-karaoke
108+
Add a karaoke audio track to .mp4 MTV
105109
-lang string
106110
language selection for audio stream extraction (default "eng")
107111
-n no exec, dry run
@@ -213,6 +217,27 @@ Saved: 0%
213217
ffcvt: to execute -
214218
ffmpeg -i StreamSample.mkv -c:v copy -c:a copy -b:a 64k -c:s copy /tmp/StreamSample.mkv
215219

220+
Transcoding completed in xxx ms
221+
Org Size: 0 MB
222+
New Size: 0 MB
223+
Saved: 0%
224+
# Test adding karaoke audio track
225+
226+
== Transcoding: test1.avi
227+
] ffmpeg -i test1.avi -filter_complex [0:1]pan=mono|c0=c0-c1[a] -map 0:0 -map [a] -map 0:1 test1_karaoke.mp4
228+
ffcvt: to execute -
229+
ffmpeg -i test1.avi -filter_complex [0:1]pan=mono|c0=c0-c1[a] -map 0:0 -map [a] -map 0:1 test1_karaoke.mp4
230+
231+
Transcoding completed in xxx ms
232+
Org Size: 0 MB
233+
New Size: 0 MB
234+
Saved: 0%
235+
236+
== Transcoding: test1.avi
237+
] ffmpeg -i test1.avi -filter_complex [0:1]pan=mono|c0=c0-c1[a] -map 0:0 -map [a] -map 0:1 test1_k.avi
238+
ffcvt: to execute -
239+
ffmpeg -i test1.avi -filter_complex [0:1]pan=mono|c0=c0-c1[a] -map 0:0 -map [a] -map 0:1 test1_k.avi
240+
216241
Transcoding completed in xxx ms
217242
Org Size: 0 MB
218243
New Size: 0 MB

test/test-all.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ $FFCVT -t wx -n -f StreamSample.mkv -w /tmp >> /tmp/ffcvt_test.txt 2>&1
2424
$FFCVT -t youtube -n -f StreamSample.mkv -w /tmp >> /tmp/ffcvt_test.txt 2>&1
2525
$FFCVT -t copy -n -f StreamSample.mkv -w /tmp >> /tmp/ffcvt_test.txt 2>&1
2626

27+
echo '# Test adding karaoke audio track' | tee -a /tmp/ffcvt_test.txt
28+
$FFCVT -n -f test1.avi -t '' -k >> /tmp/ffcvt_test.txt 2>&1
29+
$FFCVT -n -f test1.avi -t '' -k -ext _k.avi >> /tmp/ffcvt_test.txt 2>&1
30+
2731
echo '# Test transposing different keys' | tee -a /tmp/ffcvt_test.txt
2832
$FFCVT -t x264-mp3 -n -f StreamSample.mkv -w /tmp -tkf F -tkt D -vn >> /tmp/ffcvt_test.txt 2>&1
2933
$FFCVT -t x264-mp3 -n -f StreamSample.mkv -w /tmp -tkf 'F#' -tkt Db -vn -abr 72k >> /tmp/ffcvt_test.txt 2>&1

test2/ffcvt_test.txt

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ Flags:
3535
strictly in the format of hh:mm:ss, and may repeat (FFCVT_C,CUT)
3636
-S,Seg Split video into multiple segments (strictly in format: hh:mm:ss) (FFCVT_S,SEG)
3737
-Speed Speed up/down video playback speed (e.g. 1.28) (FFCVT_SPEED)
38+
-k,karaoke Add a karaoke audio track to .mp4 MTV (FFCVT_K,KARAOKE)
3839
-tkf Transpose song's key from (e.g. C/C#/Db/D etc) (FFCVT_TKF)
3940
-tkt Transpose song's key to (e.g. -tkf C -tkt Db) (FFCVT_TKT)
4041
-lang language selection for audio stream extraction (FFCVT_LANG)
@@ -102,6 +103,9 @@ Details:
102103
ffprobe program execution (default "ffprobe -print_format flat")
103104
-force
104105
overwrite any existing none-empty file
106+
-k Add a karaoke audio track to .mp4 MTV
107+
-karaoke
108+
Add a karaoke audio track to .mp4 MTV
105109
-lang string
106110
language selection for audio stream extraction (default "eng")
107111
-n no exec, dry run
@@ -213,6 +217,27 @@ Saved: 0%
213217
ffcvt: to execute -
214218
ffmpeg -i StreamSample.mkv -c:v copy -c:a copy -b:a 64k -c:s copy /tmp/StreamSample.mkv
215219

220+
Transcoding completed in xxx ms
221+
Org Size: 0 MB
222+
New Size: 0 MB
223+
Saved: 0%
224+
# Test adding karaoke audio track
225+
226+
== Transcoding: test1.avi
227+
] ffmpeg -i test1.avi -filter_complex [0:1]pan=mono|c0=c0-c1[a] -map 0:0 -map [a] -map 0:1 test1_karaoke.mp4
228+
ffcvt: to execute -
229+
ffmpeg -i test1.avi -filter_complex [0:1]pan=mono|c0=c0-c1[a] -map 0:0 -map [a] -map 0:1 test1_karaoke.mp4
230+
231+
Transcoding completed in xxx ms
232+
Org Size: 0 MB
233+
New Size: 0 MB
234+
Saved: 0%
235+
236+
== Transcoding: test1.avi
237+
] ffmpeg -i test1.avi -filter_complex [0:1]pan=mono|c0=c0-c1[a] -map 0:0 -map [a] -map 0:1 test1_k.avi
238+
ffcvt: to execute -
239+
ffmpeg -i test1.avi -filter_complex [0:1]pan=mono|c0=c0-c1[a] -map 0:0 -map [a] -map 0:1 test1_k.avi
240+
216241
Transcoding completed in xxx ms
217242
Org Size: 0 MB
218243
New Size: 0 MB

0 commit comments

Comments
 (0)