Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR : MP3 header parse error #53

Open
fakirsu opened this issue Feb 2, 2023 · 3 comments
Open

ERROR : MP3 header parse error #53

fakirsu opened this issue Feb 2, 2023 · 3 comments

Comments

@fakirsu
Copy link

fakirsu commented Feb 2, 2023

Hello,
When trying to work with the MP3 files produced in the TAGMP3.DE tool, I realize that most of the files (in fact all but one of the 70 I have already created) do not include duration information. of the track (in Headers or metadata).
Indeed, the files are tagged with "ERROR: MP3 header parse error".
Would it be possible to correct this error and provide, in each MP3 file, the duration information (in my case, the ideal would be to have the duration with tenths of a second - because my files are quite short - but if it's rounded up to the upper integer (the upper second), it's OK).
On the forum thread (https://community.mp3tag.de/t/display-length-in-column/59930), a tool http://mp3diags.sourceforge.net/ is mentioned).
What do you think ?

@fakirsu
Copy link
Author

fakirsu commented Feb 2, 2023

I specify that a simple solution (after the first quick tests) consists of re-encoding the MP3s with FFMPEG (in my case, I converted them to .OGG). The problem is then solved (the length becomes available).

@CharlieEtienne
Copy link
Owner

CharlieEtienne commented Feb 2, 2023

Hi @fakirsu,

Could you try something ?
Go in process.php on line 55 and try to replace LINEAR16 with OGG_OPUS.

FYI, here are the different possible audio encoding values:

Encoding Description
LINEAR16 Uncompressed 16-bit signed little-endian samples (Linear PCM). Audio content returned as LINEAR16 also contains a WAV header.
MP3 MP3 audio at 32kbps.
OGG_OPUS Opus encoded audio wrapped in an ogg container. The result will be a file which can be played natively on Android, and in browsers (at least Chrome and Firefox). The quality of the encoding is considerably higher than MP3 while using approximately the same bitrate.
MULAW 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law. Audio content returned as MULAW also contains a WAV header.
ALAW 8-bit samples that compand 14-bit audio samples using G.711 PCMU/A-law. Audio content returned as ALAW also contains a WAV header.

If it does change something, I'll consider to add an option to choose encoding.

@fakirsu
Copy link
Author

fakirsu commented Feb 3, 2023

Hello,

With LINEAR16: the headers (I don't know the exact name) are broken or improper: in particular, the duration of the track is not included. The MP3 file for my test is 294 kb.

With OGG_OPUS: I just can't listen to the file...?? And the duration of the track is not available. The file weighs 25 KB.

With MP3, the file is nickel, and it weighs 23 ko.

With MULAW: 148 KB file, but not the duration.

With ALAW: not possible to read the file. Weighs 147 kB, and the duration displayed is incorrect (4 s instead of 6 s??)

For my needs (the smaller the files, the better), it's perfect with MP3.

For other uses that require less compression, see...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants