Overview
Ant Media Server provides real-time adaptive bitrate (ABR) transcoding, allowing you to deliver streams at multiple quality levels. This ensures viewers get the best possible experience based on their network conditions and device capabilities. The transcoding engine is powered by FFmpeg and can encode streams in real-time with GPU acceleration support.How It Works
When transcoding is enabled, Ant Media Server:- Receives the source stream (typically at the highest quality)
- Encodes multiple renditions at different resolutions and bitrates
- Packages all renditions into HLS/DASH playlists
- Allows players to switch between qualities based on network conditions

Encoder Settings
Transcoding profiles are defined using theEncoderSettings class:
Parameters Explained
| Parameter | Description | Example |
|---|---|---|
height | Target resolution height (width calculated automatically) | 360, 480, 720, 1080 |
videoBitrate | Target video bitrate in kbps | 500, 1000, 2500 |
audioBitrate | Target audio bitrate in kbps | 64, 128 |
forceEncode | Encode even if source resolution is lower | true, false |
forceEncode=false prevents upscaling. If the source is 720p and you request 1080p with
forceEncode=false, that rendition will be skipped.Configuration
Via Web Panel
Navigate to Settings → Advanced Settings and configure:- Enable Adaptive Bitrate Streaming
- Add encoder settings as JSON array:
Via REST API
Update application settings:Per-Stream Configuration
You can also set encoding profiles for individual streams:Adaptive Stream Structure
When transcoding is active, theMuxAdaptor creates multiple output streams:
Output Files
For a stream with IDstream123, transcoding produces:
GPU Acceleration
Ant Media Server supports hardware-accelerated encoding:NVIDIA GPU (NVENC)
Enable in application settings:Intel Quick Sync (QSV)
Performance Comparison
| Encoder | 1080p Stream | CPU Usage | Latency |
|---|---|---|---|
| Software (x264) | 4 renditions | ~80% | Less than 3s |
| NVIDIA NVENC | 4 renditions | ~20% | Less than 2s |
| Intel QSV | 4 renditions | ~25% | Less than 2s |
Transcoding Modes
Real-time Transcoding
Default mode - streams are transcoded as they arrive:VOD Transcoding
Recorded files can be transcoded after the stream ends:Quality Ladder Recommendations
Standard Ladder (Mobile + Desktop)
Mobile-Only Ladder
4K Streaming Ladder
Monitoring Transcoding
Check Stream Resolutions
Server Resources
Monitor CPU/GPU usage:Troubleshooting
Adaptive streams not created
Adaptive streams not created
Check:
- Encoder settings are properly configured
- Source stream resolution is higher than target
forceEncodeis set correctly- FFmpeg is properly installed
io.antmedia.muxer.MuxAdaptorHigh CPU usage during transcoding
High CPU usage during transcoding
Causes:
- Too many renditions configured
- Software encoding without GPU
- Source resolution too high
- Reduce number of renditions
- Enable GPU acceleration (NVENC/QSV)
- Use faster encoding presets
Quality switching not working
Quality switching not working
Issue: Player doesn’t switch between qualitiesCauses:
- Using wrong playlist (not
_adaptive.m3u8) - Player doesn’t support ABR
- Network conditions stable
Best Practices
Start Conservative
Begin with 2-3 renditions and add more based on viewer analytics and server capacity.
Match Your Audience
Configure renditions based on your viewers’ devices and network conditions.
Use GPU Encoding
Enable hardware acceleration for high-volume streams to reduce CPU load.
Test Quality Ladder
Validate visual quality at each bitrate using actual devices and network conditions.
