Using appsrc with m2ts files not showing any playback

Sebastian Dröge sebastian at centricular.com
Thu Feb 18 08:03:23 UTC 2016


On Mi, 2016-02-17 at 13:34 -0800, mwei wrote:
> Hi all,
> 
> I am trying to incorporate gstreamer to show playback in my current
> application. There is a loader in this application which reads the files and
> then sends it through gstreamer. It sends it to gstreamer in chunks and
> hence why I am using an appsrc instead of something else. After pushing the
> buffer through appsrc, it goes through the tsdemux and the video pad is
> being added from the src. Currently, my pipeline looks like this:  appsrc !
> tsdemux ! h264parse ! avdec_h264 ! videoconvert ! xvimagesink.
> 
> I have gotten this to work with PS streams using a similar pipeline. appsrc
> ! mpegpsdemux ! mpeg2dec ! videoconvert ! xvimagesink.  
> 
> I am thinking that there might be something missing while configuring the
> appsrc, but I'm not sure. Any suggestions? 
> 
> Here is how I am setting up the appsrc.
> 
>     g_object_set(appSource, "format", GST_FORMAT_TIME, NULL);
> 
>     /* this causes appSource to block more buffers being pushed to it when
> its queue is full */
>     g_object_set(appSource, "block", true, NULL);
>     g_object_set(appSource, "is-live", true, NULL);

Is your application providing the data in real-time to the appsrc? Or
just as fast as it reads it from a file or similar? In case of the
latter don't use do-timestamp=true and don't use is-live=true.

> 
>     g_object_set(appSource, "min-latency", 0, NULL);
>     g_object_set(appSource, "max-latency", gst_util_uint64_scale_int (1,
> GST_SECOND, 30), NULL);

The latency setting does not make much sense, see the documentation
about the LATENCY query and docs/design about latency for details. In
your case you probably want to keep the default values here.


Does your pipeline work if you use sync=false on the xvimagesink? That
would hint at the above being the potential problems.

-- 
Sebastian Dröge, Centricular Ltd · http://www.centricular.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160218/300726d6/attachment-0001.sig>


More information about the gstreamer-devel mailing list