Skip to content

RTP pkt_size more than 1200 #120

@a-wing

Description

@a-wing

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions