c3d2-web/scripts/encode_mp4.sh

25 lines
348 B
Bash
Raw Normal View History

#!/bin/sh -e
if=$1
of=$2
# No. CPU cores:
threads=8
# Video bitrate:
vb=400k
# Audio bitrate:
2013-10-08 01:06:02 +02:00
ab=128k
ffmpeg -i "$if" \
2012-04-05 03:23:09 +02:00
-f mp4 \
-acodec libfaac \
-ab $ab \
-threads $threads \
2012-04-05 03:23:09 +02:00
-vcodec libx264 \
-b:v $vb \
-profile:v baseline -level 3.0 \
-movflags +faststart \
2012-04-05 03:23:09 +02:00
-passlogfile "$of.ffmpeg2pass" \
-y "$of"