-
Notifications
You must be signed in to change notification settings - Fork 2
/
malint.man
224 lines (224 loc) · 6.36 KB
/
malint.man
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
.TH "MALINT" "1" "November 4, 2004" "NiH" "General Commands Manual"
.nh
.if n .ad l
.SH "NAME"
\fBmalint\fR
\- validate MPEG audio streams
.SH "SYNOPSIS"
.HP 7n
\fBmalint\fR
[\fB\-cCdDEfFgGhIpPtTV\fR]
[\fB\-N\fR\ \fIMIN\fR]
[\fIfile\ ...\fR]
.SH "DESCRIPTION"
The
\fBmalint\fR
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.
.PP
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.
.SS "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
\fIno-\fR
to turn them off.
.PP
The options are as follows:
.PD 0
.TP 19n
\fB\-c\fR
.TP 19n
\fB\--crc\fR
Check CRC fields of the MPEG stream (default).
.TP 19n
\fB\-C\fR
.TP 19n
\fB\--no-crc\fR
Don't check CRC fields of the MPEG stream.
.TP 19n
\fB\-d\fR
.TP 19n
\fB\--duration\fR
Display duration of the stream (default).
.TP 19n
\fB\-D\fR
.TP 19n
\fB\--no-duration\fR
Don't display duration of the stream.
.TP 19n
\fB\-E\fR
.TP 19n
\fB\--error\fR
Only display error diagnostics: ignore some warnings and don't display
informational messages (tags and duration of the stream).
.TP 19n
\fB\-f\fR
.TP 19n
\fB\--header-change\fR
Display frame header field changes that occur in the stream (default).
.TP 19n
\fB\-F\fR
.TP 19n
\fB\--no-header-change\fR
Don't display changes in frame header fields.
.TP 19n
\fB\-g\fR
.TP 19n
\fB\--gap\fR
Check for unused bytes in bit reservoir.
.TP 19n
\fB\-G\fR
.TP 19n
\fB\--no-gap\fR
Don't check for unused bytes in bit reservoir (default).
.TP 19n
\fB\-h\fR
.TP 19n
\fB\--help\fR
Display help message.
.TP 19n
\fB\-I\fR
.TP 19n
\fB\--fast-info\fR
Display only info (bit rate, length, tags at beginning and end), do
not parse whole file.
.TP 19n
\fB\-N\fR
.TP 19n
\fB\--resync-count\fR \fIMIN\fR
If the stream gets out of sync, require at least
\fIMIN\fR
consecutive frames to accept resync.
.TP 19n
\fB\-p\fR
.TP 19n
\fB\--padding\fR
Check for missing padding in last frame (default).
.TP 19n
\fB\-P\fR
.TP 19n
\fB\--no-padding\fR
Don't check for missing padding in last frame.
.TP 19n
\fB\-t\fR
.TP 19n
\fB\--tag\fR
Display information about ID3 tags (default).
.TP 19n
\fB\-T\fR
.TP 19n
\fB\--no-tag\fR
Don't display information about ID3 tags.
.TP 19n
\fB\--tag-contents\fR
Display contents of ID3 tags (default). If tags are not displayed,
their contents aren't displayed, either.
.TP 19n
\fB\--no-tag-contents\fR
.br
Do not display contents of ID3 tags. If tags are displayed, only
their position and version is shown.
.TP 19n
\fB\-V\fR
.TP 19n
\fB\--version\fR
Display version information.
.PD
.SS "Error and warning messages"
.PP
.B "CRC error (calc:XXXX != file:YYYY)\
The CRC calculated by
\fBmalint\fR
for this frame (XXXX) differs from the
CRC stored in the stream (YYYY).
.PP
.B "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).
.PP
.B "illegal header XXXXXXXX (AAAA)\
A frame header was not found where expected, instead the four bytes
XXXXXXXX (in hex, AAAA in ASCII) were found.
.PP
.B "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.
.PP
.B "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.
.PP
.B "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.
.PP
.B "skipping N bytes\
N bytes were skipped during resynchronization.
.PP
.B "skipping N bytes, reaching EOF\
N bytes were skipped during resynchronization, thus reaching the end
of the stream. Resynchronization failed.
.PP
.B "no sync found in 1mb, bailing out\
no sync was found while scanning 1 megabyte. Resynchronization was
given up.
.PP
.B "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.
.PP
.B "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.
.PP
.B "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.
.SS "Info messages"
.PP
.B "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.
.PP
.B "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.)
.PP
.B "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.
.PP
.B "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.
.PP
.B "ID3vX\
ID3 tag version X found.
.PP
.B "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).
.SH "AUTHORS"
Dieter Baron <\[email protected]\fR>
.SH "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.
.PP
ID3v2 tags with unsynchronization are not handled properly.
.PP
Layer 2 CRC calculation is not performed.
.PP
Validation of the huffman data in layer 3 streams is not performed.