Open 4ntoine opened 9 years ago
fixed by increasing MulticastSocket
send buffer (RtpSocket.java
):
mSocket.setSendBufferSize(2 * 1024 * 1024); // 2 Mb is max for my impl
Hi, I am facing the same issue in my C++ program. I am decoding RTSP stream using FFMPEG and getting the same console output. Any idea how can I increase buffer in my implementation. I am not managing socket in my program. I open RTSP stream using FFMPEG API calls.
For C++, if you are using FFMPEG: add AVDictionary* options = NULL; av_dict_set(&options, "rtsp_transport", "tcp", 0); before avformat_open_input
Here is the code fragment:
pFormatCtx = avformat_alloc_context();
AVDictionary* options = NULL; av_dict_set(&options, "rtsp_transport", "tcp", 0);
if (avformat_open_input(&pFormatCtx, filepath, NULL, &options) != 0){ printf("Couldn't open input stream.\n"); return -1; }
I've tried to stream large resolution video (like 2048 x 2048 and more) and RTP packets are lost and decoding sometimes fails:
I've googled a bit and found the following: http://ffmpeg.org/pipermail/libav-user/2013-October/005686.html https://trac.ffmpeg.org/ticket/285#comment:12
So it seems to be UDP issue.. Any confirmations/fixes/thoughts?