Distorted DTS-HD to Stereo Downmix

Videos with DTS-HD audio tracks exhibit clipping/distortion when the Apple TV is configured to output Stereo L-PCM audio. The problem also occurs with playback to Bluetooth stereo headphones.

I rip my Blu-ray disc collection to MKV, keeping the original video and audio tracks (no re-encoding). When playing back these rips with Infuse, I’ve noticed that movies with DTS-HD audio, especially those with loud scenes (expositions, plane flyovers, etc), have distorted audio.

To replicate the problem I made a temporary testing setup to allow me to capture audio from the Apple TV onto my PC with Audacity. I used a HDfury DIVA, which lets me force the HDMI EDID to stereo audio. This device has SPDIF output, and I connected this to a SPDIF input on a USB audio interface connected to my PC.

For testing I used clips the following movies:

  • Interstellar
  • Sherlock Holmes
  • The Dark Knight Rises

These clips were created by first locating a section of the movie which exhibited the audio distortion. I the used FFmpeg to extract a short clip of the movie, starting at the problem timestamp. FFmpeg was set to copy the audio (no re-encoding). I then play these clips with Infuse and VLC on the Apple TV from a Samba share on my NAS.

My test capture setup is as follows:

  • Apple TV (model A2169, tvOS 16.2)

    • Settings > Video and Audio > Audio Format: Auto
  • Infuse Pro (v7.4.10 [4329])

    • Audio > Volume Boost: Disabled
  • Apple TV HDMI connected to a HDfury DIVA

    • This device lets me adjust the HDMI EDID and also has SPDIF output. It also shows detailed information about the HDMI signal.
    • EDID set to “1080P59.940 444 BT709 8b SDR 148MHz 2.2” video + “L-PCM 48kHz 2.0ch 24bit” audio.
    • Status screen shows that AppleTV is sending L-PCM 2.0ch audio.
  • HDfury DIVA SPDIF output connected to SPDIF input on USB audio capture interface.

  • HDfury HDMI output connected to monitor.

Here is an screenshot of Audacity with 3 captures of a clip from The Dark Knight Rises.
From top to bottom:

  • Infuse on Apple TV, captured via SPDIF
  • VLC on Apple TV, captured via SPDIF
  • FFmpeg on Linux (ffmpeg -i dkr.mkv -ac 2 dkr-2ch.wav)

You can clearly see that the volume of the Infuse capture is louder than the others, and this loudness results in lots of clipping. Listening to this capture, you can hear distortion, and voices and other sounds become difficult to hear.

Similar for Interstellar:

Here are the SPDIF captures of Infuse playback (converted to AAC for upload to the forum):

The Dark Knight Rises:

And here is the audio extracted from the clips using FFmpeg with default downmix (e.g., ffmpeg -i dkr.mkv -ac 2 dkr-2ch.wav) (converted to AAC for upload to the forum):

The Dark Knight Rises:

For the Infuse developers (and anyone else interested), I’ve uploaded the clips I used to test (with the video tracks re-encoded to a much lower bitrate to save space), and the WAV captures from Audacity.



Thanks for the super-detailed report! :heart_eyes:

We’ll look into this to see if we can uncover what is going on in this case.