Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Capture an audio-reactive application #125

Open
JetStarBlues opened this issue Nov 16, 2020 · 3 comments
Open

Capture an audio-reactive application #125

JetStarBlues opened this issue Nov 16, 2020 · 3 comments

Comments

@JetStarBlues
Copy link

I have a Three.js program that uses the Web Audio API.

From previous issues, it seems there is currently no way to manipulate Web Audio as needed for capture:

[T]here's no way to "throttle" the internal workings of Web Audio, so the AnalyserNode will run in real time, desyncing from the canvas capture.

The meshes in my program "react" to the audio, so it is not possible to add the audio afterwards.

How was the Obsidian example in this project's README captured? The demo looks to be audio-reactive...

@spite
Copy link
Owner

spite commented Nov 16, 2020

usually just capture the video, and merge with the audio file afterwards. Obsidian is not audio reactive, it's scripted
I have a branch that experiments with throttling the whole web audio graph, but it's not practical, yet.
for now, unfortunately, there's no way to capture anything that reacts in real-time

@JetStarBlues
Copy link
Author

Ah ok, thank you. Will try pre-generating the FFT data as suggested in this issue.

@ElizabethHudnott
Copy link

ElizabethHudnott commented Nov 22, 2020

I'd like to be able to add audio to the video files rendered in the browser. Non-real-time is fine for my use case. I can render audio using an OfflineAudioContext but so far I haven't managed to accomplish the "merge" step inside the browser. I see that some peeps have ported ffmpeg to the browser using web assembly so I might try to get my head around that at some point, though it seems a bit over kill for such a simple task, but I really want my application's users to be able to download one completed file. I did some experiments with the browser's Media Encoder API, but my machine wasn't fast enough to transcode 50fps without audio glitches in real-time even just loading a WebM and an MP3 from disk.

Thanks for the cool library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants