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:
- How do
duration and totalDuration of a CodecFrame correlate to the timestamp and duration of an EncodedAudioChunk?
- How to determine if a
CodecFrame is a keyframe?
- Is it the
CodecFrame.data array that you pass as the data to EncodedAudioChunk? Do you pass it as-is or by copying only the portion the Uint8Array view references?
Thanks in advance, I'll add a reply if I figure it out myself in the meantime.
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:
durationandtotalDurationof aCodecFramecorrelate to the timestamp and duration of anEncodedAudioChunk?CodecFrameis a keyframe?CodecFrame.dataarray that you pass as the data toEncodedAudioChunk? Do you pass it as-is or by copying only the portion theUint8Arrayview references?Thanks in advance, I'll add a reply if I figure it out myself in the meantime.