Jump to content

Sample Rates: Difference between revisions

From Rivendell Wiki
No edit summary
No edit summary
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
= Sample Rates in Rivendell =
= Rivendell Audio Sample Rate Recommendations =


This page documents how audio sample rates are handled in the '''Rivendell Radio Automation System''', including supported rates, configuration considerations, and best practices for production and ingestion.
The most common and recommended sample rates for the [https://rivendellaudio.org Rivendell Radio Automation System] are:


== Overview ==
{| class="wikitable"
! Sample Rate
! Recommended Use
! Notes
|-
| '''44.1 kHz'''
| Traditional music/CD workflow
| Best when the majority of source audio comes from CD rips
|-
| '''48 kHz'''
| Modern broadcast and streaming
| Preferred for FM, streaming, JACK/PipeWire, and modern processing chains
|}


Rivendell supports a '''fixed system‑wide sample rate'''. All audio stored in the Rivendell audio store must match the system's configured rate to ensure correct playback, timing accuracy, and log integrity.
Rivendell supports multiple PCM sample rates, but the most important rule is consistency across the entire audio chain.


Unlike some modern media systems, Rivendell does not transparently mix or resample audio files with differing sample rates at runtime.
== Keep the Entire Audio Chain Matched ==


== Supported Sample Rates ==
All major components should run at the same sample rate:


Rivendell supports the following PCM audio sample rates:
* Audio Interface
* JACK / PipeWire
* Rivendell Audio Store
* GlassCoder & GlassGUI / BUTT / DarkIce / Liquidsoap
* Stereo Tool
* Streaming Encoder


* '''44,100 Hz (44.1 kHz)'''
<div class="mw-message-box mw-message-box-warning">
* '''48,000 Hz (48 kHz)'''
'''Important:''' The Rivendell '''System Sample Rate''' should be selected before importing audio and should not be changed later on an active system.
</div>


Only **one sample rate may be used per Rivendell system at a time**, and all audio files must match the configured rate.
== Recommended Setups ==


''Important:'' The chosen sample rate is a '''system‑level configuration decision'''. Mixing 44.1 kHz and 48 kHz audio in the same Rivendell system is not supported.
=== Modern FM / Streaming Station ===


== Choosing a Sample Rate ==
'''Recommended Format'''


=== 44.1 kHz ===
* '''48 kHz'''
* '''16-bit or 24-bit PCM'''


44.1 kHz has historically been the most common Rivendell configuration.
'''Why 48 kHz?'''


Advantages:
* Native rate for most broadcast hardware
* Compatible with legacy CD‑based and broadcast workflows
* Matches AAC, Opus, and modern streaming pipelines
* Widely used in existing Rivendell installations
* Avoids unnecessary resampling in JACK/PipeWire workflows
* Proven stability
* Better compatibility with video and social media content
* Preferred by most modern audio processors


=== 48 kHz ===
=== Legacy Music Library / CD-Focused Workflow ===


48 kHz is commonly used in modern broadcast and video‑adjacent workflows.
'''Recommended Format'''


Advantages:
* '''44.1 kHz'''
* Industry standard for video and many modern broadcast chains
* Reduces the need for external sample‑rate conversion when interfacing with video systems
* Supported by Rivendell when configured consistently


''Note:'' Switching an existing system from 44.1 kHz to 48 kHz requires re‑importing or converting all stored audio.
Best suited when the majority of source material originates from audio CDs.


== Bit Depth ==
This minimizes resampling during import, although modern broadcast chains generally benefit more from maintaining 48 kHz consistency end-to-end.


While this page focuses on sample rates, bit depth is also relevant.
== What NOT To Use ==


* '''16‑bit''' linear PCM is the standard and recommended format.
Avoid using the following sample rates for normal radio operations:
* Some workflows may allow import of higher bit‑depth material, but audio is typically stored and processed as 16‑bit PCM.


== Channel Configuration ==
* '''96 kHz'''
* '''192 kHz'''


Rivendell supports both mono and stereo audio at either supported sample rate.
These dramatically increase:


* Mono: Single channel PCM
* CPU usage
* Stereo: Left / Right PCM
* JACK/PipeWire overhead
* Storage requirements
* Network bandwidth usage


The configured system sample rate (44.1 kHz or 48 kHz) applies equally to mono and stereo files.
...while providing essentially no listener benefit for radio broadcast or streaming applications.


== Importing Audio ==
== Best Practices for Rivendell Systems ==


When importing audio into Rivendell using:
A stable modern Rivendell broadcast chain typically uses:
* '''rdimport'''
* Rivendell GUI import tools
* Automated ingest workflows


Ensure that all source files meet the system requirements:
{| class="wikitable"
! Component
! Recommended Sample Rate
|-
| Rivendell Audio Store
| '''48 kHz'''
|-
| JACK / PipeWire
| '''48 kHz'''
|-
| Stereo Tool
| '''48 kHz'''
|-
| Liquidsoap Internal Processing
| '''48 kHz'''
|-
| Streaming Encoder Input
| '''48 kHz'''
|-
| Final MP3/AAC Stream
| '''44.1 kHz or 48 kHz'''
|}


* Sample Rate: '''Matches the system configuration (44.1 kHz or 48 kHz)'''
== Benefits of Keeping Everything at 48 kHz ==
* Encoding: Linear PCM (WAV)
* Bit Depth: 16‑bit recommended
* Channels: Mono or Stereo


Files with mismatched sample rates must be converted before import.
For most modern broadcast and streaming systems, maintaining a consistent '''48 kHz''' workflow minimizes:


== Sample Rate Conversion ==
* XRUNs
* Resampler artifacts
* Clock drift
* Unnecessary FFmpeg processing
* CPU overhead


Common source sample rates that may require conversion include:
This results in a cleaner, more stable, and lower-latency audio chain.
 
* 44.1 kHz (if the system is configured for 48 kHz)
* 48 kHz (if the system is configured for 44.1 kHz)
* 96 kHz or higher (high‑resolution recording)
 
Best practices:
* Perform high‑quality offline resampling
* Avoid repeated conversion of the same audio
* Use dithering when reducing bit depth
 
== Clocking and Audio Hardware ==
 
System‑level sample rate configuration must align with audio hardware settings.
 
* Audio interfaces should run at the same sample rate as Rivendell
* External word clock sources should be stable and correctly distributed
* Hardware sample‑rate conversion should be avoided where possible
 
Improper clocking or mismatched rates may cause:
* Clicks or pops
* Timing drift
* Unstable playback
 
== Timing and Logs ==
 
Rivendell log timing and audio length calculations depend on a consistent sample rate.
 
* Segue calculations
* Event timing
* Length metadata

Latest revision as of 16:57, 9 May 2026

Rivendell Audio Sample Rate Recommendations

The most common and recommended sample rates for the Rivendell Radio Automation System are:

Sample Rate Recommended Use Notes
44.1 kHz Traditional music/CD workflow Best when the majority of source audio comes from CD rips
48 kHz Modern broadcast and streaming Preferred for FM, streaming, JACK/PipeWire, and modern processing chains

Rivendell supports multiple PCM sample rates, but the most important rule is consistency across the entire audio chain.

Keep the Entire Audio Chain Matched

All major components should run at the same sample rate:

  • Audio Interface
  • JACK / PipeWire
  • Rivendell Audio Store
  • GlassCoder & GlassGUI / BUTT / DarkIce / Liquidsoap
  • Stereo Tool
  • Streaming Encoder

Important: The Rivendell System Sample Rate should be selected before importing audio and should not be changed later on an active system.

Modern FM / Streaming Station

Recommended Format

  • 48 kHz
  • 16-bit or 24-bit PCM

Why 48 kHz?

  • Native rate for most broadcast hardware
  • Matches AAC, Opus, and modern streaming pipelines
  • Avoids unnecessary resampling in JACK/PipeWire workflows
  • Better compatibility with video and social media content
  • Preferred by most modern audio processors

Legacy Music Library / CD-Focused Workflow

Recommended Format

  • 44.1 kHz

Best suited when the majority of source material originates from audio CDs.

This minimizes resampling during import, although modern broadcast chains generally benefit more from maintaining 48 kHz consistency end-to-end.

What NOT To Use

Avoid using the following sample rates for normal radio operations:

  • 96 kHz
  • 192 kHz

These dramatically increase:

  • CPU usage
  • JACK/PipeWire overhead
  • Storage requirements
  • Network bandwidth usage

...while providing essentially no listener benefit for radio broadcast or streaming applications.

Best Practices for Rivendell Systems

A stable modern Rivendell broadcast chain typically uses:

Component Recommended Sample Rate
Rivendell Audio Store 48 kHz
JACK / PipeWire 48 kHz
Stereo Tool 48 kHz
Liquidsoap Internal Processing 48 kHz
Streaming Encoder Input 48 kHz
Final MP3/AAC Stream 44.1 kHz or 48 kHz

Benefits of Keeping Everything at 48 kHz

For most modern broadcast and streaming systems, maintaining a consistent 48 kHz workflow minimizes:

  • XRUNs
  • Resampler artifacts
  • Clock drift
  • Unnecessary FFmpeg processing
  • CPU overhead

This results in a cleaner, more stable, and lower-latency audio chain.