diff options
-rwxr-xr-x | localvideowebencode | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/localvideowebencode b/localvideowebencode index ca1dc6a..e31ae33 100755 --- a/localvideowebencode +++ b/localvideowebencode @@ -305,11 +305,10 @@ if [ -n "$_pixels" ] && [ $_pixels -ge $((1024*768)) ]; then fi bitrate="$bitrate_fixed" -# compute average bitrate from reference bits-per-pixel and "power of .75" -if [ -n "$_pixels" ] && [ -n "$_frames" ]; then - bitrate="${bitrate_fixed:-$(perl \ - -E "say int( +(($_pixels/(640*360))**0.75" \ - -E "*640*360*$_frames*${refbpp:-$refbpp_default}) )")}" +# compute average bitrate from reference data and "power of .75" rule +if [ -z "$bitrate" ] && [ -n "$_pixels" ] && [ -n "$_frames" ]; then + bitrate=$(perl -E '$refsize=640*360;' \ + -E "say int( +(($_pixels/\$refsize)**0.75*\$refsize*$_frames*$refbpp) )") fi # default per-codec-channel bitrates |