mirror of
https://github.com/home-assistant/core.git
synced 2025-07-20 03:37:07 +00:00
use the input stream codec as the template for the output streams (#22747)
This commit is contained in:
parent
a75b151dfa
commit
8c657d4254
@ -29,11 +29,7 @@ def create_stream_buffer(stream_output, video_stream, audio_frame):
|
||||
segment = io.BytesIO()
|
||||
output = av.open(
|
||||
segment, mode='w', format=stream_output.format)
|
||||
vstream = output.add_stream(
|
||||
stream_output.video_codec, video_stream.rate)
|
||||
# Fix format
|
||||
vstream.codec_context.format = \
|
||||
video_stream.codec_context.format
|
||||
vstream = output.add_stream(template=video_stream)
|
||||
# Check if audio is requested
|
||||
astream = None
|
||||
if stream_output.audio_codec:
|
||||
|
Loading…
x
Reference in New Issue
Block a user