[Libav-user] How to change RTSP/UDP max buffer size?

Sergio Basurco sergio.b at coherentsynchro.com
Fri Mar 13 14:12:42 CET 2015


Hi there,

Related questions:
1 - http://ffmpeg.org/pipermail/libav-user/2012-June/002324.html
2 - https://lists.libav.org/pipermail/libav-api/2012-February/000409.html

I'm using very high resolution cameras via rtsp. Initially I had several 
broken frames and an unstable connection. I ended up finding out that 
this is due the UDP max buffer size.

By changing libavformat/udp.c and setting UDP_MAX_PKT_SIZE to be a lot 
bigger. This did solve the issue completely and everything works just fine.

However I know there must be some way to do this via the API. In the 
link #2 above I read:

 > No, you're correct. The correct solution is to create a private option
 > for the udp protocol, and proxy that option with a rtsp/rtp private
 > option. Then the ?x=y can disappear. Anton, am I correct here?

And I'm not sure what that means. There must be some way to access these 
parameters once I get my AVCodecCtx after opening the stream. Any idea how?

Thanks!
-- 
Sergio Basurco,
Coherent Synchro


More information about the Libav-user mailing list