Using compositor with shmsrc

Nirbheek Chauhan nirbheek.chauhan at gmail.com
Sun Dec 25 12:41:34 UTC 2022


Hi Guru,

The easiest way to do this is to use appsrc / appsink instead of
shmsrc / shmsink and set the format=time property on appsrc.

You will have to write code to manually push samples from appsink to
appsrc, though. So it won't work using gst-launch.

Cheers,
Nirbheek

On Sun, Dec 25, 2022 at 2:45 PM Guru Govindan via gstreamer-devel
<gstreamer-devel at lists.freedesktop.org> wrote:
>
> Hi,
> I have the a few pipelines that send raw video shmsink like below
>
> ```
> gst-launch-1.0 videotestsrc ! video/x-raw,format=I420,width=640,height=360,framerate=15/1 ! timeoverlay ! queue ! shmsink socket-path=/tmp/test1 shm-size=20000000 sync=true
>
> gst-launch-1.0 videotestsrc ! video/x-raw,format=I420,width=640,height=360,framerate=15/1 ! timeoverlay ! queue ! shmsink socket-path=/tmp/test2 shm-size=20000000 sync=true
>
> ```
>
> I am trying to mux the videos using the compositor plugin in another process like this
>
> ```
> gst-launch-1.0 shmsrc socket-path=/tmp/test1 is-live=true ! queue ! video/x-raw,format=I420,width=640,height=360 ! compositor name=comp sink_1::xpos=860 ! videoconvert ! autovideosink \
> shmsrc socket-path=/tmp/test2 is-live=true ! queue ! video/x-raw,format=I420,width=640,height=360 ! comp.
> ```
>
> However I get an assertion error that GST_FORMAT_TIME is not available like below.
>
> ```
> ERROR:../subprojects/gst-plugins-base/gst-libs/gst/video/gstvideoaggregator.c:2322:gst_video_aggregator_sink_event: assertion failed: (seg.format == GST_FORMAT_TIME)
> Bail out! ERROR:../subprojects/gst-plugins-base/gst-libs/gst/video/gstvideoaggregator.c:2322:gst_video_aggregator_sink_event: assertion failed: (seg.format == GST_FORMAT_TIME)
> [1]    268025 abort (core dumped)  GST_DEBUG=4 gst-launch-1.0 shmsrc socket-path=/tmp/test1 is-live=true !
> ```
>
> Is there a way to manually add GST_FORMAT_TIME?
>
> I tried the videomixer element and have the same issue there. I tried inserting identity sync=true but that doesnt seem to do the trick.
>
> I appreciate any help in this!
> Thanks a lot!
> Guru
>
>
> ~
>


More information about the gstreamer-devel mailing list