bluenviron / mediamtx

Ready-to-use SRT / WebRTC / RTSP / RTMP / LL-HLS media server and media proxy that allows to read, publish, proxy, record and playback video and audio streams.
MIT License
10.88k stars 1.41k forks source link

RTP packet is too big to be read with UDP #3158

Closed Tabarane closed 2 months ago

Tabarane commented 3 months ago

Which version are you using?

v16.0.0

Which operating system are you using?

Describe the issue

Trying to get video feed from camera with proxy and get the error

2022/09/15 23:06:42 WAR [path glass] [rtsp source] RTP packet is too big to be read with UDP
2022/09/15 23:06:42 WAR [path glass] [rtsp source] RTP packet is too big to be read with UDP
2022/09/15 23:06:42 WAR [path glass] [rtsp source] 66 RTP packet(s) lost
2022/09/15 23:06:42 WAR [path glass] [rtsp source] RTP packet is too big to be read with UDP

Describe how to replicate the issue

  1. start the server
  2. publish with ...
  3. read with vlc

Did you attach the server logs?

no

Did you attach a network dump?

no

yelodevopsi commented 2 months ago

Just a longshot since I just read this thread..

aler9 commented 2 months ago

Hello, as clearly mentioned in the error, the server explicitly discards RTP packets that are bigger than the UDP MTU. These packets are sent fragmented, therefore in a really inefficient way, and furthermore it's impossible to detect whether they have been truncated by any NAT / gateway in between, resulting in a corrupted stream. Decrease the MTU of your camera in order for it to be less than the UDP MTU, otherwise switch to TCP.