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

OGG: Unexpectedly found nil while implicitly unwrapping an Optional value #8

Open
yspreen opened this issue Nov 25, 2022 · 3 comments

Comments

@yspreen
Copy link

yspreen commented Nov 25, 2022

// initialize opus encoder
encoder = opus_encoder_create(opusRate, pcmChannels, application.rawValue, &status)

happening when I encode an m4a file. the exception is thrown in OGGEncoder.swift

image

@yspreen
Copy link
Author

yspreen commented Nov 25, 2022

this is a bit bizarre:
image

@yspreen
Copy link
Author

yspreen commented Nov 25, 2022

My sample rate was too high. Recording files at 16000 fixed the issue.

@agrathwohl
Copy link

My sample rate was too high. Recording files at 16000 fixed the issue.

I am not sure it was an issue of the sampling rate being too high, but rather the value you gave it initially, 44100, is not supported by Opus.

See the following opus FAQ article: Opus does not directly support a 44.1kHz sampling rate.

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

2 participants