Internal Data Stream Error Occurs When Adding Two Caps Filters with Different Resolutions in Webcam GStreamer Pipeline Using Tee

Sulthan Amanu sulthan4380 at gmail.com
Fri Jul 14 02:12:05 UTC 2023


Fwd...

On Fri, Jul 14, 2023, 01:33 Sulthan Amanu <sulthan4380 at gmail.com> wrote:

> Hi Nicolas,
>
> Thank you for your response,
>
> I have one query about Gstermer pipeline , Can we able to change webcam
> video resolution without terminate current pipeline?
>
> Can you please share pipeline or code snippet for above requirement.
>
> Regards,
> Sulthan
>
> On Fri, Jul 14, 2023, 00:40 Nicolas Dufresne <nicolas at ndufresne.ca> wrote:
>
>> Le jeudi 13 juillet 2023 à 19:46 +0200, Florian Echtler via
>> gstreamer-devel a
>> écrit :
>> > Hello Sulthan,
>> >
>> > I'm pretty certain this won't be possible without videoscale & friends.
>> >
>> > Reason: almost all V4L2 cameras are configured to stream a single
>> resolution at
>> > the hardware level, and even if the camera would be capable of
>> delivering two
>> > streams at different resolutions, I'm nearly 100% sure the
>> V4L2-Gstreamer path
>> > won't be able to deliver that. Your only option, as far as I can tell,
>> is to get
>> > the larger resolution from the device directly and scale it down.
>>
>> With exception of uvch264src, but finding compatible cameras is pretty
>> hard
>> these days.
>>
>> >
>> > (*) Should you happen to use a Raspberry Pi camera, which can do
>> separate
>> > preview and main streams, then you might have a shot by using the
>> libcamera
>> > stack. But for generic V4L2 devices, I don't think you can avoid the
>> software
>> > scaler.
>>
>> Yes, PI can deliver multiple streams, use libcamerasrc for that.
>>
>> regards,
>> Nicolas
>>
>> >
>> > Best, Florian
>> >
>> > On 13.07.23 19:37, Sulthan Amanu via gstreamer-devel wrote:
>> > > Hi Team,
>> > >
>> > > I have encountered an issue while
>> > > creating a GStreamer pipeline with a webcam source and two caps
>> filters using
>> > > the tee element. The pipeline is designed to apply different
>> resolutions to the
>> > > video stream. Below is an example of the pipeline:
>> > >
>> > > gst-launch-1.0 -e v4l2src device=/dev/video0 ! \
>> > >      tee name=t ! \
>> > >          queue ! \
>> > >          videoconvert ! \
>> > >          capsfilter caps="video/x-raw, width=640, height=480" ! \
>> > >          autovideosink t. ! \
>> > >          queue ! \
>> > >          videoconvert ! \
>> > >          capsfilter caps="video/x-raw, width=1280, height=720" ! \
>> > >          autovideosink
>> > >
>> > >
>> > > However, when executing the pipeline, I encountered the following
>> error message:
>> > >
>> > > Setting pipeline to PAUSED ...
>> > > Pipeline is live and does not need PREROLL ...
>> > > Setting pipeline to PLAYING ...
>> > > New clock: GstSystemClock
>> > > ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
>> Internal data
>> > > stream error.
>> > > Additional debug info:
>> > > gstbasesrc.c(3055): gst_base_src_loop ():
>> > > /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
>> > > streaming stopped, reason not-negotiated (-4)
>> > > EOS on shutdown enabled -- waiting for EOS after Error
>> > > Waiting for EOS...
>> > >
>> > >
>> > > I kindly request your assistance in resolving this issue and
>> achieving the
>> > > desired behavior without utilizing the *videoscale ,
>> videoconvertscale, other
>> > > frame resize element. And I need to orignal data of both resolution.*
>> > > *
>> > > *
>> > > Issue link -
>> > >
>> https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2808#note_1999618
>> > > <
>> https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2808#note_1999618
>> >
>> > > *
>> > > *
>> > > Regards,
>> > > Sulthan
>> >
>> > --
>> > SENT FROM MY DEC VT50 TERMINAL
>> >
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20230714/110c6b5d/attachment-0001.htm>


More information about the gstreamer-devel mailing list