Set RTSP/UDP buffer size in FFmpeg/LibAV

回眸只為那壹抹淺笑 提交于 2019-11-30 16:10:46

Since this commit it is enough to pass buffer_size as option and it gets forwarded to the udp protocol through the rtp protocol.

I tested and it works as intended.

FYI, the latest ffmpeg2.8.5 already has this option. I use it to set the the buffer_size

av_dict_set(&options, "buffer_size", "655360", 0);

and I got this output:

[udp @ 0xb4945090] attempted to set receive buffer to size 655360 but it only ended up set as 327680 After some searching I run

echo 2097152 > /proc/sys/net/core/rmem_max

to fix the warning

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!