Try to fix UDP stream
This commit is contained in:
@@ -56,6 +56,10 @@ def set_stream_mode(stream_mode : StreamMode) -> Commands:
|
|||||||
return []
|
return []
|
||||||
|
|
||||||
|
|
||||||
|
def set_stream_quality(stream_quality : int) -> Commands:
|
||||||
|
return [ '-b:v', str(stream_quality) + 'k' ]
|
||||||
|
|
||||||
|
|
||||||
def unsafe_concat() -> Commands:
|
def unsafe_concat() -> Commands:
|
||||||
return [ '-f', 'concat', '-safe', '0' ]
|
return [ '-f', 'concat', '-safe', '0' ]
|
||||||
|
|
||||||
|
|||||||
@@ -173,6 +173,7 @@ def open_stream(stream_mode : StreamMode, stream_resolution : str, stream_fps :
|
|||||||
if stream_mode == 'udp':
|
if stream_mode == 'udp':
|
||||||
commands.extend(ffmpeg_builder.set_input('-'))
|
commands.extend(ffmpeg_builder.set_input('-'))
|
||||||
commands.extend(ffmpeg_builder.set_stream_mode('udp'))
|
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'))
|
commands.extend(ffmpeg_builder.set_output('udp://localhost:27000?pkt_size=1316'))
|
||||||
|
|
||||||
if stream_mode == 'v4l2':
|
if stream_mode == 'v4l2':
|
||||||
|
|||||||
Reference in New Issue
Block a user