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: Detecting improperly encoded MP3 files (Read 5780 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Detecting improperly encoded MP3 files

Hello,

Personally I always use lame to encode and never have a problem.

Recently I started converting mp3 audios created by other people to Ogg Vorbis for html5 audio completeness (Opera and some Linux browsers do not decode MP3)

This is speech and my workflow basically was

lame --decode audio.mp3 && oggenc -q 3 audio.wav && rm -f audio.wav

Most of the time that worked perfectly.

In once case, lame could not decode the audio. I could play the audio just fine in GStreamer (w/ fluendo decoder, didn't try the libmad one) but lame could not decode it.
I was able to use a GStreamer pipe to transcode it to ogg vorbis, but clearly there is something odd about that MP3.

In another case, decoding with lame worked beautifully but I noticed that with GStreamer (again via fluendo plugin) the mp3 sounded really bad. Decoding with lame and re-encoding with lame fixed that.

Anyway what I want to do is build a web interface where service providers (it's a certain type of entertainment industry) can upload their MP3 and it will transcode to ogg for them as well as report potential errors in the MP3 file.

The transcoding part means detecting errors in MP3 and decoding with a decoder that compensates for those errors (like the GStreamer pipe in the case where lame could not decode) and I'm thinking this has likely already been done and that there is a shell script out there somewhere that will run on Linux and can detect certain types of known errors and knows what decoders can cope with them. Anyone know of one?

Thanks for suggestions.

Oh - yes I know lossy to lossy is not ideal, but this is just voice and it really doesn't matter.

Detecting improperly encoded MP3 files

Reply #1
mp3packer typically will detect errors.

Detecting improperly encoded MP3 files

Reply #2
You could try http://mp3val.sourceforge.net/ ? It's old but then again I don't believe anything in the MP3 spec has changed since then?

Detecting improperly encoded MP3 files

Reply #3
Thank you, I will try mp3val on the two files that gave me issue and see how it does with them. From it's sourceforge page it looks like it may be able to repair which would probably be a better way to deal with one that fluendo gstreamer couldn't properly decode but lame could, rather than re-encode.

Detecting improperly encoded MP3 files

Reply #4
I used it primarily for fixing broke VBR headers which is does well, not sure about other fixes.

Oh yeah it doesn't like extended character sets in the filenames. Like Cyrillic/Chinese etc.