r/SpatialAudio • u/ShockComplex1846 • 4d ago
I built an open-source Atmos encoder in Rust (ADM BWF → E-AC-3 JOC)
Hey everyone, I’m the developer behind OpenJOC, and I’ve been working on the other end of the chain: an encoder called JOCForge.
I also mix in Atmos myself, so this is something I wanted to use with my own projects. After a few months of work, I finally got the 7.1 encoding path working with full-length tracks, and figured people here might be interested.
JOCForge takes 48 kHz ADM BWF files and produces E-AC-3 JOC bitstreams. It’s written in Rust and available under the Apache 2.0 license.
The current encoding options are:
- 5.1-core JOC: 384, 448, 576, 640, 768, or 1024 kbps.
- Flat 7.1 JOC: 1664 kbps.
The encoding itself is handled by JOCForge. You can then use FFmpeg to remux the resulting .ec3 file into MKA or MP4/M4A without re-encoding the audio.
For playback testing, I’ve encoded complete songs and rendered them through OpenJOC. I’ve also opened the Flat 7.1 output in Audition and played it in Windows Media Player after remuxing to MKA. The Flat 7.1 output remuxed to M4A has played through the native iOS decoder in my tests as well.
One compatibility detail: the 5.1 JOC output currently plays silently through the native iOS decoder. The successful iOS playback tests above are with the Flat 7.1 output.
Downloads: Windows, macOS, and Linux builds
Source and instructions: JOCForge — independent encoder branch
The current encoder documentation is on that branch, including encoding commands and playback notes.
2
u/ShockComplex1846 2d ago edited 1d ago
Quick update: quite a bit has changed since I posted this!
JOCForge’s independent encoder now supports all 980 E-AC-3 JOC variants covered by the project, up from the original 965. They all encode successfully and sound as intended when decoded with OpenJOC. I’ve also merged the independent encoder into main, so that’s the branch to use going forward.
One distinction I want to highlight, especially for anyone comparing this with raress96/dolby-atmos-encoder, is the encoding architecture. That project generates its own JOC/OAMD data around an externally encoded E-AC-3 core, using FFmpeg in its documented workflow. JOCForge implements the audio encoder itself as well as the JOC layer. ADM parsing, object rendering, AC-3/E-AC-3 encoding, metadata generation, and bitstream assembly all happen within the Rust implementation. No external audio encoder is required. FFmpeg is optional for remuxing the finished stream into containers such as MKA or M4A.
There’s also a lot of control over how the output is built: five JOC profiles, dependent-substream configurations, LFE ownership, block partitions, and different ways of carrying and signalling the metadata. Those combinations are what the 980 variants represent. This exposes a substantially wider range of E-AC-3/JOC bitstream configurations than DEE’s standard encoding workflow.
To my ears, it’s currently the closest open-source E-AC-3 JOC encoder to DEE in terms of sound. Getting that sound while also opening up this much control over the bitstream is the part I’m most excited about.
These playback results are with OpenJOC. The public build still omits the proprietary HMAC key, so compatibility with commercial Dolby decoders and AVRs remains a separate issue.
Current code and documentation: JOCForge on GitHub
1
u/ShockComplex1846 1h ago
Quick update: I’ve put together a small web demo so you can try out the basic functionality directly in your browser:
👉 https://atmos.chyinan.top/
It’s a simple way to get a feel for the project before setting it up locally. Feel free to give it a try, and let me know what you think or if you run into any issues!
1
u/nagamaikeru 2d ago
This is really impressive work!
I have one question: If I convert an ADM BWF file to E-AC-3 JOC using JOCForge, will a consumer Dolby Atmos-compatible AV receiver recognize and decode the output as Dolby Atmos?
If so, that's a huge achievement! As far as I know, Cavern couldn't encode E-AC-3 JOC while preserving Atmos object information, so this would make something possible that wasn't previously achievable with Cavern.
Thanks for your amazing work!