Questions tagged [opus]

Opus or Opus Audio Codec is a lossy audio compression format developed by the Internet Engineering Task Force (IETF) that is particularly suitable for interactive real-time applications over the Internet. As an open format standardized through RFC 6716, a reference implementation is provided under the 3-clause BSD license. All known software patents which cover Opus are licensed under royalty-free terms.

Opus incorporates technology from two codecs: the speech-oriented SILK and the low-latency CELT.[3] Opus can be adjusted seamlessly between high and low bitrates, and internally, it transitions between a linear prediction codec at lower bitrates and a transform codec at higher bitrates (as well as a hybrid for a short overlap).
Opus has a very low algorithmic delay (22.5 ms by default), which is a necessity for use as part of a low audio latency communication link, which can permit natural conversation, networked music performances, or lip sync at live events. Opus permits trading-off quality or bitrate to achieve an even smaller algorithmic delay, down to 5 ms. Its delay is very low compared to well over 100 ms for popular music formats such as MP3, Ogg Vorbis and HE-AAC; yet Opus performs very competitively with these codecs in terms of quality per bitrate.[5] Unlike Ogg Vorbis, Opus does not require the definition of large codebooks for each individual file, making it preferable to Vorbis for short clips of audio.

Further information and deeper analysis: Opus on wikipedia

374 questions
5
votes
1 answer

Splitting an Ogg Opus File stream

I am trying to send an OGG_OPUS encoded stream to google's speech to text streaming service. Since there is a time limit imposed by Google for their stream requests, I have to route the audio stream to another Google Speech To Text streaming session…
Sylens
  • 1,097
  • 8
  • 31
5
votes
4 answers

How Can I Add Metadata in opus files?

I'm interested in writing metadata for .opus files, but all of the posts that I've seen so far are for more mainstream formats such as .ogg, or .mp3. I'm uncertain as to whether ID3 tags work with .opus files, and I can't find any resources that say…
Sarah Szabo
  • 10,345
  • 9
  • 37
  • 60
5
votes
1 answer

ffmpeg Resource temporarily unavailable

I'm trying to encode an audio frame using ffmpeg library and Opus codec but i faced with this error : Resource temporarily unavailable My source code : void encode_audio(uint8_t *frame , int frame_size , void (*onPacket)(uint8_t *packet , int…
KoLiBer
  • 194
  • 4
  • 15
5
votes
1 answer

ffmpeg not honoring sample rate in opus output

I am capturing a live audio stream to Opus, and no matter what I choose for the audio sample rate, I get 48khz output. This is my command line ./ffmpeg -f alsa -ar 16000 -i sysdefault:CARD=CODEC -f alsa -ar 16000 -i sysdefault:CARD=CODEC_1…
Adam
  • 4,159
  • 4
  • 32
  • 53
5
votes
0 answers

Opus for iOS, crashing with 16000 sample rate

I am developing Voip application with Opus for iOS (Objective-C and C++). It works fine with 8000, 12000, 24000 and 48000 sampling rate except with 16000, where the application crashes on opus_encode method. Here is what i am doing: m_oAudioSession…
5
votes
3 answers

How to encode and decode audio using opus

I am trying integrate opus into my application, the encode and decode function returns positive value which means successfully, but the output audio can't play. Raw audio data can play as well. Here is how I encode data. I use 4 bytes prefix to…
sahara108
  • 2,829
  • 1
  • 22
  • 41
5
votes
2 answers

Forcing L/R stereo

I'm trying to produce low bitrate opus files with L/R stereo. What decides if opusenc will use L/R stereo instead of joint stereo? Is there are flag I can pass? Is it related to bitrate? opusenc input.wav output.opus //produces L/R stereo opusenc…
Colin Pickard
  • 45,724
  • 13
  • 98
  • 148
5
votes
2 answers

Portaudio + Opus encoding / decoding audio input

I'm working on a VOIP client using Portaudio and opus. I read from the microphone in a frame -encode each frame with Opus and put it in a list -pop the first element from the list and decode it -read it with portaudio If i do the same thing without…
Wawa08
  • 168
  • 2
  • 12
4
votes
1 answer

Convert OPUS to PCM in Android Studio

As one of the components of my app, I need to be able to convert an opus file to mp3. After much looking around, I figured the best approach would be to convert the opus file into raw PCM data and then convert the PCM data to an mp3 file. After…
Moshe Goldberg
  • 461
  • 2
  • 15
4
votes
2 answers

How to play/decode Ogg Opus Audio in Safari?

OGG Opus audio format is not supported in Safari. Are there any high-level (decoding?) libraries that make .ogg files playable in Safari?
4
votes
2 answers

How to encode and decode Real-time Audio using OpusCodec in IOS?

I am working on a app which has following requirements : Record real time audio from iOS device (iPhone) Encode this audio data to Opus data and send it to server over WebSocket Decode received data to pcm again Play received audio from WebSocket…
Mohamed Farouk
  • 957
  • 1
  • 13
  • 29
4
votes
0 answers

Record audio with another header than caf

I want to record audio in Opus format on iOS share it with other clients. I did this using this setting for AVAudioRecorder: let audioRecorderSettings = [AVNumberOfChannelsKey: 1, AVFormatIDKey : kAudioFormatOpus, …
Ali Samaiee
  • 301
  • 6
  • 14
4
votes
1 answer

Swift: converting OPUS example file only returns "-4" (OPUS_INVALID_PACKET). How to strip header?

I have successfully added https://github.com/chrisballinger/Opus-iOS to my project and I am able to call the functions declared in its header. I want to convert from OPUS to AAC so my first step would be to decode my opus file. However, it keeps…
user2330482
  • 1,053
  • 2
  • 11
  • 19
4
votes
1 answer

Building adaptive audio streaming for web and mobile web

I am building a site where I'd like to stream audio files from a S3/CDN. Like with video, I'd like the stream to adapt to the bandwidth of the users. It seems like I have the following options - Encode to, say 128kbps and 320kbps audio, and switch…
geoboy
  • 1,172
  • 1
  • 11
  • 25
4
votes
1 answer

Decoding opus using libavcodec from FFmpeg

I am trying to decode opus using libavcodec. I am able to do it using libopus library alone. But I am trying to acheive same using libavcodec. I am trying to figure it out Why its not working in my case. I have an rtp stream and trying to decode it.…
Abu
  • 213
  • 5
  • 14
1 2
3
24 25