Skip to content

Instantly share code, notes, and snippets.

@animaux
Last active September 27, 2025 11:07
Show Gist options
  • Select an option

  • Save animaux/81ded6236b79674071bd7b26ec1f5e90 to your computer and use it in GitHub Desktop.

Select an option

Save animaux/81ded6236b79674071bd7b26ec1f5e90 to your computer and use it in GitHub Desktop.

extract audio objects from bluray (audio)

Atmos audio objects are not speaker-based tracks, but rather discrete audio sources that can be moved in a virtual space and will be rendered on your player using the available hardware (speakers and their positions). Exceptions are »beds«, for example the subwoofer channel.

1. do a backup of your BD with MakeMKV

2. check in BDMV/STREAM for the .mt2s that contains what you are looking for (usually the biggest file)

3. use ffmpeg to get info about the streams included and extract the one you need, for example

ffmpeg -i 00003.m2ts

output will be something like this:

…
Input #0, mpegts, from '00003.m2ts':
  Duration: 01:34:39.68, start: 600.000000, bitrate: 20392 kb/s
  Program 1 
  Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 90k tbn
  Stream #0:1[0x1100]: Audio: truehd (Dolby TrueHD + Dolby Atmos) (AC-3 / 0x332D4341), 48000 Hz, 7.1, s32 (24 bit)
  Stream #0:2[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 640 kb/s
  Stream #0:3[0x1101]: Audio: pcm_bluray (HDMV / 0x564D4448), 96000 Hz, stereo, s32 (24 bit), 4608 kb/s

Look for the truehd-stream, in this case 0:0 and extract it with ffmpeg:

ffmpeg -i 00003.m2ts -map 0:1 -c copy atmos.thd

use truehdd to extract info and then the object files

https://github.com/truehdd/truehdd

truehdd info atmos.thd

output will be something like this:

TrueHD Stream Information
=========================

Stream Information
  Format Sync               F8726FBA
  Sampling rate             48000 Hz
  Variable rate             true
  Peak data rate            8814 kbps
  Number of substreams      4
  Dolby Atmos               true

Presentation Information
  Presentation 0
    Number of channels      2
    Presentation type       Downmix of presentation 1
    Channel format          Stereo
    DRC on by default       false
    Dialogue Level          -37 dBFS
    Mix Level                99 dB
  Presentation 1
    Number of channels      6
    Presentation type       Downmix of presentation 2
    Dolby Surround EX       Not indicated
    Channel assignment      L, R, C, LFE, Ls, Rs
    DRC on by default       false
    Dialogue Level          -31 dBFS
    Mix Level               105 dB
  Presentation 2
    Number of channels      8
    Presentation type       Downmix of presentation 3
    Channel assignment      L, R, C, LFE, Ls, Rs, Lb, Rb
    DRC on by default       false
    Dialogue Level          -31 dBFS
    Mix Level               105 dB
  Presentation 3
    Number of elements      16
    Presentation type       Independent
    Bed configuration       LFE
    Dialogue Level          -31 dBFS
    Mix Level               105 dB

Trim detection              No trimmed samples detected

As stated in the readme, Presentation 3 is normally the Object presentation, we extract that into an .atmos set of files:

Setting an --output-path is important to get the »appropriate output files«.

truehdd decode --presentation 3 --output-path obj atmos.thd

The resulting obj.atmos.audio is a CAF multichannel audio file that includes all the audio objects.

You can use the Dolby Atmos Conversion Tool to create an ADM BWF master (WAV-File), which theoretically should be is importable in a modern DAW, that gives you all the automation for object panning etc.

https://professional.dolby.com/product/dolby-atmos-content-creation/dolby-atmos-conversion-tool/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment