diff options
author | Jonas Smedegaard <dr@jones.dk> | 2014-10-01 17:09:25 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2014-10-01 17:29:14 +0200 |
commit | 55129b7d12f79b3e7a7cf77c4e4135cc2c2f4d33 (patch) | |
tree | 6804f610bd7909bc00d79f407324e4bf460f1db8 /localvideowebencode | |
parent | c48c9cfc683617cc41f7ddeb69f60a8cf57e624d (diff) |
Apply minrate and maxrate for VP8 and VP9.
Diffstat (limited to 'localvideowebencode')
-rwxr-xr-x | localvideowebencode | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/localvideowebencode b/localvideowebencode index 7d6eaee..b60deb5 100755 --- a/localvideowebencode +++ b/localvideowebencode @@ -370,10 +370,10 @@ _melt_sample="$infile_first ${sample:+in=${samplestart:-0} out=$((${samplestart: _melt_video="progressive=1${framerate:+ frame_rate_num="$framerate_num" frame_rate_den="$framerate_den"}${size:+ s=${width:+$width}x${height:+$height}}${aspect:+ aspect=$aspect}" _melt_ogg="$_melt_video f=ogg vcodec=libtheora${bitrate:+ vb=$bitrate} qscale=$qscale_theora" _melt_h264="$_melt_video f=mp4 vcodec=libx264 vpreset=$speedpreset_h264 vprofile=baseline${x264tune:+ tune=$x264tune} threads=0 movflags=+faststart crf=$crf_h264" -_melt_webm="$_melt_video f=webm vcodec=libvpx vpreset=libvpx-$webmpreset${bitrate_vp8:+ vb=$bitrate_vp8} crf=$crf_vp8 cpu-used=$cpu_vp8" +_melt_webm="$_melt_video f=webm vcodec=libvpx vpreset=libvpx-$webmpreset${bitrate_vp8:+ vb=$bitrate_vp8 minrate=$((bitrate_vp8/20)) maxrate=$((bitrate_vp8*12))} crf=$crf_vp8 cpu-used=$cpu_vp8" _melt_img="$_melt_video f=image2" # CRF ignored with libvpx 1.3 -_melt_vp9="$_melt_video f=webm vcodec=libvpx-vp9 vpreset=libvpx-$webmpreset${bitrate_vp9:+ vb=$bitrate_vp9} crf=$crf_vp9 cpu-used=$cpu_vp9" +_melt_vp9="$_melt_video f=webm vcodec=libvpx-vp9 vpreset=libvpx-$webmpreset${bitrate_vp9:+ vb=$bitrate_vp9 minrate=$((bitrate_vp9/20)) maxrate=$((bitrate_vp9*12))} crf=$crf_vp9 cpu-used=$cpu_vp9" _melt_audio="${channels:+ac=$channels}" # limit (i.e. avoid peaks "clipping") _melt_postfilters_audio="${limit:+-filter ladspa.1077}" @@ -382,8 +382,8 @@ _melt_opus="$_melt_audio acodec=libopus${channels:+ ab=$(($channels*$bitrate_opu _melt_aac="$_melt_audio acodec=aac${channels:+ ab=$(($channels*$bitrate_aac))k}" avconv="avconv -threads auto -y -v warning" -_avconv_vp8="-c:v libvpx -pre:v libvpx-$webmpreset${bitrate_vp8:+ -b:v $bitrate_vp8} -crf $crf_vp8 -cpu-used $cpu_vp8" -_avconv_vp9="-c:v libvpx-vp9 -pre:v libvpx-$webmpreset${bitrate_vp9:+ -b:v $bitrate_vp9} -crf $crf_vp9 -cpu-used $cpu_vp9" +_avconv_vp8="-c:v libvpx -pre:v libvpx-$webmpreset${bitrate_vp8:+ -b:v $bitrate_vp8 -minrate $((bitrate_vp8/20)) -maxrate $((bitrate_vp8*12))} -crf $crf_vp8 -cpu-used $cpu_vp8" +_avconv_vp9="-c:v libvpx-vp9 -pre:v libvpx-$webmpreset${bitrate_vp9:+ -b:v $bitrate_vp9 -minrate $((bitrate_vp9/20)) -maxrate $((bitrate_vp9*12))} -crf $crf_vp9 -cpu-used $cpu_vp9" # resolve EBU R128 audio normalizing if [ -n "$loudness" ] && [ -z "$_melt_loudness" ]; then |