c3d2-web/scripts/encode_mp4.sh

28 lines
403 B
Bash
Raw Normal View History

#!/bin/sh -e
if=$1
of=$2
# No. CPU cores:
threads=4
# Video bitrate:
2014-10-07 01:39:08 +02:00
vb=400k
# Audio bitrate:
2014-10-07 01:39:08 +02:00
ab=96k
ffmpeg -i "$if" \
2012-04-05 03:23:09 +02:00
-f mp4 \
-acodec libfaac \
-ab $ab \
2014-10-07 01:39:08 +02:00
-ac 1 \
-threads $threads \
2014-10-07 01:39:08 +02:00
-vf hqdn3d=0:0:16:14 \
2012-04-05 03:23:09 +02:00
-vcodec libx264 \
-b:v $vb \
2014-10-07 01:39:08 +02:00
-s 720x404 \
-profile:v baseline -level 3.0 \
-movflags +faststart \
2012-04-05 03:23:09 +02:00
-passlogfile "$of.ffmpeg2pass" \
-y "$of"