Windows batch script that automatically converts DTS audio tracks in MKV files into Dolby-compatible formats (EAC3 or TrueHD), then remuxes the file while preserving audio order and metadata.
The goal is improved compatibility with TVs, media players, and Plex, while keeping the best possible audio quality.
- Detects DTS and DTS-HD Master Audio tracks
- Converts:
- DTS-HD MA → TrueHD (lossless)
- DTS → EAC3, with bitrate adapted to channel count
- Preserves:
- original audio track order
- non-DTS audio tracks
- video and subtitle streams
- Batch processing of MKV files
- Detailed logging for each session
convert_dts_to_dolby.batinputoutputtoolstemplogs
- Windows (64-bit)
Extract only the required binaries from each archive and place them in the tools folder.
Used for audio conversion (DTS → EAC3 / TrueHD)
Required files:
ffmpeg.exeffprobe.exe
Download:
- https://www.gyan.dev/ffmpeg/builds/#release-builds
- Archive:
ffmpeg-release-full.7z - Direct link: https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-full.7z
Used for audio track analysis (codec, channel count)
Required files:
MediaInfo.exeLIBCURL.DLL
Download:
- https://mediaarea.net/en/MediaInfo/Download/Windows
- Windows → CLI → 64-bit
Used for track inspection, extraction, and remuxing
Required files:
mkvmerge.exemkvextract.exe
Download:
- https://mkvtoolnix.download/downloads.html#windows
- Portable 64-bit version (
.7z)
- Place MKV files in the
inputfolder - Run the script:
convert_dts_to_dolby.bat - Converted files will be written to the
outputfolder
Files without DTS audio tracks are skipped automatically.
- Do not place the script in a path containing spaces
- Save the script as UTF-8 with BOM (UTF-8-BOM)
(required for correct handling of special characters) - Always test on a sample file before batch processing
- The script is designed for MKV input only
Each run generates a detailed log file:
logs/log_audio_conversion.txt
The log includes:
- detected tracks
- conversion commands
- bitrates used
- errors, if any
- Designed for DTS / DTS-HD audio only
- Assumes standard MKV track layouts
- Intended for personal and experimental use
- No GUI
This script was created, refined, and improved with the assistance of ChatGPT and Claude, used as technical assistants for:
- batch scripting logic
- media processing workflows
- command optimization and robustness
Final testing, validation, and usage decisions were performed manually.
MIT License
See the LICENSE file for details.