video compositor hangs when no data pushing to appsrc

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

video compositor hangs when no data pushing to appsrc

longkas
Hello,

I want to mix two video streams together using compositor element,
first I add one stream in to the pipeline:
   videotestsrc pattern=ball ! compositor name=mix ! autovideosink

Then I build an appsrc with push mode and add it :
    appsrc ! mix.

Then the video hangs there if I do not push data, how to avoid the hang, I
want the compositor to continue works whether or not my appsrc push data,
please help, thank you

BR



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

Re: video compositor hangs when no data pushing to appsrc

Tim Müller
On Wed, 2019-05-22 at 02:45 -0500, longkas wrote:

Hi,

> I want to mix two video streams together using compositor element,
> first I add one stream in to the pipeline:
>    videotestsrc pattern=ball ! compositor name=mix ! autovideosink
>
> Then I build an appsrc with push mode and add it :
>     appsrc ! mix.
>
> Then the video hangs there if I do not push data, how to avoid the
> hang, I want the compositor to continue works whether or not my
> appsrc push data, please help, thank you

If you make one of your inputs live (e.g. videotestsrc is-live=true)
compositor will work in live mode and will produce data even if you
don't push anything into your appsrc. You might also want to set the
latency property on compositor then to tell it how long it should wait.

Cheers
 Tim

--
Tim Müller, Centricular Ltd - http://www.centricular.com

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

Re: video compositor hangs when no data pushing to appsrc

longkas
Thank you very much, it works now.



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

Re: video compositor hangs when no data pushing to appsrc

longkas
In reply to this post by Tim Müller
Hello,
When I set both appsrc and videotestsrc to live mode, the pipeline hangs
again, my appsrc settings:

        g_object_set(gstAppSrc, "is-live", TRUE, NULL);
        g_object_set(gstAppSrc, "do-timestamp", TRUE, NULL);
        g_object_set(gstAppSrc, "format", GST_FORMAT_TIME, NULL);

I have tried to set appsrc framerate caps to fixed same as the pipeline or
0/1, not working, please help

BR





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

Re: video compositor hangs when no data pushing to appsrc

longkas
update: issue resolved by seting appsrc latency property, :D

BR



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel