Skip to content
This repository was archived by the owner on Oct 24, 2022. It is now read-only.

Conversation

thiblahute
Copy link
Contributor

Higher value might be too big (in particular with many VPNs webrtcsink won't work with the default 1400 MTU).

1200 is the default value in libwebrtc and it is references in several places there.

@thiblahute thiblahute changed the title Fix payloader MTU to 1200 Fix payloaders MTU to 1200 Sep 28, 2022
Higher value might be too big (in particular with many VPNs `webrtcsink`
won't work with the default 1400 MTU).

1200 is the default value in libwebrtc and it is references in several
places there.
@gdesmott
Copy link

Should we open a gst ticket about changing this default then?

@sdroege
Copy link
Contributor

sdroege commented Sep 29, 2022

Generally for RTP the default of 1400 is fine and more optimal, especially if you just transmit it over Ethernet. Changing this default now would potentially cause problems for applications that assume this default.

It would make sense to change this to 1200 in webrtcbin but unfortunately it requires the payloaders outside itself so it doesn't really have control over the MTU. Changing all the webrtcbin examples would be a good idea though.

@MathieuDuponchelle
Copy link
Collaborator

Interesting, what is the reason btw? Do VPNs add "wrapper" data around packets? If so, how do we know 1200 is safer? Also, what do you mean by "won't work"? Shouldn't packets be fragmented and reassembled eventually?

I'm completely OK with the patch by the way, just curious :)

@thiblahute
Copy link
Contributor Author

thiblahute commented Sep 30, 2022

You don't get the packets on the receiving side, in chromium it just does't show anything, with webrtcsrc I can see nooo RTP packets ever arrive. I am not sure why but I read a few places this is expected. 1200 is the commonly accepted value. I didn't find very good information about it but you can read https://stackoverflow.com/questions/47635545/why-webrtc-chose-rtp-max-packet-size-to-1200-bytes for example or https://groups.google.com/g/discuss-webrtc/c/gH5ysR3SoZI

@sdroege
Copy link
Contributor

sdroege commented Oct 1, 2022

While fragmentation works on the IP level, it rarely works over the internet with UDP. And even if it did work, splitting each 1400 byte packet into 1200 and 200 bytes is going to be less efficient than doing this at the payloader level.

@MathieuDuponchelle
Copy link
Collaborator

Thanks for the links / info :) Merging

@MathieuDuponchelle MathieuDuponchelle merged commit c4f771d into centricular:main Oct 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants