Crates.io | truehdd |
lib.rs | truehdd |
version | 0.4.0 |
created_at | 2025-08-03 11:29:19.064646+00 |
updated_at | 2025-08-15 19:51:50.688026+00 |
description | Tools for inspecting and decoding Dolby TrueHD bitstreams |
homepage | |
repository | https://github.com/truehdd/truehdd |
max_upload_size | |
id | 1779634 |
size | 229,198 |
A command-line tool for decoding Dolby TrueHD audio streams.
Language: English | 简体中文 | 日本語
⚠️ Experimental
This 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 --release
The 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
info
- Stream AnalysisAnalyzes 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.thd
decode
- Audio DecodingDecodes 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 (ignored for presentation 3 which always uses CAF)
[default: caf] [possible values: caf, pcm, w64]
--presentation <INDEX> Presentation index (0-3) [default: 3]
--no-estimate-progress Disable progress estimation
--bed-conform Enable bed conformance for Atmos content
--warp-mode <WARP_MODE> Specify warp mode when not present in metadata
[possible values: normal, warping, prologiciix, loro]
...
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 Format
output.pcm
- Raw PCM (if --format pcm
)
output.wav
- Wave64 format (if --format w64
)
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 signalsNote: Presentation 3 always uses CAF format regardless of --format
option. Use --bed-conform
to convert bed channels to 7.1.2 layout.
Warp Mode Options:
The --warp-mode
option controls how Dolby Atmos content handles downmix rendering when the metadata doesn't specify a warp mode:
normal
- Direct renderwarping
- Direct render with room balanceprologiciix
- Dolby Pro Logic IIxloro
- Standard (Lo/Ro)This option only applies when the original OAMD metadata lacks warp mode information. If warp mode is already present in the metadata, this option is ignored.
Examples:
# Decode a TrueHD file with progress
truehdd decode --progress audio.thd --output-path decoded_audio
# Decode with specific warp mode for content missing this metadata
truehdd decode --warp-mode prologiciix audio.thd --output-path decoded_audio
# Decode from ffmpeg pipe
ffmpeg -i movie.mkv -c copy -f truehd - | truehdd decode - --output-path audio
Licensed under the Apache License, Version 2.0. See LICENSE for details.