diff options
author | Jonas Smedegaard <dr@jones.dk> | 2017-04-24 08:44:33 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2017-04-24 08:44:33 +0200 |
commit | 2015793e894a829ba072d233cbaa8114d2968e06 (patch) | |
tree | 1443340a27236baf11f6ed49201a2e80971278db | |
parent | a1d6c2de4ce464374f9e2e8dc331e8786a2e9e32 (diff) |
Add variable AFRAMERATE.
-rwxr-xr-x | bin/decode+edit+encode+stream | 3 | ||||
-rwxr-xr-x | bin/loop+encode+stream | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/bin/decode+edit+encode+stream b/bin/decode+edit+encode+stream index a3be9a9..04a733c 100755 --- a/bin/decode+edit+encode+stream +++ b/bin/decode+edit+encode+stream @@ -14,6 +14,7 @@ fi FIRSTPORT=${2:-5002} # even number - next 3 ports used too +AFRAMERATE=48000 ABITRATE=32000 HEIGHT=360 @@ -29,7 +30,7 @@ ffmpeg -threads auto -re \ -vf \ "[0:v]scale=-1:$HEIGHT[bg]; [bg][1:v]overlay=main_w-overlay_w-20:main_h-overlay_h-20" \ - -codec:a libopus -ac 2 -b:a "$ABITRATE" -ar 48000 \ + -codec:a libopus -ac 2 -b:a "$ABITRATE" -ar "$AFRAMERATE" \ -vn \ -f rtp -payload_type 111 "rtp://$IP:$FIRSTPORT?pkt_size=1200" \ -an \ diff --git a/bin/loop+encode+stream b/bin/loop+encode+stream index 7c1ab79..100b6c1 100755 --- a/bin/loop+encode+stream +++ b/bin/loop+encode+stream @@ -15,6 +15,7 @@ fi FIRSTPORT=${2:-5002} # even number - next 3 ports used too +AFRAMERATE=48000 ABITRATE=32000 VBITRATE=256000 @@ -24,7 +25,7 @@ VBITRATE=256000 # + Use same RTP payload types as GStreamer ffmpeg -threads auto -re \ -stream_loop -1 -i "$INPUT" \ - -codec:a libopus -ac 2 -b:a "$ABITRATE" -ar 48000 \ + -codec:a libopus -ac 2 -b:a "$ABITRATE" -ar "$AFRAMERATE" \ -vn \ -f rtp -payload_type 111 "rtp://$IP:$FIRSTPORT?pkt_size=1200" \ -an \ |