Encoders
Encoders send audio from your station to streaming servers for distribution to listeners.
Overview
An encoder compresses audio and transmits it to a streaming server (Icecast, SHOUTcast, or similar). The streaming server then distributes the audio to listeners.
Station → Encoder → Streaming Server → ListenersKey Concepts
What is an encoder? An encoder converts raw audio into a compressed stream format (MP3, AAC, Opus) and transmits it to a remote server using a streaming protocol.
Why use multiple encoders?
- Provide different quality levels (128 kbps for mobile, 320 kbps for high fidelity)
- Stream to multiple platforms simultaneously
- Maintain backup streams for redundancy
Encoder vs streaming server: The encoder sends audio. The streaming server receives it and distributes it to listeners. Your streaming provider supplies the server; xtra audio provides the encoder.
Setup
Prerequisites
- Streaming server credentials from your provider
- Server address and port
- Mount point (for Icecast servers)
Add an Encoder
- Navigate to Station > Settings > Encoders
- Click Add Encoder
- Enter the connection details (see table below)
- Click Test Connection
- Click Save
Connection Settings
| Field | Description | Required |
|---|---|---|
| Name | Internal identifier | Yes |
| Protocol | Icecast / SHOUTcast v1 / SHOUTcast v2 | Yes |
| Host | Server address | Yes |
| Port | Server port | Yes |
| Mount Point | Stream path (Icecast only) | Icecast only |
| Username | Source username | Yes |
| Password | Source password | Yes |
Audio Settings
Codec Comparison
| Feature | MP3 | AAC | Opus |
|---|---|---|---|
| Compatibility | Universal | Good | Modern players only |
| Efficiency | Baseline | 30% better than MP3 | 50% better than MP3 |
| Quality at 128 kbps | Good | Excellent | Excellent |
| Quality at 64 kbps | Poor | Good | Good |
| Latency | Low | Low | Very low |
| License | Royalty-free | May require license | Royalty-free |
Codec Selection
| Codec | Best For | Bitrate Range |
|---|---|---|
| MP3 | Maximum compatibility | 64–320 kbps |
| AAC | Mobile listeners, efficiency | 32–256 kbps |
| Opus | Best quality at low bitrates | 32–256 kbps |
Recommended Configurations
| Use Case | Codec | Bitrate | Notes |
|---|---|---|---|
| Standard broadcast | MP3 | 128 kbps | Works everywhere |
| High fidelity | MP3 | 320 kbps | For music-focused stations |
| Mobile-optimized | AAC | 64 kbps | Low bandwidth, good quality |
| Low bandwidth | Opus | 48 kbps | Requires modern player |
Metadata
Configure how track information appears to listeners.
Template Variables
| Variable | Output |
|---|---|
{artist} | Track artist |
{title} | Track title |
{album} | Album name |
{station} | Station name |
Examples
{artist} - {title}→ "The Beatles - Hey Jude"{title} ({station})→ "Hey Jude (Radio Example)"
Status and Monitoring
| Status | Meaning |
|---|---|
| Connected | Streaming active |
| Disconnected | Not streaming |
| Connecting | Establishing connection |
| Error | Connection failed |
Troubleshooting
Connection Refused
- Verify host and port
- Check if server is running
- Confirm firewall allows outbound traffic
Authentication Failed
- Verify username and password
- Check mount point spelling (Icecast)
- Ensure source account exists
Frequent Disconnections
- Check network stability
- Reduce bitrate
- Contact server provider
Icecast vs SHOUTcast
| Feature | Icecast | SHOUTcast |
|---|---|---|
| License | Open source (GPL) | Proprietary |
| Codecs | MP3, AAC, Opus, Vorbis, FLAC | MP3, AAC |
| Mount points | Multiple streams per server | One stream per port |
| Metadata | Full support | Basic support |
| Cost | Free (self-hosted) | Free tier + paid plans |
| Fallback streams | Built-in | Limited |
When to Use Icecast
- Self-hosting your streaming server
- Need for multiple streams from one server
- Opus or FLAC streaming required
- Full control over configuration
When to Use SHOUTcast
- Managed hosting preferred
- Listener statistics and analytics needed
- Directory listing in SHOUTcast.com
- Simpler setup requirements
Bandwidth Calculator
Estimate monthly bandwidth usage based on listeners and bitrate.
| Listeners | Bitrate | Hourly | Monthly (24/7) |
|---|---|---|---|
| 10 | 128 kbps | 576 MB | 414 GB |
| 50 | 128 kbps | 2.88 GB | 2.07 TB |
| 100 | 128 kbps | 5.76 GB | 4.15 TB |
| 10 | 64 kbps | 288 MB | 207 GB |
| 50 | 64 kbps | 1.44 GB | 1.04 TB |
Formula: listeners × bitrate (kbps) × 3600 / 8 / 1024 = MB per hour
FAQ
What is the best codec for internet radio?
MP3 at 128 kbps offers the best balance of quality and compatibility. For bandwidth-constrained scenarios, AAC at 64 kbps provides similar quality at half the bitrate.
How much bandwidth does streaming use?
Bandwidth depends on bitrate and listener count. A 128 kbps stream uses approximately 57.6 MB per listener per hour. Multiply by concurrent listeners for total usage.
Can I stream to multiple servers?
Yes. Create multiple encoders in xtra audio, each with different server credentials. All encoders stream simultaneously from the same audio source.
What causes stream buffering?
Buffering occurs when listeners cannot download audio fast enough. Common causes include high bitrate on slow connections, server capacity limits, or network congestion. Lower bitrate streams reduce buffering.
Should I use stereo or mono?
Use stereo for music stations (128+ kbps). Use mono for talk/speech to save bandwidth—a 64 kbps mono stream uses half the data of stereo.
Related
- Station Configuration - Complete station setup
- EBU R128 - Loudness normalization settings
- StereoTool - Audio processing before encoding