diff options
author | Alex Xu <alex_y_xu@yahoo.ca> | 2013-07-24 18:40:52 -0400 |
---|---|---|
committer | Alex Xu <alex_y_xu@yahoo.ca> | 2013-07-24 18:40:52 -0400 |
commit | 23518a31d24e62caeecbfafe7708f4c7ffcd24f5 (patch) | |
tree | 0088578bd87f4467f5b48e0fd22df70d3fedb245 /reencode.sh | |
parent | ffd3a73254b16a00d67b188dc43bd605bf757cbf (diff) | |
download | html5ks-23518a31d24e62caeecbfafe7708f4c7ffcd24f5.tar.xz html5ks-23518a31d24e62caeecbfafe7708f4c7ffcd24f5.zip |
fix misc. bugs, add reencode.sh
Diffstat (limited to 'reencode.sh')
-rwxr-xr-x | reencode.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/reencode.sh b/reencode.sh new file mode 100755 index 0000000..f7baf0d --- /dev/null +++ b/reencode.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# configure ffmpeg location if not in PATH +FFMPEG=ffmpeg +# configure flags (e.g. if you want to force high -threads) +FFMPEG_FLAGS="" + +set -e +FFMPEG_FLAGS+="$@" +cd $(dirname $0)/www/dump/video + +encode() { + set -x + ${FFMPEG} -i "$1" -c:v "$2" $3 ${FFMPEG_FLAGS} "$4" +} + +for f in *.mkv; do + OUT=${f%.mkv} + encode $f libx264 "-preset slower -tune animation" ${OUT}.mp4 + encode $f libvpx "-crf 15 -b:v 1M -an -f webm -y" /dev/null + encode $f libvpx "-crf 15 -b:v 1M -c:a libvorbis" ${OUT}.webm + encode $f libtheora "-qscale:v 6 -c:a libvorbis" ${OUT}.ogg +done |