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: Command line tool to fix corrupted/invalid mp3 file (Read 9848 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Command line tool to fix corrupted/invalid mp3 file

I have some mp3 tracks downloaded from this page http://dwellingofduels.net/duel.php?dir=13...03-Disney_Month.

Unfortunately, all five tracks seem to have some problem.

If I run the eyeD3 python program on the files, they all report "eyed3.core:WARNING: FrameHeader: Illegal Frame ID: �j��".

The files would cause my FiiO X5 gen 1 (with latest firmware version 2.5) to hang if I try to play them.

However, they seem to play fine on VLC for OS X. If I open the Media Information in of the tracks in VLC, I see a partial embedded cover art. This suggests that the error is recoverable.

Would anybody know a commandline tool that let's me fix the mp3 file without re-encoding?

Command line tool to fix corrupted/invalid mp3 file

Reply #1
Not commandline but foobar2000 comes with a few utilities to "fix" MP3s.

Command line tool to fix corrupted/invalid mp3 file

Reply #2
Just remux them with ffmpeg:
Code: [Select]
ffmpeg -i input.mp3 -c:a copy -c:v copy output.mp3

It seems that strings in ID3v4 text frames are not null terminated. That might be the cause.

FWIW, the most recent eyeD3 (fetched from https://bitbucket.org/nicfit/eyed3) could read them.
ffmpeg and TagLib also succeed. fb2k can play it but doesn't show their tags.

Command line tool to fix corrupted/invalid mp3 file

Reply #3
Just remux them with ffmpeg:
Code: [Select]
ffmpeg -i input.mp3 -c:a copy -c:v copy output.mp3

It seems that strings in ID3v4 text frames are not null terminated. That might be the cause.

FWIW, the most recent eyeD3 (fetched from https://bitbucket.org/nicfit/eyed3) could read them.
ffmpeg and TagLib also succeed. fb2k can play it but doesn't show their tags.

ID3v4? You mean ID3v2.4, right?


Command line tool to fix corrupted/invalid mp3 file

Reply #5
You can try VBRFix or MP3val.

Command line tool to fix corrupted/invalid mp3 file

Reply #6
They use id3v2.4 with non synchsafe integers; old iTunes used to write those.

"mid3v2 -C bla.mp3" should fix it