<html><head></head><body><div style="color:#000; background-color:#fff; font-family:Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:13px"><div id="yui_3_16_0_ym19_1_1505132235140_10105">Hello,</div><div id="yui_3_16_0_ym19_1_1505132235140_10106">I am trying to understand what is the file format understood by videoconvert in the following pipeline:</div><div id="yui_3_16_0_ym19_1_1505132235140_10107"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1505132235140_10044"><b id="yui_3_16_0_ym19_1_1505132235140_10067">v4l2src device=/dev/webcam ! videoconvert ! video/x-raw,width=544,height=288 ! multifilesink location=file%06d.raw</b></div><div id="yui_3_16_0_ym19_1_1505132235140_10108" dir="ltr"><br></div><div id="yui_3_16_0_ym19_1_1505132235140_10109" dir="ltr">From the following doc</div><div id="yui_3_16_0_ym19_1_1505132235140_11447" dir="ltr"><br></div><div id="yui_3_16_0_ym19_1_1505132235140_11443" dir="ltr"><a id="yui_3_16_0_ym19_1_1505132235140_11442" href="https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-plugins/html/gst-plugins-base-plugins-videoconvert.html">https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-plugins/html/gst-plugins-base-plugins-videoconvert.html</a><br></div><div id="yui_3_16_0_ym19_1_1505132235140_11444" dir="ltr"><br></div><div id="yui_3_16_0_ym19_1_1505132235140_11445" dir="ltr">I can read that videconvert will automatically convert the video to a format understood by the video sink.</div><div id="yui_3_16_0_ym19_1_1505132235140_10450" dir="ltr">My request arise from the fact that I am a little bit confused with pixel formats.</div><div id="yui_3_16_0_ym19_1_1505132235140_10476" dir="ltr">My USB camera has the following formats (read with <b id="yui_3_16_0_ym19_1_1505132235140_10485">v4l2-ctl --list-formats --device=/dev/webcam</b> from a Linux distro)</div><div id="yui_3_16_0_ym19_1_1505132235140_10486" dir="ltr"><br></div><div id="yui_3_16_0_ym19_1_1505132235140_10487" dir="ltr"><b id="yui_3_16_0_ym19_1_1505132235140_10580">ioctl: VIDIOC_ENUM_FMT<br id="yui_3_16_0_ym19_1_1505132235140_10570"> Index : 0<br id="yui_3_16_0_ym19_1_1505132235140_10571"> Type : Video Capture<br id="yui_3_16_0_ym19_1_1505132235140_10572"> Pixel Format: 'YUYV'<br id="yui_3_16_0_ym19_1_1505132235140_10573"> Name : YUYV 4:2:2<br id="yui_3_16_0_ym19_1_1505132235140_10574"><br id="yui_3_16_0_ym19_1_1505132235140_10575"> Index : 1<br id="yui_3_16_0_ym19_1_1505132235140_10576"> Type : Video Capture<br id="yui_3_16_0_ym19_1_1505132235140_10577"> Pixel Format: 'MJPG' (compressed)<br id="yui_3_16_0_ym19_1_1505132235140_10578"> Name : Motion-JPEG</b><br></div><div id="yui_3_16_0_ym19_1_1505132235140_16347"><br></div><div id="yui_3_16_0_ym19_1_1505132235140_16349">After reading the following page:</div><div id="yui_3_16_0_ym19_1_1505132235140_11599" dir="ltr"><br></div><div id="yui_3_16_0_ym19_1_1505132235140_11598" dir="ltr"><a id="yui_3_16_0_ym19_1_1505132235140_11597" href="http://blogs.adobe.com/VideoRoad/2010/06/what_is_yuv.html">http://blogs.adobe.com/VideoRoad/2010/06/what_is_yuv.html</a><br></div><div id="yui_3_16_0_ym19_1_1505132235140_11584" dir="ltr"><br></div><div id="yui_3_16_0_ym19_1_1505132235140_16351">I undestand that <b id="yui_3_16_0_ym19_1_1505132235140_16345">YUYV</b> <b id="yui_3_16_0_ym19_1_1505132235140_16346">422</b> is a 3 channel file format.</div><div id="yui_3_16_0_ym19_1_1505132235140_16353"><br></div><div id="yui_3_16_0_ym19_1_1505132235140_11585" dir="ltr">But each raw file generated by the gststreamer pipeline is <b id="yui_3_16_0_ym19_1_1505132235140_10831">313344</b> bytes long, which is equals to <b id="yui_3_16_0_ym19_1_1505132235140_10905">2 * 544 * 288 = 2 * width * height</b> so I understand that the file format generated by the pipeline has 2 channels so I don't understand what format is used.<br></div><div id="yui_3_16_0_ym19_1_1505132235140_10886" dir="ltr">The assumption of 2 channels arise from the fact that if I specify <b id="yui_3_16_0_ym19_1_1505132235140_10931">format=GBR</b> in the caps string, I obtain a raw file <b id="yui_3_16_0_ym19_1_1505132235140_10906">470016</b> bytes long, which is <b id="yui_3_16_0_ym19_1_1505132235140_11596">3 * 544 * 288</b> and later I can correctly decode the raw data to a png file using OpenCV.<br></div><div id="yui_3_16_0_ym19_1_1505132235140_10759"><br></div><div id="yui_3_16_0_ym19_1_1505132235140_11023">So what is my file format generated by <b id="yui_3_16_0_ym19_1_1505132235140_11025">videoconvert</b> ?</div><div id="yui_3_16_0_ym19_1_1505132235140_11026">How can I be sure of it ?</div><div id="yui_3_16_0_ym19_1_1505132235140_11027"><br></div><div id="yui_3_16_0_ym19_1_1505132235140_11028">Thank you in advance for your help.<br></div><div id="yui_3_16_0_ym19_1_1505132235140_11038">Regards,</div><div id="yui_3_16_0_ym19_1_1505132235140_16387">Simon<br></div><div id="yui_3_16_0_ym19_1_1505132235140_10830"><br></div><div id="yui_3_16_0_ym19_1_1505132235140_10372"><br></div></div></body></html>