Skip to content

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 → Listeners

Key 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

  1. Navigate to Encoders in the station sidebar
  2. Click Add Encoder
  3. Enter the connection details (see table below)
  4. Click Save

Connection Settings

FieldDescriptionRequired
NameInternal identifierYes
HostServer addressYes
PortServer portYes
Mount PointStream path (Icecast)Yes
UsernameSource usernameYes
PasswordSource passwordYes
GenreStation genre tagNo
EnabledToggle encoder on or off

The connection parameters define how the encoder reaches the streaming server:

  • Host: IP address or hostname of the Icecast or SHOUTcast server
  • Port: TCP port the server listens on
  • Mount Point: stream path on the server (Icecast)
  • Username: source account username
  • Password: source account password

Encoders can be deactivated without deleting them by toggling the Enabled setting. Disabled encoders show a "Disabled" badge.

An SSL/TLS indicator (shield icon) appears when the encoder uses a secure connection.

Audio Settings

Audio passes through loudness processing before it reaches the encoder. Configure target loudness in EBU R128 to ensure consistent levels across the stream.

Codec Comparison

FeatureMP3AACOpus
CompatibilityUniversalGoodModern players only
EfficiencyBaseline30% better than MP350% better than MP3
Quality at 128 kbpsGoodExcellentExcellent
Quality at 64 kbpsPoorGoodGood
Bitrate range64–320 kbps32–256 kbps32–256 kbps
LatencyLowLowVery low
LicenseRoyalty-freeMay require licenseRoyalty-free

Codec Selection

CodecBest ForBitrate Range
MP3Maximum compatibility64–320 kbps
AACMobile listeners, efficiency32–256 kbps
OpusBest quality at low bitrates32–256 kbps

Metadata

Configure how track information appears to listeners.

Metadata Format

The metadata format is a template that combines text and placeholders. The format determines the string sent to the streaming server for each track.

{{artist}} - {{title}}

This template produces Miles Davis - So What for a track by Miles Davis. Static text outside placeholders appears unchanged. An empty placeholder resolves to an empty string.

Template Variables

VariableOutput
{{artist}}Track artist
{{title}}Track title
{{album}}Album name
{{station}}Station name

Case Transformation

OptionResult
NoneOriginal casing
UpperALL UPPERCASE
Lowerall lowercase
TitleTitle Case

Status and Monitoring

StatusMeaning
connectedStreaming active
connectingEstablishing connection
offlineNot streaming
timeoutConnection timed out
busyServer reports mount point in use
ssl_errorSSL/TLS handshake failed
cast_deniedAuthentication rejected by server
internalInternal error

The station.encoder.statuschange webhook trigger fires whenever an encoder transitions between these states. Use it to alert on disconnects or failed connections. See Webhooks.

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

FeatureIcecastSHOUTcast
LicenseOpen source (GPL)Proprietary
CodecsMP3, AAC, Opus, Vorbis, FLACMP3, AAC
Mount pointsMultiple streams per serverOne stream per port
MetadataFull supportBasic support
CostFree (self-hosted)Free tier + paid plans
Fallback streamsBuilt-inLimited

Bandwidth Calculator

ListenersBitrateHourlyMonthly (24/7)
10128 kbps576 MB414 GB
50128 kbps2.88 GB2.07 TB
100128 kbps5.76 GB4.15 TB
1064 kbps288 MB207 GB
5064 kbps1.44 GB1.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, 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.

Should I use stereo or mono?

Use stereo for music stations (128+ kbps). Use mono for talk/speech to save bandwidth.