MP3CK(1)

NAME
mp3ck - MPEG Layer 2 or 3 file or stream consistency check

SYNOPSIS
mp3ck [-dhpqsv] file ...

DESCRIPTION
The MPEG Layer 3 (MP3) format is widely used to exchange digital audio data over the Internet. In the Internet, data transfers may be aborted because of various network events and problems. Unfortunately, it's hard to tell by eye or ear whether an MP3 file hasn't suffered from such a problem in the past if the file came from a third party.

The mp3ck utility is used to check the consistency of MPEG Layer 2 or 3 streams or files. The primary accent of the check is on the seamless flow of frames and tags since most MPEG defects introduced by aborted network transfers manifest theirselves in breakage of that flow.

The following options are available:

-d  Ultimate verbosity. Besides all possible warnings and per-file information, messages will be printed for every frame or tag processed.

-h  Print a short help message and exit.

-p  Be pedantic about MPEG stream inconsistencies. See the list of detected inconsistencies for details.

-q  Decrease verbosity by one level. If specified once, warnings about trailing junk will be suppressed. If specified twice, it will currently be equivalent to the -s option.

-s  Be silent completely.

-t  Try to print time offsets (MM:SS) instead of byte offsets in diagnostic messages. In a couple of messages, offsets may still be in bytes though.

-v  Increase verbosity by one level. If specified once, per-file information about MPEG parameters will be printed. If specified twice, it will currently be equivalent to the -d option.

DIAGNOSTICS
Exit status is 0 if no errors occurred and no MPEG stream inconsistencies were found. Exit status is 1 if MPEG stream inconsistencies were found. What is considered an inconsistency can be affected by the -p option. Exit status is 2 if a file or system error occurred.

The following MPEG stream inconsistencies are detected:

empty file A MPEG stream appeared to be of zero length.

no audio frames A byte stream contained no valid MPEG frames. This error is likely to appear if mp3ck was invoked on a non-MPEG file.

leading junk A MPEG stream didn't begin with a valid frame or ID3 tag. In case of a file, this is usually a sign of corruption, e.g. due to a poorly resumed transfer over a network.

trailing junk A MPEG stream was consistent (unless other warnings were issued), but some random bytes appeared after its last frame. This is mostly harmless and may be caused by an unaligned ID3v1 tag or some sort of application-specific data. No MPEG stream inconsistency will be reported in exit status unless the -p option was specified.

trailing junk (truncated ID3v? tag?) The same as above, but there were only one or two extra bytes, which look like the beginning of an ID3 tag. "I", "ID", "T", and "TA" are the possible values for the bytes.

last frame incomplete

unexpected EOF at frame header+n

ID3v? tag incomplete These are the most common defects seen in MPEG files. They appear when an aborted transfer over a network remains unnoticed. However, a uniform or slightly varying number of bytes missing from the last frame over a series of files is usually just a sign of a quirk of the MPEG encoder/tagger used.

sync after %ld bytes of junk Normal flow of MPEG frames and ID3v2 tags was broken and then resumed after a portion of random bytes. In files, such a defect is likely to appear if a network transfer was resumed poorly. In particular, many Windows FTP clients tend to lose data when resuming an FTP upload because they fail to determine how many bytes have been delivered to the remote side successfully. On the other hand, such a warning appearing after an ID3v2 tag is often harmless and just indicates padding of the tag.

ID3v1 in the middle of the file An ID3v1 tag should not appear in the middle of a MPEG stream. An obscure corruption of the stream is likely to have happened.

ID3v2.%d.%d unsupported A MPEG stream contained an ID3v2 tag, which major version wasn't recognized. Since the ID3v2 standard is still under development, its future versions may introduce features incompatible with former specifications. An unsupported ID3v2 tag is just skipped as junk bytes.

Additionally, a number of invalid MPEG header field values is detected and reported accordingly.

BUGS
mp3ck still cannot be used to check Layer 1 streams.

mp3ck will accept ID3 tags in a Layer 2 stream.

The CRC check of MPEG headers isn't implemented yet.