Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RTP pkt_size more than 1200 #120

Closed
a-wing opened this issue May 8, 2024 · 0 comments
Closed

RTP pkt_size more than 1200 #120

a-wing opened this issue May 8, 2024 · 0 comments
Labels
enhancement New feature or request mod::whipinto whipinto
Milestone

Comments

@a-wing
Copy link
Member

a-wing commented May 8, 2024

WebRTC Build-in RTP must less 1200, But most application max send packet size mare than 1200

So, For example ffmpeg, We need set pkt_size=1200

ffmpeg -re -f lavfi -i testsrc=size=640x480:rate=30 -vcodec libvpx -f rtp 'rtp://127.0.0.1:5003?pkt_size=1200'

This is an arbitrarily selected value to avoid packet fragmentation.
There is no any exact science behind this as you can be never sure on
the actual limits, however 1200 byte is a safe value for all kind of
networks on the public internet (including something like a double VPN
connection over PPPoE) and for RTP there is no much reason to choose a
bigger value.

https://groups.google.com/g/discuss-webrtc/c/gH5ysR3SoZI
https://stackoverflow.com/questions/47635545/why-webrtc-chose-rtp-max-packet-size-to-1200-bytes/47650260#47650260


RTSP Default value is 1472

ffmpeg -re -f lavfi -i testsrc=size=640x480:rate=30 -vcodec libvpx -f rtsp -pkt_size 1200 'rtsp://[::1]:8554/live/xxx'

pkt_size

Set max send packet size (in bytes). Default value is 1472. 

https://ffmpeg.org/ffmpeg-protocols.html#rtsp

@a-wing a-wing added enhancement New feature or request mod::whipinto whipinto labels May 8, 2024
a-wing added a commit that referenced this issue May 14, 2024
@a-wing a-wing mentioned this issue Jun 3, 2024
16 tasks
@a-wing a-wing added this to the 0.6.0 milestone Jun 7, 2024
@a-wing a-wing closed this as completed Oct 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request mod::whipinto whipinto
Projects
None yet
Development

No branches or pull requests

1 participant