Help with implementing Atmos decoding
Hi, I have a complete solution that can decode and render the object stream of Enhanced AC-3 files into PCM data with user-selected channels. I'd like to code support for it in LAV Filters, I just need to know what the best place in the code is to
- take the E-AC-3 stream (preferably at frame borders, but this is not required) and provide the rendered data, and
- when the stream is not E-AC-3, take the rendered PCM data, but still pass it to the renderer to respect the user's layout. (I can only decode E-AC-3, but want to always provide a spatial remapping wherever the user's speakers are.)
Sorry for replying to this so late, I wasn't working on LAV for a bit due to other obligations, but I'm catching up now.
It sounds quite interesting to be able to handle object-based audio, as a proper mixer is one of the biggest missing parts in most audio systems.
For both parts really, the easiest would be if you would provide a clean interface for the data you require and output, and I would hook it up in LAV. If thats in a form of a helper class that facilitates communication with your software, or a more direct interface, either is fine by me.
How did you imagine the integration would work? I would think you would prefer if your software is installed separately and LAV can make use of it if its present? Which means LAV would need to load some DLL or use some form of IPC?
As an additional question, for FFmpeg there is a patchset that can decode TrueHD+Atmos into the 16ch object representation that then needs mixing. I suppose we would need to figure out how to extract and handle the mixing metadata for that to also be useful then, but would that be something Cavern can handle eventually?
Thank you for the reply, I'm humbled by your positive answer and happy to help with anything I can.
The converter - if installed - listens on a named pipe for connections. The existence of the CavernPipe named pipe is a sufficient check. The only other thing that needs to be sourced is the channel count, it's in a text file under %appdata%. The protocol is simple and fully documented, with a reference implementation available. But if you need a C++ library, I can create/test/release it. CavernPipe needs E-AC-3 frames and returns interlaced PCM with the read channel counts, the channels are set up by the user, most easily from right clicking the CavernPipe Server icon.
I sadly don't imagine TrueHD Atmos to be a decodable format soon without a documentation. The panning/scaling data is still unknown. While it's available in DD+ JOC, and it's possible with Cavern to render 7.1 TrueHD beds with it, it's unstable, and in many cases, unavailable.