A command-line tool for decoding Dolby TrueHD audio streams.
Language: English | 简体中文 | 日本語
⚠️ ExperimentalThis tool is designed for research and development purposes.
It is not intended for production environments or consumer playback systems.💡 Got a new idea?
If you have ideas for useful features, please let us know by opening an issue or starting a discussion.
truehdd is a command-line interface for the truehd library, enabling decoding of Dolby TrueHD audio streams.
Requires Rust 1.87.0 or later:
git clone https://github.com/truehdd/truehdd
cd truehdd
cargo build --releaseThe compiled executable will be located at target/release/truehdd.
truehdd [OPTIONS] <COMMAND>
Commands:
decode Decode the specified TrueHD stream into PCM audio
info Print stream information
help Print this message or the help of the given subcommand(s)
Options:
--loglevel <LOGLEVEL> Set the log level [default: info]
[possible values: off, error, warn, info, debug, trace]
--strict Treat warnings as fatal errors (fail on first warning)
--log-format <LOG_FORMAT> Log output format [default: plain]
[possible values: plain, json]
--progress Show progress bars during operations
-h, --help Print help (see a summary with '-h')
-V, --version Print version
Analyzes TrueHD streams and displays detailed information about their structure and properties without performing decoding.
Usage: truehdd info [OPTIONS] <INPUT>
Arguments:
<INPUT> Input TrueHD bitstream
Options:
...
Examples:
# Analyze a TrueHD file
truehdd info movie.thdDecodes TrueHD streams into PCM audio.
Usage: truehdd decode [OPTIONS] <INPUT>
Arguments:
<INPUT> Input TrueHD bitstream (use "-" for stdin)
Options:
--output-path <PATH> Output path for audio and metadata files
--format <FORMAT> Audio format for output [default: caf] [possible values: caf, pcm]
--presentation <INDEX> Presentation index (0-3) [default: 3]
--no-estimate-progress Disable progress estimation
...
Output Files:
By default, the maximum available presentation index is chosen for decoding.
When --output-path is specified, the tool generates appropriate output files:
-
Channel presentation: One of the following files, with presentation index 0, 1, or 2
output.caf- PCM data in Core Audio Formatoutput.pcm- Raw PCM (if--format pcm)
-
Object presentation: Dolby Atmos master file set, with presentation index 3 (if available)
output.atmos- Essential information about the presentationoutput.atmos.audio- Audio for all bed signals and objects in Core Audio formatoutput.atmos.metadata- 3D positional coordinates for static and dynamic signals
Examples:
# Decode a TrueHD file with progress
truehdd decode --progress audio.thd --output-path decoded_audio
# Decode from ffmpeg pipe
ffmpeg -i movie.mkv -c copy -f truehd - | truehdd decode - --output-path audioLicensed under the Apache License, Version 2.0. See LICENSE for details.