-
Notifications
You must be signed in to change notification settings - Fork 83
Remove the first 528 samples (only if the encoder is LAME?) #25
Comments
In my opinion, I'm leaning toward not to fix this and keep this as it is so that we can keep go-mp3 'dumb' as a decoder infrastructure. |
On second thought, as ffmpeg treats this problem well (ffmpeg sets 'start skip samples' if the decoder is LAME), go-mp3 should treat this problem... 🤔 |
I think it's better keep decoder lib itself as simple as frame in->frame out. But example/application can address this problem. |
I'm still not sure. In the current go-mp3, there is no way to detect the encoder, so it is almost impossible to care this problem on example/application side. |
Example can accept command line param, same as lame's |
So you mean specifying delay for each file would work? Well that would work, but I'd want some library to detect the delay amount. To be exact, there is also a tail part that should be ignored :-/ |
I think this solution is at least encoder dependent. |
https://github.com/aspt/diff_tools can be used to measure real delay. |
Doesn't this require the original sound file? I use |
Yes, this tool compares two audio files and can compute time shift using -align[int] option, [int] - max shift in samples, k/m can be used (-align128k for example). |
OK, so this is the same result as http://mp3decoders.mp3-tech.org/decoders_lame.html, right? |
Almost, Lame 3.87 CBR Overall Delay is 1105 samples in table, it seems changed in lame 3.99.5. |
Here latest lame decoder always compensate 529 samples: |
https://web.archive.org/web/20180111173850/http://lame.sourceforge.net/tech-FAQ.txt
It looks like the first 528 samples are always zero in MP3 decoded results that is decoded by the (almost?) all decoders. Then, should go-mp3 skip the first 528 samples?
The text was updated successfully, but these errors were encountered: