summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2014-09-24 18:24:32 +0200
committerJonas Smedegaard <dr@jones.dk>2014-09-24 18:24:32 +0200
commitb2ebea15c95291f89b65575d99337f4a707ff3b9 (patch)
treeea972ed9709484b7812d7c7d5388b849b68b7ced
parent790dc24601d0e432817476b90b6bbd4032ed3df8 (diff)
Fix avoid melt presets a.k.a. properties: Wrongly applies options only for certain bitrates/sizes.
-rwxr-xr-xlocalvideowebencode6
1 files changed, 3 insertions, 3 deletions
diff --git a/localvideowebencode b/localvideowebencode
index 049eff8..4bfe4e7 100755
--- a/localvideowebencode
+++ b/localvideowebencode
@@ -339,7 +339,7 @@ melt="melt -progress"
_melt_in="${_melt_in:+$_melt_in }${sample:+in=${samplestart:-0} out=$((${samplestart:-0} + samplelength))}"
_melt_video="progressive=1${framerate:+ frame_rate_den="$framerate_den" frame_rate_num="$framerate_num"}${bitrate:+ vb=$bitrate}${size:+ s=${width:+$width}x${height:+$height}}${aspect:+ aspect=$aspect}"
_melt_ogg="$_melt_video f=ogg vcodec=libtheora${bitrate_fixed:- qscale=5}"
-_melt_h264="$_melt_video properties=x264-medium-baseline${x264tune:+ tune=$x264tune}${bitrate_fixed:- crf=23}"
+_melt_h264="$_melt_video threads=0 movflags=+faststart vpre=baseline${x264tune:+ tune=$x264tune}${bitrate_fixed:- crf=23}"
_melt_webm="$_melt_video vpre=libvpx-$webmpreset${bitrate_fixed:- crf=10}"
_melt_audio="${channels:+ac=$channels}"
# limit (i.e. avoid peaks "clipping")
@@ -359,7 +359,7 @@ if [ -n "$ogg" ]; then
fi
if [ -n "$mp4" ]; then
- [ -z "$bitrate_fixed" ] || $melt -group $_melt_in $infiles -group $filters -consumer avformat:/dev/null properties=x264-medium-pass1 $_melt_h264 $_melt_out
+ [ -z "$bitrate_fixed" ] || $melt -group $_melt_in $infiles -group $filters -consumer avformat:/dev/null pass=1 fastfirstpass=1 an=1 audio_off=1 $_melt_h264 $_melt_out
$melt -group $_melt_in $infiles -group ${channels:+$audioprefilters${_melt_loudness:+ -filter loudness results="$_melt_loudness"}} $filters${channels:+ $_melt_postfilters_audio} -consumer avformat:"$stem.mp4" ${bitrate_fixed:+pass=2} $_melt_h264 $_melt_aac $_melt_out
if [ -z "$melt_recent" ]; then
mv "$stem.mp4" "$stem.mp4"~
@@ -370,7 +370,7 @@ fi
if [ -n "$webm" ]; then
# TODO: use two-pass when supported by melt
- $melt -group $_melt_in $infiles -group ${channels:+$audioprefilters${_melt_loudness:+ -filter loudness results="$_melt_loudness"}} $filters${channels:+ $_melt_postfilters_audio} -consumer avformat:"$stem.webm" properties=webm $_melt_webm $_melt_vorbis $_melt_out
+ $melt -group $_melt_in $infiles -group ${channels:+$audioprefilters${_melt_loudness:+ -filter loudness results="$_melt_loudness"}} $filters${channels:+ $_melt_postfilters_audio} -consumer avformat:"$stem.webm" $_melt_webm $_melt_vorbis $_melt_out
fi
# cleanup audio normalize hinting