summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2017-04-28 10:31:41 +0200
committerJonas Smedegaard <dr@jones.dk>2017-04-28 10:31:41 +0200
commit99e0ed8db8ffd97586fbb2c99948bd17d4d2b7f8 (patch)
treee2753e5765b83ba50188027ae89e038e62d9300a
parente41c71324edee6e068a10fe0fc3d179d661a7270 (diff)
Save clock-aligned 10-minute segments.
-rwxr-xr-xbin/stream4
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/stream b/bin/stream
index afb0de5..ca5045a 100755
--- a/bin/stream
+++ b/bin/stream
@@ -96,7 +96,9 @@ 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:$SAVESTEM.mkv"} \
+ -f segment -segment_format matroska -segment_format_options live=1:reserve_index_space=512kB \
+ -segment_list "$SAVESTEM.ffconcat" -segment_list_flags live \
+ -segment_time 600 -segment_atclocktime 1 -strftime 1 "$SAVESTEM-%H%M.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"} \