Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Decode opus stream generated in iOS AVAudioSession formatID = kAudioFormatOpus (Read 1575 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Decode opus stream generated in iOS AVAudioSession formatID = kAudioFormatOpus

Hi everyone,

This is a tech / coding question, hope it's OK to post here. And apologies if my terminology is off the mark from an audio perspective  ;D

I'm working on a voice app wanting to record straight to an Opus stream.

On the iOS side, I'm working in Objective C and I'm using an AVAudioSession recorder with formatID set to  kAudioFormatOpus.

This is all working well and emitting a stream of audio data.

My problem is when I receive the audio stream in the backend, I find I'm unable to reliably decode the Opus stream using ffmpeg. (I wish to decode to PCM.)

My question would be, is anyone familiar with the format of Opus audio stream that is generated by iOS AudioSession recorder under audio format kAudioFormatOpus ? Is anyone able to suggest proven conversion techniques? (e.g. some ffmpeg commands), or else hook me up with some links to format specs so I can figure out what is going on here ?

I have looked all over the internet, but I'm unable to find any useful spec info that corresponds to the stream that AVAudioSession recorder is outputting. I have seen a few posts which say Apple have not fully complied with the Opus spec.

Apologies if this is way off topic. Thanks all  :D