AOMediaCodec / libiamf

Reference Software for IAMF
BSD 3-Clause Clear License
34 stars 12 forks source link

[Windows] Binaural output doesn't apply HRTF #70

Open ThreeDeeJay opened 10 months ago

ThreeDeeJay commented 10 months ago

I tried converting test_000086.iamf into binaural using default.tf: iamfplayer.exe -sb -o2 "test_000086.iamf" Output: binaural_test_000086.wav.zip

IN ARGS:
Output binaural
Output mode 2
Input file : C:\Programs\AOM Immersive Audio Model and Formats (IAMF) Player\test_000086.iamf
Binaural has 2 channels
===================== Get 3748 frames
===================== Get 240000 samples

But the file I get is just non-binaural stereo (HRTF doesn't seem to be applied). If I set it to output 7.1 and virtualize it with something like HeSuVi, then I can hear externalization and positioning, so I'm not sure if I'm missing something or there's a bug with the binaural output mode or the HRTF file🤔

I put together a quick test here: iamfplayer binaural test.zip Just gotta download default.tf manually since it's too big to attach here, then drag and drop the test_000086.iamf into Binaural.bat

jwcullen commented 10 months ago

Can you see if you have the problem with test_000096.iamf?

ThreeDeeJay commented 10 months ago

Yup, same result: iamfplayer -sb -o2 "test_000096.iamf"

IN ARGS:
Output binaural
Output mode 2
Input file : C:\Programs\AOM Immersive Audio Model and Formats (IAMF) Player\test_000096.iamf
Binaural has 2 channels
===================== Get 236 frames
===================== Get 240000 samples

binaural_test_000096.wav.zip

yilun-zhangs commented 10 months ago

@ThreeDeeJay Because libiamf will require bear and resonance libraries, which also require many third libraries. I did not provide them(I only provided linux libararies) in our git So default, the Visual Studio solution dose not open this feature with preprocessor definition "DISABLE_BINAURALIZER"

If you want to use binarual feature, I can provide guide: 1, refer to https://github.com/AOMediaCodec/libiamf/blob/main/code/dep_external/README.md Prepare all libraries(boost_filesystem.dll, boost_thread.dll, efl.dll, iamf2bear.lib iamf2bear.dll, iamf2resonance.lib, objectmodel.dll, panning.dll, pml.dll, rbbl.dll, rcl.dll, rrl.dll, visr.dll ) and place dll in your working directory, please lib in your building directory. 2, add preprocessor definition "DISABLE_BINAURALIZER=0" in iamf project of Visual studio solution.

Later I will think more how to enable binaural feature in Visual Studio solution.

ThreeDeeJay commented 10 months ago

Ah, that explains it. I'd appreciate an update to the VS solution to get more value out of https://github.com/AOMediaCodec/libiamf/pull/71, but I'll see if I can manage to do it with the manual method 👌