diff options
author | Jonas Smedegaard <dr@jones.dk> | 2017-05-16 14:11:52 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2017-05-16 14:12:24 +0200 |
commit | 5919275dde112187c5aeedeb7b4a76de8a7eb3dd (patch) | |
tree | ff0ab343c2ea65adfd5bb585ae2d6f09e6349e49 /bin/loop+encode+stream | |
parent | 3fe329a251c3b2dae13d3cc9663da231f5f49db4 (diff) |
Introduce variables SPEED_VPX SPEED_H264.
Diffstat (limited to 'bin/loop+encode+stream')
-rwxr-xr-x | bin/loop+encode+stream | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/loop+encode+stream b/bin/loop+encode+stream index b767dca..3e5e7d7 100755 --- a/bin/loop+encode+stream +++ b/bin/loop+encode+stream @@ -22,6 +22,8 @@ ABITRATE_OPUS=32000 # TODO HEIGHT=360 +SPEED_VPX=15 + # inspired by Apple HLS recommendations if [ $HEIGHT -le 234 ]; then VBITRATE=145000; elif [ $HEIGHT -le 270 ]; then VBITRATE=365000; @@ -41,7 +43,7 @@ ffmpeg -hide_banner -threads auto -re \ -f rtp -payload_type 111 "rtp://$IP:$FIRSTPORT?pkt_size=1200" \ -map '0:v' \ -pix_fmt yuv420p \ - -codec:v vp8 -quality realtime -deadline 1000000 -cpu-used 15 \ + -codec:v vp8 -quality realtime -deadline 1000000 -cpu-used "$SPEED_VPX" \ -b:v "$VBITRATE" -minrate "$VBITRATE" -maxrate "$VBITRATE" \ -undershoot-pct 95 -bufsize $((6000*VBITRATE/1000)) -rc_init_occupancy $((4000*VBITRATE/1000)) \ -max-intra-rate 0 \ |