Can UDP buffer size be increased by parameter?

3,454 views
Skip to first unread message

Per Jarle Sæther

unread,
Sep 19, 2012, 5:55:43 AM9/19/12
to xuggle...@googlegroups.com

Hello All

I am using version 5.4 of Xuggler for decoding H.264 rtsp stream from ip camera.

I am experiencing a lot of “mosquitos” in the picture.

 

The following is copy from a developer that helped me back in 2010 when I was facing the same problems with version 3.4:

I strongly suspect the problem you are facing is caused by the shortage of UDP receive buffer in xuggler/ffmpeg library.

The default value UDP_MAX_PKT_SIZE for s->buffer_size is 64Kbytes, which is defined as a macro in captive/ffmpeg/csrc/libavformat/udp.c.

This default value of receive buffer may not be enough for high bitrate streaming.

The result for having small buffer under high bitrate is likely dropped RTP packets, which subsequently cause video frame corruption.

 

If the UDB receive buffer can be set using parameters, it would be great.

 

Hoping to get this solved J

 

 

Best Regards

 

Per-Jarle Sæther

 

Dave Peterson

unread,
Sep 25, 2012, 8:59:59 AM9/25/12
to xuggle...@googlegroups.com
You can use URL parameters in UDP input/outpstreams and the underlying UDP code will do the right thing.
Something like:
udp://x.y.z:www?fifo_size=250000&pkt_size=1500&overrun_nonfatal=1

Per Jarle Sæther

unread,
Sep 26, 2012, 5:28:50 AM9/26/12
to xuggle...@googlegroups.com

Hello Dave

And thank you for your reply.

 

Will these parameters work for rtsp urls also?

My ip camera accept the following url: rtsp://<ip address>/channel1

 

Should I use the following url?

rtsp://<ip address>?channel1&fifo_size=250000&pkt_size=1500&overrun_nonfatal=1

 

 

 

Best Regards

 

Per-Jarle Sæther

--
You received this message because you are subscribed to the Google Groups "xuggler-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/xuggler-users/-/49kHOCHhDVsJ.
To post to this group, send email to xuggle...@googlegroups.com.
To unsubscribe from this group, send email to
xuggler-user...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/xuggler-users?hl=en.

Dave Peterson

unread,
Sep 27, 2012, 2:46:48 PM9/27/12
to xuggle...@googlegroups.com
These URL parameters are understood by the underlying ffmpeg libraries.  You should read what each of them supports:
RTSP
http://ffmpeg.org/ffmpeg.html#rtsp

UDP
http://ffmpeg.org/ffmpeg.html#udp

D

John Neil

unread,
Sep 27, 2012, 9:30:38 PM9/27/12
to xuggle...@googlegroups.com
We also have accessed ip camera streams using both xuggler and ffmpeg/ffserver, and have experienced problems with udp buffer overflows.  One thing you should check is that there is sufficient buffer space allocated to UDP by the OS.  Setting the socket buffer size seems to have little effect if there is insufficient buffers allocated to the lower layers.
 
--
You received this message because you are subscribed to the Google Groups "xuggler-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/xuggler-users/-/uv04W7EsMZ0J.

To post to this group, send email to xuggle...@googlegroups.com.
To unsubscribe from this group, send email to xuggler-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/xuggler-users?hl=en.

John




Reply all
Reply to author
Forward
0 new messages