feat: improve logging

This commit is contained in:
2026-01-23 12:27:01 +01:00
parent d6bccdc088
commit 9fd6f281ef
2 changed files with 215 additions and 44 deletions

View File

@@ -11,16 +11,16 @@ Converts AAC 5.1/7.1 audio tracks to E-AC-3 while preserving all other streams (
```bash
# Preview conversions (recommended first step)
python aac2eac.py /path/to/media --dry-run
python aac2eac3.py /path/to/media --dry-run
# Convert to new files (original.eac.mkv)
python aac2eac.py /path/to/media
python aac2eac3.py /path/to/media
# Overwrite original files (creates temporary backups)
python aac2eac.py /path/to/media --overwrite
python aac2eac3.py /path/to/media --overwrite
# Custom FFmpeg path
python aac2eac.py /path/to/media --ffmpeg /usr/local/bin/ffmpeg
# Custom FFmpeg path (e.g., Jellyfin's FFmpeg)
python aac2eac3.py /path/to/media --ffmpeg /usr/lib/jellyfin-ffmpeg/ffmpeg
```
## Options
@@ -32,10 +32,46 @@ python aac2eac.py /path/to/media --ffmpeg /usr/local/bin/ffmpeg
## What it does
- Scans directory for .mkv and .mp4 files
- 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:
- 5.1 → 640 kbps
- 7.1 → 1024 kbps
- 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
- 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
```