36 lines
632 B
Bash
Executable File
36 lines
632 B
Bash
Executable File
#!/bin/sh
|
|
|
|
if=$1
|
|
of=`basename "$1"|sed -e 's/.avi/.webm/'`
|
|
|
|
if [ ! -f "$of.ffmpeg2pass" ]; then
|
|
schedtool -De \
|
|
~/ffmpeg/ffmpeg -i "$if" \
|
|
-threads 4 \
|
|
-f webm \
|
|
-an \
|
|
-vcodec libvpx \
|
|
-b 400k \
|
|
-bt 400k \
|
|
-s 720x405 \
|
|
-pass 1 \
|
|
-passlogfile "$of.ffmpeg2pass" \
|
|
-y \
|
|
/dev/null || exit 1
|
|
fi
|
|
schedtool -De \
|
|
~/ffmpeg/ffmpeg -i "$if" \
|
|
-threads 4 \
|
|
-f webm \
|
|
-acodec libvorbis \
|
|
-ab 160k \
|
|
-vcodec libvpx \
|
|
-b 400k \
|
|
-bt 400k \
|
|
-s 720x405 \
|
|
-pass 2 \
|
|
-passlogfile "$of.ffmpeg2pass" \
|
|
-y \
|
|
"$of" || exit 1
|
|
|