xref: /freebsd/contrib/file/magic/Magdir/animation (revision 0957b409)
1
2#------------------------------------------------------------------------------
3# $File: animation,v 1.68 2018/05/06 16:08:07 christos Exp $
4# animation:  file(1) magic for animation/movie formats
5#
6# animation formats
7# MPEG, FLI, DL originally from vax@ccwf.cc.utexas.edu (VaX#n8)
8# FLC, SGI, Apple originally from Daniel Quinlan (quinlan@yggdrasil.com)
9
10# SGI and Apple formats
110	string		MOVI		Silicon Graphics movie file
12!:mime	video/x-sgi-movie
134       string          moov            Apple QuickTime
14!:mime	video/quicktime
15>12     string          mvhd            \b movie (fast start)
16>12     string          mdra            \b URL
17>12     string          cmov            \b movie (fast start, compressed header)
18>12     string          rmra            \b multiple URLs
194       string          mdat            Apple QuickTime movie (unoptimized)
20!:mime	video/quicktime
21#4       string          wide            Apple QuickTime movie (unoptimized)
22#!:mime	video/quicktime
23#4       string          skip            Apple QuickTime movie (modified)
24#!:mime	video/quicktime
25#4       string          free            Apple QuickTime movie (modified)
26#!:mime	video/quicktime
274       string          idsc            Apple QuickTime image (fast start)
28!:mime	image/x-quicktime
29#4       string          idat            Apple QuickTime image (unoptimized)
30#!:mime	image/x-quicktime
314       string          pckg            Apple QuickTime compressed archive
32!:mime	application/x-quicktime-player
334	string/W	jP		JPEG 2000 image
34!:mime	image/jp2
35# http://www.ftyps.com/ with local additions
364	string		ftyp		ISO Media
37# http://aeroquartet.com/wordpress/2016/03/05/3-xavc-s/
38>8	string		XAVC		\b, MPEG v4 system, Sony XAVC Codec
39>>96	string		x		\b, Audio "%.4s"
40>>118	beshort		x		at %dHz
41>>140	string		x		\b, Video "%.4s"
42>>168	beshort		x		%d
43>>170	beshort		x		\bx%d
44>8	string		3g2		\b, MPEG v4 system, 3GPP2
45!:mime	video/3gpp2
46>>11	byte		4		\b v4 (H.263/AMR GSM 6.10)
47>>11	byte		5		\b v5 (H.263/AMR GSM 6.10)
48>>11	byte		6		\b v6 (ITU H.264/AMR GSM 6.10)
49# http://www.3gpp2.org/Public_html/Specs/C.S0050-B_v1.0_070521.pdf
50# Section 8.1.1, corresponds to a, b, c
51>>11	byte		0x61		\b C.S0050-0 V1.0
52>>11	byte		0x62		\b C.S0050-0-A V1.0.0
53>>11	byte		0x63		\b C.S0050-0-B V1.0
54>8	string		3ge		\b, MPEG v4 system, 3GPP
55!:mime	video/3gpp
56>>11	byte		6		\b, Release 6 MBMS Extended Presentations
57>>11	byte		7		\b, Release 7 MBMS Extended Presentations
58>8	string		3gg		\b, MPEG v4 system, 3GPP
59!:mime	video/3gpp
60>>11	byte		6		\b, Release 6 General Profile
61>8	string		3gp		\b, MPEG v4 system, 3GPP
62!:mime	video/3gpp
63>>11	byte		1		\b, Release %d (non existent)
64>>11	byte		2		\b, Release %d (non existent)
65>>11	byte		3		\b, Release %d (non existent)
66>>11	byte		4		\b, Release %d
67>>11	byte		5		\b, Release %d
68>>11	byte		6		\b, Release %d
69>>11	byte		7		\b, Release %d Streaming Servers
70>8	string		3gs		\b, MPEG v4 system, 3GPP
71!:mime	video/3gpp
72>>11	byte		7		\b, Release %d Streaming Servers
73>8	string		avc1		\b, MPEG v4 system, 3GPP JVT AVC [ISO 14496-12:2005]
74!:mime	video/mp4
75>8	string/W	qt		\b, Apple QuickTime movie
76!:mime	video/quicktime
77>8	string		CAEP		\b, Canon Digital Camera
78>8	string		caqv		\b, Casio Digital Camera
79>8	string		CDes		\b, Convergent Design
80>8	string		da0a		\b, DMB MAF w/ MPEG Layer II aud, MOT slides, DLS, JPG/PNG/MNG
81>8	string		da0b		\b, DMB MAF, ext DA0A, with 3GPP timed text, DID, TVA, REL, IPMP
82>8	string		da1a		\b, DMB MAF audio with ER-BSAC audio, JPG/PNG/MNG images
83>8	string		da1b		\b, DMB MAF, ext da1a, with 3GPP timed text, DID, TVA, REL, IPMP
84>8	string		da2a		\b, DMB MAF aud w/ HE-AAC v2 aud, MOT slides, DLS, JPG/PNG/MNG
85>8	string		da2b		\b, DMB MAF, ext da2a, with 3GPP timed text, DID, TVA, REL, IPMP
86>8	string		da3a		\b, DMB MAF aud with HE-AAC aud, JPG/PNG/MNG images
87>8	string		da3b		\b, DMB MAF, ext da3a w/ BIFS, 3GPP, DID, TVA, REL, IPMP
88>8	string		dash		\b, MPEG v4 system, Dynamic Adaptive Streaming over HTTP
89!:mime	video/mp4
90>8	string		dmb1		\b, DMB MAF supporting all the components defined in the spec
91>8	string		dmpf		\b, Digital Media Project
92>8	string		drc1		\b, Dirac (wavelet compression), encap in ISO base media (MP4)
93>8	string		dv1a		\b, DMB MAF vid w/ AVC vid, ER-BSAC aud, BIFS, JPG/PNG/MNG, TS
94>8	string		dv1b		\b, DMB MAF, ext dv1a, with 3GPP timed text, DID, TVA, REL, IPMP
95>8	string		dv2a		\b, DMB MAF vid w/ AVC vid, HE-AAC v2 aud, BIFS, JPG/PNG/MNG, TS
96>8	string		dv2b		\b, DMB MAF, ext dv2a, with 3GPP timed text, DID, TVA, REL, IPMP
97>8	string		dv3a		\b, DMB MAF vid w/ AVC vid, HE-AAC aud, BIFS, JPG/PNG/MNG, TS
98>8	string		dv3b		\b, DMB MAF, ext dv3a, with 3GPP timed text, DID, TVA, REL, IPMP
99>8	string		dvr1		\b, DVB (.DVB) over RTP
100!:mime	video/vnd.dvb.file
101>8	string		dvt1		\b, DVB (.DVB) over MPEG-2 Transport Stream
102!:mime	video/vnd.dvb.file
103>8	string		F4V		\b, Video for Adobe Flash Player 9+ (.F4V)
104!:mime	video/mp4
105>8	string		F4P		\b, Protected Video for Adobe Flash Player 9+ (.F4P)
106!:mime	video/mp4
107>8	string		F4A		\b, Audio for Adobe Flash Player 9+ (.F4A)
108!:mime	audio/mp4
109>8	string		F4B		\b, Audio Book for Adobe Flash Player 9+ (.F4B)
110!:mime	audio/mp4
111>8	string		isc2		\b, ISMACryp 2.0 Encrypted File
112#	?/enc-isoff-generic
113>8	string		iso2		\b, MP4 Base Media v2 [ISO 14496-12:2005]
114!:mime	video/mp4
115>8	string		isom		\b, MP4 Base Media v1 [IS0 14496-12:2003]
116!:mime	video/mp4
117>8	string/W	jp2		\b, JPEG 2000
118!:mime	image/jp2
119>8	string		JP2		\b, JPEG 2000 Image (.JP2) [ISO 15444-1 ?]
120!:mime	image/jp2
121>8	string		JP20		\b, Unknown, from GPAC samples (prob non-existent)
122>8	string		jpm		\b, JPEG 2000 Compound Image (.JPM) [ISO 15444-6]
123!:mime	image/jpm
124>8	string		jpx		\b, JPEG 2000 w/ extensions (.JPX) [ISO 15444-2]
125!:mime	image/jpx
126>8	string		KDDI		\b, 3GPP2 EZmovie for KDDI 3G cellphones
127!:mime	video/3gpp2
128>8	string		M4A 		\b, Apple iTunes ALAC/AAC-LC (.M4A) Audio
129!:mime	audio/x-m4a
130>8	string		M4B 		\b, Apple iTunes ALAC/AAC-LC (.M4B) Audio Book
131!:mime	audio/mp4
132>8	string		M4P 		\b, Apple iTunes ALAC/AAC-LC (.M4P) AES Protected Audio
133!:mime	video/mp4
134>8	string		M4V 		\b, Apple iTunes Video (.M4V) Video
135!:mime	video/x-m4v
136>8	string		M4VH		\b, Apple TV (.M4V)
137!:mime	video/x-m4v
138>8	string		M4VP		\b, Apple iPhone (.M4V)
139!:mime	video/x-m4v
140>8	string		mj2s		\b, Motion JPEG 2000 [ISO 15444-3] Simple Profile
141!:mime	video/mj2
142>8	string		mjp2		\b, Motion JPEG 2000 [ISO 15444-3] General Profile
143!:mime	video/mj2
144>8	string		mmp4		\b, MPEG-4/3GPP Mobile Profile (.MP4 / .3GP) (for NTT)
145!:mime	video/mp4
146>8	string		mobi		\b, MPEG-4, MOBI format
147!:mime	video/mp4
148>8	string		mp21		\b, MPEG-21 [ISO/IEC 21000-9]
149>8	string		mp41		\b, MP4 v1 [ISO 14496-1:ch13]
150!:mime	video/mp4
151>8	string		mp42		\b, MP4 v2 [ISO 14496-14]
152!:mime	video/mp4
153>8	string		mp71		\b, MP4 w/ MPEG-7 Metadata [per ISO 14496-12]
154>8	string		mp7t		\b, MPEG v4 system, MPEG v7 XML
155>8	string		mp7b		\b, MPEG v4 system, MPEG v7 binary XML
156>8	string		mmp4		\b, MPEG v4 system, 3GPP Mobile
157!:mime	video/mp4
158>8	string		MPPI		\b, Photo Player, MAF [ISO/IEC 23000-3]
159>8	string		mqt		\b, Sony / Mobile QuickTime (.MQV) US Pat 7,477,830
160!:mime	video/quicktime
161>8	string		MSNV		\b, MPEG-4 (.MP4) for SonyPSP
162!:mime	audio/mp4
163>8	string		NDAS		\b, MP4 v2 [ISO 14496-14] Nero Digital AAC Audio
164!:mime	audio/mp4
165>8	string		NDSC		\b, MPEG-4 (.MP4) Nero Cinema Profile
166!:mime	video/mp4
167>8	string		NDSH		\b, MPEG-4 (.MP4) Nero HDTV Profile
168!:mime	video/mp4
169>8	string		NDSM		\b, MPEG-4 (.MP4) Nero Mobile Profile
170!:mime	video/mp4
171>8	string		NDSP		\b, MPEG-4 (.MP4) Nero Portable Profile
172!:mime	video/mp4
173>8	string		NDSS		\b, MPEG-4 (.MP4) Nero Standard Profile
174!:mime	video/mp4
175>8	string		NDXC		\b, H.264/MPEG-4 AVC (.MP4) Nero Cinema Profile
176!:mime	video/mp4
177>8	string		NDXH		\b, H.264/MPEG-4 AVC (.MP4) Nero HDTV Profile
178!:mime	video/mp4
179>8	string		NDXM		\b, H.264/MPEG-4 AVC (.MP4) Nero Mobile Profile
180!:mime	video/mp4
181>8	string		NDXP		\b, H.264/MPEG-4 AVC (.MP4) Nero Portable Profile
182!:mime	video/mp4
183>8	string		NDXS		\b, H.264/MPEG-4 AVC (.MP4) Nero Standard Profile
184!:mime	video/mp4
185>8	string		odcf  		\b, OMA DCF DRM Format 2.0 (OMA-TS-DRM-DCF-V2_0-20060303-A)
186>8	string		opf2 		\b, OMA PDCF DRM Format 2.1 (OMA-TS-DRM-DCF-V2_1-20070724-C)
187>8	string		opx2  		\b, OMA PDCF DRM + XBS ext (OMA-TS-DRM_XBS-V1_0-20070529-C)
188>8	string		pana		\b, Panasonic Digital Camera
189>8	string		qt  		\b, Apple QuickTime (.MOV/QT)
190!:mime	video/quicktime
191# HEIF image format
192# see https://nokiatech.github.io/heif/technical.html
193>8	string		mif1		\b, HEIF Image
194!:mime image/heif
195>8	string		msf1		\b, HEIF Image Sequence
196!:mime image/heif-sequence
197>8	string		heic		\b, HEIF Image HEVC Main or Main Still Picture Profile
198!:mime image/heic
199>8	string		heix		\b, HEIF Image HEVC Main 10 Profile
200!:mime image/heic
201>8	string		hevc		\b, HEIF Image Sequenz HEVC Main or Main Still Picture Profile
202!:mime image/heic-sequence
203>8	string		hevx		\b, HEIF Image Sequence HEVC Main 10 Profile
204!:mime image/heic-sequence
205# following HEIF brands are not mentioned in the heif technical info currently (Oct 2017)
206# but used in the reference implementation:
207# https://github.com/nokiatech/heif/blob/d5e9a21c8ba8df712bdf643021dd9f6518134776/Srcs/reader/hevcimagefilereader.cpp
208>8	string		heim		\b, HEIF Image L-HEVC
209!:mime image/heif
210>8	string		heis		\b, HEIF Image L-HEVC
211!:mime image/heif
212>8	string		avic		\b, HEIF Image AVC
213!:mime image/heif
214>8	string		hevm		\b, HEIF Image Sequence L-HEVC
215!:mime image/heif-sequence
216>8	string		hevs		\b, HEIF Image Sequence L-HEVC
217!:mime image/heif-sequence
218>8	string		avcs		\b, HEIF Image Sequence AVC
219!:mime image/heif-sequence
220
221>8	string		ROSS		\b, Ross Video
222>8	string		sdv		\b, SD Memory Card Video
223>8	string		ssc1		\b, Samsung stereo, single stream (patent pending)
224>8	string		ssc2		\b, Samsung stereo, dual stream (patent pending)
225
226# MPEG sequences
227# Scans for all common MPEG header start codes
2280	 belong		    0x00000001
229>4	 byte&0x1F	    0x07	   JVT NAL sequence, H.264 video
230>>5      byte               66             \b, baseline
231>>5      byte               77             \b, main
232>>5      byte               88             \b, extended
233>>7      byte               x              \b @ L %u
2340        belong&0xFFFFFF00  0x00000100
235>3       byte               0xBA           MPEG sequence
236!:mime  video/mpeg
237>>4      byte               &0x40          \b, v2, program multiplex
238>>4      byte               ^0x40          \b, v1, system multiplex
239>3       byte               0xBB           MPEG sequence, v1/2, multiplex (missing pack header)
240>3       byte&0x1F          0x07           MPEG sequence, H.264 video
241>>4      byte               66             \b, baseline
242>>4      byte               77             \b, main
243>>4      byte               88             \b, extended
244>>6      byte               x              \b @ L %u
245# GRR too general as it catches also FoxPro Memo example NG.FPT
246>3       byte               0xB0           MPEG sequence, v4
247# TODO: maybe this extra line exclude FoxPro Memo example NG.FPT starting with 000001b0 00000100 00000000
248#>>4      byte               !0             MPEG sequence, v4
249!:mime  video/mpeg4-generic
250>>5      belong             0x000001B5
251>>>9     byte               &0x80
252>>>>10   byte&0xF0          16             \b, video
253>>>>10   byte&0xF0          32             \b, still texture
254>>>>10   byte&0xF0          48             \b, mesh
255>>>>10   byte&0xF0          64             \b, face
256>>>9     byte&0xF8          8              \b, video
257>>>9     byte&0xF8          16             \b, still texture
258>>>9     byte&0xF8          24             \b, mesh
259>>>9     byte&0xF8          32             \b, face
260>>4      byte               1              \b, simple @ L1
261>>4      byte               2              \b, simple @ L2
262>>4      byte               3              \b, simple @ L3
263>>4      byte               4              \b, simple @ L0
264>>4      byte               17             \b, simple scalable @ L1
265>>4      byte               18             \b, simple scalable @ L2
266>>4      byte               33             \b, core @ L1
267>>4      byte               34             \b, core @ L2
268>>4      byte               50             \b, main @ L2
269>>4      byte               51             \b, main @ L3
270>>4      byte               53             \b, main @ L4
271>>4      byte               66             \b, n-bit @ L2
272>>4      byte               81             \b, scalable texture @ L1
273>>4      byte               97             \b, simple face animation @ L1
274>>4      byte               98             \b, simple face animation @ L2
275>>4      byte               99             \b, simple face basic animation @ L1
276>>4      byte               100            \b, simple face basic animation @ L2
277>>4      byte               113            \b, basic animation text @ L1
278>>4      byte               114            \b, basic animation text @ L2
279>>4      byte               129            \b, hybrid @ L1
280>>4      byte               130            \b, hybrid @ L2
281>>4      byte               145            \b, advanced RT simple @ L!
282>>4      byte               146            \b, advanced RT simple @ L2
283>>4      byte               147            \b, advanced RT simple @ L3
284>>4      byte               148            \b, advanced RT simple @ L4
285>>4      byte               161            \b, core scalable @ L1
286>>4      byte               162            \b, core scalable @ L2
287>>4      byte               163            \b, core scalable @ L3
288>>4      byte               177            \b, advanced coding efficiency @ L1
289>>4      byte               178            \b, advanced coding efficiency @ L2
290>>4      byte               179            \b, advanced coding efficiency @ L3
291>>4      byte               180            \b, advanced coding efficiency @ L4
292>>4      byte               193            \b, advanced core @ L1
293>>4      byte               194            \b, advanced core @ L2
294>>4      byte               209            \b, advanced scalable texture @ L1
295>>4      byte               210            \b, advanced scalable texture @ L2
296>>4      byte               211            \b, advanced scalable texture @ L3
297>>4      byte               225            \b, simple studio @ L1
298>>4      byte               226            \b, simple studio @ L2
299>>4      byte               227            \b, simple studio @ L3
300>>4      byte               228            \b, simple studio @ L4
301>>4      byte               229            \b, core studio @ L1
302>>4      byte               230            \b, core studio @ L2
303>>4      byte               231            \b, core studio @ L3
304>>4      byte               232            \b, core studio @ L4
305>>4      byte               240            \b, advanced simple @ L0
306>>4      byte               241            \b, advanced simple @ L1
307>>4      byte               242            \b, advanced simple @ L2
308>>4      byte               243            \b, advanced simple @ L3
309>>4      byte               244            \b, advanced simple @ L4
310>>4      byte               245            \b, advanced simple @ L5
311>>4      byte               247            \b, advanced simple @ L3b
312>>4      byte               248            \b, FGS @ L0
313>>4      byte               249            \b, FGS @ L1
314>>4      byte               250            \b, FGS @ L2
315>>4      byte               251            \b, FGS @ L3
316>>4      byte               252            \b, FGS @ L4
317>>4      byte               253            \b, FGS @ L5
318>3       byte               0xB5           MPEG sequence, v4
319!:mime  video/mpeg4-generic
320>>4      byte               &0x80
321>>>5     byte&0xF0          16             \b, video (missing profile header)
322>>>5     byte&0xF0          32             \b, still texture (missing profile header)
323>>>5     byte&0xF0          48             \b, mesh (missing profile header)
324>>>5     byte&0xF0          64             \b, face (missing profile header)
325>>4      byte&0xF8          8              \b, video (missing profile header)
326>>4      byte&0xF8          16             \b, still texture (missing profile header)
327>>4      byte&0xF8          24             \b, mesh (missing profile header)
328>>4      byte&0xF8          32             \b, face (missing profile header)
329>3       byte               0xB3           MPEG sequence
330!:mime  video/mpeg
331>>12     belong             0x000001B8     \b, v1, progressive Y'CbCr 4:2:0 video
332>>12     belong             0x000001B2     \b, v1, progressive Y'CbCr 4:2:0 video
333>>12     belong             0x000001B5     \b, v2,
334>>>16    byte&0x0F          1              \b HP
335>>>16    byte&0x0F          2              \b Spt
336>>>16    byte&0x0F          3              \b SNR
337>>>16    byte&0x0F          4              \b MP
338>>>16    byte&0x0F          5              \b SP
339>>>17    byte&0xF0          64             \b@HL
340>>>17    byte&0xF0          96             \b@H-14
341>>>17    byte&0xF0          128            \b@ML
342>>>17    byte&0xF0          160            \b@LL
343>>>17    byte               &0x08          \b progressive
344>>>17    byte               ^0x08          \b interlaced
345>>>17    byte&0x06          2              \b Y'CbCr 4:2:0 video
346>>>17    byte&0x06          4              \b Y'CbCr 4:2:2 video
347>>>17    byte&0x06          6              \b Y'CbCr 4:4:4 video
348>>11     byte               &0x02
349>>>75    byte               &0x01
350>>>>140  belong             0x000001B8     \b, v1, progressive Y'CbCr 4:2:0 video
351>>>>140  belong             0x000001B2     \b, v1, progressive Y'CbCr 4:2:0 video
352>>>>140  belong             0x000001B5     \b, v2,
353>>>>>144 byte&0x0F          1              \b HP
354>>>>>144 byte&0x0F          2              \b Spt
355>>>>>144 byte&0x0F          3              \b SNR
356>>>>>144 byte&0x0F          4              \b MP
357>>>>>144 byte&0x0F          5              \b SP
358>>>>>145 byte&0xF0          64             \b@HL
359>>>>>145 byte&0xF0          96             \b@H-14
360>>>>>145 byte&0xF0          128            \b@ML
361>>>>>145 byte&0xF0          160            \b@LL
362>>>>>145 byte               &0x08          \b progressive
363>>>>>145 byte               ^0x08          \b interlaced
364>>>>>145 byte&0x06          2              \b Y'CbCr 4:2:0 video
365>>>>>145 byte&0x06          4              \b Y'CbCr 4:2:2 video
366>>>>>145 byte&0x06          6              \b Y'CbCr 4:4:4 video
367>>76    belong             0x000001B8     \b, v1, progressive Y'CbCr 4:2:0 video
368>>76    belong             0x000001B2     \b, v1, progressive Y'CbCr 4:2:0 video
369>>76    belong             0x000001B5     \b, v2,
370>>>80   byte&0x0F          1              \b HP
371>>>80   byte&0x0F          2              \b Spt
372>>>80   byte&0x0F          3              \b SNR
373>>>80   byte&0x0F          4              \b MP
374>>>80   byte&0x0F          5              \b SP
375>>>81   byte&0xF0          64             \b@HL
376>>>81   byte&0xF0          96             \b@H-14
377>>>81   byte&0xF0          128            \b@ML
378>>>81   byte&0xF0          160            \b@LL
379>>>81   byte               &0x08          \b progressive
380>>>81   byte               ^0x08          \b interlaced
381>>>81   byte&0x06          2              \b Y'CbCr 4:2:0 video
382>>>81   byte&0x06          4              \b Y'CbCr 4:2:2 video
383>>>81   byte&0x06          6              \b Y'CbCr 4:4:4 video
384>>4      belong&0xFFFFFF00  0x78043800     \b, HD-TV 1920P
385>>>7     byte&0xF0          0x10           \b, 16:9
386>>4      belong&0xFFFFFF00  0x50002D00     \b, SD-TV 1280I
387>>>7     byte&0xF0          0x10           \b, 16:9
388>>4      belong&0xFFFFFF00  0x30024000     \b, PAL Capture
389>>>7     byte&0xF0          0x10           \b, 4:3
390>>4      beshort&0xFFF0     0x2C00         \b, 4CIF
391>>>5     beshort&0x0FFF     0x01E0         \b NTSC
392>>>5     beshort&0x0FFF     0x0240         \b PAL
393>>>7     byte&0xF0          0x20           \b, 4:3
394>>>7     byte&0xF0          0x30           \b, 16:9
395>>>7     byte&0xF0          0x40           \b, 11:5
396>>>7     byte&0xF0          0x80           \b, PAL 4:3
397>>>7     byte&0xF0          0xC0           \b, NTSC 4:3
398>>4      belong&0xFFFFFF00  0x2801E000     \b, LD-TV 640P
399>>>7     byte&0xF0          0x10           \b, 4:3
400>>4      belong&0xFFFFFF00  0x1400F000     \b, 320x240
401>>>7     byte&0xF0          0x10           \b, 4:3
402>>4      belong&0xFFFFFF00  0x0F00A000     \b, 240x160
403>>>7     byte&0xF0          0x10           \b, 4:3
404>>4      belong&0xFFFFFF00  0x0A007800     \b, 160x120
405>>>7     byte&0xF0          0x10           \b, 4:3
406>>4      beshort&0xFFF0     0x1600         \b, CIF
407>>>5     beshort&0x0FFF     0x00F0         \b NTSC
408>>>5     beshort&0x0FFF     0x0120         \b PAL
409>>>7     byte&0xF0          0x20           \b, 4:3
410>>>7     byte&0xF0          0x30           \b, 16:9
411>>>7     byte&0xF0          0x40           \b, 11:5
412>>>7     byte&0xF0          0x80           \b, PAL 4:3
413>>>7     byte&0xF0          0xC0           \b, NTSC 4:3
414>>>5     beshort&0x0FFF     0x0240         \b PAL 625
415>>>>7    byte&0xF0          0x20           \b, 4:3
416>>>>7    byte&0xF0          0x30           \b, 16:9
417>>>>7    byte&0xF0          0x40           \b, 11:5
418>>4      beshort&0xFFF0     0x2D00         \b, CCIR/ITU
419>>>5     beshort&0x0FFF     0x01E0         \b NTSC 525
420>>>5     beshort&0x0FFF     0x0240         \b PAL 625
421>>>7     byte&0xF0          0x20           \b, 4:3
422>>>7     byte&0xF0          0x30           \b, 16:9
423>>>7     byte&0xF0          0x40           \b, 11:5
424>>4      beshort&0xFFF0     0x1E00         \b, SVCD
425>>>5     beshort&0x0FFF     0x01E0         \b NTSC 525
426>>>5     beshort&0x0FFF     0x0240         \b PAL 625
427>>>7     byte&0xF0          0x20           \b, 4:3
428>>>7     byte&0xF0          0x30           \b, 16:9
429>>>7     byte&0xF0          0x40           \b, 11:5
430>>7      byte&0x0F          1              \b, 23.976 fps
431>>7      byte&0x0F          2              \b, 24 fps
432>>7      byte&0x0F          3              \b, 25 fps
433>>7      byte&0x0F          4              \b, 29.97 fps
434>>7      byte&0x0F          5              \b, 30 fps
435>>7      byte&0x0F          6              \b, 50 fps
436>>7      byte&0x0F          7              \b, 59.94 fps
437>>7      byte&0x0F          8              \b, 60 fps
438>>11     byte               &0x04          \b, Constrained
439
440# MPEG ADTS Audio (*.mpx/mxa/aac)
441# from dreesen@math.fu-berlin.de
442# modified to fully support MPEG ADTS
443
444# MP3, M1A
445# modified by Joerg Jenderek
446# GRR the original test are too common for many DOS files
447# so don't accept as MP3 until we've tested the rate
4480       beshort&0xFFFE  0xFFFA
449# rates
450>2      byte&0xF0       0x10           MPEG ADTS, layer III, v1,  32 kbps
451!:mime	audio/mpeg
452>2      byte&0xF0       0x20           MPEG ADTS, layer III, v1,  40 kbps
453!:mime	audio/mpeg
454>2      byte&0xF0       0x30           MPEG ADTS, layer III, v1,  48 kbps
455!:mime	audio/mpeg
456>2      byte&0xF0       0x40           MPEG ADTS, layer III, v1,  56 kbps
457!:mime	audio/mpeg
458>2      byte&0xF0       0x50           MPEG ADTS, layer III, v1,  64 kbps
459!:mime	audio/mpeg
460>2      byte&0xF0       0x60           MPEG ADTS, layer III, v1,  80 kbps
461!:mime	audio/mpeg
462>2      byte&0xF0       0x70           MPEG ADTS, layer III, v1,  96 kbps
463!:mime	audio/mpeg
464>2      byte&0xF0       0x80           MPEG ADTS, layer III, v1, 112 kbps
465!:mime	audio/mpeg
466>2      byte&0xF0       0x90           MPEG ADTS, layer III, v1, 128 kbps
467!:mime	audio/mpeg
468>2      byte&0xF0       0xA0           MPEG ADTS, layer III, v1, 160 kbps
469!:mime	audio/mpeg
470>2      byte&0xF0       0xB0           MPEG ADTS, layer III, v1, 192 kbps
471!:mime	audio/mpeg
472>2      byte&0xF0       0xC0           MPEG ADTS, layer III, v1, 224 kbps
473!:mime	audio/mpeg
474>2      byte&0xF0       0xD0           MPEG ADTS, layer III, v1, 256 kbps
475!:mime	audio/mpeg
476>2      byte&0xF0       0xE0           MPEG ADTS, layer III, v1, 320 kbps
477!:mime	audio/mpeg
478# timing
479>2      byte&0x0C       0x00           \b, 44.1 kHz
480>2      byte&0x0C       0x04           \b, 48 kHz
481>2      byte&0x0C       0x08           \b, 32 kHz
482# channels/options
483>3      byte&0xC0       0x00           \b, Stereo
484>3      byte&0xC0       0x40           \b, JntStereo
485>3      byte&0xC0       0x80           \b, 2x Monaural
486>3      byte&0xC0       0xC0           \b, Monaural
487#>1     byte            ^0x01          \b, Data Verify
488#>2     byte            &0x02          \b, Packet Pad
489#>2     byte            &0x01          \b, Custom Flag
490#>3     byte            &0x08          \b, Copyrighted
491#>3     byte            &0x04          \b, Original Source
492#>3     byte&0x03       1              \b, NR: 50/15 ms
493#>3     byte&0x03       3              \b, NR: CCIT J.17
494
495# MP2, M1A
4960       beshort&0xFFFE  0xFFFC         MPEG ADTS, layer II, v1
497!:mime	audio/mpeg
498# rates
499>2      byte&0xF0       0x10           \b,  32 kbps
500>2      byte&0xF0       0x20           \b,  48 kbps
501>2      byte&0xF0       0x30           \b,  56 kbps
502>2      byte&0xF0       0x40           \b,  64 kbps
503>2      byte&0xF0       0x50           \b,  80 kbps
504>2      byte&0xF0       0x60           \b,  96 kbps
505>2      byte&0xF0       0x70           \b, 112 kbps
506>2      byte&0xF0       0x80           \b, 128 kbps
507>2      byte&0xF0       0x90           \b, 160 kbps
508>2      byte&0xF0       0xA0           \b, 192 kbps
509>2      byte&0xF0       0xB0           \b, 224 kbps
510>2      byte&0xF0       0xC0           \b, 256 kbps
511>2      byte&0xF0       0xD0           \b, 320 kbps
512>2      byte&0xF0       0xE0           \b, 384 kbps
513# timing
514>2      byte&0x0C       0x00           \b, 44.1 kHz
515>2      byte&0x0C       0x04           \b, 48 kHz
516>2      byte&0x0C       0x08           \b, 32 kHz
517# channels/options
518>3      byte&0xC0       0x00           \b, Stereo
519>3      byte&0xC0       0x40           \b, JntStereo
520>3      byte&0xC0       0x80           \b, 2x Monaural
521>3      byte&0xC0       0xC0           \b, Monaural
522#>1     byte            ^0x01          \b, Data Verify
523#>2     byte            &0x02          \b, Packet Pad
524#>2     byte            &0x01          \b, Custom Flag
525#>3     byte            &0x08          \b, Copyrighted
526#>3     byte            &0x04          \b, Original Source
527#>3     byte&0x03       1              \b, NR: 50/15 ms
528#>3     byte&0x03       3              \b, NR: CCIT J.17
529
530# MPA, M1A
531# updated by Joerg Jenderek
532# GRR the original test are too common for many DOS files, so test 32 <= kbits <= 448
533# GRR this test is still too general as it catches a BOM of UTF-16 files (0xFFFE)
534# FIXME: Almost all little endian UTF-16 text with BOM are clobbered by these entries
535#0	beshort&0xFFFE		0xFFFE
536#>2	ubyte&0xF0	>0x0F
537#>>2	ubyte&0xF0	<0xE1		MPEG ADTS, layer I, v1
538## rate
539#>>>2      byte&0xF0       0x10           \b,  32 kbps
540#>>>2      byte&0xF0       0x20           \b,  64 kbps
541#>>>2      byte&0xF0       0x30           \b,  96 kbps
542#>>>2      byte&0xF0       0x40           \b, 128 kbps
543#>>>2      byte&0xF0       0x50           \b, 160 kbps
544#>>>2      byte&0xF0       0x60           \b, 192 kbps
545#>>>2      byte&0xF0       0x70           \b, 224 kbps
546#>>>2      byte&0xF0       0x80           \b, 256 kbps
547#>>>2      byte&0xF0       0x90           \b, 288 kbps
548#>>>2      byte&0xF0       0xA0           \b, 320 kbps
549#>>>2      byte&0xF0       0xB0           \b, 352 kbps
550#>>>2      byte&0xF0       0xC0           \b, 384 kbps
551#>>>2      byte&0xF0       0xD0           \b, 416 kbps
552#>>>2      byte&0xF0       0xE0           \b, 448 kbps
553## timing
554#>>>2      byte&0x0C       0x00           \b, 44.1 kHz
555#>>>2      byte&0x0C       0x04           \b, 48 kHz
556#>>>2      byte&0x0C       0x08           \b, 32 kHz
557## channels/options
558#>>>3      byte&0xC0       0x00           \b, Stereo
559#>>>3      byte&0xC0       0x40           \b, JntStereo
560#>>>3      byte&0xC0       0x80           \b, 2x Monaural
561#>>>3      byte&0xC0       0xC0           \b, Monaural
562##>1     byte            ^0x01          \b, Data Verify
563##>2     byte            &0x02          \b, Packet Pad
564##>2     byte            &0x01          \b, Custom Flag
565##>3     byte            &0x08          \b, Copyrighted
566##>3     byte            &0x04          \b, Original Source
567##>3     byte&0x03       1              \b, NR: 50/15 ms
568##>3     byte&0x03       3              \b, NR: CCIT J.17
569
570# MP3, M2A
5710       beshort&0xFFFE  0xFFF2         MPEG ADTS, layer III, v2
572!:mime	audio/mpeg
573# rate
574>2      byte&0xF0       0x10           \b,   8 kbps
575>2      byte&0xF0       0x20           \b,  16 kbps
576>2      byte&0xF0       0x30           \b,  24 kbps
577>2      byte&0xF0       0x40           \b,  32 kbps
578>2      byte&0xF0       0x50           \b,  40 kbps
579>2      byte&0xF0       0x60           \b,  48 kbps
580>2      byte&0xF0       0x70           \b,  56 kbps
581>2      byte&0xF0       0x80           \b,  64 kbps
582>2      byte&0xF0       0x90           \b,  80 kbps
583>2      byte&0xF0       0xA0           \b,  96 kbps
584>2      byte&0xF0       0xB0           \b, 112 kbps
585>2      byte&0xF0       0xC0           \b, 128 kbps
586>2      byte&0xF0       0xD0           \b, 144 kbps
587>2      byte&0xF0       0xE0           \b, 160 kbps
588# timing
589>2      byte&0x0C       0x00           \b, 22.05 kHz
590>2      byte&0x0C       0x04           \b, 24 kHz
591>2      byte&0x0C       0x08           \b, 16 kHz
592# channels/options
593>3      byte&0xC0       0x00           \b, Stereo
594>3      byte&0xC0       0x40           \b, JntStereo
595>3      byte&0xC0       0x80           \b, 2x Monaural
596>3      byte&0xC0       0xC0           \b, Monaural
597#>1     byte            ^0x01          \b, Data Verify
598#>2     byte            &0x02          \b, Packet Pad
599#>2     byte            &0x01          \b, Custom Flag
600#>3     byte            &0x08          \b, Copyrighted
601#>3     byte            &0x04          \b, Original Source
602#>3     byte&0x03       1              \b, NR: 50/15 ms
603#>3     byte&0x03       3              \b, NR: CCIT J.17
604
605# MP2, M2A
6060       beshort&0xFFFE  0xFFF4         MPEG ADTS, layer II, v2
607!:mime	audio/mpeg
608# rate
609>2      byte&0xF0       0x10           \b,   8 kbps
610>2      byte&0xF0       0x20           \b,  16 kbps
611>2      byte&0xF0       0x30           \b,  24 kbps
612>2      byte&0xF0       0x40           \b,  32 kbps
613>2      byte&0xF0       0x50           \b,  40 kbps
614>2      byte&0xF0       0x60           \b,  48 kbps
615>2      byte&0xF0       0x70           \b,  56 kbps
616>2      byte&0xF0       0x80           \b,  64 kbps
617>2      byte&0xF0       0x90           \b,  80 kbps
618>2      byte&0xF0       0xA0           \b,  96 kbps
619>2      byte&0xF0       0xB0           \b, 112 kbps
620>2      byte&0xF0       0xC0           \b, 128 kbps
621>2      byte&0xF0       0xD0           \b, 144 kbps
622>2      byte&0xF0       0xE0           \b, 160 kbps
623# timing
624>2      byte&0x0C       0x00           \b, 22.05 kHz
625>2      byte&0x0C       0x04           \b, 24 kHz
626>2      byte&0x0C       0x08           \b, 16 kHz
627# channels/options
628>3      byte&0xC0       0x00           \b, Stereo
629>3      byte&0xC0       0x40           \b, JntStereo
630>3      byte&0xC0       0x80           \b, 2x Monaural
631>3      byte&0xC0       0xC0           \b, Monaural
632#>1     byte            ^0x01          \b, Data Verify
633#>2     byte            &0x02          \b, Packet Pad
634#>2     byte            &0x01          \b, Custom Flag
635#>3     byte            &0x08          \b, Copyrighted
636#>3     byte            &0x04          \b, Original Source
637#>3     byte&0x03       1              \b, NR: 50/15 ms
638#>3     byte&0x03       3              \b, NR: CCIT J.17
639
640# MPA, M2A
6410       beshort&0xFFFE  0xFFF6         MPEG ADTS, layer I, v2
642!:mime	audio/mpeg
643# rate
644>2      byte&0xF0       0x10           \b,  32 kbps
645>2      byte&0xF0       0x20           \b,  48 kbps
646>2      byte&0xF0       0x30           \b,  56 kbps
647>2      byte&0xF0       0x40           \b,  64 kbps
648>2      byte&0xF0       0x50           \b,  80 kbps
649>2      byte&0xF0       0x60           \b,  96 kbps
650>2      byte&0xF0       0x70           \b, 112 kbps
651>2      byte&0xF0       0x80           \b, 128 kbps
652>2      byte&0xF0       0x90           \b, 144 kbps
653>2      byte&0xF0       0xA0           \b, 160 kbps
654>2      byte&0xF0       0xB0           \b, 176 kbps
655>2      byte&0xF0       0xC0           \b, 192 kbps
656>2      byte&0xF0       0xD0           \b, 224 kbps
657>2      byte&0xF0       0xE0           \b, 256 kbps
658# timing
659>2      byte&0x0C       0x00           \b, 22.05 kHz
660>2      byte&0x0C       0x04           \b, 24 kHz
661>2      byte&0x0C       0x08           \b, 16 kHz
662# channels/options
663>3      byte&0xC0       0x00           \b, Stereo
664>3      byte&0xC0       0x40           \b, JntStereo
665>3      byte&0xC0       0x80           \b, 2x Monaural
666>3      byte&0xC0       0xC0           \b, Monaural
667#>1     byte            ^0x01          \b, Data Verify
668#>2     byte            &0x02          \b, Packet Pad
669#>2     byte            &0x01          \b, Custom Flag
670#>3     byte            &0x08          \b, Copyrighted
671#>3     byte            &0x04          \b, Original Source
672#>3     byte&0x03       1              \b, NR: 50/15 ms
673#>3     byte&0x03       3              \b, NR: CCIT J.17
674
675# MP3, M25A
6760       beshort&0xFFFE  0xFFE2         MPEG ADTS, layer III,  v2.5
677!:mime	audio/mpeg
678# rate
679>2      byte&0xF0       0x10           \b,   8 kbps
680>2      byte&0xF0       0x20           \b,  16 kbps
681>2      byte&0xF0       0x30           \b,  24 kbps
682>2      byte&0xF0       0x40           \b,  32 kbps
683>2      byte&0xF0       0x50           \b,  40 kbps
684>2      byte&0xF0       0x60           \b,  48 kbps
685>2      byte&0xF0       0x70           \b,  56 kbps
686>2      byte&0xF0       0x80           \b,  64 kbps
687>2      byte&0xF0       0x90           \b,  80 kbps
688>2      byte&0xF0       0xA0           \b,  96 kbps
689>2      byte&0xF0       0xB0           \b, 112 kbps
690>2      byte&0xF0       0xC0           \b, 128 kbps
691>2      byte&0xF0       0xD0           \b, 144 kbps
692>2      byte&0xF0       0xE0           \b, 160 kbps
693# timing
694>2      byte&0x0C       0x00           \b, 11.025 kHz
695>2      byte&0x0C       0x04           \b, 12 kHz
696>2      byte&0x0C       0x08           \b, 8 kHz
697# channels/options
698>3      byte&0xC0       0x00           \b, Stereo
699>3      byte&0xC0       0x40           \b, JntStereo
700>3      byte&0xC0       0x80           \b, 2x Monaural
701>3      byte&0xC0       0xC0           \b, Monaural
702#>1     byte            ^0x01          \b, Data Verify
703#>2     byte            &0x02          \b, Packet Pad
704#>2     byte            &0x01          \b, Custom Flag
705#>3     byte            &0x08          \b, Copyrighted
706#>3     byte            &0x04          \b, Original Source
707#>3     byte&0x03       1              \b, NR: 50/15 ms
708#>3     byte&0x03       3              \b, NR: CCIT J.17
709
710# AAC (aka MPEG-2 NBC audio) and MPEG-4 audio
711
712# Stored AAC streams (instead of the MP4 format)
7130       string          ADIF           MPEG ADIF, AAC
714!:mime	audio/x-hx-aac-adif
715>4      byte            &0x80
716>>13    byte            &0x10          \b, VBR
717>>13    byte            ^0x10          \b, CBR
718>>16    byte&0x1E       0x02           \b, single stream
719>>16    byte&0x1E       0x04           \b, 2 streams
720>>16    byte&0x1E       0x06           \b, 3 streams
721>>16    byte            &0x08          \b, 4 or more streams
722>>16    byte            &0x10          \b, 8 or more streams
723>>4    byte            &0x80          \b, Copyrighted
724>>13   byte            &0x40          \b, Original Source
725>>13   byte            &0x20          \b, Home Flag
726>4      byte            ^0x80
727>>4     byte            &0x10          \b, VBR
728>>4     byte            ^0x10          \b, CBR
729>>7     byte&0x1E       0x02           \b, single stream
730>>7     byte&0x1E       0x04           \b, 2 streams
731>>7     byte&0x1E       0x06           \b, 3 streams
732>>7     byte            &0x08          \b, 4 or more streams
733>>7     byte            &0x10          \b, 8 or more streams
734>>4    byte            &0x40          \b, Original Stream(s)
735>>4    byte            &0x20          \b, Home Source
736
737# Live or stored single AAC stream (used with MPEG-2 systems)
7380       beshort&0xFFF6  0xFFF0         MPEG ADTS, AAC
739!:mime	audio/x-hx-aac-adts
740>1      byte            &0x08          \b, v2
741>1      byte            ^0x08          \b, v4
742# profile
743>>2     byte            &0xC0          \b LTP
744>2      byte&0xc0       0x00           \b Main
745>2      byte&0xc0       0x40           \b LC
746>2      byte&0xc0       0x80           \b SSR
747# timing
748>2      byte&0x3c       0x00           \b, 96 kHz
749>2      byte&0x3c       0x04           \b, 88.2 kHz
750>2      byte&0x3c       0x08           \b, 64 kHz
751>2      byte&0x3c       0x0c           \b, 48 kHz
752>2      byte&0x3c       0x10           \b, 44.1 kHz
753>2      byte&0x3c       0x14           \b, 32 kHz
754>2      byte&0x3c       0x18           \b, 24 kHz
755>2      byte&0x3c       0x1c           \b, 22.05 kHz
756>2      byte&0x3c       0x20           \b, 16 kHz
757>2      byte&0x3c       0x24           \b, 12 kHz
758>2      byte&0x3c       0x28           \b, 11.025 kHz
759>2      byte&0x3c       0x2c           \b, 8 kHz
760# channels
761>2      beshort&0x01c0  0x0040         \b, monaural
762>2      beshort&0x01c0  0x0080         \b, stereo
763>2      beshort&0x01c0  0x00c0         \b, stereo + center
764>2      beshort&0x01c0  0x0100         \b, stereo+center+LFE
765>2      beshort&0x01c0  0x0140         \b, surround
766>2      beshort&0x01c0  0x0180         \b, surround + LFE
767>2      beshort         &0x01C0        \b, surround + side
768#>1     byte            ^0x01           \b, Data Verify
769#>2     byte            &0x02           \b, Custom Flag
770#>3     byte            &0x20           \b, Original Stream
771#>3     byte            &0x10           \b, Home Source
772#>3     byte            &0x08           \b, Copyrighted
773
774# Live MPEG-4 audio streams (instead of RTP FlexMux)
7750       beshort&0xFFE0  0x56E0         MPEG-4 LOAS
776!:mime	audio/x-mp4a-latm
777#>1     beshort&0x1FFF  x              \b, %hu byte packet
778>3      byte&0xE0       0x40
779>>4     byte&0x3C       0x04           \b, single stream
780>>4     byte&0x3C       0x08           \b, 2 streams
781>>4     byte&0x3C       0x0C           \b, 3 streams
782>>4     byte            &0x08          \b, 4 or more streams
783>>4     byte            &0x20          \b, 8 or more streams
784>3      byte&0xC0       0
785>>4     byte&0x78       0x08           \b, single stream
786>>4     byte&0x78       0x10           \b, 2 streams
787>>4     byte&0x78       0x18           \b, 3 streams
788>>4     byte            &0x20          \b, 4 or more streams
789>>4     byte            &0x40          \b, 8 or more streams
790# This magic isn't strong enough (matches plausible ISO-8859-1 text)
791#0       beshort         0x4DE1         MPEG-4 LO-EP audio stream
792#!:mime	audio/x-mp4a-latm
793
794# Summary: FLI animation format
795# Created by: Daniel Quinlan <quinlan@yggdrasil.com>
796# Modified by (1): Abel Cheung <abelcheung@gmail.com> (avoid over-generic detection)
7974	leshort		0xAF11
798# standard FLI always has 320x200 resolution and 8 bit color
799>8	leshort		320
800>>10	leshort		200
801>>>12	leshort		8			FLI animation, 320x200x8
802!:mime	video/x-fli
803>>>>6	leshort		x			\b, %d frames
804# frame speed is multiple of 1/70s
805>>>>16	leshort		x			\b, %d/70s per frame
806
807# Summary: FLC animation format
808# Created by: Daniel Quinlan <quinlan@yggdrasil.com>
809# Modified by (1): Abel Cheung <abelcheung@gmail.com> (avoid over-generic detection)
8104	leshort		0xAF12
811# standard FLC always use 8 bit color
812>12	leshort		8			FLC animation
813!:mime	video/x-flc
814>>8	leshort		x			\b, %d
815>>10	leshort		x			\bx%dx8
816>>6	uleshort	x			\b, %d frames
817>>16	uleshort	x			\b, %dms per frame
818
819# DL animation format
820# XXX - collision with most `mips' magic
821#
822# I couldn't find a real magic number for these, however, this
823# -appears- to work.  Note that it might catch other files, too, so be
824# careful!
825#
826# Note that title and author appear in the two 20-byte chunks
827# at decimal offsets 2 and 22, respectively, but they are XOR'ed with
828# 255 (hex FF)!  The DL format is really bad.
829#
830#0	byte	1	DL version 1, medium format (160x100, 4 images/screen)
831#!:mime	video/x-unknown
832#>42	byte	x	- %d screens,
833#>43	byte	x	%d commands
834#0	byte	2	DL version 2
835#!:mime	video/x-unknown
836#>1	byte	1	- large format (320x200,1 image/screen),
837#>1	byte	2	- medium format (160x100,4 images/screen),
838#>1	byte	>2	- unknown format,
839#>42	byte	x	%d screens,
840#>43	byte	x	%d commands
841# Based on empirical evidence, DL version 3 have several nulls following the
842# \003.  Most of them start with non-null values at hex offset 0x34 or so.
843#0	string	\3\0\0\0\0\0\0\0\0\0\0\0	DL version 3
844
845# iso 13818 transport stream
846#
847# from Oskar Schirmer <schirmer@scara.com> Feb 3, 2001 (ISO 13818.1)
848# syncbyte      8 bit	0x47
849# error_ind     1 bit	-
850# payload_start 1 bit	1
851# priority      1 bit	-
852# PID          13 bit	0x0000
853# scrambling    2 bit	-
854# adaptfld_ctrl 2 bit	1 or 3
855# conti_count   4 bit	-
8560	belong&0xFF5FFF10	0x47400010
857>188	byte			0x47		MPEG transport stream data
858
859# DIF digital video file format <mpruett@sgi.com>
8600	belong&0xffffff00	0x1f070000      DIF
861>4	byte			&0x01		(DVCPRO) movie file
862>4	byte			^0x01		(DV) movie file
863>3	byte			&0x80		(PAL)
864>3	byte			^0x80		(NTSC)
865
866# Microsoft Advanced Streaming Format (ASF) <mpruett@sgi.com>
8670	belong			0x3026b275	Microsoft ASF
868!:mime  video/x-ms-asf
869
870# MNG Video Format, <URL:http://www.libpng.org/pub/mng/spec/>
8710	string			\x8aMNG		MNG video data,
872!:mime	video/x-mng
873>4	belong			!0x0d0a1a0a	CORRUPTED,
874>4	belong			0x0d0a1a0a
875>>16    belong	x				%d x
876>>20    belong	x				%d
877
878# JNG Video Format, <URL:http://www.libpng.org/pub/mng/spec/>
8790	string			\x8bJNG		JNG video data,
880!:mime	video/x-jng
881>4	belong			!0x0d0a1a0a	CORRUPTED,
882>4	belong			0x0d0a1a0a
883>>16    belong	x				%d x
884>>20    belong	x				%d
885
886# Vivo video (Wolfram Kleff)
8873	string		\x0D\x0AVersion:Vivo	Vivo video data
888
889# VRML (Virtual Reality Modelling Language)
8900       string/w        #VRML\ V1.0\ ascii	VRML 1 file
891!:mime	model/vrml
8920	string/w	#VRML\ V2.0\ utf8	ISO/IEC 14772 VRML 97 file
893!:mime	model/vrml
894
895# X3D (Extensible 3D) [http://www.web3d.org/specifications/x3d-3.0.dtd]
896# From Michel Briand <michelbriand@free.fr>
897# mimetype from https://www.iana.org/assignments/media-types/model/x3d+xml
898# Example http://www.web3d.org/x3d/content/examples/Basic/course/CreateX3DFromStringRandomSpheres.x3d
8990	string/w	\<?xml\ version=
900!:strength + 5
901>20	search/1000/w	\<!DOCTYPE\ X3D		X3D (Extensible 3D) model xml text
902!:mime model/x3d+xml
903
904#---------------------------------------------------------------------------
905# HVQM4: compressed movie format designed by Hudson for Nintendo GameCube
906# From Mark Sheppard <msheppard@climax.co.uk>, 2002-10-03
907#
9080	string		HVQM4		%s
909>6	string		>\0		v%s
910>0	byte		x		GameCube movie,
911>0x34	ubeshort	x		%d x
912>0x36	ubeshort	x		%d,
913>0x26	ubeshort	x		%dus,
914>0x42	ubeshort	0		no audio
915>0x42	ubeshort	>0		%dHz audio
916
917# From: "Stefan A. Haubenthal" <polluks@web.de>
9180	string		DVDVIDEO-VTS	Video title set,
919>0x21	byte		x		v%x
9200	string		DVDVIDEO-VMG	Video manager,
921>0x21	byte		x		v%x
922
923# From: Behan Webster <behanw@websterwood.com>
924# NuppelVideo used by Mythtv (*.nuv)
925# Note: there are two identical stanzas here differing only in the
926# initial string matched. It used to be done with a regex, but we're
927# trying to get rid of those.
9280	string		NuppelVideo	MythTV NuppelVideo
929>12	string		x		v%s
930>20	lelong		x		(%d
931>24	lelong		x		\bx%d),
932>36	string		P		\bprogressive,
933>36	string		I		\binterlaced,
934>40	ledouble	x		\baspect:%.2f,
935>48	ledouble	x		\bfps:%.2f
9360	string		MythTV		MythTV NuppelVideo
937>12	string		x		v%s
938>20	lelong		x		(%d
939>24	lelong		x		\bx%d),
940>36	string		P		\bprogressive,
941>36	string		I		\binterlaced,
942>40	ledouble	x		\baspect:%.2f,
943>48	ledouble	x		\bfps:%.2f
944
945#						MPEG file
946# MPEG sequences
947# FIXME: This section is from the old magic.mime file and needs
948# integrating with the rest
949#0       belong             0x000001BA
950#>4      byte               &0x40
951#!:mime	video/mp2p
952#>4      byte               ^0x40
953#!:mime	video/mpeg
954#0       belong             0x000001BB
955#!:mime	video/mpeg
956#0       belong             0x000001B0
957#!:mime	video/mp4v-es
958#0       belong             0x000001B5
959#!:mime	video/mp4v-es
960#0       belong             0x000001B3
961#!:mime	video/mpv
962#0       belong&0xFF5FFF10  0x47400010
963#!:mime	video/mp2t
964#0       belong             0x00000001
965#>4      byte&0x1F	   0x07
966#!:mime	video/h264
967
968# Type: Bink Video
969# Extension: .bik
970# URL:  http://wiki.multimedia.cx/index.php?title=Bink_Container
971# From: <hoehle@users.sourceforge.net>  2008-07-18
9720	string		BIK	Bink Video
973>3	regex		=[a-z]	rev.%s
974#>4	ulelong		x	size %d
975>20	ulelong		x	\b, %d
976>24	ulelong		x	\bx%d
977>8	ulelong		x	\b, %d frames
978>32	ulelong		x	at rate %d/
979>28	ulelong		>1	\b%d
980>40	ulelong		=0	\b, no audio
981>40	ulelong		!0	\b, %d audio track
982>>40	ulelong		!1	\bs
983# follow properties of the first audio track only
984>>48	uleshort	x	%dHz
985>>51	byte&0x20	0	mono
986>>51	byte&0x20	!0	stereo
987#>>51	byte&0x10	0	FFT
988#>>51	byte&0x10	!0	DCT
989
990# Type:	NUT Container
991# URL:	http://wiki.multimedia.cx/index.php?title=NUT
992# From:	Adam Buchbinder <adam.buchbinder@gmail.com>
9930	string	nut/multimedia\ container\0	NUT multimedia container
994
995# Type: Nullsoft Video (NSV)
996# URL:  http://wiki.multimedia.cx/index.php?title=Nullsoft_Video
997# From: Mike Melanson <mike@multimedia.cx>
9980	string	NSVf	Nullsoft Video
999
1000# Type: REDCode Video
1001# URL:  http://www.red.com/ ; http://wiki.multimedia.cx/index.php?title=REDCode
1002# From: Mike Melanson <mike@multimedia.cx>
10034	string	RED1	REDCode Video
1004
1005# Type: MTV Multimedia File
1006# URL:  http://wiki.multimedia.cx/index.php?title=MTV
1007# From: Mike Melanson <mike@multimedia.cx>
10080	string	AMVS	MTV Multimedia File
1009
1010# Type: ARMovie
1011# URL:  http://wiki.multimedia.cx/index.php?title=ARMovie
1012# From: Mike Melanson <mike@multimedia.cx>
10130	string	ARMovie\012	ARMovie
1014
1015# Type: Interplay MVE Movie
1016# URL:  http://wiki.multimedia.cx/index.php?title=Interplay_MVE
1017# From: Mike Melanson <mike@multimedia.cx>
10180	string	Interplay\040MVE\040File\032	Interplay MVE Movie
1019
1020# Type: Windows Television DVR File
1021# URL:  http://wiki.multimedia.cx/index.php?title=WTV
1022# From: Mike Melanson <mike@mutlimedia.cx>
1023# This takes the form of a Windows-style GUID
10240	bequad	0xB7D800203749DA11
1025>8	bequad	0xA64E0007E95EAD8D	Windows Television DVR Media
1026
1027# Type: Sega FILM/CPK Multimedia
1028# URL:  http://wiki.multimedia.cx/index.php?title=Sega_FILM
1029# From: Mike Melanson <mike@multimedia.cx>
10300	string	FILM	Sega FILM/CPK Multimedia,
1031>32	belong	x	%d x
1032>28	belong	x	%d
1033
1034# Type: Nintendo THP Multimedia
1035# URL:  http://wiki.multimedia.cx/index.php?title=THP
1036# From: Mike Melanson <mike@multimedia.cx>
10370	string	THP\0	Nintendo THP Multimedia
1038
1039# Type: BBC Dirac Video
1040# URL:  http://wiki.multimedia.cx/index.php?title=Dirac
1041# From: Mike Melanson <mike@multimedia.cx>
10420	string	BBCD	BBC Dirac Video
1043
1044# Type: RAD Game Tools Smacker Multimedia
1045# URL:  http://wiki.multimedia.cx/index.php?title=Smacker
1046# From: Mike Melanson <mike@multimedia.cx>
10470	string	SMK	RAD Game Tools Smacker Multimedia
1048>3	byte	x	version %c,
1049>4	lelong	x	%d x
1050>8	lelong	x	%d,
1051>12	lelong	x	%d frames
1052
1053# Material Exchange Format
1054# More information:
1055# https://en.wikipedia.org/wiki/Material_Exchange_Format
1056# http://www.freemxf.org/
10570	string	\x06\x0e\x2b\x34\x02\x05\x01\x01\x0d\x01\x02\x01\x01\x02	Material exchange container format
1058!:ext	mxf
1059!:mime	application/mxf
1060
1061# Recognize LucasArts Smush video files (cf.
1062# https://wiki.multimedia.cx/index.php/Smush)
10630	string	ANIM
1064>8	string	AHDR	LucasArts Smush Animation Format (SAN) video
10650	string	SANM
1066>8	string	SHDR	LucasArts Smush v2 (SANM) video
1067