Dear all,
I am a v4l2 capture driver developer and I have encountered a problem when requesting I420 pixel format with: gst-launch-1.0 v4l2src device=/dev/video4 ! video/x-raw, format=I420, width=1920, height=1080, framerate=30/1 ! autovideosink
The above pipeline results in broken picture (see attached). Note that my driver does not support I420 and what I see requested from the driver is YUYV (0x56595559) so I think there is a conversion done in libv4l2. I first wrote to GStreamer and got an answer confirming it: the emulation is done in libv4l2. Can there be a bug while converting YUYV to I420 in libv4l2?
Requesting other formats which driver supports (no v4l2 emulation involved) results in the correct captured image (see attached).
Best regards, Przemek
Przemek Gajos Software Engineer [Datapath]http://www.datapath.co.uk/ Bemrose House, Bemrose Park, Wayzgoose Drive, Derby, DE21 6XQ, United Kingdom T:+44 (0)1332 294 441 | www.datapath.co.ukhttp://www.datapath.co.uk [cid:image231efd.JPG@19d9246f.4a977e7b]http://ow.ly/a4cH300zbGd Datapath Ltd. Registered Number: 1609392. Registered in England at Bemrose House, Bemrose Park, Wayzgoose Drive, Derby. DE21 6XQ.
Hi,
On 21-07-17 15:35, Przemek Gajos wrote:
Dear all,
I am a v4l2 capture driver developer and I have encountered a problem when requesting I420 pixel format with:
gst-launch-1.0 v4l2src device=/dev/video4 ! video/x-raw, format=I420, width=1920, height=1080, framerate=30/1 ! autovideosink
The above pipeline results in broken picture (see attached). Note that my driver does not support I420 and what I see requested from the driver is YUYV (0x56595559) so I think there is a conversion done in libv4l2. I first wrote to GStreamer and got an answer confirming it: the emulation is done in libv4l2.
Can there be a bug while converting YUYV to I420 in libv4l2?
That is possible, I have 2 suggestions for you:
1) Try a gst-launch line directly requesting YUYV , autovideosink should be able to convert itself If that also does not work then you've a problem in your driver
2) If 1. does not help, libv4l is open source and the code is available for inspection...
Regards,
Hans
Requesting other formats which driver supports (no v4l2 emulation involved) results in the correct captured image (see attached).
*Best regards,*
*Przemek*
Przemek Gajos Software Engineer Datapath http://www.datapath.co.uk/ Bemrose House, Bemrose Park, Wayzgoose Drive, Derby, DE21 6XQ, United Kingdom T:+44 (0)1332 294 441 | www.datapath.co.uk http://www.datapath.co.uk http://ow.ly/a4cH300zbGd Datapath Ltd. Registered Number: 1609392. Registered in England at Bemrose House, Bemrose Park, Wayzgoose Drive, Derby. DE21 6XQ.
V4L2-library mailing list V4L2-library@linuxtv.org https://www.linuxtv.org/cgi-bin/mailman/listinfo/v4l2-library