Time-Sensitive Networking-Based HDMI-to-IP Converter

ID 791031
Updated 10/16/2023
Version 1.0
Public

author-image

By

Overview

Implements a SMPTE ST 2110 compliant HDMI-to-IP Converter based on Intel® Media Transport Library, Intel® Core™ Processors based Video-Capture-Design Solution and Intel® Ethernet Controller I225. The HDMI-to-IP Converter reads signal from HDMI-IN port and output YUV video stream over IP network. By leveraging Time Sensitive Networking feature of Intel® Ethernet Controller I225, it archives SMPTE ST 2110-21 narrow type sender require precision.

Select Configure & Download to download the sample.

Configure & Download

 

  • Time to Complete:   8 hours
  • Available Software: DPDK*

Recommended Hardware


The hardware below is recommended for use with this reference implementation.

UZEL UM-H3910

  • CPU: Intel® Core™ i7-1165G7
  • Memory: 8G
  • Video Input: 1 x HDMI
  • Display Ouput: 4 x HDMI
  • Ethernet: Intel® Ethernet Controller I225-LM

Prerequisites

  • Complete setup and test steps as below:
    • Follow steps to enable Video-Capture-Design (VCD) solution here
    • Click on Download link under tab Content Details
  • Once after setting up the target system, user to add below boot options:
iommu=pt intel_iommu=on hugepages=2048 rdt=!l3cat,!l2cat efi=runtime art=virtallow clocksource=tsc tsc=reliable no_ipi_broadcast=1 nosoftlockup idle=poll audit=0 nmi_watchdog=0 irqaffinity=0 noht isolcpus=1-3 rcu_nocbs=1-3 nohz_full=1-3 intel_pstate=disable intel.max_cstate=0 intel_idle.max_cstate=0 processor.max_cstate=0 processor_idle.max_cstate=0 vt.handoff=7

How It Works

 

Figure 1: Overview Diagram

Time Sensitive Networking-Based HDMI-to-IP Converter is a SMPTE ST 2110 compliant device based on Time Sensitive Networking (TSN) technology. Because time synchronization and traffic shaping are common to both the SMPT ST 2110 and the TSN standards, TSN technology can be used for SMPTE ST 2110 implementation.

 

Figure 2: Architecture Diagram

Intel® VCD Solution : Intel® Core™ Processors based Video-Capture-Design Solution.

The Recommended Hardware  is an example.

Intel® i225-LM is discrete ethernet solutions w/ RTOS and Linux deliver the benefit of AVB/TSN capabilities. Supports Audio Video Bridging (AVB) /Time-Sensitive Networking (TSN) specifications. These standards provide networking features for time-sensitive applications.

Lontium/IPU/I2S implements the video pipeline setup, device configuration and IO control for LT6911UXC integrated with V4L2 framework and ALSA framework.

DPDK with TSN enabled provides a set of data plane libraries and network interface controller polling-mode drivers for offloading TCP packet processing from the operating system kernel to processes running in user space. It already supports TSN features based on igc driver.

 

Intel® Media Transportation Library with TSN-Based pacing enabled is a DPDK-based solution designed for high-throughput, low-latency transmission and reception of media data. It features an efficient user-space LibOS UDP stack specifically crafted for media transport, and comes equipped with a built-in SMPTE ST 2110-compliant implementation for Professional Media over Managed IP Networks. The latest version supports nanosecond precision pacing based and time synchronization on TSN technology.

 


 

Get Started

Select Configure & Download to download the sample.   

Configure & Download

 

  1. Install the package

Install required packages using below commands:

sudo apt-get install git gcc meson python3 python3-pip pkg-config libnuma-dev libjson-c-dev libpcap-dev libgtest-dev libsdl2-dev libsdl2-ttf-dev libssl-dev libgmp-dev
sudo pip install pyelftools ninja
  1. Get the source code

Run below commands:

cd ~
git clone https://github.com/OpenVisualCloud/Media-Transport-Library.git
export imtl_source_code=${PWD}/Media-Transport-Library
cd ~
git clone https://github.com/DPDK/dpdk.git
cd dpdk
git checkout v23.03
git switch -c v23.03
git am $imtl_source_code/patches/dpdk/23.03/*.patch
git am $imtl_source_code/patches/dpdk/23.03/tsn/*.patch

Two folders will be created under user home directory after executing above steps. One is named Media-Transport-Library. The other is named dpdk. Both folders contain source files.

  1. Build and install DPDK

Run below commands:

meson setup ~/build/dpdk
ninja -C ~/build/dpdk
sudo ninja install -C ~/build/dpdk

One folder will be created under user home directory after executing above steps. It is named build/dpdk. The folder is the build folder of DPDK.

  1. Build TSN-Based HDMI-to-IP Converter

Run below commands

cd $imtl_source_code
./build.sh

One folder will be created under ~/Media-Transport-Library after executing above steps. It is named build. The folder is the build folder of TSN-Based HDMI-to-IP Converter.

Run the Application

  1. Connect all machine according by below figure

Figure 3 shows the scenarios to run the application.

 

Figure 3: Run TSN-Based HDMI-to-IP Converter

Video Source is a device output video frames over HDMI, for example camera, PC etc.

TSN-Based HDMI-to-IP Converter is an Intel® VCD solution + Intel® i225-LM platform running the TSN-based HDMI-to-IP Converter program. The program reads video frames from HDMI-IN port, can convert the video frames to SMPTE ST 2110 compliant RTP stream.

Video Receiver is a PC. It runs tcpdump program to capture receiving RTP packets and analyzes the SMPTE ST 2110 compliant of RTP stream. It also acts as a master clock for PTP.

TSN-Based HDMI-to-IP Converter and Video Receiver are connected directly over Intel® i225-LM. The $CONNECT_INF in below steps is interface name of Intel® i225-LM.

  1. On Video Receiver, optimize network stack

Run below commands

cd $imtl_source_code
./build.sh
  1. On Video Receiver, start PTP master clock

Run below commands

sudo ptp4l -i $CONNECT_INF -4 -l 6 -m --logSyncInterval -3 --tx_testamp_timeout 1000  --socket_priority 7 &
sudo phc2sys -c $ CONNECT_INF -s CLOCK_REALTIME -O 0 -l 6 -m &
  1. On TSN-Based HDMI-to-IP Converter, check device ID of Intel® Ethernet Controller I225-LM

Run below commands

sudo lspci | grep 15f3

Find the device ID, for example “0000:01:00.0”, from below output:

01:00.0 Ethernet controller: Intel Corporation Device 15f3 (rev 03)

If above output is not shown, run below commands:

sudo lspci | grep I225

Find the device ID, for example “0000:01:00.0”, from below output

01:00.0 Ethernet controller: Intel Corporation Ethernet Controller I225-LM (rev 03)
  1. On TSN-Based HDMI-to-IP Converter, bind Intel® Ethernet Controller I225-LM to DPDK igc driver

Run below commands

cd $imtl_source_code
sudo ./script/nicctl.sh bind_pmd 0000:01:00.0
  1. On TSN-Based HDMI-to-IP Converter, initiate Lontium/IPU/I2S

Run below commands

sudo media-ctl -r
sudo media-ctl -v -V "\"lt6911uxc a\":0 [fmt:UYVY/1920x1080]"
sudo media-ctl -v -V "\"Intel IPU6 CSI-2 1\":0 [fmt:UYVY/1920x1080]"
sudo media-ctl -v -V "\"Intel IPU6 CSI2 BE SOC\":0 [fmt:UYVY/1920x1080]"
sudo media-ctl -v -l "\"lt6911uxc a\":0 -> \"Intel IPU6 CSI-2 1\":0[1]"
sudo media-ctl -v -l "\"Intel IPU6 CSI-2 1\":1 -> \"Intel IPU6 CSI2 BE SOC\":0[5]"
sudo media-ctl -v -l "\"Intel IPU6 CSI2 BE SOC\":16 -> \"Intel IPU6 BE SOC capture 0\":0[5]"
  1. On TSN-Based HDMI-to-IP Converter, start TSN-Based HDMI-to-IP Converter program

Run below commands

sudo ./build/app/V4l2toIPApp /dev/video51 --log-status --ptp –tsn

After “MT: PTP(0): system clock offset max 259, synchronized” of below output presents, the SMPTE ST 2110 compliant RTP stream transmission starts:

MT: * *    M T    D E V   S T A T E   * *
MT: DEV(0): Avr rate, tx: 1743.150045 Mb/s, rx: 0.017576 Mb/s, pkts, tx: 1646228, rx: 245
MT: CNI(0): eth_rx_rate 0 Mb/s, eth_rx_cnt 245
MT: PTP(0): time 1692904264838671714, 2023-08-24 19:10:27
MT: PTP(0): system clock offset max 259, synchronized
MT: PTP(0): delta avg 3, min -12, max 11, cnt 138
MT: PTP(0): correct_delta avg 25744798125, min -169289497586, max 60530855505, cnt 80
MT: PTP(0): path_delay avg 1413, min 1410, max 1416, cnt 80
MT: PTP(0): mode l4, sync cnt 80, expect avg 1:0@0.124482s
MT: PTP(0): rx time error 0, tx time error 0, delta result error 58
MT: TX_VIDEO_SESSION(0,0:v4l2_st20_tx): fps 49.991044, frame 500 pkts 1646200:1646199 inflight 407057:411550
MT: TX_VIDEO_SESSION(0,0): throughput 1742.887329 Mb/s: 0.000000 Mb/s, cpu busy 0.000000
MT: * *    E N D    S T A T E   * *
  1. On Video Receiver, start tcpdump to capture RTP packets

Run below commands

chrt -f 90 tcpdump -w /tmp/rtp.pcap -p -s 1350 -B 4096 -tt -nn \
 --time-stamp-precision=nano --time-stamp-type=adapter_unsynced -e -xa \
 -c 40000 -i $ CONNECT_INF "udp and port 50000"

The command will generate file “rtp.pcap” under /tmp folder. The file contains 40000 RTP packets.

  1. On Video Receiver, unload the /tmp/rtp.pcap to EBU LIST to analyze SMPTE ST 2110 compliant of receiving RTP stream

Figure 4 shows expected result:

 

Figure 4: Expected EBU LIST Result

Build a Solution Based on the Product

Figure 5 shows a professional media broadcast solution. TSN-Based HDMI-to-IP Converter acts as one source of media. There are other sources, for example, label etc. Multiple source streams aggregate at the Video Mixer to composite final video. Because all streams are SMPTE ST 2110 compliant, their transmission intertwine and keep well synchronization.

 

Figure 5: Professional Media Broadcast Solution

Summary and Next Steps

You have successfully built a SMPTE ST 2110 compliant HDMI-to-IP Converter based on Intel® VCD solution and TSN technology.

As a next step, try the following :

  • Panorama video from multiple cameras.
  • Project a HDMI video source to a display wall.

Support Forum

If you're unable to resolve your issues, contact the Support Forum.