Debugging GStreamer Based Application - 2023.1 English

H.264/H.265 Video Codec Unit v1.2 Solutions LogiCORE IP Product Guide (PG252)

Document ID
Release Date
2023.1 English

To debug a GStreamer based application, perform the following steps.

  1. 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 
  2. 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]"
  3. Run a pipeline with VCU components in the pipeline. Use omxh264/omxh265enc/dec components in the pipeline.
  4. 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.

  5. 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=\
    )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