conversion_project/AUDIO_CONFIG_GUIDE.md
2026-08-20 10:51:14 -04:00

3.7 KiB

config.xml - Audio Bucket Configuration Guide

Audio Bucket Structure

The audio buckets in config.xml define the bitrate tiers used for audio encoding based on channel count.

Current Configuration

<audio>
  <stereo>
    <low>128000</low>
    <medium>160000</medium>
    <high>192000</high>
  </stereo>
  <multi_channel>
    <low>384000</low>
    <medium>448000</medium>
    <high>640000</high>
  </multi_channel>
</audio>

Bitrate Usage by Resolution and Channels

Stereo (2 Channels) - All Resolutions

  • 720p: Up to high (192 kbps) if needed
  • 1080p: Up to high (192 kbps) if needed
  • 4K (2160p): Up to high (192 kbps) if needed

Stereo bitrates are the same across all resolutions.

Multi-Channel (6+ Channels)

1080p (Max 6 channels)

  • Minimum: low (384 kbps)
  • Default: medium (448 kbps)
  • Maximum: medium (448 kbps) ⚠️ High tier NOT used

Reason: Balanced compression for 1080p file size

4K / 2160p (Max 8 channels)

  • Minimum: low (384 kbps)
  • Default: medium (448 kbps)
  • Maximum: high (640 kbps) High tier NOW available

Reason: 4K containers larger; can better accommodate higher quality audio

720p (Max 2 channels)

  • Uses stereo bitrate tier (2 channels)
  • Never uses multi-channel tier

Audio Encoder Selection

Stereo (2 channels)

  • Codec: AAC
  • Use Case: Commentary tracks, all 720p sources
  • Quality: ~128-192 kbps depending on source

Multi-Channel (6+ channels)

  • Codec: EAC3 (Enhanced AC-3)
  • Use Case: Main audio tracks with surround sound
  • Quality Tiers:
    • Low: Aggressive compression, smaller files
    • Medium: Balanced quality/size (default)
    • High: High fidelity (4K only)

Configuration Recommendations

For 4K HDR Content

<multi_channel>
  <low>384000</low>      <!-- Option for aggressive compression -->
  <medium>448000</medium> <!-- Standard quality -->
  <high>640000</high>    <!-- High-quality surround (NEW in 4K mode) -->
</multi_channel>

For Bandwidth-Conscious Setup

Reduce high tier if needed:

<multi_channel>
  <low>384000</low>
  <medium>384000</medium>  <!-- Same as low to reduce file size -->
  <high>448000</high>      <!-- Moderate high tier for 4K -->
</multi_channel>

For Maximum Quality

Increase all tiers:

<multi_channel>
  <low>448000</low>
  <medium>512000</medium>
  <high>768000</high>      <!-- Higher quality for 4K -->
</multi_channel>

How the Selection Works

Example 1: 6-Channel Audio on 1080p

  1. Detected: 6 channels, 500 kbps bitrate, 1080p resolution
  2. Channel clamping: 6 ≤ 6 (max for 1080p) → stays 6ch
  3. Bitrate selection: 500 kbps, 1080p max is medium (448 kbps) → uses 448 kbps
  4. Output: EAC3 codec, 6 channels, 448 kbps

Example 2: 8-Channel Audio on 4K

  1. Detected: 8 channels, 640 kbps bitrate, 4K resolution
  2. Channel clamping: 8 ≤ 8 (max for 4K) → stays 8ch
  3. Bitrate selection: 640 kbps is exactly high → uses 640 kbps
  4. Output: EAC3 codec, 8 channels, 640 kbps

Example 3: 8-Channel Audio on 1080p

  1. Detected: 8 channels, 640 kbps bitrate, 1080p resolution
  2. Channel clamping: 8 > 6 (max for 1080p) → downmix to 6ch
  3. Bitrate selection: 640 kbps → clamped to medium (448 kbps) for 1080p
  4. Output: EAC3 codec, 6 channels, 448 kbps (downmixed)

Key Takeaways

  • Stereo bitrates remain unchanged across all resolutions
  • Multi-channel at 1080p: Max medium (448 kbps), no downmixing below 6ch
  • Multi-channel at 4K: Can use high (640 kbps) for 6-8 channels
  • Audio channels automatically clamped: 720p→2ch, 1080p→6ch, 4K→8ch
  • Bitrate selection respects both detected quality and resolution ceiling