Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Run below modetest command to set CRTC configurations for 4Kp60:

Code Block
languagebash
$ modetest -D a0070000.v_mix -s 45:3840x2160-60@BG24

Run below modetest command to set CRTC configurations for 4Kp30:

Code Block
languagebash
$ modetest -D a0070000.v_mix -s 45:3840x2160-30@BG24

Execution of the application is shown below:

Code Block
languagebash
$ vcu_gst_app <path to *.cfg file>

...

4kp60 HEVC_HIGH Display Pipeline Execution

Code Block
languagebash
$ vcu_gst_app /media/card/config/1-4kp60/Display/Single_4kp60_HEVC_HIGH.cfg

4kp60 HEVC_HIGH Record Pipeline Execution

Code Block
languagebash
$ vcu_gst_app /media/card/config/1-4kp60/Record/Single_4kp60_HEVC_HIGH.cfg

4kp60 HEVC_HIGH Stream-out Pipeline Execution

Code Block
languagebash
$ vcu_gst_app /media/card/config/1-4kp60/Stream-out/Single_4kp60_HEVC_HIGH.cfg

4kp60 HEVC_HIGH Stream-in Pipeline Execution

Code Block
languagebash
$ vcu_gst_app /media/card/config/1-4kp60/Stream-in/input.cfg

...

Latency Measurement: To measure the latency of the pipeline, run the below command. The latency data is huge, so dump it to a file.

Code Block
languagebash
$ GST_DEBUG="GST_TRACER:7" GST_TRACERS="latency" GST_DEBUG_FILE=/run/latency.log vcu_gst_app /media/card/config/input.cfg

...

  • Kill the Qt GUI application running on target board by executing the below commands from the serial console

Code Block
languagebash
$ killall -9 run_vcu.sh
$ killall -9 vcu_qt
$ killall -9 Xorg
  • HDMI source can be locked to any resolution. Run the below command for all media nodes to print media device topology where "mediaX" represents different media nodes. In the topology, log look for the “v_hdmi_rx_ss” string to identify the HDMI input source media node.

Code Block
languagebash
$ media-ctl -p -d /dev/mediaX
  • To check the link status, resolution and video node of the HDMI input source, run below media-ctl command where "mediaX" indicates media node for the HDMI input source.

Code Block
languagebash
$ media-ctl -p -d /dev/mediaX
  • When HDMI source is connected to 4Kp60 resolution, it shows as below:

Code Block
languagebash
root@zcu106_vcu_trd:/media/card# media-ctl -p -d /dev/mediaX
Media controller API version 5.4.0

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

Device topology
- entity 1: vcapaxis_broad_out1hdmi_input_a (1 pad, 1 link)
            type Node subtype V4L flags 0
            device node name /dev/video0 -----> Video node for HDMI-Rx source
	pad0: Sink
		<- "amba_pl@0:axis_broadcasterhdmi_":1 [ENABLED]

- entity 5: vcapaxis_broad_out1hdmi_input_a (1 pad, 1 link)
            type Node subtype V4L flags 0
            device node name /dev/video1
	pad0: Sink
		<- "amba_pl@0:axis_broadcasterhdmi_":2 [ENABLED]

- entity 9: vcapaxis_broad_out1hdmi_input_a (1 pad, 1 link)
            type Node subtype V4L flags 0
            device node name /dev/video2
	pad0: Sink
		<- "amba_pl@0:axis_broadcasterhdmi_":3 [ENABLED]

- entity 13: vcapaxis_broad_out1hdmi_input_a (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video3
	pad0: Sink
		<- "amba_pl@0:axis_broadcasterhdmi_":4 [ENABLED]

- entity 17: vcapaxis_broad_out1hdmi_input_a (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video4
	pad0: Sink
		<- "amba_pl@0:axis_broadcasterhdmi_":5 [ENABLED]

- entity 21: vcapaxis_broad_out1hdmi_input_a (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video5
	pad0: Sink
		<- "amba_pl@0:axis_broadcasterhdmi_":6 [ENABLED]

- entity 25: vcapaxis_broad_out1hdmi_input_a (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video6
	pad0: Sink
		<- "amba_pl@0:axis_broadcasterhdmi_":7 [ENABLED]

- entity 29: amba_pl@0:axis_broadcasterhdmi_ (8 pads, 8 links)
             type V4L2 subdev subtype Unknown flags 0
             device node name /dev/v4l-subdev15
	pad0: Sink
		[fmt:VYYUYY8_1X24/3840x2160 field:none]
		<- "a0080000.v_proc_ss":1 [ENABLED]
	pad1: Source
		[fmt:VYYUYY8_1X24/3840x2160 field:none]
		-> "vcapaxis_broad_out1hdmi_input_a":0 [ENABLED]
	pad2: Source
		[fmt:VYYUYY8_1X24/3840x2160 field:none]
		-> "vcapaxis_broad_out1hdmi_input_a":0 [ENABLED]
	pad3: Source
		[fmt:VYYUYY8_1X24/3840x2160 field:none]
		-> "vcapaxis_broad_out1hdmi_input_a":0 [ENABLED]
	pad4: Source
		[fmt:VYYUYY8_1X24/3840x2160 field:none]
		-> "vcapaxis_broad_out1hdmi_input_a":0 [ENABLED]
	pad5: Source
		[fmt:VYYUYY8_1X24/3840x2160 field:none]
		-> "vcapaxis_broad_out1hdmi_input_a":0 [ENABLED]
	pad6: Source
		[fmt:VYYUYY8_1X24/3840x2160 field:none]
		-> "vcapaxis_broad_out1hdmi_input_a":0 [ENABLED]
	pad7: Source
		[fmt:VYYUYY8_1X24/3840x2160 field:none]
		-> "vcapaxis_broad_out1hdmi_input_a":0 [ENABLED]

- entity 38: a0080000.v_proc_ss (2 pads, 2 links)
             type V4L2 subdev subtype Unknown flags 0
             device node name /dev/v4l-subdev16
	pad0: Sink
		[fmt:RBG888_1X24/3840x2160 field:none]
		<- "a0000000.v_hdmi_rx_ss":0 [ENABLED]
	pad1: Source
		[fmt:VYYUYY8_1X24/3840x2160 field:none]
		-> "amba_pl@0:axis_broadcasterhdmi_":0 [ENABLED]

- entity 41: a0000000.v_hdmi_rx_ss (1 pad, 1 link)
             type V4L2 subdev subtype Unknown flags 0
             device node name /dev/v4l-subdev17
	pad0: Source
		[fmt:RBG888_1X24/3840x2160 field:none]
		[dv.caps:BT.656/1120 min:0x0@25000000 max:4096x2160@297000000 stds:CEA-861,DMT,CVT,GTF caps:progressive,reduced-blanking,custom]
		[dv.detect:BT.656/1120 3840x2160p60 (4400x2250) stds:CEA-861 flags:CE-video] -----> Resolution and Frame-rate of HDMI-Rx source
		-> "a0080000.v_proc_ss":0 [ENABLED]

...

  • When the HDMI source is not connected, it shows as below:

Code Block
languagebash
root@zcu106_vcu_trd:/media/card# media-ctl -p -d /dev/mediaX
Media controller API version 5.4.0

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

Device topology
- entity 1: vcapaxis_broad_out1hdmi_input_a (1 pad, 1 link)
            type Node subtype V4L flags 0
            device node name /dev/video0 -----> Video node for HDMI-Rx source
	pad0: Sink
		<- "amba_pl@0:axis_broadcasterhdmi_":1 [ENABLED]

- entity 5: vcapaxis_broad_out1hdmi_input_a (1 pad, 1 link)
            type Node subtype V4L flags 0
            device node name /dev/video1
	pad0: Sink
		<- "amba_pl@0:axis_broadcasterhdmi_":2 [ENABLED]

- entity 9: vcapaxis_broad_out1hdmi_input_a (1 pad, 1 link)
            type Node subtype V4L flags 0
            device node name /dev/video2
	pad0: Sink
		<- "amba_pl@0:axis_broadcasterhdmi_":3 [ENABLED]

- entity 13: vcapaxis_broad_out1hdmi_input_a (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video3
	pad0: Sink
		<- "amba_pl@0:axis_broadcasterhdmi_":4 [ENABLED]

- entity 17: vcapaxis_broad_out1hdmi_input_a (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video4
	pad0: Sink
		<- "amba_pl@0:axis_broadcasterhdmi_":5 [ENABLED]

- entity 21: vcapaxis_broad_out1hdmi_input_a (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video5
	pad0: Sink
		<- "amba_pl@0:axis_broadcasterhdmi_":6 [ENABLED]

- entity 25: vcapaxis_broad_out1hdmi_input_a (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video6
	pad0: Sink
		<- "amba_pl@0:axis_broadcasterhdmi_":7 [ENABLED]

- entity 29: amba_pl@0:axis_broadcasterhdmi_ (8 pads, 8 links)
             type V4L2 subdev subtype Unknown flags 0
             device node name /dev/v4l-subdev15
	pad0: Sink
		[fmt:VYYUYY8_1X24/3840x2160 field:none]
		<- "a0080000.v_proc_ss":1 [ENABLED]
	pad1: Source
		[fmt:VYYUYY8_1X24/3840x2160 field:none]
		-> "vcapaxis_broad_out1hdmi_input_a":0 [ENABLED]
	pad2: Source
		[fmt:VYYUYY8_1X24/3840x2160 field:none]
		-> "vcapaxis_broad_out1hdmi_input_a":0 [ENABLED]
	pad3: Source
		[fmt:VYYUYY8_1X24/3840x2160 field:none]
		-> "vcapaxis_broad_out1hdmi_input_a":0 [ENABLED]
	pad4: Source
		[fmt:VYYUYY8_1X24/3840x2160 field:none]
		-> "vcapaxis_broad_out1hdmi_input_a":0 [ENABLED]
	pad5: Source
		[fmt:VYYUYY8_1X24/3840x2160 field:none]
		-> "vcapaxis_broad_out1hdmi_input_a":0 [ENABLED]
	pad6: Source
		[fmt:VYYUYY8_1X24/3840x2160 field:none]
		-> "vcapaxis_broad_out1hdmi_input_a":0 [ENABLED]
	pad7: Source
		[fmt:VYYUYY8_1X24/3840x2160 field:none]
		-> "vcapaxis_broad_out1hdmi_input_a":0 [ENABLED]

- entity 38: a0080000.v_proc_ss (2 pads, 2 links)
             type V4L2 subdev subtype Unknown flags 0
             device node name /dev/v4l-subdev16
	pad0: Sink
		[fmt:RBG888_1X24/3840x2160 field:none]
		<- "a0000000.v_hdmi_rx_ss":0 [ENABLED]
	pad1: Source
		[fmt:VYYUYY8_1X24/3840x2160 field:none]
		-> "amba_pl@0:axis_broadcasterhdmi_":0 [ENABLED]

- entity 41: a0000000.v_hdmi_rx_ss (1 pad, 1 link)
             type V4L2 subdev subtype Unknown flags 0
             device node name /dev/v4l-subdev17
	pad0: Source
		[fmt:RBG888_1X24/3840x2160 field:none]
		[dv.caps:BT.656/1120 min:0x0@25000000 max:4096x2160@297000000 stds:CEA-861,DMT,CVT,GTF caps:progressive,reduced-blanking,custom]
		[dv.query:no-link] -----> HDMI-Rx Link Status
		-> "a0080000.v_proc_ss":0 [ENABLED]

...

  • Video node for HDMI-Rx source can be checked using media-ctl command. Run below media-ctl command to check video node for HDMI-Rx source where "mediaX" indicates media node for HDMI input source.

Code Block
languagebash
$ media-ctl -p -d /dev/mediaX
  • Make sure HDMI-Rx media pipeline is configured for 4Kp60 resolution and source/sink have the same color format. Run below media-ctl commands to set resolution and format of HDMI scaler node where "mediaX" indicates media node for HDMI input source.

  • When HDMI Input Source is NVIDIA SHIELD

Code Block
languagebash
$ media-ctl -d /dev/mediaX -V "\"a0080000.v_proc_ss\":0  [fmt:RBG888_1X24/3840x2160 field:none]"
$ media-ctl -d /dev/mediaX -V "\"a0080000.v_proc_ss\":1  [fmt:VYYUYY8_1X24/3840x2160 field:none]"

...

  • When HDMI Input Source is ABOX

Code Block
languagebash
$ media-ctl -d /dev/mediaX -V "\"a0080000.v_proc_ss\":0  [fmt:VYYUYY8_1X24/3840x2160 field:none]"
$ media-ctl -d /dev/mediaX -V "\"a0080000.v_proc_ss\":1  [fmt:VYYUYY8_1X24/3840x2160 field:none]"

...

  • SCD media node resolution is auto handled as per current pipeline resolution

  • After executing pipeline in case of any error, you can make sure if resolution was auto set as per resolution of pipeline for number of required streams or not using below command:
    (here mediaX is SCD media node)

Code Block
languagebash
$ media-ctl -p -d /dev/mediaX

...

Below configurations needs to be set in input.cfg for HDMI-1080p60

Code Block
languagebash
Common Configuration    : START
Num Of Input            : 1
Output                  : HDMI
Out Type                : Display
Frame Rate              : 60
Exit

Input Configuration     : START
Input Num               : 1
Input Type              : hdmi
Raw                     : TRUE
Width                   : 1920
Height                  : 1080
Exit
  • Run vcu_gst_app for current HDMI resolution (1080p60) by executing the following command

Code Block
languagebash
$ vcu_gst_app /media/card/config/input.cfg

...

If HDMI-Tx link-up issue is observed after Linux booting, use the following command:

Code Block
languagebash
$ modetest -D a0070000.v_mix -s 45:3840x2160-60@BG24
  • Display RAW use case: Run the following gst-launch-1.0 command to display passthrough pipeline. Where "videoX" indicates a video node for the input source.

Code Block
languagebash
$ gst-launch-1.0 v4l2src device=/dev/videoX io-mode=4 ! video/x-raw, width=3840, height=2160, format=NV12, framerate=60/1 ! queue ! kmssink bus-id="a0070000.v_mix" show-preroll-frame=false
  • Display serial use case: Run the following gst-launch-1.0 command to display processed pipeline (capture → scd → encode → decode → display) on HDMI-Tx. Where "videoX" indicates a video node for the input source.

Code Block
languagebash
$ gst-launch-1.0 v4l2src device=/dev/videoX io-mode=4 ! video/x-raw, width=3840, height=2160, format=NV12, framerate=60/1 ! xilinxscd io-mode=5 ! omxh265enc qp-mode=auto gop-mode=basic gop-length=60 b-frames=0 target-bitrate=60000 num-slices=8 control-rate=constant prefetch-buffer=true low-bandwidth=false filler-data=true cpb-size=1000 initial-delay=500 ! video/x-h265, profile=main, alignment=au ! queue ! omxh265dec internal-entropy-buffers=5 low-latency=0 ! queue max-size-bytes=0 ! kmssink bus-id="a0070000.v_mix" show-preroll-frame=false
  • Record use case: Run the following gst-launch-1.0 command to record video using GStreamer pipeline. Where "videoX" indicates a video node for the input source.

Code Block
languagebash
$ gst-launch-1.0 v4l2src device=/dev/videoX io-mode=4 num-buffers=3600 ! video/x-raw, format=NV12,width=3840,height=2160,framerate=60/1 ! xilinxscd io-mode=5 ! omxh265enc qp-mode=auto gop-mode=basic gop-length=60 b-frames=0 target-bitrate=60000 num-slices=8 control-rate=constant prefetch-buffer=true low-bandwidth=false filler-data=true cpb-size=1000 initial-delay=500 ! queue ! video/x-h265, profile=main, alignment=au ! mpegtsmux alignment=7 name=mux ! filesink location="/run/media/sda/test.ts"

...

  • File Playback use case: Run the following gst-launch-1.0 command to play the recorded file on HDMI-Tx using the GStreamer pipeline.

Code Block
languagebash
$ gst-launch-1.0 uridecodebin uri="file:///run/media/sda/test.ts" ! queue max-size-bytes=0 ! kmssink bus-id="a0070000.v_mix"

...

  • Stream-out use case: Run the following gst-launch-1.0 command for CBR stream-out pipeline. Where "videoX" indicates a video node for the input source.

Code Block
languagebash
$ gst-launch-1.0 v4l2src device=/dev/videoX io-mode=4 ! video/x-raw, format=NV12, width=3840, height=2160, framerate=60/1 ! xilinxscd io-mode=5 ! omxh265enc qp-mode=auto gop-mode=basic gop-length=60 b-frames=0 target-bitrate=60000 num-slices=8 control-rate=constant prefetch-buffer=true low-bandwidth=false filler-data=true cpb-size=1000 initial-delay=500 periodicity-idr=60 ! video/x-h265, profile=main, alignment=au ! queue ! mpegtsmux alignment=7 name=mux ! rtpmp2tpay ! udpsink host=192.168.25.89 port=5004

...

  • Stream-in use case: Run the following gst-launch-1.0 command to display CBR stream-in on HDMI-Tx video using Gstreamer pipeline where 5004 is port number.

Code Block
languagebash
$ gst-launch-1.0 udpsrc port=5004 buffer-size=60000000 caps="application/x-rtp, clock-rate=90000" ! rtpjitterbuffer latency=1000 ! rtpmp2tdepay ! tsparse ! video/mpegts ! tsdemux name=demux ! queue ! h265parse ! video/x-h265, profile=main, alignment=au ! omxh265dec internal-entropy-buffers=5 low-latency=0 ! queue max-size-bytes=0 ! kmssink bus-id="a0070000.v_mix"

...