toniebox-reverse-engineering / teddycloud_web

A better web interface for TeddyCloud
https://github.com/toniebox-reverse-engineering/teddycloud/
16 stars 9 forks source link

Audio Encoder - audio volume quiet at start und getting louder #101

Closed fila612 closed 3 months ago

fila612 commented 3 months ago

Hi, I have loaded an mp3 via audio encoder into the library with the current DEV-Branch version ([TeddyCloud vX.X.X (a5a6237)]). Unfortunately, the volume is different, very quiet at the beginning and then gets steadily louder. Also, the file size seems to be a lot smaller compared to previous uploads (June 24). A 13min MP3, which has 18MB becomes an 8.8MB tag and 8 Mp3s with 66MB become an 18MB taf.

henryk86 commented 3 months ago

@SciLor THis should be moved to teddycloud_web repository.

Could the volume be the result of introducing the window thing in the adapted code? I tested it with the previously buggy mp3 file and I did not experienced that. Also the file size of the taf stays the same for all versions.

@fila612 can you provide the example file?

fila612 commented 3 months ago

@henryk86 sure, were should i put these files?

henryk86 commented 3 months ago

Maybe send it in the telegram? As I am currently not able to analyse it, maybe you can send it to @SciLor and maybe he has some spare time to do an analysis. Or just be a little bit patient till I am back at home again

fila612 commented 3 months ago

S05E17 - Leckerlies auf Eis.mp3.zip S05E17 - Leckerlies auf Eis.taf.zip

fila612 commented 3 months ago

made an additional test and upload and encoded a file which a I've done in June. Resulte: Size is the same, but the volume is quieter then the older file. So, there is a difference between the 2 files. the old file was uploaded on June 2nd, so maybe you can compare this(?).

henryk86 commented 3 months ago

I added some changes recently as there was some decoding cracks, this could lead to quieter files then before. If they are quieter at all, then it’s ok, if the volume increases then this is a bug

fila612 commented 3 months ago

hi @henryk86, understand, but the files are at the beginning very quiet and getting louder after a few minutes. the attached .taf file here are getting quiter in waves, e.g. at the last couple minutes there is also a timeframe, where its quiter than normal.

so, I think its a bug, because the volume isn't constant at all.

CraWleRLT commented 3 months ago

I was actually trying to figure out if I could make a recording louder recently. After spending a couple of hours playing with the original MP3, my general feeling was that something was off with the Audio Encoder. Turns out I was likely running into this same issue 😄

If you use Audio Encoder on the new UI and on the Legacy GUI (you can still access it through Settings) and then play those recordings on each, even on the browser there's an obvious difference in sound volume at the beginning and yes, it does fluctuate. It seems to be way better through Legacy GUI.

I do see this change between I assume the old encoder logic and the new encoder logic. Not sure what it does, but in the current state I prefer the legacy encoder 😄

henryk86 commented 3 months ago

You don’t have to show us where a change was ;) we are aware that this change is the reason. But this change also fixes another bug with cracking noises on deep basses. As soon as I am back from vacation I will have a look on it and fix it. Just be a little patient ;) or try to fix it yourself.

CraWleRLT commented 3 months ago

Just to elaborate on Hamming Window - this question and visualization in it gives me the impression that Hamming Window should be applied to select parts of the recording (likely parts in which we want to reduce the volume), not to the whole recording. If we apply it to the whole recording, based on that visualization it makes sense why the beginning and the end of the recording is quiet, but the middle is the loudest. Until I saw that visualization, I didn't even realize that the middle of the recording was louder.

henryk86 commented 3 months ago

The fix By @CraWleRLT is now merged into teddycloud. Feel free to test it in the latest teddycloud dev docker container

fila612 commented 3 months ago

thanks for the quick fix and I will retest with the new version, but when I redeploy my portainer stack, there is no new version shown up in d teddy cloud ui - its still at a5a6237. I expected, based on the latest commit, that the new version should be c44d2b9, but its not.

did I something wrong or should I wait for some other merging activities?

SciLor commented 3 months ago

A redeploy does not update the stack. You'll need to re pull the image

fila612 commented 3 months ago

thats what I've done, sorry for confusion: redeploying with re pull the image. This works always at the last updates: Bildschirmfoto 2024-08-24 um 22 06 15

fila612 commented 3 months ago

repeat it, no change of the version, assuming that the fix is not in, but will test it tomorrow. Bildschirmfoto 2024-08-24 um 22 10 42

henryk86 commented 3 months ago

@fila612 please use develop as tag in image parameter in your docker-compose.yml, not nightly-develop

fila612 commented 3 months ago

@henryk86, thanks :) I've changed it, but makes no difference:/ I'll wait and check it tomorrow again. thanks for helping.

henryk86 commented 3 months ago

It seems in the current build pipeline the docker image build fetches not the previously committed version of teddycloud. A newly triggered build now fetched the latest version. After build is completed, you should get the right version.

fila612 commented 3 months ago

I didn't see an update notice in portainer, but I did a repull of the image - and now I have the latest version. I repeated the test with the same mp3 and the volume is constant. From my point of view, the error has been solved, so I'll close here. thank you very much