ebu / ebu_adm_renderer

The EBU ADM Renderer, written in Python, is the reference implementation of EBU Tech 3388
https://ear.readthedocs.io
BSD 3-Clause Clear License
79 stars 13 forks source link

ebu_adm_renderer fails to render ADM from EPS 1.0.0 #60

Closed WernerBleisteiner closed 9 months ago

WernerBleisteiner commented 1 year ago

ear-render-ITU-R-BS2051-43LS-Positions-ID_4-ADM.wav-FAIL.zip I have an issue with an ADM created in EPS 1.0.0. It's a test file with one object hopping through 43 positions of the ITU-R-BS2051 loudspeaker in all three levels (leaving out only the +- 15º positions). Trying to render that with ebu_adm_renderer fails with message KeyError: 'Unknown element requested AC_00031001_00' I cannot find this specific element in the axml, though. Consequently also adjacent tools like ebu_bear and IRT/binaural_nga_renderer fail. However: Re-importing the ADM into EPS and playback and rendering (also in bear-vst) works fine.

File and debug log attached.

tomjnixon commented 1 year ago

Hi, thanks for the report.

It looks like the EPS is using BS.2076-2 features (in this case a reference from the CHNA and audioTrackUID to an audioChannelFormat). This looks ok, except that:

If the version tag is added it seems to work correctly.

WernerBleisteiner commented 1 year ago

Thanks Tom. I'll have to dive i to this. So a manual tweak im the axml and reinsert it with ear-utils might do?

tomjnixon commented 1 year ago

Yeah, that's what I did:

ear-utils dump_axml ITU-R-BS2051-43LS-Positions-ID_4-ADM.wav > tmp.xml
# edit tmp.wav, changing `audioFormatExtended` to `audioFormatExtended version="ITU-R_BS.2076-2"`
ear-utils replace_axml -a tmp.xml ITU-R-BS2051-43LS-Positions-ID_4-ADM.wav ITU-R-BS2051-43LS-Positions-ID_4-ADM_fixed.wav

I should add a tool specifically to fix this issue for when the bs2076-2 branch is done.

WernerBleisteiner commented 1 year ago

🙏🏻

liyunlong277 commented 11 months ago

Hello tomjnixon! Thank you for your contribution to ebu adm renderer! I'm very interested in this and plan to use it for my next project. But the gap between EPS and EAR stopped me. I wonder when you will update support for bs2076-2.

sincere regards!

tomjnixon commented 9 months ago

I've just merged the v2 support branch, which also includes a tool to fix files with this problem:

# original file gives a sensible error message
ear-render -s 0+2+0 ITU-R-BS2051-43LS-Positions-ID_4-ADM.wav out.wav
ERROR:ear:error while parsing element audioChannelFormatIDRef on line 746: ValueError: audioChannelFormatIDRef in audioTrackUID is a BS.2076-2 feature

# fix it by setting the version
ear-utils regenerate --set-version 2 ITU-R-BS2051-43LS-Positions-ID_4-ADM.wav ITU-R-BS2051-43LS-Positions-ID_4-ADM-fixed.wav

# now it works, but warns because it's not standardised
ear-render -s 0+2+0 ITU-R-BS2051-43LS-Positions-ID_4-ADM-fixed.wav out.wav
WARNING:ear:rendering of files with version ITU-R_BS.2076-2 is not standardised

It took a while, sorry!