c3d2-web/scripts/encode_webm.sh

35 lines
565 B
Bash
Raw Normal View History

#!/bin/sh
2012-04-05 03:23:09 +02:00
if=$1
2011-10-06 23:22:34 +02:00
of=`basename "$1"`".webm"
2012-04-05 03:23:09 +02:00
if [ ! -f "$of.ffmpeg2pass-0.log" ]; then
schedtool -De \
2012-04-05 03:23:09 +02:00
ffmpeg -i "$if" \
-threads 4 \
-f webm \
-an \
-vcodec libvpx \
-deinterlace \
-b:v 400k \
-pass 1 \
-passlogfile "$of.ffmpeg2pass" \
-y \
/dev/null || exit 1
fi
schedtool -De \
2012-04-05 03:23:09 +02:00
ffmpeg -i "$if" \
-threads 4 \
-f webm \
-acodec libvorbis \
-ab 96k \
-vcodec libvpx \
-deinterlace \
-b:v 400k \
-pass 2 \
-passlogfile "$of.ffmpeg2pass" \
-y \
"$of" || exit 1