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:
| Application | Description |
|---|---|
| init_rsrc | detect Quadra devices and create their resource entries in host's file system |
| ni_rsrc_list | list info about detected Quadra devices |
| ni_rsrc_mon | display performance related info about detected Quadra devices |
| ni_rsrc_namespace | manage NVMe configuration for Quadra devices |
| ni_rsrc_update | manage detected Quadra resource entries |
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
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.
Shown below is an example systemd process in Ubuntu that can automatically initialize all Quadra VPU devices on startup.
- 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
- Enable the systemd process
sudo systemctl enable nilibxcoder.service
- Manually start the systemd process
sudo systemctl start nilibxcoder.service