Using input-selector to change between multiple cameras for h264 encoding

Marc Leeman marc.leeman at gmail.com
Fri Jan 15 20:41:51 UTC 2021


lib/tlvtour.c:  gst_bin_recalculate_latency(GST_BIN(self->pipeline));

On Fri, 15 Jan 2021 at 21:15, dlw <dlwalter at protonmail.com> wrote:
>
> I have the following pipeline with 2 cameras at different
> resolutions,framerates,formats etc.
>
> cam1(1080p, 30fps) -> videoconvert -> videorate ->capsfilter ->
> input-selector.sink_0
>
> cam2(640, 10fps) -> videoconvert -> videorate ->capsfilter ->
> input-selector.sink_1
>
> input-selector -> h264enc ->rtph264pay -> udpsink
>
> Running either input (sink_0, or sink_1) runs fine and streams correctly,
> but if I try switching while the pipeline is running the image freezes and I
> can't see a camera feed.
>
> I switch pads on the input-selector using the following:
> g_object_set(G_OBJECT(bindata->input-selector), "active-pad", new_pad,
> NULL);
>
> Is there something else I need to do to the pipeline to get the stream to
> work?  The pipeline also runs fine if I put the h264enc before the
> input-selector, but I get some image corruption during camera switches due
> to not switching on an I-frame.  I'd prefer not to use this method because I
> don't want to be running multiple hw encoders at the same time.
>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



-- 
g. Marc


More information about the gstreamer-devel mailing list