From 9b29d09d45a4b4759d8f8ad70d37117bf561c5d4 Mon Sep 17 00:00:00 2001 From: uvjustin <46082645+uvjustin@users.noreply.github.com> Date: Sat, 12 Sep 2020 02:07:45 +0800 Subject: [PATCH] Set output timescale to input timescale (#39946) --- homeassistant/components/stream/worker.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/stream/worker.py b/homeassistant/components/stream/worker.py index 0e861c5cefc..b76896b815a 100644 --- a/homeassistant/components/stream/worker.py +++ b/homeassistant/components/stream/worker.py @@ -25,7 +25,10 @@ def create_stream_buffer(stream_output, video_stream, audio_stream, sequence): segment, mode="w", format=stream_output.format, - container_options=container_options, + container_options={ + "video_track_timescale": str(int(1 / video_stream.time_base)), + **container_options, + }, ) vstream = output.add_stream(template=video_stream) # Check if audio is requested