diff options
author | Jonas Smedegaard <dr@jones.dk> | 2017-05-16 13:59:07 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2017-05-16 13:59:07 +0200 |
commit | 3fe329a251c3b2dae13d3cc9663da231f5f49db4 (patch) | |
tree | 6f2963d88b746afd1a5d840394fecb6fb87cc648 /bin | |
parent | 8dcd0a663d409ae42d5ae2fb9f73a8c29f46a2d3 (diff) |
Rename and split variable ABITRATE → ABITRATE_OPUS ABITRATE_AAC.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/loop+encode+stream | 4 | ||||
-rwxr-xr-x | bin/stream | 7 |
2 files changed, 6 insertions, 5 deletions
diff --git a/bin/loop+encode+stream b/bin/loop+encode+stream index fc944fe..b767dca 100755 --- a/bin/loop+encode+stream +++ b/bin/loop+encode+stream @@ -17,7 +17,7 @@ FIRSTPORT=${2:-5002} # even number - next 3 ports used too ACHANNELS=2 AFRAMERATE_OPUS=48000 -ABITRATE=32000 +ABITRATE_OPUS=32000 # TODO HEIGHT=360 @@ -37,7 +37,7 @@ fi ffmpeg -hide_banner -threads auto -re \ -stream_loop -1 -i "$INPUT" \ -map '0:a' \ - -codec:a libopus -ac "$ACHANNELS" -ar "$AFRAMERATE_OPUS" -b:a "$ABITRATE" \ + -codec:a libopus -ac "$ACHANNELS" -ar "$AFRAMERATE_OPUS" -b:a "$ABITRATE_OPUS" \ -f rtp -payload_type 111 "rtp://$IP:$FIRSTPORT?pkt_size=1200" \ -map '0:v' \ -pix_fmt yuv420p \ @@ -80,7 +80,8 @@ ACHANNELS=1 AFRAMERATE_SRC=24000 AFRAMERATE_OPUS=24000 AFRAMERATE_AAC=44100 -ABITRATE=16000 +ABITRATE_OPUS=16000 +ABITRATE_AAC=64000 # FIXME: support multiple heights HEIGHT=234 @@ -172,7 +173,7 @@ ffmpeg -hide_banner -threads auto \ ${HEIGHTS_WEBM:+\ ${HASAUDIO:+-map '0:a' }${HASVIDEO:+$(printf_each ' -map [v%swebm]' "$HEIGHTS_WEBM") } -shortest \ ${HASAUDIO:+\ - -codec:a libopus -ac "$ACHANNELS" -ar "$AFRAMERATE_OPUS" -b:a "$ABITRATE" } \ + -codec:a libopus -ac "$ACHANNELS" -ar "$AFRAMERATE_OPUS" -b:a "$ABITRATE_OPUS" } \ ${HASVIDEO:+\ -pix_fmt yuv420p \ -codec:v vp8 -quality realtime -deadline 1000000 -cpu-used 15 \ @@ -188,7 +189,7 @@ ffmpeg -hide_banner -threads auto \ ${HEIGHTS_MPEG:+\ ${HASAUDIO:+-map '0:a' }${HASVIDEO:+$(printf_each ' -map [v%smpeg]' "$HEIGHTS_MPEG") } -shortest \ ${HASAUDIO:+\ - -codec:a aac -strict experimental -ac "$ACHANNELS" -ar "$AFRAMERATE_AAC" -b:a $((ACHANNELS*64))k } \ + -codec:a aac -strict experimental -ac "$ACHANNELS" -ar "$AFRAMERATE_AAC" -b:a $((ACHANNELS*ABITRATE_AAC)) } \ ${HASVIDEO:+\ -pix_fmt yuv420p \ -codec:v libx264 -tune zerolatency -preset ultrafast \ |