[meta-freescale] [dizzy] Choppy gstreamer video (MPEG TS over UDP)

Nikolay Dimitrov picmaster at mail.bg
Sat Nov 15 15:02:23 PST 2014


Hi Daiane,

On 11/14/2014 10:25 PM, Daiane Angolini wrote:
> On Fri, Nov 14, 2014 at 4:46 PM, Nikolay Dimitrov <picmaster at mail.bg> wrote:
>> Hi guys,
>>
>> I have an issue with gstreamer, running on imx6q sabresd (dizzy). The
>> gstreamer pipeline has to play a live video stream over the network.
>> The video stream is MPEG TS over UDP unicast, carrying h264 video + mp3
>> audio. Here's the pipeline:
>>
>> gst-launch udpsrc port=5000 ! decodebin2 ! mfw_v4lsink
>> The biggest issue right now with this setup is that the video is very
>> choppy - shortly after the playback starts (<10s) the video becomes
>> choppy, e.g. after decoding 1 frame it pauses for 2-3s before
>> displaying the next frame (all frames in between are skipped, so it
>> looks like a slideshow). Also, gstreamer is giving warnings in the
>> console:
>>
>> WARNING: from element
>> /GstPipeline:pipeline0/MFW_GST_V4LSINK_INFO_T:mfw_gst_v4lsink_info_t0: A lot
>> of buffer
>> s are being dropped.
>> Additional debug info:
>> /home/picmaster/work/yocto-dizzy-sabresd/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/gstreamer/0.1
>> 0.36-r2/gstreamer-0.10.36/libs/gst/base/gstbasesink.c(2875):
>> gst_base_sink_is_too_late (): /GstPipeline:pipe
>> line0/MFW_GST_V4LSINK_INFO_T:mfw_gst_v4lsink_info_t0:
>> There may be a timestamping problem, or this computer is too slow.
>>
>> As I'm by no means a gstreamer expert, I tried different combinations
>> of queues in all possible places in the pipeline, but with no success.
>> What's interesting to note is that if I make a local file copy of the
>> live stream, it plays without the choppines:
>>
>> gst-launch playbin2 uri=file:///tmp/stream.ts
>>
>> Has someone seen such behavior of gstreamer, or even better - has an
>> idea how to solve it? Thanks in advance for taking your time to read
>> and respond.
>
> I have never-ever got a good streaming audio+video.
>
> There are several imx-community pages with how-tos to streaming (i.e.
> [1][2]) you can use to get a better line instead of using decodebin
> (which I´m not sure is going to really know your streaming caps
> instead of guessing)

Playbin was very unstable for most of my tests (either refuses to play 
stream at all, or freezes on 1st or consequent frames). Then I started 
to use decodebin to have more control of the pipeline, and more stable 
results (to some minimal extent).

Most, if not all of these examples are hard to be applied in my case: my 
customer has already deployed infrastructure for the previous product 
generation, where they use MPEG-TS transport over multicast UDP, and I 
can't deviate from that. Also currently gstreamer-0.10 just doesn't 
support multicast, that's why I'm testing on unicast for now, and will 
have to fix the multicast bug soon.

> Another thing, your network does matter, a lot! So start with a local
> network or even ppp.

Totally agree. I'm using Gigabit LAN, which is dedicated to this 
development. Also, when deployed, the final product will also run on 
dedicated network segments with dedicated media servers, so I don't 
expect issues with that.

> I haven´t tested gstreamer 1.x, maybe it can be better for streaming
> audio+video.

I don't know whether the FSL plugins are compatible with Gstreamer-1.0. 
If they're, I can give it a try.

> [1]https://community.freescale.com/docs/DOC-94646
> [2]https://community.freescale.com/docs/DOC-97781

Thanks for sharing the links, the Freescale community was the first 
place where I looked for information.

Regards,
Nikolay


More information about the meta-freescale mailing list