









|
[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
[NMLUG] Identifying clipped MP3s
On Friday 24 November 2006 22:13, Kelly Jones wrote:
> It's easy to tell how long an MP3 is by looking at the bitrate and
> filesize and dividing.
This only works if it's not encoded with variable bitrate (VBR). Often MP3's
that are supposedly a fixed bitrate often actually were encoded with the
advertised bitrate as the nominal or max for VBR. (This is almost always a
good thing as it usually increases quality and decreases file-size.)
> How can I tell how long an MP3 is *supposed* to be? I tried id3tool,
> but this info doesn't seem to be in the header of the MP3?
>
> Example: I download a 3m30s MP3, but my download gets cut off at
> 3m15s. Is there any way to tell that I'm missing the last 15s w/o
> going back to whereever I downloaded it?
The only way I can think of is to parse the file, find the last frame header,
and see if there are missing chunks at the end of the frame data section.
You might be able to do this roughly with an existing tool, (e.g. mpg321) if
you can get it to exit with an error code (or parse it's stderr in --verbose
mode) if it encounters an invalid MP3. Then you could have it "play" all your
MP3 files (to a null output device) and you'd watch the error code or stderr
output to determine if they were problem files or not.
|
|