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

When set to OPUS format, audio does not record in OPUS format #291

Open
jt274 opened this issue Apr 22, 2024 · 0 comments
Open

When set to OPUS format, audio does not record in OPUS format #291

jt274 opened this issue Apr 22, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@jt274
Copy link

jt274 commented Apr 22, 2024

Describe the bug
When the recorder is set to the OPUS format, audio does not actually record in the OPUS format. No error is given. Additionally, the bit rate, sample rate and number of channels are incorrect.

To Reproduce

On Android 12 physical device:

await recorderController.record(
          path: '$tempDir/myfile.opus',
          sampleRate: 48000,
          bitRate: 10000,
          androidEncoder: AndroidEncoder.opus,
          iosEncoder: IosEncoder.kAudioFormatOpus,
        );

When using ffprobe to check the audio:

  • Expected: 48000 Hz sample rate, 10 kb/s bit rate, mono, OPUS format
  • Actual: 16000 Hz sample rate, 24 kb/s bit rate, mono, amr_wb format

On iPhone 11 iOS 17.4.1 physical device:

await recorderController.record(
          path: '$tempDir/myfile.opus',
          sampleRate: 48000,
          androidEncoder: AndroidEncoder.opus,
          iosEncoder: IosEncoder.kAudioFormatOpus,
        );

When using ffprobe to check the audio:

  • Expected: 48000 Hz sample rate, auto bit rate, mono, OPUS format
  • Actual: 48000 Hz sample rate, 89 kb/s bit rate, stereo, aac format

Expected behavior
Audio should record in OPUS format, or a message should be printed to console about the format being changed. Bit rate and sample rate recorded should be what is specified in the bitRate and sampleRate parameters. Number of channels should be able to be specified as mono. Anything different should be specified in the documentation.

@Ujas-Majithiya Ujas-Majithiya added the bug Something isn't working label May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants