diff options
Diffstat (limited to 'bin/stream')
-rwxr-xr-x | bin/stream | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -77,7 +77,9 @@ VSTREAMINDEX=1 FIRSTPORT=${FIRSTPORT:-5002} # even number - next 7 ports used too ACHANNELS=1 -AFRAMERATE=24000 +AFRAMERATE_SRC=24000 +AFRAMERATE_OPUS=24000 +AFRAMERATE_AAC=44100 ABITRATE=16000 # FIXME: support multiple heights @@ -153,7 +155,7 @@ tee_rtp() { stream=$1; pt=$2; port=$3; # * Predictive GOP size preserving scene-change GOP based on https://superuser.com/a/1098329 # * Use same RTP payload types as GStreamer ffmpeg -hide_banner -threads auto \ - ${ALSA:+-f alsa -sample_rate "$AFRAMERATE" -channels "$ACHANNELS" -thread_queue_size 2048 -i "$ALSA"} \ + ${ALSA:+-f alsa -sample_rate "$AFRAMERATE_SRC" -channels "$ACHANNELS" -thread_queue_size 2048 -i "$ALSA"} \ ${DVCAM:+-f iec61883 -thread_queue_size 64 -i $DVCAM} \ ${XFILE:+-re${SEEK:+ -ss $SEEK} -i "$XFILE"} \ ${IIDC:+-f libdc1394 -video_size 640x480 -framerate 15 -thread_queue_size 256 -i "$IIDC"} \ @@ -170,7 +172,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" -b:a "$ABITRATE" } \ + -codec:a libopus -ac "$ACHANNELS" -ar "$AFRAMERATE_OPUS" -b:a "$ABITRATE" } \ ${HASVIDEO:+\ -pix_fmt yuv420p \ -codec:v vp8 -quality realtime -deadline 1000000 -cpu-used 15 \ @@ -186,7 +188,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 44100 -b:a $((ACHANNELS*64))k } \ + -codec:a aac -strict experimental -ac "$ACHANNELS" -ar "$AFRAMERATE_AAC" -b:a $((ACHANNELS*64))k } \ ${HASVIDEO:+\ -pix_fmt yuv420p \ -codec:v libx264 -tune zerolatency -preset ultrafast \ |