IPTV Live Video Encoding & Streaming with NVIDIA GPU
NVIDIA GPUs contain one or more hardware-based decoder and encoder(s) (separate from the CUDA cores) which provides fully-accelerated video decoding and encoding for several popular codecs. With GPU decoding/encoding via NVENC / NVDEC SDKs, IPVTL saves CPU from heavy computing jobs for other applications.
Before choosing NVIDIA video cards, visit NVIDIA Video Encode and Decode GPU Support Matrix to make sure the card fulfills your requirements.
Set up NVIDIA GPU Streaming on Windows
To set up NVIDIA GPU streaming on Windows, desktop OS like Windows 10 against server OS is recommended. Make sure to install latest NVIDIA video driver from NVIDIA Official Drivers.
Set up NVIDIA GPU Streaming on Linux
To enable NVIDIA GPU streaming on Linux, recommened OSs are lately released Linux distros like Ubuntu, as they have better support of latest NVIDIA video drivers. For example, on Ubuntu there is ubuntu-drivers tool available to install NVIDIA drivers easily. For detailed instructions, visit Ubuntu NVIDIA Drivers Installation. Always make sure to install latest video driver, or GPU encoding MAY NOT function.
After driver installation, enter nvidia-smi
in command
console to make sure it's working.
# nvdia-smi
Wed Dec 11 09:52:10 2019
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 536.23 Driver Version: 536.23 CUDA Version: 12.2 |
|-----------------------------------------+----------------------+----------------------+
| GPU Name TCC/WDDM | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+======================+======================|
| 0 Tesla K80 On | 00000000:00:1E.0 Off | N/A |
| 0% 43C P0 7W / 149W | 639MiB / 11441MiB | 1% Default |
| | | N/A |
+-----------------------------------------+----------------------+----------------------+
+---------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=======================================================================================|
+---------------------------------------------------------------------------------------+
Note: NVIDIA GeForce GTX/RTX series, and Quadro under
K2000/M2000/P2000/T2000 has a limit of 3 or 5 encoding sessions
max per system. It is a hard limit inside NVIDIA official driver. Other
Quadro models, Tesla or GRID don't have such restraint.
To remove this limit, follow https://github.com/keylase/nvidia-patch
for a 3rd party driver patch at your own risk.
Set up NVIDIA Video Encoding
IPVTL supports H.264, HEVC and AV1 encoding on NVIDIA GPU. In channel config, choose encodings with nvenc to enable NVENC.
Note different NVIDIA video cards have different capabilities of video encodings. For example GeForce RTX 4060 supports AV1 encoding, while GeForce RTX 3060 or GTX 1660 doesn't. For details please visit NVIDIA Video Encode and Decode GPU Support Matrix.
Set up NVIDIA Video Decoding
If the channel source video is encoded in H.264, HEVC or AV1, it's recommended to enable NVDEC to make full GPU transcoding. To do that, select NVDEC/CUVID H.264 or HEVC (as per source video format) in advanced video options -> Misc. -> GPU Decoding. This will make video decoding, resizing and encoding process (with deinterlacing if required) all in GPU, avoiding unnecessary picture data copy between system memory and video memory.
Tip: If you have multiple NVIDIA cards installed, remember to specify which card to use in above settings to balance GPUs load.
Monitor NVIDIA GPU Load
GPU-Z tool can monitor NVIDIA GPU load on Windows. Go to Sensors tab, Video Engine Load reflects current NVDEC/NVENC working load. Not "GPU Load", which reflects 3D-modeling load instead. If you have more than one video cards, select them in IPVTL advanced video options and monitor them separatedly to keep a good balance. Also you can use GPU load monitor available in Task Manager since Windows 10.
On Linux, use nvidia-smi
or nvtop
instead.