-
Notifications
You must be signed in to change notification settings - Fork 202
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
OPUS format does not record on iOS, documentation conflicting #320
Comments
Opus audio format is not natively supported by iOS. Fixing documentation. |
@llfbandit According to Apple Developer docs, opus codec is supported on iOS 11+ using
|
Opus is available for decoding only. |
@llfbandit I edited this file:
I added the line: I then tried recording using So I believe iOS does support opus as an encoder (and the documentation of the package was correct in saying SDK 11+), but the |
Can you send me a simple audio file with this setup? |
I used the following config:
After recording an audio file, I analyzed it with
For some reason the bitrate and sample rate are not correct, but it is working in opus format. |
Ok, that's good news! The only caveat here (before testing & re-introducing this encoding) is CAF. This container is only supported by Apple products/platforms. |
Yes, ideally there would be a solution to convert to OGG container, but I can figure something out for that. |
Another funny thing, Safari only supports opus in CAF container and not OGG. |
Package version
5.1.0
Environment
iOS 17.4.1
Describe the bug
Front page of documentation states OPUS encoding is not available on iOS: https://pub.dev/packages/record
AudioEncoder
enum states underopus
that it is supported with SDK 11+: https://pub.dev/documentation/record/latest/record/AudioEncoder.htmlHowever, when recording on iOS it throws an error:
PlatformException(record, Failed to start recording, opus not supported., null)
Either this is a bug, or the documentation is incorrect. However, iOS does indeed support an opus encoder since SDK 11, so it should be working.
Add your record configuration
RecordConfig(...)
Expected behavior
Audio should record using opus encoder on iOS 11+.
Additionally, documentation states OPUS is recorded in MPEG_4 container, but CHANGELOG states with version
4.0.1
that OPUS is now in OGG containers, so documentation is out of date.The text was updated successfully, but these errors were encountered: