diff options
Diffstat (limited to 'bin/stream')
-rwxr-xr-x | bin/stream | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -77,11 +77,13 @@ ABITRATE=32000 HEIGHT=360 VBITRATE=256000 +SAVESTEM="$SAVEDIR/$(date +%Y%m%d-%H%M%S)" +${SAVEDIR:+export FFREPORT=file="$SAVESTEM.log"} + # based on http://www.webmproject.org/docs/encoder-parameters/#real-time-cbr-encoding-and-streaming # + scale+watermark trick based on http://stackoverflow.com/a/10937357 # + Add 1s latency (deadline) # + Use same RTP payload types as GStreamer -${SAVEDIR:+export FFREPORT=file="$SAVEDIR/%t.log"} ffmpeg -hide_banner -threads auto -re \ ${ALSA:+-f alsa -sample_rate "$AFRAMERATE" -channels "$ACHANNELS" -thread_queue_size 1024 -i "$ALSA"} \ ${DVCAM:+-f iec61883 -i $DVCAM} \ @@ -94,7 +96,7 @@ ffmpeg -hide_banner -threads auto -re \ [bg][$((VSTREAMINDEX+1)):v]overlay=main_w-overlay_w-20:main_h-overlay_h-20[v]}}"} \ ${SAVEDIR:+-map '0:' ${TWOSOURCES:+-map '1:'} \ -codec copy \ - -f matroska "file:$SAVEDIR/$(date +%Y%m%d-%H%M%S).mkv"} \ + -f matroska "file:$SAVESTEM.mkv"} \ ${MAYBEAUDIO:+-map '0:a' \ -codec:a libopus -ac "$ACHANNELS" -ar "$AFRAMERATE" -b:a "$ABITRATE" \ -f rtp -payload_type 111 "rtp://$IP:$FIRSTPORT?pkt_size=1200"} \ |