smooth-dl.py: use more specific exception when looking for the Clip element
[smooth-dl.git] / scripts / reencode_mencoder.sh
1 #!/bin/sh
2 set -x
3
4 INPUT_FILE='ffout.mkv'
5 OUTPUT_FILE='out.avi'
6
7 # The inverse of what "smooth-dl -s" tells us
8 AV_DELAY="-0.441333"
9
10 VIDEO_BITRATE="1600"
11 AUDIO_BITRATE="192"
12
13 OPTIONS="-noskip -vf harddup"
14 AV_SYNC="-audio-delay $AV_DELAY"
15
16 mencoder $INPUT_FILE -o /dev/null $AV_SYNC -ovc x264 \
17 -x264encopts pass=1:bitrate=${VIDEO_BITRATE}:bframes=1:\
18 me=umh:partitions=all:trellis=1:qp_step=4:qcomp=0.7:direct_pred=auto:keyint=300:threads=auto \
19 ${OPTIONS} \
20 -oac mp3lame -lameopts cbr:preset=$AUDIO_BITRATE -channels 2 -srate 48000
21 # faac still gives some problems with open video editors
22 #-oac faac -faacopts br=${AUDIO_BITRATE}:mpeg=4:object=2 -channels 2 -srate 48000
23
24 mencoder $INPUT_FILE -o $OUTPUT_FILE $AV_SYNC -ovc x264 \
25 -x264encopts pass=2:bitrate=${VIDEO_BITRATE}:frameref=5:bframes=1:\
26 me=umh:partitions=all:trellis=1:qp_step=4:qcomp=0.7:direct_pred=auto:keyint=300:threads=auto \
27 ${OPTIONS} \
28 -oac mp3lame -lameopts cbr:preset=$AUDIO_BITRATE -channels 2 -srate 48000
29 # faac still gives some problems with open video editors
30 #-oac faac -faacopts br=${AUDIO_BITRATE}:mpeg=4:object=2 -channels 2 -srate 48000