Test procedure for video capture and play

Linux Drivers

Release Date
2023-07-22

The driver has been tested using the YAVTA tool and GStreamer framework.

On cable connect, the Rx core will detect the input stream and set the MEDIA_BUS format accordingly. Video data received from Rx core is saved to DDR using framebuffer write DMA. You can query the detected format by using media-ctl utility.

root@xilinx-zcu102-2021_1:/media# media-ctl -p
Media controller API version 5.10.0

Media device information
------------------------
driver          xilinx-video
model           Xilinx Video Composite Device
serial
bus info
hw revision     0x0
driver version  5.10.0

Device topology
- entity 1: vcap_dp output 0 (1 pad, 1 link)
            type Node subtype V4L flags 0
            device node name /dev/video0
        pad0: Sink
                <- "a0040000.v_dp_rxss1":0 [ENABLED]

- entity 5: a0040000.v_dp_rxss1 (1 pad, 1 link)
            type V4L2 subdev subtype Unknown flags 0
            device node name /dev/v4l-subdev0
        pad0: Source
                [fmt:RBG888_1X24/3840x2160 field:none colorspace:rec709]
                [dv.caps:BT.656/1120 min:800x600@25000000 max:7680x4320@297000000 stds:CEA-861,DMT,CVT,GTF caps:interlaced,progressive,reduced-blanking,custom]
                [dv.detect:BT.656/1120 3840x2160p60 (4400x2250) stds:CEA-861 flags:can-reduce-fps,CE-video,has-cea861-vic]
                -> "vcap_dp output 0":0 [ENABLED]

root@xilinx-zcu102-2022_1:/media#

Using VIDIOC_SUBDEV_G_FMT ioctl, the width, height ,format and field type (interlaced or progressive) can be determined.

The resolution info can be sent across to a video capture application such as YAVTA to capture the stream frames into the DDR using a simple design

DP-Rx SS ==> Framebuffer Write ==> Memory

For example, below is the command to capture a 1920x1080 stream using the yavta application .

yavta -n 3 -c10 -f RGB24 -s 1920x1080 --skip 9 -F /dev/video0

The captured .bin files can then be viewed in the yuvplayer.exe application.

Below is the command to capture a 1920x1080 stream using a GStreamer application .

gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=2 ! video/x-raw,width=1920,height=1080,format=RGB ! filesink location=frame.rgb

The above command captures 2 frames from the input stream and saves it in a file called frame.rgb which can then be viewed in the yuvplayer.exe application.