Changing MTU for sout through Python bindings python-vlc
Posted: 03 Nov 2020 08:53
Hi all,
First of all thanks for that awesome library and your support. I am trying to create a stream out limiting the MTU, but I can't achieve the goal.
If I use this sentence through CMD the package are clipped to 1370 as expected (variable mtu is set to 1370):
In my code, in python, I use the following:
Thanks in advance
First of all thanks for that awesome library and your support. I am trying to create a stream out limiting the MTU, but I can't achieve the goal.
If I use this sentence through CMD the package are clipped to 1370 as expected (variable mtu is set to 1370):
with VLC_params: --sout-keep --loopstart %VLC_path%\vlc.exe -vvv %video_path% --mtu="%mtu%" %VLC_Params% :sout=#duplicate{dst=rtp{dst=%ip_dest%,port=%port_dest%},dst=display}"
In my code, in python, I use the following:
For the media creation (this works and streaming starts with destination dst_ip to port dst_port) and for limiting the MTU I tryed with a lot of sentences:self.media = self.vlc_instance.media_new(filename[0], r':sout=#duplicate{dst=rtp{dst=%s,port=%d},dst=display}' % (dst_ip, dst_port))
- self.media.add_option_flag('--mtu=', 1370)
- self.media.add_option_flag('mtu', 1370)
- self.media.add_option_flag('--mtu', 1370)
Thanks in advance