Read the videoconvert understood format

simo zz simon.zz at yahoo.com
Mon Sep 11 15:22:43 UTC 2017


Hello,I am trying to understand what is the file format understood by videoconvert in the following pipeline:
v4l2src device=/dev/webcam ! videoconvert ! video/x-raw,width=544,height=288 ! multifilesink location=file%06d.raw
>From the following doc
https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-plugins/html/gst-plugins-base-plugins-videoconvert.html

I can read that videconvert will automatically convert the video to a format understood by the video sink.My request arise from the fact that I am a little bit confused with pixel formats.My USB camera has the following formats (read with v4l2-ctl --list-formats --device=/dev/webcam from a Linux distro)
ioctl: VIDIOC_ENUM_FMT
    Index       : 0
    Type        : Video Capture
    Pixel Format: 'YUYV'
    Name        : YUYV 4:2:2

    Index       : 1
    Type        : Video Capture
    Pixel Format: 'MJPG' (compressed)
    Name        : Motion-JPEG

After reading the following page:
http://blogs.adobe.com/VideoRoad/2010/06/what_is_yuv.html

I undestand that YUYV 422 is a 3 channel file format.
But each raw file generated by the gststreamer pipeline is 313344 bytes long, which is equals to 2 * 544 * 288 = 2 * width * height so I understand that the file format generated by the pipeline has 2 channels so I don't understand what format is used.
The assumption of 2 channels arise from the fact that if I specify format=GBR in the caps string, I obtain a raw file 470016 bytes long, which is 3 * 544 * 288 and later I can correctly decode the raw data to a png file using OpenCV.

So what is my file format generated by videoconvert ?How can I be sure of it ?
Thank you in advance for your help.
Regards,Simon


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-android/attachments/20170911/d5e8e7a4/attachment.html>


More information about the gstreamer-android mailing list