Skip to content

Niaw/convert-dts-to-dolby

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

convert_dts_to_dolby.bat

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.


Features

  • 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

Folder Structure

  • convert_dts_to_dolby.bat
  • input
  • output
  • tools
  • temp
  • logs

Requirements

Operating System

  • Windows (64-bit)

External Tools (mandatory)

Extract only the required binaries from each archive and place them in the tools folder.


FFmpeg

Used for audio conversion (DTS → EAC3 / TrueHD)

Required files:

  • ffmpeg.exe
  • ffprobe.exe

Download:


MediaInfo (CLI)

Used for audio track analysis (codec, channel count)

Required files:

  • MediaInfo.exe
  • LIBCURL.DLL

Download:


MKVToolNix

Used for track inspection, extraction, and remuxing

Required files:

  • mkvmerge.exe
  • mkvextract.exe

Download:


Usage

  1. Place MKV files in the input folder
  2. Run the script: convert_dts_to_dolby.bat
  3. Converted files will be written to the output folder

Files without DTS audio tracks are skipped automatically.


Important Notes

  • 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

Logging

Each run generates a detailed log file:

  • logs/log_audio_conversion.txt

The log includes:

  • detected tracks
  • conversion commands
  • bitrates used
  • errors, if any

Limitations

  • Designed for DTS / DTS-HD audio only
  • Assumes standard MKV track layouts
  • Intended for personal and experimental use
  • No GUI

Credits

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.


License

MIT License
See the LICENSE file for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors