Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Dolby Atmos Playback (Read 11042 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Dolby Atmos Playback

Apologies if this is the wrong forum (or if one has already been started on this topic); neither Google nor the forum search gave me what I was looking for.

fb2k is my favorite media player for multi-channel audio (4.0, 5.1, etc). But lately I've upgraded to my system to Atmos and have been acquiring lots of Atmos files in various audio & video formats: mp4, m4a, mka/mkv.  While I've been able to get other players (VLC, Kodi, Windows Movies & TV) to play Atmos files properly via HDMI to my AVR--not every player will handle all formats--I can only get foobar to play their TrueHD 5.1/7.1 core. That is: foobar doesn't seem to be picking up and passing along the object-oriented metadata that, among other things, sends sound to the overhead speakers.

Can anyone shed any light on this? Am I missing a plug-in or a setting? I'm using the latest stable version of fb2k and the most recent version of ffmpeg.

Re: Dolby Atmos Playback

Reply #1
But lately I've upgraded to my system to Atmos and have been acquiring lots of Atmos files in various audio & video formats: mp4, m4a, mka/mkv.
Those are just the container formats. Dolby Atmos formats are either E-AC-3-JOC, AC-4 or TrueHD.
Can anyone shed any light on this? Am I missing a plug-in or a setting? I'm using the latest stable version of fb2k and the most recent version of ffmpeg.

Foobar cannot do bitstreaming to HDMI receivers AFAIK. Atmos requires bitstreaming for the objects, while foobar is using ffmpeg to decode the TrueHD stream to 7.1 PCM. 

You can try setting the output to WASAPI and see if that allows bitstreaming.


 

Re: Dolby Atmos Playback

Reply #2
Those are just the container formats. Dolby Atmos formats are either E-AC-3-JOC, AC-4 or TrueHD.

Right.

Quote
Foobar cannot do bitstreaming to HDMI receivers AFAIK. Atmos requires bitstreaming for the objects, while foobar is using ffmpeg to decode the TrueHD stream to 7.1 PCM. 

You can try setting the output to WASAPI and see if that allows bitstreaming.

Thanks; I gave it a try. (My understanding was that WASAPI does in fact allow a direct output of the bitstream.) But no luck.

I've always been slightly mystified by the output settings. I generally choose "Default : [my AVR]," but there's also:
WASAPI (push) : [my AVR]
WASAPI (event) : [my AVR]
DSD : WASAPI (push) : [my AVR]
DSD : WASAPI (event) : [my AVR]

I tried each of those settings with the same results. For good measure, I also downloaded and installed the E-AC plugin. Still nothing doing. I'm just wondering what VLC and Kodi do (that fb2k doesn't) that allows them to play Atmos files--and what changes could be made to foobar to add that functionality. I'd rather be able to use foobar as a universal player.

Re: Dolby Atmos Playback

Reply #3
You'll have to remove foo_input_dts, and somehow encode your DTS audio tracks into FLAC or WAV files that appear to be PCM encoded, but are actually S/PDIF encapsulated audio packets. You'll also need to disable all DSPs, and disable ReplayGain processing, and set the volume control to 100%. All this, at the very least.

Re: Dolby Atmos Playback

Reply #4
I'm just wondering what VLC and Kodi do (that fb2k doesn't) that allows them to play Atmos files--and what changes could be made to foobar to add that functionality.

I tried to reply earlier but it seems to either have been deleted for whatever reason.

fb2k appears to be decoding to 7.1 PCM (ffmpeg discards the object data) and outputting that as PCM in WASAPI. 
VLC and other players do not decode the audio to PCM after demuxing and instead set the player format to HDMI bitstream using WASAPI exclusive mode.

https://docs.microsoft.com/en-us/windows/win32/coreaudio/device-formats
https://docs.microsoft.com/en-us/windows/win32/coreaudio/representing-formats-for-iec-61937-transmissions

For any object based format to work, fb2k would need to not decode the audio, and know the format from the demuxer, and then pass that on to the WASAPI output. I have not worked with fb2k (and it's closed source) so I don't know how much work that would be.

Anyway, Peter is the owner of both the ffmpeg and WASAPI components so only he can help. 

You'll have to remove foo_input_dts, and somehow encode your DTS audio tracks into FLAC or WAV files that appear to be PCM encoded, but are actually S/PDIF encapsulated audio packets. You'll also need to disable all DSPs, and disable ReplayGain processing, and set the volume control to 100%. All this, at the very least.

That won't work in general (since this is different from DoP), the output format needs to be set properly for bitstreaming using WASAPI (in the wasapi component) unless I'm mistaken.
And there isn't any decoding or encoding support for the object based codecs at all, and even demuxing support can be poor sometimes.

As for regular DTS/AC3/EAC3/TrueHD, there is really no point in bitstreaming those with fb2k since they can be decoded for 7.1, 24bit/192kHz PCM over HDMI just fine without any loss of (nonexistent) audio object data.

Re: Dolby Atmos Playback

Reply #5

fb2k appears to be decoding to 7.1 PCM (ffmpeg discards the object data) and outputting that as PCM in WASAPI. 
VLC and other players do not decode the audio to PCM after demuxing and instead set the player format to HDMI bitstream using WASAPI exclusive mode.

https://docs.microsoft.com/en-us/windows/win32/coreaudio/device-formats
https://docs.microsoft.com/en-us/windows/win32/coreaudio/representing-formats-for-iec-61937-transmissions

For any object based format to work, fb2k would need to not decode the audio, and know the format from the demuxer, and then pass that on to the WASAPI output. I have not worked with fb2k (and it's closed source) so I don't know how much work that would be.

Anyway, Peter is the owner of both the ffmpeg and WASAPI components so only he can help.

Thanks very much for that convincing explanation, @prajaybasu.

FWIW: in Kodi, even after going into the audio settings, ticking the HDMI passthrough checkbox, and selecting my AVR as the output device, I could at first still only play the TrueHD core of Dolby Atmos files. The trick involved going deeper into the settings (to the "Expert" level), where there's an option to change "Passthrough Output Device" from DirectSound [your AVR] to WASAPI [your AVR]. After that, you check “True HD capable receiver,” and voila: Dolby Atmos playback.

It would be wonderful to come up with a similar solution for foobar, but it sounds like that would start by instructing it to bypass ffmpeg when playing Atmos files. . . .

Re: Dolby Atmos Playback

Reply #6
Sounds like you don't want to use foobar anyway.

Re: Dolby Atmos Playback

Reply #7
Sounds like you don't want to use foobar anyway.

On the contrary: I started my first post by emphasizing that foobar is my favorite media player for multi-channel audio. It does a fabulous job with every other format. I just wish it would play Atmos files so that I could use it for everything.

Re: Dolby Atmos Playback

Reply #8
you can download the asio4all driver, setup the speakers to be top right and top left, or however you have your avr setup and attempt it that way.

i have never owned atmos encoded content, but I can regular upmix dts hd, flac 5.1, flac 4.0 and others to utilize the atmos enabled speakers via the avr after setting it up properly with asio4all.

I abandoned atmos and upmixing altogether because there just isn't enough musical content to warrant the frustration of setup.

Re: Dolby Atmos Playback

Reply #9
I wonder if there will ever be a bypass option for the wasapi.
They just redesigned the 1.6 version to always run the DSP for the wasapi output.
 
But Who knows. I foundout that DVDAudioextractor is able to save a blueray soundtrack to a bitstream file file.
And ffmpeg wrapper converts it to 7.1 but the atmos layer is gone
I don't know how to instruct ffmpeg to not convert to 7.1 and see what that does.
the thd (bitstream file)  file is an actual truehd rip with the atmos layer intact. (vlc passes the amtos true the hmdi with succes)

Come on guys at hydrogen! You are so close! :)

Re: Dolby Atmos Playback

Reply #10
Play it with something else.

Re: Dolby Atmos Playback

Reply #11
Play it with something else.
I have restarted my research on this subject, as I still would like to be able to use fb2k to playback Atmos content. Could you explain why the answers here are so confrontational? I read the whole conversation and I don't understand why this reasonable request was met with such hostility.

Re: Dolby Atmos Playback

Reply #12
Because Dolby Atmos is patented. And needs approval from Dolby for legal support in 3rd party apps. And then you need someone to do actual coding work to code support for it in fb2k too.

Re: Dolby Atmos Playback

Reply #13
Because Dolby Atmos is patented. And needs approval from Dolby for legal support in 3rd party apps. And then you need someone to do actual coding work to code support for it in fb2k too.
That's not true for bitstreaming though. Plenty of free players can bitstream directly to my AVR and I know they aren't paying Dolby licensing fees. For example, VLC/Kodi/etc. They can't decrypt the audio codec because they don't have a licensed decoder, but they can certainly pass it through to a device that can decode it.

@gorman I agree the seeming hostility in this thread is very confusing. The issue is that foobar2000 can't bitstream at all, and it doesn't appear that Peter has any intention of adding that as an output option for the player. If he did it would bypass every bit of processing (because it's just streaming the bits!) that foobar does, and tons of components and DSP plugins take advantage of. It's kind of antithetical to the design of foobar, which sadly means it'll probably never happen.

As someone with a full 7.1.4 Atmos setup, this is the one killer feature I think is missing from foobar, and it feels like I'm slumming it if I have to open another player on the rare occasion I want to listen to Atmos files. I would definitely listen to a lot more Atmos music if fb2k had the ability to pass it through.

Re: Dolby Atmos Playback

Reply #14
Atmos.

Why not make a solution similar as SACD.
SACD can bitstream and also create a (fake) PCM on the fly with which you can drive all visual plugins.

Re: Dolby Atmos Playback

Reply #15
Atmos.

Why not make a solution similar as SACD.
SACD can bitstream and also create a (fake) PCM on the fly with which you can drive all visual plugins.

If that can be done for Atmos, then hopefully someone will eventually implement it and this one gap in fb2k goes away.

Re: Dolby Atmos Playback

Reply #16
Atmos.

Why not make a solution similar as SACD.
SACD can bitstream and also create a (fake) PCM on the fly with which you can drive all visual plugins.

I've never been into SACD bitstreaming but your post gives me hope. Even more so considering that, from many scientific analysis I read around, SACD native format (DSD) wasn't/isn't bringing much to the table compared to PCM, whereas with Atmos or Auro-3D (encapsulated in DTS-HD or FLAC) you have something very tangible added/changed in the music.

So the SACD plugin bitstreams DSD while converting to PCM to have the visualization working too? Neat!
Hopefully something similar can/will happen for Atmos.

Re: Dolby Atmos Playback

Reply #17
Because Dolby Atmos is patented. And needs approval from Dolby for legal support in 3rd party apps. And then you need someone to do actual coding work to code support for it in fb2k too.
Not if you just want to bitstream, unless VLC, Kodi, mpv and other software (I mention just FOSS) are challenging Dolby legal department (something which I very much doubt).