diff options
author | Alex Xu <alex_y_xu@yahoo.ca> | 2013-08-17 22:22:38 -0400 |
---|---|---|
committer | Alex Xu <alex_y_xu@yahoo.ca> | 2013-08-17 22:22:38 -0400 |
commit | 780226fa442abda5cb5b1018e998f50e7985e908 (patch) | |
tree | 353b00372e2137e72236c5665293133114208277 /vencode.sh | |
parent | 11d9810801baa3e9627e99f0a58ef0eedaeb5bae (diff) | |
download | html5ks-780226fa442abda5cb5b1018e998f50e7985e908.tar.xz html5ks-780226fa442abda5cb5b1018e998f50e7985e908.zip |
toolchain improvements
Diffstat (limited to 'vencode.sh')
-rwxr-xr-x | vencode.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/vencode.sh b/vencode.sh new file mode 100755 index 0000000..23d20be --- /dev/null +++ b/vencode.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +# configure ffmpeg location if not in PATH +FFMPEG=ffmpeg +# configure flags +FFMPEG_FLAGS="-y" + +set -e + +cd $(dirname $0)/www/dump/video + +vencode() { + set -x + ${FFMPEG} -threads ${THREADS} -i "$1" -c:v "$2" $3 ${FFMPEG_FLAGS} "$4" +} + +for f in *.mkv; do + OUT=${f%.mkv} + vencode $f libx264 "-preset slower -tune animation" ${OUT}.mp4 + vencode $f libvpx "-crf 15 -b:v 1M -an -f webm -y" /dev/null + vencode $f libvpx "-crf 15 -b:v 1M -c:a copy" ${OUT}.webm + vencode $f libtheora "-qscale:v 6 -c:a copy" ${OUT}.ogg +done + |