summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2017-06-07 17:23:17 +0200
committerJonas Smedegaard <dr@jones.dk>2017-06-07 17:23:17 +0200
commit27f594d476c87de4ef164e71b8d6672c118737e1 (patch)
treef5399bc822c41716128101613a6bfa178c96b184 /bin
parent6da10629d8910a1434aee620fc7fd9e8dc0a2a50 (diff)
Adjust lowest bitrates, and add math.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/stream10
1 files changed, 5 insertions, 5 deletions
diff --git a/bin/stream b/bin/stream
index 34e274b..6a1e31b 100755
--- a/bin/stream
+++ b/bin/stream
@@ -135,14 +135,14 @@ BITS=$(videosize "$HEIGHT" "$RATIO")
# + bits rounded up to include nearby modulo 16 formats
# * Recommended sizes (highest modulo 16 or 8 (or 4) size not "pumping"
# in bridge scene 20s into Tears of Steel):
-# + 4:3: (105 210) 288 312 384 480 624 816
-# + 16:9: (72 180) 216 288 360 432 576 720
-# + 2.40:1: (60 160) 200 240 320 360 480 600
+# + 4:3: (96 216) 288 312 384 480 624 816
+# + 16:9: (72 160) 216 288 360 432 576 720
+# + 2.40:1: (80 160) 200 240 320 360 480 600
# resolved using http://aarmstrong.org/content/aspect_ratio_calc.php
# with ratio as modulo 4 integers, and size a multiplum of that
# * speeds tuned to just below 100% cpu usage for each combination on a multi-core computer
# TODO: Externalize speeds to site-specific configfile
-if [ $BITS -le 15360 ]; then # 192x80 → 15360
+if [ $BITS -le 15360 ]; then # 4:3'96→16²*8*6=12288, 16:9'72→8²*16*9=9216, 2.40:1'80→16*12*5=15360
AFRAMERATE_AAC=22050
ABITRATE_OPUS=16000
ABITRATE_AAC=32000
@@ -150,7 +150,7 @@ if [ $BITS -le 15360 ]; then # 192x80 → 15360
VBITRATE=32000
SPEED_X264=fast; SPEED_X264_ALONE=fast
SPEED_VP8=3; SPEED_VP8_ALONE=2
-elif [ $BITS -le 61440 ]; then # 384x160 → 61440
+elif [ $BITS -le 62208 ]; then # 4:3'216→8²*27*36=62208, 16:9'160→16²*24*10=61440
AFRAMERATE_AAC=22050
ABITRATE_OPUS=16000
ABITRATE_AAC=32000