gsreeamer\v4l2sink - frame rate\size limitations

Marianna Smidth Buschle msb at qtec.com
Wed Aug 30 12:24:57 UTC 2023


I agree with Nicholas, the easiest is to use 'v4l2-ctl'.

But otherwise you should look at the negotiation of the CAPS (I have no 
v4lsink so I show an example with v4l2src):

GST_DEBUG=*:3,GST_CAPS:5 gst-launch-1.0 v4l2src ! fakesink

Setting pipeline to PLAYING ...
0:00:00.126314061 524670 0x55b209141f60 DEBUG GST_CAPS 
gstutils.c:3113:gst_pad_query_caps:<v4l2src0:src> get pad caps with 
filter (NULL)
New clock: GstSystemClock
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

Shows the formats, sizes and fps my webcam supports


By comparison with:

v4l2-ctl -d /dev/video0 --list-formats-ext

[0]: 'MJPG' (Motion-JPEG, compressed)
         Size: Discrete 1280x720
             Interval: Discrete 0.033s (30.000 fps)
         Size: Discrete 320x180
             Interval: Discrete 0.033s (30.000 fps)
         Size: Discrete 320x240
             Interval: Discrete 0.033s (30.000 fps)
         Size: Discrete 352x288
             Interval: Discrete 0.033s (30.000 fps)
         Size: Discrete 424x240
             Interval: Discrete 0.033s (30.000 fps)
         Size: Discrete 640x360
             Interval: Discrete 0.033s (30.000 fps)
         Size: Discrete 640x480
             Interval: Discrete 0.033s (30.000 fps)
         Size: Discrete 848x480
             Interval: Discrete 0.033s (30.000 fps)
         Size: Discrete 960x540
             Interval: Discrete 0.033s (30.000 fps)
     [1]: 'YUYV' (YUYV 4:2:2)
         Size: Discrete 640x480
             Interval: Discrete 0.033s (30.000 fps)
         Size: Discrete 320x180
             Interval: Discrete 0.033s (30.000 fps)
         Size: Discrete 320x240
             Interval: Discrete 0.033s (30.000 fps)
         Size: Discrete 352x288
             Interval: Discrete 0.033s (30.000 fps)
         Size: Discrete 424x240
             Interval: Discrete 0.033s (30.000 fps)
         Size: Discrete 640x360
             Interval: Discrete 0.033s (30.000 fps)
         Size: Discrete 848x480
             Interval: Discrete 0.050s (20.000 fps)
         Size: Discrete 960x540
             Interval: Discrete 0.067s (15.000 fps)
         Size: Discrete 1280x720
             Interval: Discrete 0.100s (10.000 fps)

Best Regards

Marianna

On 30/08/2023 13.41, gstreamer-devel-request at lists.freedesktop.org wrote:
> Hi,
>
> Le mar. 29 ao?t 2023, 06 h 45, Regine Issan via gstreamer-devel <
> gstreamer-devel at lists.freedesktop.org> a ?crit :
>
>> 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 ?
>>
> 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.
>
>
>
>> 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
>>        *video/x-bayer*
>>                   format: { (string)bggr, (string)gbrg, (string)grbg,
>> (string)rggb }
>>
>> *   width: [ 1, 32768 ]                 height: [ 1, 32768 ]*
>>           *     framerate: [ 0/1, 2147483647/1 ]*
>>
>> *video/x-raw*
>>                   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 ]*
>>
-- 
Best regards / Med venlig hilsen
“Marianna Smidth Buschle”
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20230830/062bc4b2/attachment.htm>


More information about the gstreamer-devel mailing list