Casting data from v4l2src

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

Casting data from v4l2src

Kristoffer Koch
Hi,

We're developing a UVC camera, and as a part of our production test, we set the camera into a raw mode, where we output the raw bayer image.

Because reasons, we must lie in the USB-descriptors, so we say that we output a YVYU image, while it is really bayer.

Of course, if I do

  gst-launch-1.0 v4l2src ! xvimagesink

it "works", but with a green image.

I'm trying to override the format, but I'm not having any luck:

  gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,format=YVYU,width=3456,height=2592,framerate=5/1 ! videoparse ! video/x-raw,format=rgb,width=3456,height=2592  ! xvimagesink
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 flow error.
Additional debug info:
gstbasesrc.c(2948): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming task paused, reason not-negotiated (-4)
Execution ended after 0:00:00.001297994
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

I tried turning up the debug level, but there's not any more details coming from the v4l2src element, as far as i can see. If anyone have some hints, it's maybe a bit hard to reproduce, but I guess you can try to "cast" data on any camera.

Best regards,
Kristoffer Koch

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

Re: Casting data from v4l2src

Andrew Grace
Not sure if this affects anything, but the docs state that videoparse is deprecated and to look at rawvideoparse instead. 


Andrew

On Mar 21, 2017, at 6:57 AM, Kristoffer Koch <[hidden email]> wrote:

Hi,

We're developing a UVC camera, and as a part of our production test, we set the camera into a raw mode, where we output the raw bayer image.

Because reasons, we must lie in the USB-descriptors, so we say that we output a YVYU image, while it is really bayer.

Of course, if I do

  gst-launch-1.0 v4l2src ! xvimagesink

it "works", but with a green image.

I'm trying to override the format, but I'm not having any luck:

  gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,format=YVYU,width=3456,height=2592,framerate=5/1 ! videoparse ! video/x-raw,format=rgb,width=3456,height=2592  ! xvimagesink
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 flow error.
Additional debug info:
gstbasesrc.c(2948): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming task paused, reason not-negotiated (-4)
Execution ended after 0:00:00.001297994
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

I tried turning up the debug level, but there's not any more details coming from the v4l2src element, as far as i can see. If anyone have some hints, it's maybe a bit hard to reproduce, but I guess you can try to "cast" data on any camera.

Best regards,
Kristoffer Koch
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


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

Re: Casting data from v4l2src

Kristoffer Koch
Thanks for your quick feedback.

rawvideoparse isn't in gstreamer 1.0 on the stock Ubuntu 16.10, but I'll try to build the latest gstreamer and check the behaviour there.

Best regards, Kristoffer



On Tue, Mar 21, 2017 at 1:08 PM, Andrew Grace <[hidden email]> wrote:
Not sure if this affects anything, but the docs state that videoparse is deprecated and to look at rawvideoparse instead. 


Andrew

On Mar 21, 2017, at 6:57 AM, Kristoffer Koch <[hidden email]> wrote:

Hi,

We're developing a UVC camera, and as a part of our production test, we set the camera into a raw mode, where we output the raw bayer image.

Because reasons, we must lie in the USB-descriptors, so we say that we output a YVYU image, while it is really bayer.

Of course, if I do

  gst-launch-1.0 v4l2src ! xvimagesink

it "works", but with a green image.

I'm trying to override the format, but I'm not having any luck:

  gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,format=YVYU,width=3456,height=2592,framerate=5/1 ! videoparse ! video/x-raw,format=rgb,width=3456,height=2592  ! xvimagesink
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 flow error.
Additional debug info:
gstbasesrc.c(2948): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming task paused, reason not-negotiated (-4)
Execution ended after 0:00:00.001297994
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

I tried turning up the debug level, but there's not any more details coming from the v4l2src element, as far as i can see. If anyone have some hints, it's maybe a bit hard to reproduce, but I guess you can try to "cast" data on any camera.

Best regards,
Kristoffer Koch
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


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



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

Re: Casting data from v4l2src

Nicolas Dufresne-5
In reply to this post by Kristoffer Koch
Le mardi 21 mars 2017 à 11:57 +0100, Kristoffer Koch a écrit :
> I'm trying to override the format, but I'm not having any luck:
>
>   gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-
> raw,format=YVYU,width=3456,height=2592,framerate=5/1 ! videoparse !
> video/x-raw,format=rgb,width=3456,height=2592  ! xvimagesink

'rgb' is not a valid format, use RGB in caps for 24bit (not padded)
rgb. I'm not sure if older version of videoparse support downstream
caps filter. Try and use the properties instead, like this (note the
properties will take small caps):

  .. ! videoparse format=rgb width=3456 height=2592 ! ...

In any case, 24bit RGB (not padded) is likely not supported by
xvimagesink. XV extension usually only allow YUV formats. ximagesink
may support padded RGB, like xRGB or BGRx. With the benifit that the
image size of xRGB/BGRx is the same as packed YVYU.

Nicolas


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

signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Casting data from v4l2src

Kristoffer Koch
Thanks, but it seems to be generating the same error:

gst-launch-1.0 v4l2src device=/dev/video0 ! videoparse format=xrgb width=3456 height=2592   ! xvimagesink
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 flow error.
Additional debug info:
gstbasesrc.c(2948): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming task paused, reason not-negotiated (-4)
Execution ended after 0:00:00.000467417
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

(I also tried with a videoconvert after videoparse).

I'm a bit stuck here, so any help is appreciated.

Best regards, Kristoffer

On Tue, Mar 21, 2017 at 4:55 PM, Nicolas Dufresne <[hidden email]> wrote:
Le mardi 21 mars 2017 à 11:57 +0100, Kristoffer Koch a écrit :
> I'm trying to override the format, but I'm not having any luck:
>
>   gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-
> raw,format=YVYU,width=3456,height=2592,framerate=5/1 ! videoparse !
> video/x-raw,format=rgb,width=3456,height=2592  ! xvimagesink

'rgb' is not a valid format, use RGB in caps for 24bit (not padded)
rgb. I'm not sure if older version of videoparse support downstream
caps filter. Try and use the properties instead, like this (note the
properties will take small caps):

  .. ! videoparse format=rgb width=3456 height=2592 ! ...

In any case, 24bit RGB (not padded) is likely not supported by
xvimagesink. XV extension usually only allow YUV formats. ximagesink
may support padded RGB, like xRGB or BGRx. With the benifit that the
image size of xRGB/BGRx is the same as packed YVYU.

Nicolas


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



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

Re: Casting data from v4l2src

dedsx
y ur using videoparse element
Reply | Threaded
Open this post in threaded view
|

Re: Casting data from v4l2src

dedsx
In reply to this post by Kristoffer Koch
gst-launch-1.0 v4l2src ! capsfilter caps=video/x-raw,width=640,height=480 ! xvimagesink
 
try this as simple as that
Reply | Threaded
Open this post in threaded view
|

Re: Casting data from v4l2src

Kristoffer Koch
In reply to this post by dedsx
On Wed, Mar 22, 2017 at 9:04 AM, Ronit P Zagade <[hidden email]> wrote:
y ur using videoparse element

Hi, it's because my videostream lies about the format, and I'm looking for a way to "cast" the data to something sensible (bayer).

-Kristoffer
 

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

Re: Casting data from v4l2src

dedsx
try this


 gst-launch-1.0 v4l2src ! videoparse ! autovideoconvert ! xvimagesink
Reply | Threaded
Open this post in threaded view
|

Re: Casting data from v4l2src

Nicolas Dufresne-5
In reply to this post by Kristoffer Koch
Le mercredi 22 mars 2017 à 08:57 +0100, Kristoffer Koch a écrit :

> Thanks, but it seems to be generating the same error:
>
> gst-launch-1.0 v4l2src device=/dev/video0 ! videoparse format=xrgb
> width=3456 height=2592   ! xvimagesink
> 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 flow error.
> Additional debug info:
> gstbasesrc.c(2948): gst_base_src_loop ():
> /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
> streaming task paused, reason not-negotiated (-4)
> Execution ended after 0:00:00.000467417
> Setting pipeline to PAUSED ...
> Setting pipeline to READY ...
> Setting pipeline to NULL ...
> Freeing pipeline ...
>
> (I also tried with a videoconvert after videoparse).
>
> I'm a bit stuck here, so any help is appreciated.
First, enable some more debugging, e.g. env GST_DEBUG=2 or something.
Second, you have dropped the caps filter before videoparse. I have no
idea what videparse will reply in the caps queries. Normally, with
videoparse, you save to a file, and then you use filesrc and parse.

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

signature.asc (188 bytes) Download Attachment