To debug a GStreamer based application, perform the following steps.
- Run capture to display pipeline to ensure live capture to display is working as expected.
gst-launch-1.0 -v v4l2src io-mode=4 device=/dev/video1 ! video/ x-raw,format=NV12,width=3840,height=2160, framerate=30/1 ! kmssink driver-name=xilinx_drm_mixer
- If you see a streamon error with the capture → display pipeline, ensure that the
format is set to NV12 using v4l2-ctl and media-ctl API inside hdmi configuration
script. Here is an example
v4l2-ctl -d /dev/video1 --set-fmt-video=width=3840,height=2160,pixelformat='NV12' media-ctl -d /dev/media1 -V "\"a0080000.scaler\":0 [fmt:RBG888_1X24/3840x2160 field:none]" media-ctl -d /dev/media1 -V "\"a0080000.scaler\":1 [fmt:VYYUYY8_1X24/3840x2160 field:none]"
- Run a pipeline with VCU components in the pipeline. Use omxh264/omxh265enc/dec components in the pipeline.
- For a list of supported properties of omxh264/omxh265enc/dec, use the following
command:
gst-inspect-1.0 <omxh264/omxh265enc/dec>
which lists all the supported properties of VCU encoder and decoder blocks. Use the properties as appropriate in the pipeline.
- Start with a known pipeline example like the one
below:
gst-launch-1.0 -v \ v4l2src num-buffers=2100 device=/dev/video8 io-mode=4 \ ! video/x-raw,format=NV12,width=3840,height=2160, framerate=30/1 \ ! omxh265enc target-bitrate=70000 prefetch-buffer=TRUE \control-rate=2 gop-length=30 b-frames=0 \ ! video/x-h265, profile=main,level=\ (string\ )5.1,tier=main \ ! omxh265dec low-latency=0 internal-entropy-buffers=2 \ ! queue \ ! fpsdisplaysink name=fpssink text-overlay=false \ video-sink="kmssink max-lateness=100000000 async=false \ sync=true driver-name=xilinx_drm_mixer" -v