From bb77af71ff8174dba4c3b401492d95a3f4b7ef44 Mon Sep 17 00:00:00 2001 From: uvjustin <46082645+uvjustin@users.noreply.github.com> Date: Tue, 6 Sep 2022 13:30:55 +0800 Subject: [PATCH] Use fragmented mp4 in stream recorder (#77822) --- homeassistant/components/stream/recorder.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/stream/recorder.py b/homeassistant/components/stream/recorder.py index 3bda8acfa7b..3910a2d2fed 100644 --- a/homeassistant/components/stream/recorder.py +++ b/homeassistant/components/stream/recorder.py @@ -104,7 +104,11 @@ class RecorderOutput(StreamOutput): "w", format=RECORDER_CONTAINER_FORMAT, container_options={ - "video_track_timescale": str(int(1 / source_v.time_base)) + "video_track_timescale": str(int(1 / source_v.time_base)), + "movflags": "frag_keyframe", + "min_frag_duration": str( + self.stream_settings.min_segment_duration + ), }, )