6

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?

BTables
  • 4,413
  • 2
  • 11
  • 30
legit
  • 109
  • 1
  • 2
  • 4
  • 1
    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? – legit Aug 19 '20 at 21:07
  • 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. – shellter Aug 19 '20 at 22:57

1 Answers1

10

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.

Diego Rodriguez
  • 368
  • 2
  • 9