high bitrate udp buffer drop

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

high bitrate udp buffer drop

rland
This post was updated on .
I play a high rate of mpeg2ts over UDP(10Mbps) with v1.8.2, the video quality is very poor, a large number of drop frames or macro block.
pipeline(gstplayer)dot_playing.dot:
udpsrc ->tsdemux -> multiqueue -> h264parse -> avdec_aac   .....     ->openslessink
                                                                            -> amcvdec     .....     ->glimagesink

I  tried to  configure with buffer-size properties of udpsrc,max-size,use_buffering of multiqueue, less than 4M/b  can be normal playback,10Mbps's video   still a large number of drop frames and after a few seconds, the video frame stops moving.
-------------------------
01-01 14:04:59.439 21031 22819 W GStreamer+tsdemux: 0:02:40.809052118 0xabe36b50 tsdemux.c:2159:gst_ts_demux_queue_data CONTINUITY: Mismatch packet 5, stream 13
01-01 14:04:59.518 21031 22819 W GStreamer+tsdemux: 0:02:40.887878160 0xabe36b50 tsdemux.c:2159:gst_ts_demux_queue_data CONTINUITY: Mismatch packet 3, stream 12
......................
 tsdemux.c:2159:gst_ts_demux_queue_data CONTINUITY: Mismatch packet 11, stream 14
01-01 14:05:43.714 21031 22819 W GStreamer+tsdemux: 0:03:25.084061098 0xabe36b50 tsdemux.c:2159:gst_ts_demux_queue_data CONTINUITY: Mismatch packet 12, stream 7
01-01 14:05:43.716 21031 22819 W GStreamer+tsdemux: 0:03:25.086445265 0xabe36b50 tsdemux.c:2159:gst_ts_demux_queue_data CONTINUITY: Mismatch packet 6, stream 10

-------------------------
If I record the network packets in local file(mpeg2ts) then gst-plugin-bad/gst-libs/player can perfeclty play it(
Except udpsrc, all other plugins are the same with the  UDP's  pipeline).In addition,with VLC the stream is played almost perfectly.
So I think the problem comes from some buffering issures.? I think on the left side of the tsdemux, a plug-in like rtpjittbuffer should be inserted ?Is there a plugin for GStreamer  to deal with UDP's network jitter ? If not the case, what other ways can optimize UDP's  pipelie to deal with the playback of high bit rate files(I can't control the stream server, so it is not feasible to reduce the bitrate ...)?

Best regards,
Lucky chou


Reply | Threaded
Open this post in threaded view
|

Re: high bitrate udp buffer drop

jasonlife
I have almost the same video quality issue with my gst-launch-1.0 command for my mpeg2ts.

This is my pipeline;
gst-launch-1.0 udpsrc address=239.255.1.3 port=5004 ! application/x-rtp,media=video,clock-rate=90000,encoding-name=H264 ! rtpjitterbuffer ! rtpmp2tdepay ! tsparse ! tsdemux ! h264parse ! avdec_h264 ! videoconvert ! autovideosink

I tried different buffer-size for udpsrc and latency for rtpjitterbuffer, but no big changes.

If I run following vlc command, video plays almost perfect..

vlc  rtp://@239.255.1.3:5004

Any help or suggestion would be appreciated..
Reply | Threaded
Open this post in threaded view
|

Re: high bitrate udp buffer drop

jasonlife
It turned out the problem was caused by my test environment. I ran vlc on Host A and gst-launch on Host B. When I ran vlc on Host B, I got the same corrupted video. gst-launch works fine on Host A as well.

On Tue, Aug 16, 2016 at 11:25 AM, jasonlife <[hidden email]> wrote:
I have almost the same video quality issue with my gst-launch-1.0 command for
my mpeg2ts.

This is my pipeline;
gst-launch-1.0 udpsrc address=239.255.1.3 port=5004 !
application/x-rtp,media=video,clock-rate=90000,encoding-name=H264 !
rtpjitterbuffer ! rtpmp2tdepay ! tsparse ! tsdemux ! h264parse ! avdec_h264
! videoconvert ! autovideosink

I tried different buffer-size for udpsrc and latency for rtpjitterbuffer,
but no big changes.

If I run following vlc command, video plays almost perfect..

vlc  rtp://@239.255.1.3:5004

Any help or suggestion would be appreciated..



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/high-bitrate-udp-buffer-drop-tp4678917p4679108.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


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

Re: high bitrate udp buffer drop

rland
jasonlife wrote
It turned out the problem was caused by my test environment. I ran vlc on
Host A and gst-launch on Host B. When I ran vlc on Host B, I got the same
corrupted video. gst-launch works fine on Host A as well.
Yes,rtp has a rtpjitterbuffer, it should be able to work well,
but for the naked UDP,there is no buffering mechanism,
I think it's not enough to just rely on the small buffer of the kernel (<100k  ?).
Reply | Threaded
Open this post in threaded view
|

Re: high bitrate udp buffer drop

Peter Maersk-Moller-2
This has come up a few times.

See https://lists.freedesktop.org/archives/gstreamer-devel/2016-January/056169.html and other entries in the mailing list.

Setting net.core.rmem_max to a high enough value (this is system wide) appear sometimes to work better than setting 'buffer-size' for the udpsrc element. It sould be the same, but I have sometimes seen it was not. Maybe the GStreamer folks have an explanation. Just test both solution an use whatever works for you.

Peter MM

On Wed, Aug 17, 2016 at 4:15 AM, lucky chou <[hidden email]> wrote:
jasonlife wrote
> It turned out the problem was caused by my test environment. I ran vlc on
> Host A and gst-launch on Host B. When I ran vlc on Host B, I got the same
> corrupted video. gst-launch works fine on Host A as well.

Yes,rtp has a rtpjitterbuffer, it should be able to work well,
but for the naked UDP,there is no buffering mechanism,
I think it's not enough to just rely on the small buffer of the kernel
(<100k  ?).



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/high-bitrate-udp-buffer-drop-tp4678917p4679113.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel