...
Codec: Opus
Format: S24_32LE
Channel: 2
Sampling rate: 48 kHz
Source: HDMI-Rx/ I2S-Rx
Render: HDMI-Tx/ I2S-Tx/ DP
Audio Deliverables:
Pipeline | Video-Input Source | Audio Input Source | Video Output Type | Audio Output Type | ALSA Drivers | Resolution | Audio Codec Type | Audio Configuration | Video Codec Type | Deliverables |
Record / Stream-Out pipeline |
|
| File-Sink | File-Sink | HDMI-Rx ALSA drivers | 4K / 1080p | Opus | 2 channel @ 48 kHz | HEVC / AVC | HDMI-Rx Audio encode with soft codec and video with VCU and store it in a container format. |
Playback pipeline | File Source/ Stream-In | File Source/ Stream-In | DP |
| HDMI-Tx ALSA drivers | 4K / 1080p | Opus | 2 channel @ 48 kHz | HEVC / AVC | Playback of the local-file / stream-in with video decoded using VCU and Audio using GStreamer soft codec. |
Capture → Display |
|
| DP |
| HDMI-Rx/Tx ALSA drivers | 4K / 1080p | NA | 2 channel @ 48 kHz | HEVC / AVC | HDMI-Rx Audio / Video pass to HDMI-Tx without VCU/Audio-Codec. |
Capture → Encod → Decode → Display |
|
| DP |
| HDMI-Rx/Tx ALSA drivers | 4K / 1080p | NA | 2 channel @ 48 kHz | HEVC / AVC | HDMI-Rx raw audio and video with VCU encoder and decode to achieve AV sync. |
Supports 1-4Kp60 Single Stream with either HDMI-Rx or I2S-Rx as input Audio source + HDMI-Rx / MIPI Rx as input Video source; and HDMI-Tx / I2S-Tx as Output Audio Sink + HDMI-Tx / DP as Output Video sink pipeline
Supports 1-4Kp30 Single Stream with either HDMI-Rx or I2S-Rx as input Audio source + HDMI-Rx / MIPI Rx as input Video source; and HDMI-Tx / I2S-Tx as Output Audio Sink + HDMI-Tx / DP as Output Video sink pipeline
Supports 1-1080p60 Single Stream with either HDMI-Rx or I2S-Rx as input Audio source + HDMI-Rx / MIPI Rx as input Video source; and HDMI-Tx / I2S-Tx as Output Audio Sink + HDMI-Tx / DP as Output Video sink pipeline
Supports 2-4Kp30 multi-stream feature with HDMI-Rx and I2S-Rx as input Audio sources, with HDMI-Rx and MIPI Rx as an input Video sources; and with HDMI-Tx and I2S-Tx as Output Audio Sink + HDMI-Tx as Output Video sink pipeline
Supports 2-1080p60 multi-stream feature with HDMI-Rx and I2S-Rx as input Audio sources with HDMI-Rx and MIPI Rx as an input Video sources; and with HDMI-Tx and I2S-Tx as Output Audio Sink + HDMI-Tx as Output Video sink pipeline
...
The table below provides the supported resolution from GUI and command-line app in this design.
Resolution | GUI | Command Line | |
Single Stream | Single Stream | Multi-stream | |
4Kp60 | X | √ | NA |
4Kp30 | √ | √ | √ (Max 2) |
1080p60 | √ | √ | √ (Max 2) |
√ - Supported
x – Not supported
NA – Not applicable
The below sections describe the HDMI / MIPI Video Capture and HDMI Display with the Audio from HDMI / I2S sources. It is VCU TRD design supporting HDMI-Rx audio/video + HDMI-Tx with Audio/video and MIPI-Rx video + I2S-Rx audio with HDMI-Tx video + I2S-Tx audio.
...
The example configuration files are stored at /media/card/config/
folder.
Configuration Type | Configuration Name | Description | Available Options |
---|---|---|---|
Common | Common Configuration | It is the starting point of common configuration | |
Num of Input | Provide the number of inputs. This is 1 for single stream and 2 in case of Multi-stream. | 1 to 2 | |
Output | Select the video interface | HDMI or DP | |
Out Type | Type of output | display, record, stream | |
Display Rate | Pipeline frame rate | 30 or 60 fps | |
Exit | It indicates to the application that the configuration is over | ||
Input | Input Configuration | It is the starting point of the input configuration | |
Input Num | Starting Nth input configuration | 1 to 2 | |
Input Type | Input source type | HDMI, MIPI, File, Stream | |
Uri | File path or Network URL. Applicable for file playback and stream-in pipeline only. Supported file formats for playback are ts, mp4, and mkv. | file:///run/media/sda/abc.ts (for file path), udp://192.168.25.89:5004/ (for Network streaming, Here | |
Raw | To tell the pipeline is processed or pass-through | True, False | |
Width | The width of the live source | 3840, 1920 | |
Height | The height of the live source | 2160, 1080 | |
Format | The format of input data | NV12 | |
Enable SCD | Stream-based SCD supports with HDMI input source only and must be enabled; and with MIPI input source it must be disabled | True, False | |
Exit | It indicates to the application that the configuration is over | ||
Encoder | Encoder Configuration | It is the starting point of encoder configuration | |
Encoder Num | Starting Nth encoder configuration | 1 to 2 | |
Encoder Name | Name of the encoder | AVC, HEVC | |
Profile | Name of the profile | AVC: baseline, main or high | |
Rate Control | Rate control options | CBR, VBR, and low |
_latency | |||
Filler Data | Filler Data NAL units for CBR rate control | True, False | |
QP | QP control mode used by the VCU encoder | Uniform, Auto | |
L2 Cache | Enable or Disable L2Cache buffer in encoding process | True, False | |
Latency Mode | Encoder latency mode. | Normal, sub_frame | |
Low Bandwidth | If enabled, decrease the vertical search range used for P-frame motion estimation to reduce the bandwidth. | True, False | |
Gop Mode | Group of Pictures mode. | Basic, low_delay_p, low_delay_b | |
Bitrate | Target bitrate in Kbps | 1-60000 | |
B Frames | Number of B-frames between two consecutive P-frames | 0-4 | |
Slice | The number of slices produced for each frame. Each slice contains one or more complete macroblock/CTU row(s). Slices are distributed over the frame as regularly as possible. If slice-size is defined as well more slices may be produced to fit the slice-size requirement. | 4-22 4Kp resolution with HEVC codec | |
GoP Length | The distance between two consecutive I frames | 1-1000 | |
GDR Mode | It specifies which Gradual Decoder Refresh(GDR) scheme should be used when gop-mode = low_delay_p GDR mode is currently supported with LLP1/LLP2 low-delay-p use-cases only | Horizontal, Vertical, Disabled | |
Entropy Mode | It specifies the entropy mode for H.264 (AVC) encoding process | CAVLC, CABAC, Default | |
Max Picture Size | It is used to curtail instantaneous peak in the bit-stream using this parameter. It works in CBR/VBR rate-control only. When it is enabled, max-picture-size value is calculated and set with 10% of AllowedPeakMargin. i.e. It works in CBR/VBR rate-control only | True, False | |
Format | The format of input data | NV12 | |
Preset | Based on provided six presets, predefined configuration will be set for encoder parameters. Select custom to provide user-specific options for encoder parameters. | HEVC_HIGH, HEVC_MEDIUM, HEVC_LOW, AVC_HIGH, AVC_MEDIUM, AVC_LOW, Custom | |
Exit | It indicates to the application that the configuration is over | ||
Record | Record Configuration | It is the starting point of record configuration | |
Record Num | Starting Nth record configuration | 1 to 2 | |
Out-File Name | Record file path See Mount Location for additional file paths | e.g. /run/media/sda/abc.ts | |
Duration | Duration in minutes | 1-3 | |
Exit | It indicates to the application that the configuration is over | ||
Streaming | Streaming Configuration | It is the starting point of streaming configuration. | |
Streaming Num | Starting Nth Streaming configuration | 1 to 2 | |
Host IP | The host to send the packets to the client |
| |
Port | The port to send the packets to port number | 5004, 5006 | |
Exit | It indicates to the application that the configuration is over. | ||
Audio Configuration | Audio Configuration | It is the starting point of the audio configuration. | |
Audio Num | Starting Nth Audio configuration | 1 to 2 | |
Audio Enable | Enable or Disable audio in pipeline | True, False | |
Audio Format | The format of the audio | S24_32LE (for serial use-cases) | |
Sampling Rate | To set the audio sampling rate | 48000 | |
Num Of Channel | The number of audio channels | 1-2 | |
Source | To set audio input source | HDMI or I2S | |
Renderer | To set audio output device | HDMI, DP or I2S | |
Exit | It indicates to the application that the configuration is over | ||
Trace | Trace Configuration | It is the starting point of trace configuration | |
FPS Info | To display achieved frame per second information on the console | True, False | |
APM Info | To display APM counter number on the console | True, False | |
Pipeline Info | To display pipeline info on console | True, False | |
Exit | It indicates to the application that the configuration is over |
Mount Locations
The mount locations for various devices can be found in the below table.
The mount locations can vary. Users can use lsblk
or mount
to find the location of the mounted devices.
Below are some example mount points
Device | Mount Location |
---|---|
SD Card | /media/card |
Sata Drive | /run/media/sda |
USB Drive | /media/usb |
RAM Disk | /run/media |
...
4 Appendix B - HDMI-Rx/Tx Link-up and GStreamer Commands
...
Code Block |
---|
$ gst-launch-1.0 v4l2src device=/dev/video0 io-mode=4 num-buffers=3600 ! video/x-raw, format=NV12, width=3840, height=2160, framerate=60/1 ! 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 ! mux. alsasrc device=hw:2,1 provide-clock=false num-buffers=3600 ! audio/x-raw, format= S24_32LE, rate=48000, channels=2 ! queue ! audioconvert ! audioresample ! opusenc ! opusparse ! mpegtsmux name=mux ! filesink location = "/run/test.ts" |
...
Code Block |
---|
$ gst-launch-1.0 v4l2src device=/dev/video1 io-mode=4 num-buffers=3600 ! video/x-raw, format=NV12, width=3840, height=2160, framerate=60/1 ! 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 ! mux. alsasrc device=hw:1,1 provide-clock=false num-buffers=3600 ! audio/x-raw, format= S24_32LE, rate=48000, channels=2 ! queue ! audioconvert ! audioresample ! opusenc ! opusparse ! mpegtsmux name=mux ! filesink location = "/run/test.ts" |
...