Skip to content

Commit

Permalink
- [+] add karaoke option tests
Browse files Browse the repository at this point in the history
  • Loading branch information
suntong committed May 18, 2023
1 parent 2521f0f commit 84a9213
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 0 deletions.
25 changes: 25 additions & 0 deletions test/ffcvt_test.txt
Expand Up @@ -35,6 +35,7 @@ Flags:
strictly in the format of hh:mm:ss, and may repeat (FFCVT_C,CUT)
-S,Seg Split video into multiple segments (strictly in format: hh:mm:ss) (FFCVT_S,SEG)
-Speed Speed up/down video playback speed (e.g. 1.28) (FFCVT_SPEED)
-k,karaoke Add a karaoke audio track to .mp4 MTV (FFCVT_K,KARAOKE)
-tkf Transpose song's key from (e.g. C/C#/Db/D etc) (FFCVT_TKF)
-tkt Transpose song's key to (e.g. -tkf C -tkt Db) (FFCVT_TKT)
-lang language selection for audio stream extraction (FFCVT_LANG)
Expand Down Expand Up @@ -102,6 +103,9 @@ Details:
ffprobe program execution (default "ffprobe -print_format flat")
-force
overwrite any existing none-empty file
-k Add a karaoke audio track to .mp4 MTV
-karaoke
Add a karaoke audio track to .mp4 MTV
-lang string
language selection for audio stream extraction (default "eng")
-n no exec, dry run
Expand Down Expand Up @@ -213,6 +217,27 @@ Saved: 0%
ffcvt: to execute -
ffmpeg -i StreamSample.mkv -c:v copy -c:a copy -b:a 64k -c:s copy /tmp/StreamSample.mkv

Transcoding completed in xxx ms
Org Size: 0 MB
New Size: 0 MB
Saved: 0%
# Test adding karaoke audio track

== Transcoding: test1.avi
] 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
ffcvt: to execute -
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

Transcoding completed in xxx ms
Org Size: 0 MB
New Size: 0 MB
Saved: 0%

== Transcoding: test1.avi
] ffmpeg -i test1.avi -filter_complex [0:1]pan=mono|c0=c0-c1[a] -map 0:0 -map [a] -map 0:1 test1_k.mp4
ffcvt: to execute -
ffmpeg -i test1.avi -filter_complex [0:1]pan=mono|c0=c0-c1[a] -map 0:0 -map [a] -map 0:1 test1_k.mp4

Transcoding completed in xxx ms
Org Size: 0 MB
New Size: 0 MB
Expand Down
4 changes: 4 additions & 0 deletions test/test-all.sh
Expand Up @@ -24,6 +24,10 @@ $FFCVT -t wx -n -f StreamSample.mkv -w /tmp >> /tmp/ffcvt_test.txt 2>&1
$FFCVT -t youtube -n -f StreamSample.mkv -w /tmp >> /tmp/ffcvt_test.txt 2>&1
$FFCVT -t copy -n -f StreamSample.mkv -w /tmp >> /tmp/ffcvt_test.txt 2>&1

echo '# Test adding karaoke audio track' | tee -a /tmp/ffcvt_test.txt
$FFCVT -n -f test1.avi -t '' -k >> /tmp/ffcvt_test.txt 2>&1
$FFCVT -n -f test1.avi -t '' -k -ext _k.mp4 >> /tmp/ffcvt_test.txt 2>&1

echo '# Test transposing different keys' | tee -a /tmp/ffcvt_test.txt
$FFCVT -t x264-mp3 -n -f StreamSample.mkv -w /tmp -tkf F -tkt D -vn >> /tmp/ffcvt_test.txt 2>&1
$FFCVT -t x264-mp3 -n -f StreamSample.mkv -w /tmp -tkf 'F#' -tkt Db -vn -abr 72k >> /tmp/ffcvt_test.txt 2>&1
Expand Down
25 changes: 25 additions & 0 deletions test2/ffcvt_test.txt
Expand Up @@ -35,6 +35,7 @@ Flags:
strictly in the format of hh:mm:ss, and may repeat (FFCVT_C,CUT)
-S,Seg Split video into multiple segments (strictly in format: hh:mm:ss) (FFCVT_S,SEG)
-Speed Speed up/down video playback speed (e.g. 1.28) (FFCVT_SPEED)
-k,karaoke Add a karaoke audio track to .mp4 MTV (FFCVT_K,KARAOKE)
-tkf Transpose song's key from (e.g. C/C#/Db/D etc) (FFCVT_TKF)
-tkt Transpose song's key to (e.g. -tkf C -tkt Db) (FFCVT_TKT)
-lang language selection for audio stream extraction (FFCVT_LANG)
Expand Down Expand Up @@ -102,6 +103,9 @@ Details:
ffprobe program execution (default "ffprobe -print_format flat")
-force
overwrite any existing none-empty file
-k Add a karaoke audio track to .mp4 MTV
-karaoke
Add a karaoke audio track to .mp4 MTV
-lang string
language selection for audio stream extraction (default "eng")
-n no exec, dry run
Expand Down Expand Up @@ -213,6 +217,27 @@ Saved: 0%
ffcvt: to execute -
ffmpeg -i StreamSample.mkv -c:v copy -c:a copy -b:a 64k -c:s copy /tmp/StreamSample.mkv

Transcoding completed in xxx ms
Org Size: 0 MB
New Size: 0 MB
Saved: 0%
# Test adding karaoke audio track

== Transcoding: test1.avi
] 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
ffcvt: to execute -
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

Transcoding completed in xxx ms
Org Size: 0 MB
New Size: 0 MB
Saved: 0%

== Transcoding: test1.avi
] ffmpeg -i test1.avi -filter_complex [0:1]pan=mono|c0=c0-c1[a] -map 0:0 -map [a] -map 0:1 test1_k.mp4
ffcvt: to execute -
ffmpeg -i test1.avi -filter_complex [0:1]pan=mono|c0=c0-c1[a] -map 0:0 -map [a] -map 0:1 test1_k.mp4

Transcoding completed in xxx ms
Org Size: 0 MB
New Size: 0 MB
Expand Down

0 comments on commit 84a9213

Please sign in to comment.