github truehdd/truehdd 0.5.0

latest release: 0.5.1
5 hours ago

Downloads

Pick one file. If unsure which CPU you have, choose Intel or AMD.

Platform CPU File
Windows Intel or AMD (almost all PCs) truehdd-0.5.0-x86_64-pc-windows-msvc.zip
Windows ARM (Snapdragon, Windows on ARM) truehdd-0.5.0-aarch64-pc-windows-msvc.zip
macOS Intel and Apple Silicon (universal) truehdd-0.5.0-universal-macOS.zip
Linux Intel or AMD truehdd-0.5.0-x86_64-unknown-linux-gnu.tar.gz
Linux Intel or AMD, static build truehdd-0.5.0-x86_64-unknown-linux-musl.tar.gz
Linux ARM truehdd-0.5.0-aarch64-unknown-linux-gnu.tar.gz
Linux ARM, static build truehdd-0.5.0-aarch64-unknown-linux-musl.tar.gz

The static Linux builds run on distributions with an older or different C library.
Each archive ships a matching .sha256 file for verification.

Changes

Added

  • --presentation accepts a list (0,1,3), all, or max in addition to a single index; multiple presentations decode in a single pass with shared extraction and parsing, writing one output per presentation with _p{index} filename suffixes
  • Extraction, parsing and decoding run on separate threads
  • Decode now recovers from mid-stream corruption: after a parse or decode failure, both stages reset in lockstep and resume at the next major sync instead of continuing on damaged state
  • --metadata-only writes the Dolby Atmos master header and metadata without the audio file (#10)
  • --json prints a result summary on stdout listing the files written per presentation, along with frame, sample, skipped-frame and seamless-branch counts, including branch points that fail the buffer-model checks
  • Exit codes now identify the failing stage: 3 input, 4 parse, 5 decode, 6 write
  • --probe-range sets how many access units are probed for Atmos metadata when --bed-conform is used (default 12000)

Changed

  • Minimum supported Rust version for building the CLI is now 1.95.0
  • Updated dependencies (clap 4.6, vergen-gitcl 10, darling 0.24 with syn 3 in truehdd-macros)
  • Decode pipeline errors now travel in-band with the data: failures report the originating stage (input/parse/decode/write) instead of always "Write error", and output file headers are finalized even when decoding fails, keeping partial output playable
  • The default --presentation is now spelled max; it requests the same presentation as the previous default of 3, including the fallback used when a stream has no presentation 3
  • BREAKING: --format now applies to whichever presentation is written, except presentation 3 which always uses CAF; it was previously ignored whenever presentation 3 was requested, so a stream without presentation 3 produced CAF regardless of the option
  • BREAKING: --strict treats frames the extractor had to skip as a failure, so it now exits non-zero on input it previously accepted

Fixed

  • The presentation list parser failed to build on Windows, where an extra FromIterator implementation made the element type ambiguous
  • Errors are reported on stderr even when logging is turned off
  • DAMF YAML no longer corrupts file references containing double spaces, - or single quotes, and keeps quoting for names that need it so the output stays valid YAML (#17, #18)
  • Fields in --log-format json output are escaped, so paths and messages containing quotes no longer break the JSON
  • Removed a shutdown race that could report success after an unreported pipeline error

The DAMF YAML fix above builds on @nekno's report and first fix in #18.

Library (truehd crate)

Added

  • Decoder::decode_presentations() decoding several presentations from one access unit in a single pass, and PresentationMap for resolving which substreams a presentation needs
  • Parser::invalid_branches() counting seamless branch points that fail the buffer-model checks; the decoded samples are unaffected, so callers can treat it as a conformance signal
  • Parser::reset_for_next_major_sync() and Decoder::reset_for_next_major_sync() to recover from fatal parse/decode failures at the next major sync
  • Extractor::error_count() exposing the number of corrupt-frame events
  • Parser::substream_state() read-only accessor for per-substream state (DRC gain/time values)
  • OAMD object distance parsing: ObjectRenderInfo::distance_factor resolved via the new DISTANCE_FACTORS table
  • PartialEq, Eq, Hash derives on SpeakerLabels

Changed

  • BREAKING: DecoderState::decode_access_unit() is replaced by decode_access_unit_presentations(); use Decoder::decode_presentation() or Decoder::decode_presentations() instead
  • Minimum supported Rust version is now 1.88.0 (let chains; was already required, now declared correctly)
  • Updated dependency floors (anyhow, bitstream-io 4.10, log, thiserror)
  • BREAKING: ObjectRenderInfo fields b_object_at_infinity and distance_factor_idx replaced by distance_factor: Option<f64>
  • Extractor internal buffer reworked (Vec + cursor with amortized compaction) removing per-resync allocations

Fixed

  • Correct substream 0 size calculation for substream size history
  • Correct TRIM_LUT[14] value (-16.0 -> -15.0) (#26, fixed by @yuygfgg in #27)
  • No longer panic on corrupt bitstreams: invalid restart_sync_word, division by zero in seamless-branch timing, and substream size/length underflows now return typed errors (#15, #16)
  • Persist heavy DRC gain/time updates in parser substream state; heavy DRC validation previously compared against zeroed values
  • decode_presentations() no longer copies OAMD payloads into non-object presentation results

The panic-free parsing, recovery API, DRC state, OAMD distance and extractor buffer changes above are based on work by @harletty in the harletty-bridge fork.

Don't miss a new truehdd release

NewReleases is sending notifications on new releases.