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: Opus Compatibility: 1.3.1 encoder with 1.1.2 decoder (Read 2021 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Opus Compatibility: 1.3.1 encoder with 1.1.2 decoder

Hi all,

TL;DR: Encoding with 1.3.1 Opus encoder and decoding with 1.1.2 Opus decoder results in extremely bad / distorted audio.

We have a software that (among other functionalities) sends encoded audio between different machines, using `libopus` to encode/decode the audio.
(in case it's relevant - we're using `ALSA` APIs to control recording/playback devices)
Some of our machines are running Ubuntu 18.04 and some are running Ubuntu 20.04.
Some machines are amd64 and some are arm64.

The Ubuntu apt repos for 18.04 bionic provide libopus0 version 1.1.2.
The Ubuntu apt repos for 20.04 focal provide libopus0 version 1.3.1.

When we encode the audio with 1.3.1 Opus encoder (on 20.040, and decode it with 1.1.2 Opus decoder - we get very distorted sound.
When we manually cloned the Opus git repo, and built v1.1.2 on the 20.04 machine, the resulting sound quality was good.

Manually building 1.1.2 on all the 20.04 machines we want to run our software on, is not really a practical solution for us.

My questions:
1. Do you know why we are experiencing the distorted / bad quality audio? Are 1.3.1<>1.1.2 incompatible (I didn't find any such note in the Opus documentation)
2. Can I somehow change the 1.3.1 encoder configurations, so that it's compatible with a 1.1.2 decoder?
3. Can you suggest to me how to further debug the issue, to better analyze the root cause??
4. Is there a way to install 1.3.1 on 18.04 OR 1.1.2 on 20.04, without manually cloning the git repo and building?

Thanks in advance.

Re: Opus Compatibility: 1.3.1 encoder with 1.1.2 decoder

Reply #1
I guess it would be a good idea to provided a sample of distorted audio here so people here would get an idea what's wrong.

Because actually version of Opus decoder shouldn't matter at all if we talk about decoding.
Opus VBR 256 + SoX

Re: Opus Compatibility: 1.3.1 encoder with 1.1.2 decoder

Reply #2
Manually building 1.1.2 on all the 20.04 machines we want to run our software on, is not really a practical solution for us.

Correct me if I'm wrong, but you don't need to manually build encoder on all machines, you can just copy the encoder from one machine into /usr/bin on all machines and it will work. At least until this is all sorted out.

EDIT: I'm on Windows, so that may be the difference, but I've encoded a song with latest opus I have (opus-tools 0.2-3-gf5f571b using libopus 1.3) at 96 kbit VBR and decoded with old decoder (v0.1.9-9-gaa7e018 using libopus 1.1.2) and there was no problem whatsoever. Samples of input and distorted output would be most preferable.
TAPE LOADING ERROR