<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>I agree with Nicholas, the easiest is to use 'v4l2-ctl'.</p>
    <p>But otherwise you should look at the negotiation of the CAPS (I
      have no v4lsink so I show an example with v4l2src):</p>
    <p>GST_DEBUG=*:3,GST_CAPS:5 gst-launch-1.0 v4l2src ! fakesink</p>
    <p>Setting pipeline to PLAYING ...<br>
      0:00:00.126314061 524670 0x55b209141f60 DEBUG              
      GST_CAPS gstutils.c:3113:gst_pad_query_caps:<v4l2src0:src>
      get pad caps with filter (NULL)<br>
      New clock: GstSystemClock<br>
      0:00:00.126399095 524670 0x55b209141f60 DEBUG              
      GST_CAPS gstutils.c:3120:gst_pad_query_caps:<v4l2src0:src>
      query returned video/x-raw, format=(string)YUY2, width=(int)1280,
      height=(int)720, pixel-aspect-ratio=(fraction)1/1,
      framerate=(fraction)10/1; video/x-raw, format=(string)YUY2,
      width=(int)960, height=(int)540, pixel-aspect-ratio=(fraction)1/1,
      framerate=(fraction)15/1; video/x-raw, format=(string)YUY2,
      width=(int)848, height=(int)480, pixel-aspect-ratio=(fraction)1/1,
      framerate=(fraction)20/1; video/x-raw, format=(string)YUY2,
      width=(int)640, height=(int)480, pixel-aspect-ratio=(fraction)1/1,
      framerate=(fraction)30/1; video/x-raw, format=(string)YUY2,
      width=(int)640, height=(int)360, pixel-aspect-ratio=(fraction)1/1,
      framerate=(fraction)30/1; video/x-raw, format=(string)YUY2,
      width=(int)424, height=(int)240, pixel-aspect-ratio=(fraction)1/1,
      framerate=(fraction)30/1; video/x-raw, format=(string)YUY2,
      width=(int)352, height=(int)288, pixel-aspect-ratio=(fraction)1/1,
      framerate=(fraction)30/1; video/x-raw, format=(string)YUY2,
      width=(int)320, height=(int)240, pixel-aspect-ratio=(fraction)1/1,
      framerate=(fraction)30/1; video/x-raw, format=(string)YUY2,
      width=(int)320, height=(int)180, pixel-aspect-ratio=(fraction)1/1,
      framerate=(fraction)30/1; image/jpeg, width=(int)1280,
      height=(int)720, pixel-aspect-ratio=(fraction)1/1,
      framerate=(fraction)30/1; image/jpeg, width=(int)960,
      height=(int)540, pixel-aspect-ratio=(fraction)1/1,
      framerate=(fraction)30/1; image/jpeg, width=(int)848,
      height=(int)480, pixel-aspect-ratio=(fraction)1/1,
      framerate=(fraction)30/1; image/jpeg, width=(int)640,
      height=(int)480, pixel-aspect-ratio=(fraction)1/1,
      framerate=(fraction)30/1; image/jpeg, width=(int)640,
      height=(int)360, pixel-aspect-ratio=(fraction)1/1,
      framerate=(fraction)30/1; image/jpeg, width=(int)424,
      height=(int)240, pixel-aspect-ratio=(fraction)1/1,
      framerate=(fraction)30/1; image/jpeg, width=(int)352,
      height=(int)288, pixel-aspect-ratio=(fraction)1/1,
      framerate=(fraction)30/1; image/jpeg, width=(int)320,
      height=(int)240, pixel-aspect-ratio=(fraction)1/1,
      framerate=(fraction)30/1; image/jpeg, width=(int)320,
      height=(int)180, pixel-aspect-ratio=(fraction)1/1,
      framerate=(fraction)30/1<br>
    </p>
    <p>Shows the formats, sizes and fps my webcam supports</p>
    <p><br>
    </p>
    <p>By comparison with:</p>
    <p>v4l2-ctl -d /dev/video0 --list-formats-ext</p>
    <p>[0]: 'MJPG' (Motion-JPEG, compressed)<br>
      Â Â  Â Â Â Â  Size: Discrete 1280x720<br>
      Â Â  Â Â Â Â  Â Â Â  Interval: Discrete 0.033s (30.000 fps)<br>
      Â Â  Â Â Â Â  Size: Discrete 320x180<br>
      Â Â  Â Â Â Â  Â Â Â  Interval: Discrete 0.033s (30.000 fps)<br>
      Â Â  Â Â Â Â  Size: Discrete 320x240<br>
      Â Â  Â Â Â Â  Â Â Â  Interval: Discrete 0.033s (30.000 fps)<br>
      Â Â  Â Â Â Â  Size: Discrete 352x288<br>
      Â Â  Â Â Â Â  Â Â Â  Interval: Discrete 0.033s (30.000 fps)<br>
      Â Â  Â Â Â Â  Size: Discrete 424x240<br>
      Â Â  Â Â Â Â  Â Â Â  Interval: Discrete 0.033s (30.000 fps)<br>
      Â Â  Â Â Â Â  Size: Discrete 640x360<br>
      Â Â  Â Â Â Â  Â Â Â  Interval: Discrete 0.033s (30.000 fps)<br>
      Â Â  Â Â Â Â  Size: Discrete 640x480<br>
      Â Â  Â Â Â Â  Â Â Â  Interval: Discrete 0.033s (30.000 fps)<br>
      Â Â  Â Â Â Â  Size: Discrete 848x480<br>
      Â Â  Â Â Â Â  Â Â Â  Interval: Discrete 0.033s (30.000 fps)<br>
      Â Â  Â Â Â Â  Size: Discrete 960x540<br>
      Â Â  Â Â Â Â  Â Â Â  Interval: Discrete 0.033s (30.000 fps)<br>
      Â Â  Â [1]: 'YUYV' (YUYV 4:2:2)<br>
      Â Â  Â Â Â Â  Size: Discrete 640x480<br>
      Â Â  Â Â Â Â  Â Â Â  Interval: Discrete 0.033s (30.000 fps)<br>
      Â Â  Â Â Â Â  Size: Discrete 320x180<br>
      Â Â  Â Â Â Â  Â Â Â  Interval: Discrete 0.033s (30.000 fps)<br>
      Â Â  Â Â Â Â  Size: Discrete 320x240<br>
      Â Â  Â Â Â Â  Â Â Â  Interval: Discrete 0.033s (30.000 fps)<br>
      Â Â  Â Â Â Â  Size: Discrete 352x288<br>
      Â Â  Â Â Â Â  Â Â Â  Interval: Discrete 0.033s (30.000 fps)<br>
      Â Â  Â Â Â Â  Size: Discrete 424x240<br>
      Â Â  Â Â Â Â  Â Â Â  Interval: Discrete 0.033s (30.000 fps)<br>
      Â Â  Â Â Â Â  Size: Discrete 640x360<br>
      Â Â  Â Â Â Â  Â Â Â  Interval: Discrete 0.033s (30.000 fps)<br>
      Â Â  Â Â Â Â  Size: Discrete 848x480<br>
      Â Â  Â Â Â Â  Â Â Â  Interval: Discrete 0.050s (20.000 fps)<br>
      Â Â  Â Â Â Â  Size: Discrete 960x540<br>
      Â Â  Â Â Â Â  Â Â Â  Interval: Discrete 0.067s (15.000 fps)<br>
      Â Â  Â Â Â Â  Size: Discrete 1280x720<br>
      Â Â  Â Â Â Â  Â Â Â  Interval: Discrete 0.100s (10.000 fps)<br>
      <br>
    </p>
    <p>Best Regards</p>
    <p>Marianna<br>
    </p>
    <div class="moz-cite-prefix">On 30/08/2023 13.41,
      <a class="moz-txt-link-abbreviated" href="mailto:gstreamer-devel-request@lists.freedesktop.org">gstreamer-devel-request@lists.freedesktop.org</a> wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:mailman.21450.1693395695.931.gstreamer-devel@lists.freedesktop.org">
      <pre class="moz-quote-pre" wrap="">Hi,

Le mar. 29 ao?t 2023, 06 h 45, Regine Issan via gstreamer-devel <
<a class="moz-txt-link-abbreviated moz-txt-link-freetext" href="mailto:gstreamer-devel@lists.freedesktop.org" moz-do-not-send="true">gstreamer-devel@lists.freedesktop.org</a>> a ?crit :

</pre>
      <blockquote type="cite" style="color: #007cff;">
        <pre class="moz-quote-pre" wrap="">Hello,
I am new to video world.
Trying to figure out the frame size limitations of v4l2sink.
running gst-launch-1.0 v4l2sink i get the result below.
Does that mean that v4l2 supports
video\ebayer  and video\x-bayer  frames
up to 32768*32768 pixels
with frame rate between 1 to 2147483647 frames per second ?

</pre>
      </blockquote>
      <pre class="moz-quote-pre" wrap="">These are just template, what the HW support is obtained at runtime. While
its possible to write an GST app to retrieve this information, it's easier
to introspect your v4l2 driver using v4l2-ctl utility.



</pre>
      <blockquote type="cite" style="color: #007cff;">
        <pre class="moz-quote-pre" wrap="">Thanks !


Pad Templates:
  SINK template: 'sink'
    Availability: Always
    Capabilities:
      image/jpeg
      video/mpeg
            mpegversion: 4
           systemstream: false
      video/mpeg
            mpegversion: { (int)1, (int)2 }
      video/mpegts
           systemstream: true
      <b class="moz-txt-star"><span class="moz-txt-tag">*</span>video/x-bayer<span class="moz-txt-tag">*</span></b>
                 format: { (string)bggr, (string)gbrg, (string)grbg,
(string)rggb }

*   width: [ 1, 32768 ]                 height: [ 1, 32768 ]*
         *     framerate: [ 0/1, 2147483647/1 ]*

<b class="moz-txt-star"><span class="moz-txt-tag">*</span>video/x-raw<span class="moz-txt-tag">*</span></b>
                 format: { (string)RGB16, (string)BGR, (string)RGB,
(string)ABGR, (string)xBGR, (string)RGBA, (string)RGBx, (string)GRAY8,
(string)GRAY16_LE, (string)GRAY16_BE, (string)YVU9, (string)YV12,
(string)YUY2, (string)YVYU, (string)UYVY, (string)Y42B, (string)Y41B,
(string)YUV9, (string)NV12_64Z32, (string)NV24, (string)NV61, (string)NV16,
(string)NV21, (string)NV12, (string)I420, (string)ARGB, (string)xRGB,
(string)BGRA, (string)BGRx, (string)BGR15, (string)RGB15 }


* width: [ 1, 32768 ]                 height: [ 1, 32768 ]
framerate: [ 0/1, 2147483647/1 ]*

</pre>
      </blockquote>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Best regards / Med venlig hilsen
“Marianna Smidth Buschle”</pre>
  </body>
</html>