Skip to main content
Version: v5.3.1

Libxcoder Documentation

Libxcoder is the software driver for NETINT Quadra Video Processing Units (VPU). It contains APIs and tools for video processing and Quadra device management.

Applications​

After installation the following applications are installed:

ApplicationDescription
init_rsrcdetect Quadra devices and create their resource entries in host's file system
ni_rsrc_listlist info about detected Quadra devices
ni_rsrc_mondisplay performance related info about detected Quadra devices
ni_rsrc_namespacemanage NVMe configuration for Quadra devices
ni_rsrc_updatemanage detected Quadra resource entries
info

Additional options can be viewed by using the -h option.

init_rsrc​

This application will initialize the Quadra VPU cards. To know if the cards have already been initialized, check the /dev/shm for the resources files

warning

This needs to be run after a reboot. It is recommended to create a systemd process or another startup script.

ls /dev/shm/NI_*

To reinitize the cards, delete the NI_* files and re-run the init_rsrc command.

To run this command without requiring sudo the user needs to be apart of the disk group.

sudo usermod -aG disk $USER

Example Systemd​

Libxcoder can automatically install systemd process on Ubuntu systems with using the quadra_quick_installer.sh available in the SDK release. Alternately systemd can be setup when manually install libxcoder by using the --enable-systemd flag.

The below is an example of a systemd process used with Ubuntu that can be used to initialize the Quadra VPU devices on startup.

  1. Use the below command to create the systemd file:
sudo tee /etc/systemd/system/nilibxcoder.service << EOF

[Service]
Type=oneshot
RemainAfterExit=true
#Quadra Product Line
ExecStart=-/usr/local/bin/init_rsrc -t 5
StandardOutput=journal
StandardError=journal
SyslogIdentifier=ni_libxcoder_devices
User=nvme
Group=nvme

[Install]
WantedBy=multi-user.target
EOF
  1. Enable the systemd process
sudo systemctl enable nilibxcoder.service
  1. Manually start the systemd process
sudo systemctl start nilibxcoder.service

ni_rsrc_list​

This application list detail information about the capabilities of all the initialized cards. It includes supported codecs, resolutions, filters, etc.

ni_rsrc_mon​

This application will display various information about the VPU:

  • Number of VPU detected
  • Temperature and Power
  • Firmware and Serial Number
  • Utilization of the Decoder, Encoder, Scaler and AI Engine

Using the command with the -h option (ni_rsrc_mon -h) will also display the definition for the various values.

Example:

**************************************************
1 devices retrieved from current pool at start up
Wed Mar 12 09:28:16 2025 up 00:00:00 v5206s5r2
INDEX TEMP POWER FR SN
0 38 7647mW 5106rtr4 Q1A224A11DC065-0018
Num decoders: 1
INDEX LOAD MODEL_LOAD INST MEM SHARE_MEM P2P_MEM DEVICE
0 0 0 0 0 0 0 /dev/nvme1n1
Num encoders: 1
INDEX LOAD MODEL_LOAD INST MEM SHARE_MEM P2P_MEM DEVICE
0 0 0 0 0 0 0 /dev/nvme1n1
Num scalers: 1
INDEX LOAD MODEL_LOAD INST MEM SHARE_MEM P2P_MEM DEVICE
0 0 0 0 0 0 0 /dev/nvme1n1
Num AIs: 1
INDEX LOAD MODEL_LOAD INST MEM SHARE_MEM P2P_MEM DEVICE
0 0 0 0 0 0 0 /dev/nvme1n1
**************************************************

More detail status information about the VPU can be viewed with the -d option.

ni_rsrc_mon -d

Example:

**************************************************
1 devices retrieved from current pool at start up
Wed Mar 12 09:45:41 2025 up 00:00:00 v5206s5r2
INDEX TEMP POWER FR SN
0 38 7872mW 5106rtr4 Q1A224A11DC065-0018
Num decoders: 1
INDEX AvgCost FrameRate IDR InFrame OutFrame Width Height SID DEVICE NAMESPACE
0 2 29 4 372 372 1920 1080 0000 /dev/nvme1n1 /dev/nvme1n1
1 2 29 4 372 372 1920 1080 0000 /dev/nvme1n1 /dev/nvme1n1
2 2 29 4 372 372 1920 1080 0000 /dev/nvme1n1 /dev/nvme1n1
3 2 29 4 372 372 1920 1080 0000 /dev/nvme1n1 /dev/nvme1n1
4 2 29 4 372 372 1920 1080 0000 /dev/nvme1n1 /dev/nvme1n1
5 2 29 4 371 371 1920 1080 0000 /dev/nvme1n1 /dev/nvme1n1
6 2 29 4 372 371 1920 1080 0000 /dev/nvme1n1 /dev/nvme1n1
7 2 29 4 371 371 1920 1080 0000 /dev/nvme1n1 /dev/nvme1n1
8 2 29 4 371 371 1920 1080 0000 /dev/nvme1n1 /dev/nvme1n1
9 2 29 4 371 371 1920 1080 0000 /dev/nvme1n1 /dev/nvme1n1
Num encoders: 1
INDEX AvgCost FrameRate IDR UserIDR InFrame OutFrame BR AvgBR Width Height Format SID DEVICE NAMESPACE
0 2 29 4 0 368 367 2611392 3923186 1280 720 UNSUPPORT 0000 /dev/nvme1n1 /dev/nvme1n1
1 2 29 4 0 368 367 2611392 3923186 1280 720 UNSUPPORT 0000 /dev/nvme1n1 /dev/nvme1n1
2 2 29 4 0 368 367 2611392 3923186 1280 720 UNSUPPORT 0000 /dev/nvme1n1 /dev/nvme1n1
3 2 29 4 0 368 367 2611392 3923186 1280 720 UNSUPPORT 0000 /dev/nvme1n1 /dev/nvme1n1
4 2 29 4 0 368 367 2611392 3923186 1280 720 UNSUPPORT 0000 /dev/nvme1n1 /dev/nvme1n1
5 2 29 4 0 367 366 2150640 3926770 1280 720 UNSUPPORT 0000 /dev/nvme1n1 /dev/nvme1n1
6 2 29 4 0 368 367 2611392 3923186 1280 720 UNSUPPORT 0000 /dev/nvme1n1 /dev/nvme1n1
7 2 29 4 0 367 366 2150640 3926770 1280 720 UNSUPPORT 0000 /dev/nvme1n1 /dev/nvme1n1
8 2 29 4 0 367 366 2150640 3926770 1280 720 UNSUPPORT 0000 /dev/nvme1n1 /dev/nvme1n1
9 2 29 4 0 367 366 2150640 3926770 1280 720 UNSUPPORT 0000 /dev/nvme1n1 /dev/nvme1n1
**************************************************

ni_rsrc_namespace​

This application is used to create multiple namespaces to be shared a Quadra Card across different VM, docker, kubernetes, etc.

ni_rsrc_update​

This application is used to manage detected Quadra resource entries.