summaryrefslogtreecommitdiff
path: root/reencode.sh
diff options
context:
space:
mode:
authorAlex Xu <alex_y_xu@yahoo.ca>2013-08-17 22:22:38 -0400
committerAlex Xu <alex_y_xu@yahoo.ca>2013-08-17 22:22:38 -0400
commit780226fa442abda5cb5b1018e998f50e7985e908 (patch)
tree353b00372e2137e72236c5665293133114208277 /reencode.sh
parent11d9810801baa3e9627e99f0a58ef0eedaeb5bae (diff)
downloadhtml5ks-780226fa442abda5cb5b1018e998f50e7985e908.tar.xz
html5ks-780226fa442abda5cb5b1018e998f50e7985e908.zip
toolchain improvements
Diffstat (limited to 'reencode.sh')
-rwxr-xr-xreencode.sh23
1 files changed, 4 insertions, 19 deletions
diff --git a/reencode.sh b/reencode.sh
index f7baf0d..8aba8d8 100755
--- a/reencode.sh
+++ b/reencode.sh
@@ -1,22 +1,7 @@
#!/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
+export THREADS=${THREADS:-4}
-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
+cd $(dirname $0)
+./vencode.sh
+./iencode.sh