udpsink max packet error

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

udpsink max packet error

Baby Octopus
Hi,

I'm capturing raw data and streaming it to my local network after encoding. I see a lot of packet losses on the client side and the server is throwing up lot of error messages as below

WARNING: from element /GstPipeline:pipeline0/GstUDPSink:udpsink0: Attempting to send a UDP packet larger than maximum size (72568 > 65507)
Additional debug info:
gstmultiudpsink.c(541): gst_multiudpsink_render (): /GstPipeline:pipeline0/GstUDPSink:udpsink0:
Reason: Error sending message: Message too long

And this is my pipeline
gst-launch-1.0 decklinksrc mode=10 name=src src.! video/x-raw ! queue !  videoconvert ! x264enc bitrate=5000 ! mpegtsmux name=mux ! udpsink host=10.0.0.140 port=5858 src.! audio/x-raw ! queue ! avenc_aac ! mux.

As you see, I'm encoding video at 5Mbps and the system bitrate is approx 6Mbps. How do i reduce this error? TS packet sizes are 188bytes. How do i restrict UDP packet size here? Is there any property or code that I can tweak in udpsink?

~BO
Reply | Threaded
Open this post in threaded view
|

Re: udpsink max packet error

Tim-Philipp Müller-2
On Sat, 2013-07-20 at 04:25 -0700, Baby Octopus wrote:

Hi,

> I'm capturing raw data and streaming it to my local network after encoding.
> I see a lot of packet losses on the client side and the server is throwing
> up lot of error messages as below
>
> WARNING: from element /GstPipeline:pipeline0/GstUDPSink:udpsink0: Attempting
> to send a UDP packet larger than maximum size (72568 > 65507)
> Additional debug info:
> gstmultiudpsink.c(541): gst_multiudpsink_render ():
> /GstPipeline:pipeline0/GstUDPSink:udpsink0:
> Reason: Error sending message: Message too long
>
> And this is my pipeline
> gst-launch-1.0 decklinksrc mode=10 name=src src.! video/x-raw ! queue !
> videoconvert ! x264enc bitrate=5000 ! mpegtsmux name=mux ! udpsink
> host=10.0.0.140 port=5858 src.! audio/x-raw ! queue ! avenc_aac ! mux.
>
> As you see, I'm encoding video at 5Mbps and the system bitrate is approx
> 6Mbps. How do i reduce this error? TS packet sizes are 188bytes. How do i
> restrict UDP packet size here? Is there any property or code that I can
> tweak in udpsink?

Try:

  mpegtsmux alignment=7 ! udpsink

Cheers
 -Tim

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: udpsink max packet error

Baby Octopus
Hi Tim,

Thanks. I did try with alignment=7 but doesn't seem to help. gst_pad_push() call happens once a frame, so the data going to udpsink is always one frame worth of PES data. If i add rtpmp2tpay after mpegts, I see gst_pad_push() being called more often. Is this a bug in mpegtsmux then?

Can't this be handled in udpsink by setting some buffer size?

~BO
Reply | Threaded
Open this post in threaded view
|

Re: udpsink max packet error

Tim-Philipp Müller-2
On Sat, 2013-07-20 at 06:51 -0700, Baby Octopus wrote:

Hi,

> Thanks. I did try with alignment=7 but doesn't seem to help. gst_pad_push()
> call happens once a frame, so the data going to udpsink is always one frame
> worth of PES data. If i add rtpmp2tpay after mpegts, I see gst_pad_push()
> being called more often. Is this a bug in mpegtsmux then?

It seems alignment does really only align :)

So maybe this helps then:

 ! .. mpegtsmux alignment=7 ! rndbuffersize max=1316 min=1316 ! .

though a new property for this on mpegtsmux would also be in order IMHO
(unless we can figure out a way to cleverly negotiate this with
udpsink).

> Can't this be handled in udpsink by setting some buffer size?

Nope.

Cheers
 -Tim

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: udpsink max packet error

Baby Octopus
Thanks Tim. That helped to reduce packet losses. Let me look into mpegtsmux.c to see if this feature can be added internally

~BO