audioEngine Analyser using a <Video> element's audio track

I’m using a element to texture an element of my scene, and I want to pass it’s audio data along to an audioEngine analyser so that I can have meshes react dynamically. I’m hoping that the two will be synced up as well.

I found some examples of using the mic from browser’s webcam:
https://playground.babylonjs.com/#MB5S2C#6
But nothing for video files.

If need be, I can have a separate mp3 for the soundtrack and silent mp4 for the texture, but that’s going to be a lot of preparation or preprocessing files, and I’d love to have a system that just handles one video format. Any ideas?

Thanks so much :slight_smile:

1 Like

Hi Jonah… welcome to the BJS forum! Good question, too. I don’t have any definitive solutions… but… did you read this:

shrug. It might be worth SOMETHING. Our friend David Rousset WAS our web-audio expert, but I haven’t seen him around, lately. Stay tuned for more/better comments.

1 Like

https://playground.babylonjs.com/#MB5S2C#8

This should do to extract and reuse the track as an input.

Click the scene to start .