NAME

malint - validate MPEG audio streams

SYNOPSIS

malint [-cCdDEfFgGhIpPtTV] [-N MIN] [file ...]

DESCRIPTION

The malint utility parses and validates the MPEG audio streams named in the file arguments (or standard input if none are given) and prints information about the streams and any format violations it finds.

The output for each file is grouped under a line with that file's name. The diagnostic and informative messages are preceded with the byte offset they pertain to.

Options

For options that specify what test should be performed, a lower case letter turns the test on, and an upper case letter turns it off. For long options, prepend no- to turn them off.

The options are as follows:

-c
--crc
Check CRC fields of the MPEG stream (default).
-C
--no-crc
Don't check CRC fields of the MPEG stream.
-d
--duration
Display duration of the stream (default).
-D
--no-duration
Don't display duration of the stream.
-E
--error
Only display error diagnostics: ignore some warnings and don't display informational messages (tags and duration of the stream).
-f
--header-change
Display frame header field changes that occur in the stream (default).
-F
--no-header-change
Don't display changes in frame header fields.
-g
--gap
Check for unused bytes in bit reservoir.
-G
--no-gap
Don't check for unused bytes in bit reservoir (default).
-h
--help
Display help message.
-I
--fast-info
Display only info (bit rate, length, tags at beginning and end), do not parse whole file.
-N
--resync-count MIN
If the stream gets out of sync, require at least MIN consecutive frames to accept resync.
-p
--padding
Check for missing padding in last frame (default).
-P
--no-padding
Don't check for missing padding in last frame.
-t
--tag
Display information about ID3 tags (default).
-T
--no-tag
Don't display information about ID3 tags.
--tag-contents
Display contents of ID3 tags (default). If tags are not displayed, their contents aren't displayed, either.
--no-tag-contents
Do not display contents of ID3 tags. If tags are displayed, only their position and version is shown.
-V
--version
Display version information.

Error and warning messages

CRC error (calc:XXXX != file:YYYY)
The CRC calculated by malint for this frame (XXXX) differs from the CRC stored in the stream (YYYY).

frame data overflows frame (M > N)
The length of data in this frame (M, calculated from side-info or bit-alloc) is more than the frame can contain (N).

illegal header XXXXXXXX (AAAA)
A frame header was not found where expected, instead the four bytes XXXXXXXX (in hex, AAAA in ASCII) were found.

bit reservoir spans across ID3 tag
Parts of the bit reservoir are located before an ID3 tag, whereas this frame is located after it. This is dubious at best, since many players do not account for tags when finding the bit reservoir for a frame.

main_data_begin overflows bit reservoir (N > R)
main_data_begin says this frame uses N bytes of the bit reservoir, but the previous frame only left R bytes as bit reservoir.

gap in bit stream (N < R)
Only N of the R bytes in the bit reservoir are used. This is not an error, and some encoder limit the amount of bit reservoir they'll use (e.g. to one frame), and thus create gaps if it becomes bigger.

skipping N bytes
N bytes were skipped during resynchronization.

skipping N bytes, reaching EOF
N bytes were skipped during resynchronization, thus reaching the end of the stream. Resynchronization failed.

no sync found in 1mb, bailing out
no sync was found while scanning 1 megabyte. Resynchronization was given up.

short [last] frame N of L bytes (D+P=M missing)
The [last] frame should be L bytes long, but was found to be only N bytes long. D bytes of frame data and P bytes of padding (giving M bytes total) are missing.

padding missing from [last] frame (P bytes)
All P bytes of padding were found to be missing from the [last] frame. This shouldn't cause problems if it is the last frame.

padding missing from [last] frame (M of P bytes)
M of P bytes padding were found to be missing from the [last] frame. This shouldn't cause problems if it is the last frame.

Info messages

MPEG V layer L ...
Shows the MPEG version, audio layer and other parameters contained in the frame header. This is also output if header parameters change within the stream.

play time: HH:MM:SS (N frames)
Play time of this stream is HH:MM:SS, it contains N frames. (The play time calculation does not work if the sampling frequency is not constant throughout the stream.)

play time: HH:MM:SS (according to vbr tag)
If using fast info mode, the number of frames is not counted. According to the VBR tag, play time of this stream is HH:MM:SS.

play time: HH:MM:SS (aproximately)
If using fast info mode, the number of frames is not counted. Based on the assumption that bit rate and sampling frequency are constant throughout the stream, the number of frames is approximated as file-length/frame-length, giving a play time of HH:MM:SS.

ID3vX
ID3 tag version X found.

ID3v1 tag (in middle of file)
ID3v1 tags should be stored in the last 128 bytes of the stream. This tag was found in the middle of the stream, which might not be found by some players, or even cause problems (loss of sync).

AUTHORS

Dieter Baron

BUGS

VBR only works if the VBR tag is at the beginning of the stream (possibly after an ID3 tag) and spans to the end of the stream.

ID3v2 tags with unsynchronization are not handled properly.

Layer 2 CRC calculation is not performed.

Validation of the huffman data in layer 3 streams is not performed.