Jump to content

Sample Rates: Difference between revisions

From Rivendell Wiki
No edit summary
No edit summary
 
(3 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, system limitations, 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 is designed primarily for broadcast radio environments and assumes a fixed digital audio sample rate throughout the system. Correct configuration and consistent audio formatting are critical to ensure reliable playback, accurate timing, and predictable audio quality.
Rivendell supports multiple PCM sample rates, but the most important rule is consistency across the entire audio chain.


== Supported Sample Rates ==
== Keep the Entire Audio Chain Matched ==


Rivendell supports '''44,100 Hz (44.1 kHz)''' PCM audio.
All major components should run at the same sample rate:


* 44.1 kHz is the **native and required sample rate** for all audio stored in the Rivendell audio store.
* Audio Interface
* Audio at other sample rates must be converted before being imported into Rivendell.
* JACK / PipeWire
* Rivendell Audio Store
* GlassCoder & GlassGUI / BUTT / DarkIce / Liquidsoap
* Stereo Tool
* Streaming Encoder


Rivendell does not dynamically resample audio during playback. Files not at the correct sample rate may fail to import or play incorrectly.
<div class="mw-message-box mw-message-box-warning">
'''Important:''' The Rivendell '''System Sample Rate''' should be selected before importing audio and should not be changed later on an active system.
</div>


== Bit Depth ==
== Recommended Setups ==


While this page focuses on sample rates, bit depth is closely related and must also be considered.
=== Modern FM / Streaming Station ===


* '''16-bit''' linear PCM is the standard and most commonly used format.
'''Recommended Format'''
* Some workflows may support '''24-bit''' audio during import, but files are typically stored and processed as 16-bit audio internally.


== Channel Configuration ==
* '''48 kHz'''
* '''16-bit or 24-bit PCM'''


Rivendell supports both mono and stereo audio at the supported sample rate.
'''Why 48 kHz?'''


* Mono: Single channel PCM
* Native rate for most broadcast hardware
* Stereo: Two-channel PCM (Left / Right)
* 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


The sample rate requirement (44.1 kHz) applies equally to mono and stereo files.
=== Legacy Music Library / CD-Focused Workflow ===


== Importing Audio ==
'''Recommended Format'''


When importing audio into Rivendell using tools such as:
* '''44.1 kHz'''
* '''rdimport'''
* '''Rivendell Import GUI'''
* External production workflows


ensure that all source files meet the following criteria:
Best suited when the majority of source material originates from audio CDs.


* Sample Rate: '''44,100 Hz'''
This minimizes resampling during import, although modern broadcast chains generally benefit more from maintaining 48 kHz consistency end-to-end.
* Encoding: Linear PCM (WAV)
* Bit Depth: 16-bit (recommended)
* Channel Count: Mono or Stereo


If a file does not meet these requirements, it should be converted prior to import using an external audio editor or batch processing tool.
== What NOT To Use ==


== Sample Rate Conversion ==
Avoid using the following sample rates for normal radio operations:


Audio files created at common production or distribution sample rates such as:
* '''96 kHz'''
* 48,000 Hz (video production)
* '''192 kHz'''
* 96,000 Hz (high‑resolution recording)


must be resampled to 44.1 kHz before use in Rivendell.
These dramatically increase:


Recommended practices:
* CPU usage
* Use high‑quality offline resampling
* JACK/PipeWire overhead
* Avoid repeated resampling of the same audio
* Storage requirements
* Apply dithering when reducing bit depth
* Network bandwidth usage


== Clocking and Audio Hardware ==
...while providing essentially no listener benefit for radio broadcast or streaming applications.


Although Rivendell software assumes a 44.1 kHz internal rate, audio hardware configuration is also important.
== Best Practices for Rivendell Systems ==


* Audio interfaces should be locked to a stable clock source
A stable modern Rivendell broadcast chain typically uses:
* Hardware may run at 44.1 kHz or perform real‑time sample rate conversion internally
* Mixing differing hardware clock rates without proper synchronization can cause clicks, pops, or drift


== Timing and Logs ==
{| 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'''
|}


Precise timing in Rivendell logs depends on all audio sharing the same sample rate.
== Benefits of Keeping Everything at 48 kHz ==


* Segue calculations
For most modern broadcast and streaming systems, maintaining a consistent '''48 kHz''' workflow minimizes:
* Event timing
* Length metadata


are all based on the assumption of 44.1 kHz source audio.
* XRUNs
* Resampler artifacts
* Clock drift
* Unnecessary FFmpeg processing
* CPU overhead


Using non‑conforming files may result in:
This results in a cleaner, more stable, and lower-latency audio chain.
* Incorrect length reporting
* Timing drift
* Playback errors
 
== Best Practices ==
 
* Standardize production workflows at 44.1 kHz
* Validate audio files before import
* Avoid on‑the‑fly sample rate conversion
* Document any exceptions clearly for engineering staff

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.