Q: gst-launch & videoconvert

classic Classic list List threaded Threaded
2 messages Options
ran
Reply | Threaded
Open this post in threaded view
|

Q: gst-launch & videoconvert

ran
Hello,

I am getting unexpected behavior when using videoconvert with gst-launch:

On doing option (1) below I get errors:

  gst-launch-1.0 v4l2src !  'video/x-raw, width=640, height=480,
framerate=30/1'  ! autovideosink

The erros is:

ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
Internal data flow error. Additional debug info: gstbasesrc.c(2865):
gst_base_src_loop():/GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming task paused, reason not-negotiated (-4)

The error does make sense, because probably the format of filter does
not match format of v4l2src or format of autovideosink.


But by using videoconvert in both options (2&3) below, it works OK
without any errors:

I see that option (2) below works without any errors:

  gst-launch-1.0 v4l2src !  videoconvert !   'video/x-raw, width=640,
height=480, framerate=30/1'  ! autovideosink

I also see that option (3) below works without any errors:

  gst-launch-1.0 v4l2src  !   'video/x-raw, width=640, height=480,
framerate=30/1'  ! videoconvert ! autovideosink

The question is why is works in both cases (2&3), and not just in one of them:

I would assume that it should only work in one of them because if src
of v4l2src does not match filter(width=640, height=480) then we must
convert the format of v4l2src to match filter.

On the other hand, if the format of autovideosink does not match
filter (width=640, height=480) then we must do the conversion right
after the filter.

So, I would assume that only (2) or (3) should work but not both.

Thank you,
Ran
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Q: gst-launch & videoconvert

Nicolas Dufresne-5
Le mercredi 05 avril 2017 à 18:02 +0300, Ran Shalit a écrit :
>
> The question is why is works in both cases (2&3), and not just in one
> of them:

The filter sets the field width/height/framerate, while videoconvert
will act on the field format. For this reason, it does not matter if
you set the filter before or after, those field will simply be
forwarded int he negotiation.

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (188 bytes) Download Attachment