-
Notifications
You must be signed in to change notification settings - Fork 639
Enable NVIDIA GPU Encoder Support
Ant Media Server can use hardware-based encoder that is available in some NVIDIA GPUs. If you have a NVIDIA GPU, you can check that your GPU contains hardware-based encoder on Video Encode and Decode GPU Support Matrix
Answer is Performance. Performance increases 5x over x264(CPU) encoder. Btw, x264 is one of the best h.264 software encoder and Ant Media Server uses x264 if there is no GPU in the system.
After you are sure that your GPU contains hardware-based encoder, the only thing is installing CUDA toolkit to your system.
Download the deb file
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_9.2.88-1_amd64.deb
Install repository meta-data
sudo dpkg -i cuda-repo-ubuntu1604_9.2.88-1_amd64.deb
Install CUDA Public GPG Key
sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub
Update repository cache
sudo apt-get update
Install CUDA
sudo apt-get install cuda
If everthing is ok, you can run the command below to see the status of your GPU
nvidia-smi
You can install Ant Media Server with its usual way or if you already install it, you can restart the Ant Media Server.
sudo service antmedia restart
Ant Media Server will check and log at startup if there is a hardware-based GPU encoder in the system and it will use it automatically. No need to do anything. Log at startup will be as follows pay attention the line cuda verify result true
below
Running on Linux
Starting Ant Media Server
Root: /usr/local/antmedia
Configuation root: /usr/local/antmedia/conf
Ant Media Server jar was found
URL list: [file:/usr/local/antmedia/ant-media-server.jar]
cuda verify result true
Selected libraries: (175 items)
...
If you need more information for installing on other systems, please check NVIDIA docs and CUDA downloads pages
- Introduction
- Quick Start
- Installation
- Publishing Live Streams
- Playing Live Streams
- Conference Call
- Peer to Peer Call
- Adaptive Bitrate(Multi-Bitrate) Streaming
- Data Channel
- Video on Demand Streaming
- Simulcasting to Social Media Channels
- Clustering & Scaling
- Monitor Ant Media Servers with Apache Kafka and Grafana
- WebRTC SDKs
- Security
- Integration with your Project
- Advanced
- WebRTC Load Testing
- TURN Servers
- AWS Wavelength Deployment
- Multi-Tenancy Support
- Monitor Ant Media Server with Datadog
- Clustering in Alibaba
- Playlist
- Kubernetes
- Time based One Time Password
- Kubernetes Autoscaling
- Kubernetes Ingress
- How to Install Ant Media Server on EKS
- Release Tests
- Spaceport Volumetric Video
- WebRTC Viewers Info
- Webhook Authentication for Publishing Streams
- Recording Streams
- How to Update Ant Media Server with Cloudformation
- How to Install Ant Media Server on GKE
- Ant Media Server on Docker Swarm
- Developer Quick Start
- Recording HLS, MP4 and how to recover
- Re-streaming update
- Git Branching
- UML Diagrams