Yavta

Stable: 30.11.2021 - 17:43 / Revision: 12.10.2021 - 16:26

I am here to prevent the first-page-empty bug!

1 Overview

Yavta stands for "Yet Another V4L2 Test Application". This is a test application based on V4L2 Linux® kernel interface that allows testing, debugging and controlling camera subsystem.

Warning white.png Warning
Yavta is only available in STM32MP1 Distribution Package weston image

2 How to use Yavta

/usr/sbin # yavta --help
Usage: yavta [options] device
Supported options:
-c, --capture[=nframes]         Capture frames
-C, --check-overrun             Verify dequeued frames for buffer overrun
-d, --delay                     Delay (in ms) before requeuing buffers
-D, --display                   Display frames
-f, --format format             Set the video format
-F, --file[=name]               Read/write frames from/to disk
        For video capture devices, the first '#' character in the file name is
        expanded to the frame sequence number. The default file name is
        'frame-#.bin'.
-h, --help                      Show this help screen
-i, --input input               Select the video input
-I, --fill-frames               Fill frames with check pattern before queuing them
-l, --list-controls             List available controls
-n, --nbufs n                   Set the number of video buffers
-p, --pause                     Pause before starting the video stream
-q, --quality n                 MJPEG quality (0-100)
-r, --get-control ctrl          Get control 'ctrl'
-R, --realtime=[priority]       Enable realtime RR scheduling
-s, --size WxH                  Set the frame size
-t, --time-per-frame num/denom  Set the time per frame (eg. 1/25 = 25 fps)
-u, --userptr                   Use the user pointers streaming method
-w, --set-control 'ctrl value'  Set control 'ctrl' to 'value'
    --enum-formats              Enumerate formats
    --enum-inputs               Enumerate inputs
    --no-query                  Don't query capabilities on open
    --offset                    User pointer buffer offset from page start
    --requeue-last              Requeue the last buffers before streamoff
    --skip n                    Skip the first n frames
    --sleep-forever             Sleep forever after configuring the device
    --stride value              Line stride in bytes

3 Examples

  • Getting supported controls/formats/resolutions:
yavta -l --enum-formats --enum-inputs /dev/video0
Device /dev/video0 opened.
Device `STM32 Camera Memory Interface' on `platform:dcmi' is a video capture device.
--- Image Processing Controls (class 0x009f0001) ---
control 0x009f0903 `Test Pattern' min 0 max 1 step 1 default 0 current 1.
1 control found.
- Available formats:
        Format 0: RGB565 (50424752)
        Type: Video capture (1)
        Name: 16-bit RGB 5-6-5
        Frame size: 640x480 ()
        Frame size: 320x240 ()
        Frame size: 160x120 ()

- Available inputs:
        Input 0: Camera.

Video format: RGB565 (50424752) 160x120 (stride 320) buffer size 38400
  • Capturing 10 frames on the disk (default format/resolution):
yavta -F /dev/video0 --capture=10
/usr/sbin # yavta -F /dev/video0 --capture=10
Device /dev/video0 opened.
Device `STM32 Camera Memory Interface' on `platform:dcmi' is a video capture device.
Video format: RGB565 (50424752) 160x120 (stride 320) buffer size 38400
8 buffers requested.
length: 38400 offset: 0
Buffer 0 mapped at address 0xc0710000.
length: 38400 offset: 40960
Buffer 1 mapped at address 0xc0720000.
length: 38400 offset: 81920
Buffer 2 mapped at address 0xc0730000.
length: 38400 offset: 122880
Buffer 3 mapped at address 0xc0740000.
length: 38400 offset: 163840
Buffer 4 mapped at address 0xc0750000.
length: 38400 offset: 204800
Buffer 5 mapped at address 0xc0760000.
length: 38400 offset: 245760
Buffer 6 mapped at address 0xc0770000.
length: 38400 offset: 286720
Buffer 7 mapped at address 0xc0780000.
0 (0) [-] 0 38400 bytes 1378.374325 1378.374535 17.819 fps
1 (1) [-] 1 38400 bytes 1378.407623 1378.407822 30.032 fps
2 (2) [-] 2 38400 bytes 1378.440939 1378.441111 30.016 fps
3 (3) [-] 3 38400 bytes 1378.474288 1378.474450 29.986 fps
4 (4) [-] 4 38400 bytes 1378.507624 1378.507827 29.998 fps
5 (5) [-] 5 38400 bytes 1378.540989 1378.541196 29.972 fps
6 (6) [-] 6 38400 bytes 1378.574288 1378.574489 30.031 fps
7 (7) [-] 7 38400 bytes 1378.607624 1378.607827 29.998 fps
8 (0) [-] 8 38400 bytes 1378.640959 1378.641162 29.999 fps
9 (1) [-] 9 38400 bytes 1378.674288 1378.674488 30.004 fps
Captured 10 frames in 0.356282 seconds (28.067590 fps, 1077795.461669 B/s).



IMPORTANT NOTICE – READ CAREFULLY
STMicroelectronics NV and its subsidiaries ("ST") reserve the right to make changes, corrections, enhancements, modifications, and improvements to ST products and/or to this document at any time without notice. Purchasers should obtain the latest relevant information on ST products before placing orders. ST products are sold pursuant to ST’s terms and conditions of sale in place at the time of order acknowledgment.

Purchasers are solely responsible for the choice, selection, and use of ST products and ST assumes no liability for application assistance or the design of purchasers’ products.

No license, express or implied, to any intellectual property right is granted by ST herein.

Resale of ST products with provisions different from the information set forth herein shall void any warranty granted by ST for such product.

ST and the ST logo are trademarks of ST. For additional information about ST trademarks, refer to www.st.com/trademarks. All other product or service names are the property of their respective owners.

Information in this document supersedes and replaces information previously supplied in any prior versions of this document.