c3d2-web/scripts/encode_webm.sh

35 lines
565 B
Bash
Executable File

#!/bin/sh
if=$1
of=`basename "$1"`".webm"
if [ ! -f "$of.ffmpeg2pass-0.log" ]; then
schedtool -De \
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 \
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