-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add example usage with WebCodecs AudioDecoder or VideoDecoder? #22
Comments
I figured it out in the meantime, it's actually very simple and straightforward all things considered, but there are quite a few gotchas:
In a nutshell, it's something like:
|
Thanks for posting this, it's a good example. I'll make an update to the docs explaining the shared aspect of the One note on keyframes, All of the codecs supported in this library |
@eshaz Might be a simple API limitation in this case. I found that:
... together get decoding to work great. Performance is pretty good as well, currently in my case it's very slightly behind |
Hi, thanks for your work on this great library, it's working perfect for parsing audio files.
Do you have an example about how to use it with the WebCodecs API to decode frames? My use case is decoding an audio file into raw LPCM samples. In particular, what's not clear to me:
duration
andtotalDuration
of aCodecFrame
correlate to the timestamp and duration of anEncodedAudioChunk
?CodecFrame
is a keyframe?CodecFrame.data
array that you pass as the data toEncodedAudioChunk
? Do you pass it as-is or by copying only the portion theUint8Array
view references?Thanks in advance, I'll add a reply if I figure it out myself in the meantime.
The text was updated successfully, but these errors were encountered: