Skip to content

Dolby Vision for DASH and Dolby Atmos probe support#174

Open
elv-peter wants to merge 6 commits into
masterfrom
peter/dv
Open

Dolby Vision for DASH and Dolby Atmos probe support#174
elv-peter wants to merge 6 commits into
masterfrom
peter/dv

Conversation

@elv-peter
Copy link
Copy Markdown
Contributor

@elv-peter elv-peter commented May 22, 2026

Dolby Vision Profile 8.1 (commit 4d01b7f)

Preserve the dvvC box through bypass remux by setting
FF_COMPLIANCE_UNOFFICIAL when a Dolby Vision stream is detected (mirrors
the existing MV-HEVC path). Expose the DOVI decoder configuration record
in probe output via a new DOVI *mp4e.DOVIInfo field on StreamInfo
(C side data → Go). Parse dvcC/dvvC boxes in mp4e for codec info
extraction. Add XcParams JSON logging, early nil guard for
getCParams, and doc comments on all transcoding entry points.

Dolby Atmos probe (commit f2c4008)

Add DolbyAtmos bool to StreamInfo, populated from
s->codecpar->profile == AV_PROFILE_EAC3_DDP_ATMOS in avpipe_probe()
— consistent with is_dolby_atmos() in avpipe_format.c. The profile
is set by the EAC-3 decoder from sync-frame headers during
avformat_find_stream_info and propagated back to codecpar via
avcodec_parameters_from_context.

Add TestAudioAtmosBypassExplicit, which uses BypassTranscoding=true
to remux EAC-3 without re-encoding and without relying on the
is_dolby_atmos() auto-bypass heuristic (PENDING(SS) WIP).
TestAudioAtmosBypass is kept and documented as the test for that
heuristic — it should be updated when the heuristic is replaced.

Add ProbeInfo.StreamByCodecType() helper to goavpipe; replace all
open-coded range loops in avpipe_test.go with calls to it.

Test and doc cleanup (commit ffe6303)

  • Both bypass tests now assert codec, DolbyAtmos, BitRate,
    Channels, and ChannelLayoutName
  • Replace hand-written TestProbeDolbyVision81 assertions with
    TestProbeDolbyVision81Golden (full JSON comparison against a new
    golden fixture testdata/avprobe_dolby_vision_81.jsonc)
  • Add unit tests for StreamByCodecType in goavpipe/probe_test.go,
    driven from the Dolby Atmos golden fixture
  • Fix C comment: mov_read_dec3 discards the dec3 box bytes (not
    avcodec_parameters_from_context); use s->codecpar->profile
    consistently instead of codec_context->profile
  • Rename testdata *.json*.jsonc; convert _comments objects to
    // comments

  Preserve the dvvC box through bypass remux by setting FF_COMPLIANCE_UNOFFICIAL
  when a Dolby Vision stream is detected (mirrors the existing MV-HEVC path).
  Expose DOVI config in probe output (C side data → Go StreamInfo). Parse dvcC/dvvC
  boxes in mp4e for codec info extraction. Add XcParams JSON logging, early nil
  guard for getCParams, and doc comments on all transcoding entry points.
elv-peter added 2 commits May 26, 2026 21:44
  Probe: set StreamInfo.DolbyAtmos from ec3_joc in stream_info_t, which
  is populated in avpipe_probe() by checking s->codecpar->profile ==
  AV_PROFILE_EAC3_DDP_ATMOS — consistent with is_dolby_atmos() in
  avpipe_format.c.

  Tests: add TestAudioAtmosBypassExplicit, which uses BypassTranscoding=true
  to remux EAC-3 without re-encoding and without relying on the
  is_dolby_atmos() auto-bypass heuristic (PENDING(SS) WIP). Update
  TestAudioAtmosBypass comment to document that it intentionally exercises
  that heuristic and should be updated (not deleted) if it is removed.

  goavpipe: add ProbeInfo.StreamByCodecType() helper; use it at all five
  call sites in avpipe_test.go that previously open-coded the same loop.
  Tests: add TestAudioAtmosBypassExplicit, which uses BypassTranscoding=true
  to remux EAC-3 without re-encoding and without relying on the
  is_dolby_atmos() auto-bypass heuristic (PENDING(SS) WIP). Update
  TestAudioAtmosBypass comment to document that it intentionally exercises
  that heuristic and should be updated if it is removed. Both bypass tests
  now assert codec, DolbyAtmos, BitRate, Channels, and ChannelLayoutName.

  Replace hand-written TestProbeDolbyVision81 assertions with
  TestProbeDolbyVision81Golden, a full JSON comparison against a new golden
  fixture (testdata/avprobe_dolby_vision_81.jsonc).

  goavpipe: add ProbeInfo.StreamByCodecType() helper; replace all five
  open-coded range loops in avpipe_test.go with calls to it. Add unit
  tests for the helper in goavpipe/probe_test.go driven from the Dolby
  Atmos golden fixture.

  C comment: correct the claim that avcodec_parameters_from_context clears
  codecpar->extradata — the actual cause is mov_read_dec3 discarding the
  dec3 box bytes. Use codecpar->profile consistently instead of
  codec_context->profile, matching is_dolby_atmos().

  testdata: rename .json → .jsonc; convert _comments object in
  ffprobe_dolby_atmos to a // comment; add command comment to
  avprobe_dolby_atmos.jsonc.
@elv-peter elv-peter changed the title Add Dolby Vision Profile 8.1 DASH delivery support Dolby Vision for DASH and Dolby Atmos probe support May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant