<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_23140">Hello,</div><div id="yui_3_16_0_ym19_1_1505132235140_23141">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_23142"><br id="yui_3_16_0_ym19_1_1505132235140_23143"></div><div id="yui_3_16_0_ym19_1_1505132235140_23144" dir="ltr"><b id="yui_3_16_0_ym19_1_1505132235140_23145">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_23146" dir="ltr"><br id="yui_3_16_0_ym19_1_1505132235140_23147"></div><div id="yui_3_16_0_ym19_1_1505132235140_23148" dir="ltr">From the following doc</div><div id="yui_3_16_0_ym19_1_1505132235140_23149" dir="ltr"><br id="yui_3_16_0_ym19_1_1505132235140_23150"></div><div id="yui_3_16_0_ym19_1_1505132235140_23151" dir="ltr"><a id="yui_3_16_0_ym19_1_1505132235140_23152" rel="nofollow" target="_blank" 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 id="yui_3_16_0_ym19_1_1505132235140_23153"></div><div id="yui_3_16_0_ym19_1_1505132235140_23154" dir="ltr"><br id="yui_3_16_0_ym19_1_1505132235140_23155"></div><div id="yui_3_16_0_ym19_1_1505132235140_23156" 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_23157" 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_23158" dir="ltr">My USB camera has the following formats (read with <b id="yui_3_16_0_ym19_1_1505132235140_23159">v4l2-ctl --list-formats --device=/dev/webcam</b> from a Linux distro)</div><div id="yui_3_16_0_ym19_1_1505132235140_23160" dir="ltr"><br id="yui_3_16_0_ym19_1_1505132235140_23161"></div><div id="yui_3_16_0_ym19_1_1505132235140_23162" dir="ltr"><b id="yui_3_16_0_ym19_1_1505132235140_23163">ioctl: VIDIOC_ENUM_FMT<br id="yui_3_16_0_ym19_1_1505132235140_23164"> Index : 0<br id="yui_3_16_0_ym19_1_1505132235140_23165"> Type : Video Capture<br id="yui_3_16_0_ym19_1_1505132235140_23166"> Pixel Format: 'YUYV'<br id="yui_3_16_0_ym19_1_1505132235140_23167"> Name : YUYV 4:2:2<br id="yui_3_16_0_ym19_1_1505132235140_23168"><br id="yui_3_16_0_ym19_1_1505132235140_23169"> Index : 1<br id="yui_3_16_0_ym19_1_1505132235140_23170"> Type : Video Capture<br id="yui_3_16_0_ym19_1_1505132235140_23171"> Pixel Format: 'MJPG' (compressed)<br id="yui_3_16_0_ym19_1_1505132235140_23172"> Name : Motion-JPEG</b><br id="yui_3_16_0_ym19_1_1505132235140_23173"></div><div id="yui_3_16_0_ym19_1_1505132235140_23174"><br id="yui_3_16_0_ym19_1_1505132235140_23175"></div><div id="yui_3_16_0_ym19_1_1505132235140_23176">After reading the following page:</div><div id="yui_3_16_0_ym19_1_1505132235140_23177" dir="ltr"><br id="yui_3_16_0_ym19_1_1505132235140_23178"></div><div id="yui_3_16_0_ym19_1_1505132235140_23179" dir="ltr"><a id="yui_3_16_0_ym19_1_1505132235140_23180" rel="nofollow" target="_blank" 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 id="yui_3_16_0_ym19_1_1505132235140_23181"></div><div id="yui_3_16_0_ym19_1_1505132235140_23182" dir="ltr"><br id="yui_3_16_0_ym19_1_1505132235140_23183"></div><div id="yui_3_16_0_ym19_1_1505132235140_23184">I undestand that <b id="yui_3_16_0_ym19_1_1505132235140_23185">YUYV</b> <b id="yui_3_16_0_ym19_1_1505132235140_23186">422</b> is a 3 channel file format.</div><div id="yui_3_16_0_ym19_1_1505132235140_23187"><br id="yui_3_16_0_ym19_1_1505132235140_23188"></div><div id="yui_3_16_0_ym19_1_1505132235140_23189" dir="ltr">But each raw file generated by the gststreamer pipeline is <b id="yui_3_16_0_ym19_1_1505132235140_23190">313344</b> bytes long, which is equals to <b id="yui_3_16_0_ym19_1_1505132235140_23191">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 id="yui_3_16_0_ym19_1_1505132235140_23192"></div><div id="yui_3_16_0_ym19_1_1505132235140_23193" dir="ltr">The assumption of 2 channels arise from the fact that if I specify <b id="yui_3_16_0_ym19_1_1505132235140_23194">format=GBR</b> in the caps string, I obtain a raw file <b id="yui_3_16_0_ym19_1_1505132235140_23195">470016</b> bytes long, which is <b id="yui_3_16_0_ym19_1_1505132235140_23196">3 * 544 * 288</b> and later I can correctly decode the raw data to a png file using OpenCV.<br id="yui_3_16_0_ym19_1_1505132235140_23197"></div><div id="yui_3_16_0_ym19_1_1505132235140_23198"><br id="yui_3_16_0_ym19_1_1505132235140_23199"></div><div id="yui_3_16_0_ym19_1_1505132235140_23200">So what is my file format generated by <b id="yui_3_16_0_ym19_1_1505132235140_23201">videoconvert</b> ?</div><div id="yui_3_16_0_ym19_1_1505132235140_23202"><div id="yui_3_16_0_ym19_1_1505132235140_24250">How can I be sure of it ?</div><div><br></div><div>PS: I sent the same request to the gstreamer-android mailing list. It was an error.<br></div></div><div id="yui_3_16_0_ym19_1_1505132235140_23203"><br id="yui_3_16_0_ym19_1_1505132235140_23204"></div><div id="yui_3_16_0_ym19_1_1505132235140_23205">Thank you in advance for your help.<br id="yui_3_16_0_ym19_1_1505132235140_23206"></div><div id="yui_3_16_0_ym19_1_1505132235140_23207">Regards,</div>Simon</div></body></html>