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

PCM decoder "pcm: maximum frames per packet is required" #253

Open
dady8889 opened this issue Jan 18, 2024 · 0 comments
Open

PCM decoder "pcm: maximum frames per packet is required" #253

dady8889 opened this issue Jan 18, 2024 · 0 comments

Comments

@dady8889
Copy link

Hi,

I am trying to decode audio recorded by Google Chrome, using the audio/webm;codecs=pcm configuration.
Trying to decode this file then results in the pcm: maximum frames per packet is required error.
I was able to fix this problem by setting params.max_frames_per_packet = 65536 in case this value is None.

According to OggPCM (https://wiki.xiph.org/OggPCM):
The "Maximum number of frames per packet" field is meant to notify an application reading the file that no data packet will contain more than a certain number of frames. This not only makes implementation easier, but also provides information on how much needs to be buffered when streaming PCM files. A value of 0 means a maximum of 65536 frames. Implementations SHOULD make this field such that packets do not get split into multiple pages.

However, I do not think Chrome uses this field.
Check the following audio sample:
pcm_sample.zip

Thanks.

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

1 participant