2012-09-09 09:49:14 +02:00
|
|
|
#!/bin/sh -e
|
2010-11-10 01:58:38 +01:00
|
|
|
|
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-09-09 09:49:14 +02:00
|
|
|
# No. CPU cores:
|
|
|
|
threads=2
|
|
|
|
# Video bitrate:
|
|
|
|
vb=400k
|
|
|
|
# Audio bitrate:
|
|
|
|
ab=96k
|
|
|
|
|
|
|
|
ffmpeg -i "$if" \
|
|
|
|
-threads $threads \
|
|
|
|
-f webm \
|
|
|
|
-an \
|
|
|
|
-vcodec libvpx \
|
|
|
|
-b:v $vb \
|
|
|
|
-pass 1 \
|
|
|
|
-passlogfile "$of.ffmpeg2pass" \
|
|
|
|
-y /dev/null
|
|
|
|
ffmpeg -i "$if" \
|
|
|
|
-threads $threads \
|
2012-04-05 03:23:09 +02:00
|
|
|
-f webm \
|
|
|
|
-acodec libvorbis \
|
2012-09-09 09:49:14 +02:00
|
|
|
-ab $ab \
|
2012-04-05 03:23:09 +02:00
|
|
|
-vcodec libvpx \
|
2012-09-09 09:49:14 +02:00
|
|
|
-b:v $vb \
|
2012-04-05 03:23:09 +02:00
|
|
|
-pass 2 \
|
|
|
|
-passlogfile "$of.ffmpeg2pass" \
|
2012-09-09 09:49:14 +02:00
|
|
|
-y "$of"
|
2010-11-10 01:58:38 +01:00
|
|
|
|