2010-11-10 01:58:38 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
2012-04-05 03:23:09 +02:00
|
|
|
|
2010-11-10 01:58:38 +01:00
|
|
|
if=$1
|
2011-10-06 23:22:34 +02:00
|
|
|
of=`basename "$1"`".webm"
|
2010-11-10 01:58:38 +01:00
|
|
|
|
2012-04-05 03:23:09 +02:00
|
|
|
if [ ! -f "$of.ffmpeg2pass-0.log" ]; then
|
2010-11-10 01:58:38 +01:00
|
|
|
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
|
2010-11-10 01:58:38 +01:00
|
|
|
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
|
2010-11-10 01:58:38 +01:00
|
|
|
|