Ambisonics and VLC

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
DrWig
New Cone
New Cone
Posts: 6
Joined: 22 Jan 2020 14:49

Ambisonics and VLC

Postby DrWig » 22 Jan 2020 14:53

Hi all. I've been testing 360 videos with spatial audio made for YouTube (i.e. using 1st order Ambisonics) over a 5.1 array. That works well with the audio scene rotating with the video view :-) . Videos made for Facebook 360 don't reproduce spatial audio correctly (probably because FB uses three streams in an MP4 for the 8+2 channels of [nearly] 2nd order + stereo headlocked audio).

However, my question is VLC supports up to 3rd order audio in a 360 video. What container/audio would I use in FFMPEG to create this and how would I inject the meta data for such a video?

cheers

Bruce

DrWig
New Cone
New Cone
Posts: 6
Joined: 22 Jan 2020 14:49

Re: Ambisonics and VLC

Postby DrWig » 22 Jan 2020 15:54

I can make a .mov file with an equirectangular image and 16 channels of 3rd order Ambisonic audio........I'm just not sure how to inject metadata to get VLC to recognise it (Google's spatial media injector only handles 1st order audio.......)

DrWig
New Cone
New Cone
Posts: 6
Joined: 22 Jan 2020 14:49

Re: Ambisonics and VLC

Postby DrWig » 22 Jan 2020 16:02

ok......I'm getting there. Angelo Farina has made a version of the spatial media injector that injects meta data for higher order Ambisonic audio:
http://pcfarina.eng.unipr.it/Public/Jump-Videos/spatial-media-2.1-HOA.zip

Testing in VLC in a mo, and I'll report back!

DrWig
New Cone
New Cone
Posts: 6
Joined: 22 Jan 2020 14:49

Re: Ambisonics and VLC

Postby DrWig » 22 Jan 2020 16:19

ok. That seems to work.

So, in case anyone finds this post. My video uses a static jpg, rather than a video:
ffmpeg -loop 1 -i EQUIRECT.JPG -i "3rd Order ambix.wav" -map 1:a -map 0:v -c:a copy -channel_layout hexadecagonal -c:v libx264 -b:v 40000k -bufsize 40000k -tune stillimage -shortest "3rd Order Video".mov

Then, put it through the injector python script in the post above, and VLC seems to recognise it correctly, even though it doesn't show 'Ambisonics' in the codec details like it does for 1st order content (audio does pan on video direction, though, so I think it's working!)

cheers

Bruce

DrWig
New Cone
New Cone
Posts: 6
Joined: 22 Jan 2020 14:49

Re: Ambisonics and VLC

Postby DrWig » 22 Jan 2020 18:08

On a related note, it would be really useful if VLC labelled the Ambisonic audio as such on the codec dialog for higher order Ambisonics...... ;-)

cheers

Bruce

DrWig
New Cone
New Cone
Posts: 6
Joined: 22 Jan 2020 14:49

Re: Ambisonics and VLC

Postby DrWig » 23 Jan 2020 10:13

My next task (as I seem to be documenting stuff here a little now!) is to work out how to add Ambisonic audio to a non-spherical video..........

Bruce

bossesand
New Cone
New Cone
Posts: 4
Joined: 22 Jul 2020 10:03

Re: Ambisonics and VLC

Postby bossesand » 22 Jul 2020 10:45

I found your postings and want to ask a few related questions and possibly suggest something.

I have been slowly working with web based ambisonics players as examples at www.ohti.xyz

For compressed third order ambisonics I have tested opus and aac
Opus is not supported on Apple products.
The only codec supported on all platforms is AAC.
The current way for me to get playback AAC TOA to work on all platforms is to have 4 4 channels files for the 16 channels.
One future envelope for TOA I have been thinking about is AAC 4 channels in 4 tracks, this as 4 channels AAC is the lowest common encoding in AAC they is decoded in web audio on all platforms.

For VLC I wonder is Opus decoding on all platforms decoded internally?

Is there an interface for an external head tracker to control the audio rotation of the Ambisonics, if so how is the interface specified?

I have had an idea for a long time about head tracking and video players to improve the headphone experience.

It is very simple, it is to have 2 stages of audio rotators, the first to be controlled by the viewport direction of the video, the second rotator to be controlled only by the headtracker.

This would demand a directional reset button for the audio to correct the direction if you change your position in the earth magnetic field :D

kidsplayvr
New Cone
New Cone
Posts: 6
Joined: 31 Aug 2020 23:23
Contact:

Re: Ambisonics and VLC

Postby kidsplayvr » 05 May 2021 16:38

Would really like to get ambisonics supported by VLC?
DeoVR developer

Ephi
New Cone
New Cone
Posts: 2
Joined: 28 Oct 2010 17:37

Re: Ambisonics and VLC

Postby Ephi » 22 May 2021 14:33

Hi all,

I am trying to reproduce the creation of .mov files containing 3rd Order Ambisonics Audio for playback in VLC. However, I can't get the above mentioned HOA metadata injection tool to work. Whenever I run it on my muxed mov, I get the following output:

Code: Select all

>py -2.7 spatialmedia --stereo=top-bottom --spatial-audio "C:\Users\xxx\Desktop\Mux Test.mov" Processing: C:\Users\xxx\Desktop\Mux Test.mov Loaded file... Track 0 Track 1 Traceback (most recent call last): File "C:\Python27\lib\runpy.py", line 174, in _run_module_as_main "__main__", fname, loader, pkg_name) File "C:\Python27\lib\runpy.py", line 72, in _run_code exec code in run_globals File "C:\Users\xxx\Downloads\spatial-media-2.1-HOA\spatialmedia\__main__.py", line 127, in <module> main() File "C:\Users\xxx\Downloads\spatial-media-2.1-HOA\spatialmedia\__main__.py", line 117, in main parsed_metadata.num_channels) AttributeError: 'ParsedMetadata' object has no attribute 'num_channels'

I also noted that ffmpeg outputs the following warning despite the argument -channel_layout hexadecagonal:

Code: Select all

[mov @ 00000244b8d2c7c0] not writing 'chan' tag due to lack of channel information
The input file is a plain 16-channel interleaved wav with 24bit/48kHz

Any suggestions what might be going wrong here?
Thank you very much!

angelofarina
New Cone
New Cone
Posts: 1
Joined: 19 Oct 2022 17:40

Re: Ambisonics and VLC

Postby angelofarina » 19 Oct 2022 17:50

As my work has been cited, I provide here more info on how to create these 16-channels video files with 3rd order Ambisonics.
The only supported container is a MOV container, as an MP4 cannot contain a 16-channels uncompressed audio track.
Using compression with high order Ambisonics is strongly discouraged, as any minor phase shift on high order channels creates strong artefacts, which should be avoided. So please prepare your recording as a 32-bits float 16-channel WAV file.
Then follow the guide provided here:
http://www.angelofarina.it/Ambix_3rd_order.htm
Regarding the Google Metadata Injector, if you have troubles running my modified GUI.py script through a Python 2.7 interpreter, I have created a pre-compiled executable for Windows. You can download it here (forcing your browser to accept such an "unsecure" .EXE file): http://www.angelofarina.it/Public/Jump- ... jector.exe

And now my question: I have a separate Ambisonics decoder in my listening room, so I would like to play one of these files driving 16 discrete outputs of my audio interface (an RME Madiface, which has 64 channels). No processing at all is required in VLC.
But I can only get a "binauralized" stereo output.
How can I disable this binaural renderer and play straight the 16 channels contained in the audio track, with no processing at all?
Thanks...


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 18 guests