Try to fix UDP stream

This commit is contained in:
henryruhs
2025-05-28 22:09:01 +02:00
parent 00047858a8
commit a02df0be7e
2 changed files with 5 additions and 0 deletions

View File

@@ -56,6 +56,10 @@ def set_stream_mode(stream_mode : StreamMode) -> Commands:
return []
def set_stream_quality(stream_quality : int) -> Commands:
return [ '-b:v', str(stream_quality) + 'k' ]
def unsafe_concat() -> Commands:
return [ '-f', 'concat', '-safe', '0' ]

View File

@@ -173,6 +173,7 @@ def open_stream(stream_mode : StreamMode, stream_resolution : str, stream_fps :
if stream_mode == 'udp':
commands.extend(ffmpeg_builder.set_input('-'))
commands.extend(ffmpeg_builder.set_stream_mode('udp'))
commands.extend(ffmpeg_builder.set_stream_quality(2000)),
commands.extend(ffmpeg_builder.set_output('udp://localhost:27000?pkt_size=1316'))
if stream_mode == 'v4l2':