Poor encoding quality

When trying to encode files I end up with rather poor quality (sound spikes, noises).

I have tried downloading a video from YouTube using yt-dlp passing it information to extract audio and output it into OPUS format hoping this will result in as less quality drop as possible. Once I got myself the OPUS files I then use the audio encoder to encode it but the resulting TAF has said problems.
From what I have read teddycloud used a CBR of 96kbit/s. Did I get it right the box is capable of only VBR 96-116 kbit/s? Is this a limitation of only the CC3200 and CC3235 because I doubt the ESP32 is outpowered by that.
Additionally: are real Tonies using a VBR?

In the latest develop version there is a debug option where you get a command to download the pcm file which is created in your browser and is the base for the actual encoding.

and then open Dev Mode and console (in Chrome: Hit f12) and add a file to the encoder and click upload. The console should then contain something like that:

You might use that to test if this file is already the problem.

and here is a hint, how to test the PCM at all:

Please do not forget to turn this option off as it might cause some memory leaks.

1 Like

:thinking:
Locally in the browser the files are converted to PCM increasing it’s size manyfolds and is then transferred to the server? And I was wondering what it has been taking so long. :laughing:

I will setup another instance of the cloud to check for the quality and the pcm.
Thank you.

There was indeed a bug in teddycloud_web. this is now fixed and as soon as the fix is published, you should be able to create high quality sounds :wink:

First of all: you were right. Indeed the pcm already contains the cracking noises and sound spikes so the error exists within the web interface’s decoder? Does it recognize WAV for instance so as to prevent creating raws with flaws?

I have checked the development branch and have checked several commits where this bug is not addressed in so I assume this bug has been fixed a few days ago? In this case the docker image I have should contain the fix already.

The bug was fixed yesterday 20:09 and is available in a docker container since ~23:55 roughly.

So if you have do docker composer pull today, you should get the bugfix.

As it is part of teddycloud_web, the commit is in that repository, not in teddycloud itself ( in teddycloud it’s just update frontend (make web))

Ok, here I am lost a bit. First of all: how would I update teddycloud_web while using teddycloud’s docker?
Additionally: is this fix on client side so as to fix pcm’s poor quality?

Teddycloud_web is included in teddycloud. So you just have to update teddycloud and everything is fine (develop branch!)

The fix is improving the decoding the input file into pcm. So yes, the pcm file should also sound better.

Ok, so I have checked it and yes you are right. From what I believe I can see is that you have applied the sinus wave was ignored before thus adding up sound amplifications to a base wave resulting in values added onto the existing sinus wave sound and creating cracking noises? Holy hell.
The raw sound looks much more friendly in Audacity now. Previously it was hitting max almost instantly when sound kicked in.
Awesome work. Thank you.

Ok, need to add one more thing though sadly.
While trying to create a file from 99 songs (bitrate 96) the problem reoccured. I have then tested it using only 3 songs and it occured again. After refreshing the page and setting to 128 bits the problem vanished.
Setting back to 96 it was gone still and while uploading 99 at 96 again the problem is gone still. Driving me nuts.