-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Load big audio files with WebAudio backend and MediaElementAudioSourceNode #1763
Comments
Sounds like a good idea, can you make a pull request? |
Done! I've commented in my request my changes. |
Will this also fix sync offset/drift on long files? |
Also, does using MediaElementAudioSourceNode load the file in chunks, or does it load the entire file like WebAudio typically does? |
It loads the file from server in the same way as the MediaElement backend does. Since this Source Node wants an HTML5 tag, the audio is loaded like audio tags are loaded, requesting it in ranges from server. |
Hello, I have a question . How are you get the peaks ? |
Hi! You can get them with |
Hello. How ffmpeg generate peaks? Can you give me some commands ? Thanks very much. |
I tried to load an audio file with a duration of three hours, but the browser crashes because internally the library uses AudioBuffer to decode the audio data and AudioBuffer can not be used with huge files. An only solution that i found is to load the file with MediaElement backend, but i know that this backend handle the audio resource without Api Web Audio, so i will lost all my functionalities.
From the API Web Audio, there is a possibility to load an audio as an HTML tag, but using as a source node the MediaElementAudioSourceNode, instead of AudioBufferSourceNode which decodes internally the audio data causing the crash of the browser in case of big files. Using MediaElementAudioSourceNode, it can can be connected to other nodes of the Audio graph normally, using the Audio Context, so filters and other functionalities can be applied (also it can be connected to the AnalyserNode to draw the waveform).
Is there a possibility to implement this option or is there another way to load big audio files with the possibility to have audio filters and other features?
It is a short example:
The text was updated successfully, but these errors were encountered: