2026-01-23 12:27:01 +01:00
2026-01-23 12:27:01 +01:00

AAC to E-AC-3 Converter

Converts AAC 5.1/7.1 audio tracks to E-AC-3 while preserving all other streams (video, subtitles, metadata).

Requirements

  • Python 3.6+
  • FFmpeg with E-AC-3 support

Usage

# Preview conversions (recommended first step)
python aac2eac3.py /path/to/media --dry-run

# Convert to new files (original.eac.mkv)
python aac2eac3.py /path/to/media

# Overwrite original files (creates temporary backups)
python aac2eac3.py /path/to/media --overwrite

# Custom FFmpeg path (e.g., Jellyfin's FFmpeg)
python aac2eac3.py /path/to/media --ffmpeg /usr/lib/jellyfin-ffmpeg/ffmpeg

Options

  • path - Directory containing .mkv/.mp4 files (searches recursively)
  • --dry-run - Show what would be converted without making changes
  • --overwrite - Replace original files instead of creating new ones
  • --ffmpeg - Path to FFmpeg binary (default: ffmpeg)

What it does

  • Scans directory for .mkv and .mp4 files recursively
  • Identifies AAC audio tracks with 6 channels (5.1) or 8 channels (7.1)
  • Converts those tracks to E-AC-3 @ 640 kbps
    • Note: 7.1 AAC is downmixed to 5.1 E-AC-3 (FFmpeg limitation)
  • Copies all other streams unchanged (video, subtitles, other audio)
  • Preserves all metadata (language tags, track titles, etc.)

Features

  • Detailed progress tracking - Shows file-by-file progress with conversion times
  • Smart skipping - Automatically skips files without AAC 5.1/7.1 tracks
  • Comprehensive summary - Displays statistics at the end (converted, skipped, failed, time)
  • Color-coded output - Easy-to-read terminal output with visual indicators
  • Safe operation - Creates temporary backups when using --overwrite

Example output

════════════════════════════════════════════════════════════════════
  AAC to E-AC-3 Converter
════════════════════════════════════════════════════════════════════

Scanning: /media/movies
Found 5 media files

▶ [1/5] movie.mkv
  Track 1: AAC 6ch (eng) → E-AC-3 @ 640k
  Converting → movie.eac.mkv
✓ Completed in 45s (4.2 GB)

▶ [2/5] another_movie.mkv
  No AAC 5.1/7.1 tracks found - skipping

════════════════════════════════════════════════════════════════════
  Conversion Summary
════════════════════════════════════════════════════════════════════
  Total files scanned:     5
  Successfully converted:  3
  Skipped (no AAC):        2

  Total time:             3m 25s
  Average per file:       1m 8s
Description
Converts all AAC 5.1/7.1 to EAC 5.1
Readme 37 KiB
Languages
Python 100%