GStreamer pipeline broken
Asked Answered
E

1

8

I am not sure why this pipeline is breaking, I have gstreamer installed on linux from the websites exact instructions, any ideas?

gst-launch-1.0 v4l2src device=/dev/video0 ! videoscale ! video/x-raw, width=2592, height=600 ! autovideosink -v
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
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)
Execution ended after 0:00:00.000093207
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

If I change it to:

gst-launch-1.0 v4l2src device=/dev/video0 ! videoconvert! videoscale ! video/x-raw, width=2592, height=600 ! autovideosink -v 

it will work but why will it not work the other way?

Evangelicalism answered 19/8, 2020 at 20:34 Comment(2)
If i change it to: gst-launch-1.0 v4l2src device=/dev/video0 ! videoconvert! videoscale ! video/x-raw, width=2592, height=600 ! autovideosink -v , it will work but why will it not work the other way?Evangelicalism
Don't post this sort of information in a comment. Edit your question to show that alternative. Otherwise a pretty good first Q. Let me know you made that change, and we can delete these exteraneous comments (and I'll upvote your Q). Good luck.Shanell
S
12

Your webcam transmits raw video output to whoever is listening to it. Adding videoconvert encodes the raw video to a codec that can be manipulated by the videoscale element and the end product of the manipulation to be understood by the autovideosink element.

So gst-launch-1.0 v4l2src device=/dev/video0 ! videoconvert! videoscale ! video/x-raw, width=2592, height=600 ! autovideosink is telling gstreamer to get the raw video from the camera, encode it into something that we understand, alter the video, and display it.

I really recommend that when you have doubts about an element, call gst-inspect-1.0 <element name> to see it's description and properties.

Sappington answered 19/8, 2020 at 21:36 Comment(3)
Really helpful common on using gst-inspect!Insomnia
I have a similar problem but adding videoconvert did not solve it. In fact it generated another error (Failed to allocate required memory). What can be a solution?Semiannual
@Semiannual can you share the pipeline you're running?Sappington

© 2022 - 2024 — McMap. All rights reserved.