How Should You Handle Audio Loudness When Live Streaming with OBS Studio?

This article was translated from Japanese by AI. The original is at https://blog.semnil.com/post-1287.html

Audio loudness in live streams is something that had long bothered me as a viewer, and once I started streaming myself, searching the web turned up all sorts of information — but much of it never explained what standard it was based on. So I researched the topic until I could draw my own conclusions, and built what I needed.

Conclusion

This is not a prescription everyone should follow — it is what I do and how I think about it.

  • Use the recommendations in AES TD1008 as the baseline
    • Keep the stream’s integrated loudness between -20 LUFS and -18 LUFS
      • Below -20 LUFS, viewers are likely to struggle to get enough playback volume, so pay attention to the lower bound
    • Do not let the true peak exceed -1 dBTP (dB True Peak)
      • To be safe, apply a filter (limiter) to the mix track right before output
      • Use a limiter that can detect true peaks and keep the output at or below -2 dBTP *
  • Use the loudness meter in Flux::MiRA (AES Streaming mode) for monitoring
    • The display can be adjusted to match your target loudness
    • The integrated loudness readout is easy to read

* Adjusted after I observed a case where a VOD of a Twitch live stream (measured below -1 dBTP during the stream) was uploaded to YouTube, and the audio of the video re-encoded by YouTube exceeded 0 dBTP.

Loudness standards

Here is a summary of the internationally recognized standards for loudness and true peak. The following contains excerpts and loose translations, so refer to the original documents for the exact wording.

ITU-R: Recommendations of the International Telecommunication Union Radiocommunication Sector

  • ITU-R BS.1770
    • Defines the loudness unit LKFS (Loudness, K-weighted, relative to full scale) and how to measure it
      • Programme loudness: the average loudness of the entire content (with a gate that excludes silence and relatively low-level passages)
    • Provides guidelines for measuring true peak

EBU: Recommendations and technical documents of the European Broadcasting Union

  • EBU R 128
    • Defines LUFS (Loudness Units, referenced to Full Scale), equivalent to the LKFS defined in ITU-R BS.1770 (following international naming conventions)
    • Recommends the following
      • The target loudness should be normalized to −23.0 LUFS ±1.0 LU
      • The true peak level must not exceed −1 dBTP ±0.3 dB (for signals band-limited to 20 kHz)
  • EBU TECH 3341
    • Specifies loudness meter requirements based on EBU R 128
      • Momentary loudness: ungated, 400 ms average
      • Short-term loudness: ungated, 3-second average
      • Integrated loudness: the loudness from the start of measurement, measured in the same way as Programme loudness

AES: Technical documents of the Audio Engineering Society

  • AESTD1008 (a revision of AESTD1004)
    • Recommends the following
      • Integrated loudness of audio content: -18 LUFS (upper tolerance: +1 LU)
      • To keep playback from becoming too quiet on vulnerable playback devices even at maximum gain, keeping the content’s integrated loudness at or above -20 LUFS is recommended

OBS Studio specifics

This is what I looked into while monitoring loudness and true peak, and while writing my own plugin. The information below applies to OBS Studio 32.0.

What OBS can monitor on its own

  • What the audio mixer’s level meters show by default is sample peak and RMS
    • Sample peak
      • Indicates the maximum value of the sampled audio signal
      • Displayed on the level meter in green, yellow, and red
      • Even when this value stays at or below 0 dB, the true peak can exceed 0 dB
    • RMS
      • Root Mean Square
      • The average energy of the audio signal
      • Displayed as a black band on the level meter
      • Gives an indication closer to perceived loudness than looking only at peaks, but does not take the characteristics of human hearing into account
  • True peak can be displayed by changing “Audio > Meters > Peak Meter Type”
    • As the note in the settings says, CPU usage goes up

Audio output buffering

  • Audio is buffered and processed in units of at least 1,024 samples (21 ms at 48 kHz)
  • The buffer grows dynamically up to 46,080 samples (45 times the minimum; 960 ms at 48 kHz) (default setting, buffering type: dynamically increasing)
    • Depending on the environment and circumstances, audio output latency can gradually grow during a stream, which may cause the audio to drift out of sync with the video
  • Enabling “Audio > Advanced > Low Latency Audio Buffering Mode (For Decklink/NDI outputs)” pins the buffer at the minimum of 1,024 samples (buffering type: fixed)

Log output (relevant excerpts)

# Low Latency Audio Buffering Mode disabled (default)
---------------------------------
audio settings reset:
samples per sec: 48000
speakers:        2
max buffering:   960 milliseconds
buffering type:  dynamically increasing
---------------------------------

# Low Latency Audio Buffering Mode enabled
---------------------------------
audio settings reset:
samples per sec: 48000
speakers:        2
max buffering:   21 milliseconds
buffering type:  fixed
---------------------------------

References and related resources

A miscellaneous collection of the books, plugins, and other resources I referred to.

  • とーくばっく (Talkback)
    • A book (in Japanese) that teaches what you should know about digital audio in general
  • OBS Core API Reference
    • The API documentation for OBS Studio
  • github.com/obsproject/obs-studio
    • The source code of OBS Studio, and more
  • github.com/obsproject/obs-plugintemplate
    • A template for creating OBS Studio plugins
  • Loudness Balance Monitor
    • An OBS Studio plugin that shows the volume balance, the loudness of the mix, and sample-peak clipping status in green, yellow, and red (Windows only)
    • Designed and optimized for balancing the volume of sources such as a microphone plus BGM
    • The level at which the mix reads green can be switched between three settings: -20, -18, and -16 LUFS
  • Master Level Meter (OBS Plugin)
    • An OBS Studio plugin that displays level meters for the mix tracks (Windows, macOS)
    • Shows RMS, sample peak, and short-term loudness
    • No plans to support master effects
  • “Streaming Volume Checker” — real-time diagnosis of your stream’s volume balance
    • A tool that connects to OBS Studio (via the WebSocket API) to measure volume and give advice on your settings (Windows only)
    • Designed and optimized for balancing the volume of sources such as a microphone plus BGM
    • As of v1.1.3 there is no way to specify an arbitrary target loudness
  • Virtual Audio Master for OBS Studio
    • An OBS Studio plugin that adds a source carrying the mixed audio of the active, unmuted sources (equivalent to a mix track) (Windows only)
    • Designed to function as a single master bus
  • Source Dock
    • An OBS Studio plugin that displays a given source as a dock (Windows, macOS, Ubuntu)
    • Lets you keep a captured view of a loudness meter that runs as a separate application on screen at all times
    • Convenient because it stays visible regardless of the state of your scenes
  • Mix Track To Source
    • The OBS Studio plugin I wrote for my own use this time (Windows, macOS, Ubuntu)
    • Does nothing except make one of mix tracks 1–6 available as a source input
    • The routing design and which filters to apply are entirely up to the user

コメント

Copied title and URL