xref: /dragonfly/contrib/file/magic/Magdir/animation (revision 8af44722)
1
2#------------------------------------------------------------------------------
3# $File: animation,v 1.74 2019/10/29 01:06:20 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# https://www.ftyps.com/ with local additions
364	string		ftyp		ISO Media
37# https://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# https://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
448# But also beat GEMDOS fonts
4490       beshort&0xFFFE  0xFFFA
450# rates
451>2	byte&0xF0	!0
452>>2	byte&0xF0	!0xF0		MPEG ADTS, layer III, v1
453!:strength +20
454!:mime	audio/mpeg
455>2	byte&0xF0	0x10		\b, 32 kbps
456>2	byte&0xF0	0x20		\b, 40 kbps
457>2	byte&0xF0	0x30		\b, 48 kbps
458>2	byte&0xF0	0x40		\b, 56 kbps
459>2	byte&0xF0	0x50		\b, 64 kbps
460>2	byte&0xF0	0x60		\b, 80 kbps
461>2	byte&0xF0	0x70		\b, 96 kbps
462>2	byte&0xF0	0x80		\b, 112 kbps
463>2	byte&0xF0	0x90		\b, 128 kbps
464>2	byte&0xF0	0xA0		\b, 160 kbps
465>2	byte&0xF0	0xB0		\b, 192 kbps
466>2	byte&0xF0	0xC0		\b, 224 kbps
467>2	byte&0xF0	0xD0		\b, 256 kbps
468>2	byte&0xF0	0xE0		\b, 320 kbps
469# timing
470>2	byte&0x0C	0x00		\b, 44.1 kHz
471>2	byte&0x0C	0x04		\b, 48 kHz
472>2	byte&0x0C	0x08		\b, 32 kHz
473# channels/options
474>3	byte&0xC0	0x00		\b, Stereo
475>3	byte&0xC0	0x40		\b, JntStereo
476>3	byte&0xC0	0x80		\b, 2x Monaural
477>3	byte&0xC0	0xC0		\b, Monaural
478#>1	byte		^0x01		\b, Data Verify
479#>2	byte		&0x02		\b, Packet Pad
480#>2	byte		&0x01		\b, Custom Flag
481#>3	byte		&0x08		\b, Copyrighted
482#>3	byte		&0x04		\b, Original Source
483#>3	byte&0x03	1		\b, NR: 50/15 ms
484#>3	byte&0x03	3		\b, NR: CCIT J.17
485
486# MP2, M1A
4870       beshort&0xFFFE  0xFFFC         MPEG ADTS, layer II, v1
488!:mime	audio/mpeg
489# rates
490>2      byte&0xF0       0x10           \b,  32 kbps
491>2      byte&0xF0       0x20           \b,  48 kbps
492>2      byte&0xF0       0x30           \b,  56 kbps
493>2      byte&0xF0       0x40           \b,  64 kbps
494>2      byte&0xF0       0x50           \b,  80 kbps
495>2      byte&0xF0       0x60           \b,  96 kbps
496>2      byte&0xF0       0x70           \b, 112 kbps
497>2      byte&0xF0       0x80           \b, 128 kbps
498>2      byte&0xF0       0x90           \b, 160 kbps
499>2      byte&0xF0       0xA0           \b, 192 kbps
500>2      byte&0xF0       0xB0           \b, 224 kbps
501>2      byte&0xF0       0xC0           \b, 256 kbps
502>2      byte&0xF0       0xD0           \b, 320 kbps
503>2      byte&0xF0       0xE0           \b, 384 kbps
504# timing
505>2      byte&0x0C       0x00           \b, 44.1 kHz
506>2      byte&0x0C       0x04           \b, 48 kHz
507>2      byte&0x0C       0x08           \b, 32 kHz
508# channels/options
509>3      byte&0xC0       0x00           \b, Stereo
510>3      byte&0xC0       0x40           \b, JntStereo
511>3      byte&0xC0       0x80           \b, 2x Monaural
512>3      byte&0xC0       0xC0           \b, Monaural
513#>1     byte            ^0x01          \b, Data Verify
514#>2     byte            &0x02          \b, Packet Pad
515#>2     byte            &0x01          \b, Custom Flag
516#>3     byte            &0x08          \b, Copyrighted
517#>3     byte            &0x04          \b, Original Source
518#>3     byte&0x03       1              \b, NR: 50/15 ms
519#>3     byte&0x03       3              \b, NR: CCIT J.17
520
521# MPA, M1A
522# updated by Joerg Jenderek
523# GRR the original test are too common for many DOS files, so test 32 <= kbits <= 448
524# GRR this test is still too general as it catches a BOM of UTF-16 files (0xFFFE)
525# FIXME: Almost all little endian UTF-16 text with BOM are clobbered by these entries
526#0	beshort&0xFFFE		0xFFFE
527#>2	ubyte&0xF0	>0x0F
528#>>2	ubyte&0xF0	<0xE1		MPEG ADTS, layer I, v1
529## rate
530#>>>2      byte&0xF0       0x10           \b,  32 kbps
531#>>>2      byte&0xF0       0x20           \b,  64 kbps
532#>>>2      byte&0xF0       0x30           \b,  96 kbps
533#>>>2      byte&0xF0       0x40           \b, 128 kbps
534#>>>2      byte&0xF0       0x50           \b, 160 kbps
535#>>>2      byte&0xF0       0x60           \b, 192 kbps
536#>>>2      byte&0xF0       0x70           \b, 224 kbps
537#>>>2      byte&0xF0       0x80           \b, 256 kbps
538#>>>2      byte&0xF0       0x90           \b, 288 kbps
539#>>>2      byte&0xF0       0xA0           \b, 320 kbps
540#>>>2      byte&0xF0       0xB0           \b, 352 kbps
541#>>>2      byte&0xF0       0xC0           \b, 384 kbps
542#>>>2      byte&0xF0       0xD0           \b, 416 kbps
543#>>>2      byte&0xF0       0xE0           \b, 448 kbps
544## timing
545#>>>2      byte&0x0C       0x00           \b, 44.1 kHz
546#>>>2      byte&0x0C       0x04           \b, 48 kHz
547#>>>2      byte&0x0C       0x08           \b, 32 kHz
548## channels/options
549#>>>3      byte&0xC0       0x00           \b, Stereo
550#>>>3      byte&0xC0       0x40           \b, JntStereo
551#>>>3      byte&0xC0       0x80           \b, 2x Monaural
552#>>>3      byte&0xC0       0xC0           \b, Monaural
553##>1     byte            ^0x01          \b, Data Verify
554##>2     byte            &0x02          \b, Packet Pad
555##>2     byte            &0x01          \b, Custom Flag
556##>3     byte            &0x08          \b, Copyrighted
557##>3     byte            &0x04          \b, Original Source
558##>3     byte&0x03       1              \b, NR: 50/15 ms
559##>3     byte&0x03       3              \b, NR: CCIT J.17
560
561# MP3, M2A
5620       beshort&0xFFFE  0xFFF2         MPEG ADTS, layer III, v2
563!:mime	audio/mpeg
564# rate
565>2      byte&0xF0       0x10           \b,   8 kbps
566>2      byte&0xF0       0x20           \b,  16 kbps
567>2      byte&0xF0       0x30           \b,  24 kbps
568>2      byte&0xF0       0x40           \b,  32 kbps
569>2      byte&0xF0       0x50           \b,  40 kbps
570>2      byte&0xF0       0x60           \b,  48 kbps
571>2      byte&0xF0       0x70           \b,  56 kbps
572>2      byte&0xF0       0x80           \b,  64 kbps
573>2      byte&0xF0       0x90           \b,  80 kbps
574>2      byte&0xF0       0xA0           \b,  96 kbps
575>2      byte&0xF0       0xB0           \b, 112 kbps
576>2      byte&0xF0       0xC0           \b, 128 kbps
577>2      byte&0xF0       0xD0           \b, 144 kbps
578>2      byte&0xF0       0xE0           \b, 160 kbps
579# timing
580>2      byte&0x0C       0x00           \b, 22.05 kHz
581>2      byte&0x0C       0x04           \b, 24 kHz
582>2      byte&0x0C       0x08           \b, 16 kHz
583# channels/options
584>3      byte&0xC0       0x00           \b, Stereo
585>3      byte&0xC0       0x40           \b, JntStereo
586>3      byte&0xC0       0x80           \b, 2x Monaural
587>3      byte&0xC0       0xC0           \b, Monaural
588#>1     byte            ^0x01          \b, Data Verify
589#>2     byte            &0x02          \b, Packet Pad
590#>2     byte            &0x01          \b, Custom Flag
591#>3     byte            &0x08          \b, Copyrighted
592#>3     byte            &0x04          \b, Original Source
593#>3     byte&0x03       1              \b, NR: 50/15 ms
594#>3     byte&0x03       3              \b, NR: CCIT J.17
595
596# MP2, M2A
5970       beshort&0xFFFE  0xFFF4         MPEG ADTS, layer II, v2
598!:mime	audio/mpeg
599# rate
600>2      byte&0xF0       0x10           \b,   8 kbps
601>2      byte&0xF0       0x20           \b,  16 kbps
602>2      byte&0xF0       0x30           \b,  24 kbps
603>2      byte&0xF0       0x40           \b,  32 kbps
604>2      byte&0xF0       0x50           \b,  40 kbps
605>2      byte&0xF0       0x60           \b,  48 kbps
606>2      byte&0xF0       0x70           \b,  56 kbps
607>2      byte&0xF0       0x80           \b,  64 kbps
608>2      byte&0xF0       0x90           \b,  80 kbps
609>2      byte&0xF0       0xA0           \b,  96 kbps
610>2      byte&0xF0       0xB0           \b, 112 kbps
611>2      byte&0xF0       0xC0           \b, 128 kbps
612>2      byte&0xF0       0xD0           \b, 144 kbps
613>2      byte&0xF0       0xE0           \b, 160 kbps
614# timing
615>2      byte&0x0C       0x00           \b, 22.05 kHz
616>2      byte&0x0C       0x04           \b, 24 kHz
617>2      byte&0x0C       0x08           \b, 16 kHz
618# channels/options
619>3      byte&0xC0       0x00           \b, Stereo
620>3      byte&0xC0       0x40           \b, JntStereo
621>3      byte&0xC0       0x80           \b, 2x Monaural
622>3      byte&0xC0       0xC0           \b, Monaural
623#>1     byte            ^0x01          \b, Data Verify
624#>2     byte            &0x02          \b, Packet Pad
625#>2     byte            &0x01          \b, Custom Flag
626#>3     byte            &0x08          \b, Copyrighted
627#>3     byte            &0x04          \b, Original Source
628#>3     byte&0x03       1              \b, NR: 50/15 ms
629#>3     byte&0x03       3              \b, NR: CCIT J.17
630
631# MPA, M2A
6320       beshort&0xFFFE  0xFFF6         MPEG ADTS, layer I, v2
633!:mime	audio/mpeg
634# rate
635>2      byte&0xF0       0x10           \b,  32 kbps
636>2      byte&0xF0       0x20           \b,  48 kbps
637>2      byte&0xF0       0x30           \b,  56 kbps
638>2      byte&0xF0       0x40           \b,  64 kbps
639>2      byte&0xF0       0x50           \b,  80 kbps
640>2      byte&0xF0       0x60           \b,  96 kbps
641>2      byte&0xF0       0x70           \b, 112 kbps
642>2      byte&0xF0       0x80           \b, 128 kbps
643>2      byte&0xF0       0x90           \b, 144 kbps
644>2      byte&0xF0       0xA0           \b, 160 kbps
645>2      byte&0xF0       0xB0           \b, 176 kbps
646>2      byte&0xF0       0xC0           \b, 192 kbps
647>2      byte&0xF0       0xD0           \b, 224 kbps
648>2      byte&0xF0       0xE0           \b, 256 kbps
649# timing
650>2      byte&0x0C       0x00           \b, 22.05 kHz
651>2      byte&0x0C       0x04           \b, 24 kHz
652>2      byte&0x0C       0x08           \b, 16 kHz
653# channels/options
654>3      byte&0xC0       0x00           \b, Stereo
655>3      byte&0xC0       0x40           \b, JntStereo
656>3      byte&0xC0       0x80           \b, 2x Monaural
657>3      byte&0xC0       0xC0           \b, Monaural
658#>1     byte            ^0x01          \b, Data Verify
659#>2     byte            &0x02          \b, Packet Pad
660#>2     byte            &0x01          \b, Custom Flag
661#>3     byte            &0x08          \b, Copyrighted
662#>3     byte            &0x04          \b, Original Source
663#>3     byte&0x03       1              \b, NR: 50/15 ms
664#>3     byte&0x03       3              \b, NR: CCIT J.17
665
666# MP3, M25A
6670       beshort&0xFFFE  0xFFE2         MPEG ADTS, layer III,  v2.5
668!:mime	audio/mpeg
669# rate
670>2      byte&0xF0       0x10           \b,   8 kbps
671>2      byte&0xF0       0x20           \b,  16 kbps
672>2      byte&0xF0       0x30           \b,  24 kbps
673>2      byte&0xF0       0x40           \b,  32 kbps
674>2      byte&0xF0       0x50           \b,  40 kbps
675>2      byte&0xF0       0x60           \b,  48 kbps
676>2      byte&0xF0       0x70           \b,  56 kbps
677>2      byte&0xF0       0x80           \b,  64 kbps
678>2      byte&0xF0       0x90           \b,  80 kbps
679>2      byte&0xF0       0xA0           \b,  96 kbps
680>2      byte&0xF0       0xB0           \b, 112 kbps
681>2      byte&0xF0       0xC0           \b, 128 kbps
682>2      byte&0xF0       0xD0           \b, 144 kbps
683>2      byte&0xF0       0xE0           \b, 160 kbps
684# timing
685>2      byte&0x0C       0x00           \b, 11.025 kHz
686>2      byte&0x0C       0x04           \b, 12 kHz
687>2      byte&0x0C       0x08           \b, 8 kHz
688# channels/options
689>3      byte&0xC0       0x00           \b, Stereo
690>3      byte&0xC0       0x40           \b, JntStereo
691>3      byte&0xC0       0x80           \b, 2x Monaural
692>3      byte&0xC0       0xC0           \b, Monaural
693#>1     byte            ^0x01          \b, Data Verify
694#>2     byte            &0x02          \b, Packet Pad
695#>2     byte            &0x01          \b, Custom Flag
696#>3     byte            &0x08          \b, Copyrighted
697#>3     byte            &0x04          \b, Original Source
698#>3     byte&0x03       1              \b, NR: 50/15 ms
699#>3     byte&0x03       3              \b, NR: CCIT J.17
700
701# AAC (aka MPEG-2 NBC audio) and MPEG-4 audio
702
703# Stored AAC streams (instead of the MP4 format)
7040       string          ADIF           MPEG ADIF, AAC
705!:mime	audio/x-hx-aac-adif
706>4      byte            &0x80
707>>13    byte            &0x10          \b, VBR
708>>13    byte            ^0x10          \b, CBR
709>>16    byte&0x1E       0x02           \b, single stream
710>>16    byte&0x1E       0x04           \b, 2 streams
711>>16    byte&0x1E       0x06           \b, 3 streams
712>>16    byte            &0x08          \b, 4 or more streams
713>>16    byte            &0x10          \b, 8 or more streams
714>>4    byte            &0x80          \b, Copyrighted
715>>13   byte            &0x40          \b, Original Source
716>>13   byte            &0x20          \b, Home Flag
717>4      byte            ^0x80
718>>4     byte            &0x10          \b, VBR
719>>4     byte            ^0x10          \b, CBR
720>>7     byte&0x1E       0x02           \b, single stream
721>>7     byte&0x1E       0x04           \b, 2 streams
722>>7     byte&0x1E       0x06           \b, 3 streams
723>>7     byte            &0x08          \b, 4 or more streams
724>>7     byte            &0x10          \b, 8 or more streams
725>>4    byte            &0x40          \b, Original Stream(s)
726>>4    byte            &0x20          \b, Home Source
727
728# Live or stored single AAC stream (used with MPEG-2 systems)
7290       beshort&0xFFF6  0xFFF0         MPEG ADTS, AAC
730!:mime	audio/x-hx-aac-adts
731>1      byte            &0x08          \b, v2
732>1      byte            ^0x08          \b, v4
733# profile
734>>2     byte            &0xC0          \b LTP
735>2      byte&0xc0       0x00           \b Main
736>2      byte&0xc0       0x40           \b LC
737>2      byte&0xc0       0x80           \b SSR
738# timing
739>2      byte&0x3c       0x00           \b, 96 kHz
740>2      byte&0x3c       0x04           \b, 88.2 kHz
741>2      byte&0x3c       0x08           \b, 64 kHz
742>2      byte&0x3c       0x0c           \b, 48 kHz
743>2      byte&0x3c       0x10           \b, 44.1 kHz
744>2      byte&0x3c       0x14           \b, 32 kHz
745>2      byte&0x3c       0x18           \b, 24 kHz
746>2      byte&0x3c       0x1c           \b, 22.05 kHz
747>2      byte&0x3c       0x20           \b, 16 kHz
748>2      byte&0x3c       0x24           \b, 12 kHz
749>2      byte&0x3c       0x28           \b, 11.025 kHz
750>2      byte&0x3c       0x2c           \b, 8 kHz
751# channels
752>2      beshort&0x01c0  0x0040         \b, monaural
753>2      beshort&0x01c0  0x0080         \b, stereo
754>2      beshort&0x01c0  0x00c0         \b, stereo + center
755>2      beshort&0x01c0  0x0100         \b, stereo+center+LFE
756>2      beshort&0x01c0  0x0140         \b, surround
757>2      beshort&0x01c0  0x0180         \b, surround + LFE
758>2      beshort         &0x01C0        \b, surround + side
759#>1     byte            ^0x01           \b, Data Verify
760#>2     byte            &0x02           \b, Custom Flag
761#>3     byte            &0x20           \b, Original Stream
762#>3     byte            &0x10           \b, Home Source
763#>3     byte            &0x08           \b, Copyrighted
764
765# Live MPEG-4 audio streams (instead of RTP FlexMux)
7660       beshort&0xFFE0  0x56E0         MPEG-4 LOAS
767!:mime	audio/x-mp4a-latm
768#>1     beshort&0x1FFF  x              \b, %hu byte packet
769>3      byte&0xE0       0x40
770>>4     byte&0x3C       0x04           \b, single stream
771>>4     byte&0x3C       0x08           \b, 2 streams
772>>4     byte&0x3C       0x0C           \b, 3 streams
773>>4     byte            &0x08          \b, 4 or more streams
774>>4     byte            &0x20          \b, 8 or more streams
775>3      byte&0xC0       0
776>>4     byte&0x78       0x08           \b, single stream
777>>4     byte&0x78       0x10           \b, 2 streams
778>>4     byte&0x78       0x18           \b, 3 streams
779>>4     byte            &0x20          \b, 4 or more streams
780>>4     byte            &0x40          \b, 8 or more streams
781# This magic isn't strong enough (matches plausible ISO-8859-1 text)
782#0       beshort         0x4DE1         MPEG-4 LO-EP audio stream
783#!:mime	audio/x-mp4a-latm
784
785# Summary: FLI animation format
786# Created by: Daniel Quinlan <quinlan@yggdrasil.com>
787# Modified by (1): Abel Cheung <abelcheung@gmail.com> (avoid over-generic detection)
7884	leshort		0xAF11
789# standard FLI always has 320x200 resolution and 8 bit color
790>8	leshort		320
791>>10	leshort		200
792>>>12	leshort		8			FLI animation, 320x200x8
793!:mime	video/x-fli
794>>>>6	leshort		x			\b, %d frames
795# frame speed is multiple of 1/70s
796>>>>16	leshort		x			\b, %d/70s per frame
797
798# Summary: FLC animation format
799# Created by: Daniel Quinlan <quinlan@yggdrasil.com>
800# Modified by (1): Abel Cheung <abelcheung@gmail.com> (avoid over-generic detection)
8014	leshort		0xAF12
802# standard FLC always use 8 bit color
803>12	leshort		8			FLC animation
804!:mime	video/x-flc
805>>8	leshort		x			\b, %d
806>>10	leshort		x			\bx%dx8
807>>6	uleshort	x			\b, %d frames
808>>16	uleshort	x			\b, %dms per frame
809
810# DL animation format
811# XXX - collision with most `mips' magic
812#
813# I couldn't find a real magic number for these, however, this
814# -appears- to work.  Note that it might catch other files, too, so be
815# careful!
816#
817# Note that title and author appear in the two 20-byte chunks
818# at decimal offsets 2 and 22, respectively, but they are XOR'ed with
819# 255 (hex FF)!  The DL format is really bad.
820#
821#0	byte	1	DL version 1, medium format (160x100, 4 images/screen)
822#!:mime	video/x-unknown
823#>42	byte	x	- %d screens,
824#>43	byte	x	%d commands
825#0	byte	2	DL version 2
826#!:mime	video/x-unknown
827#>1	byte	1	- large format (320x200,1 image/screen),
828#>1	byte	2	- medium format (160x100,4 images/screen),
829#>1	byte	>2	- unknown format,
830#>42	byte	x	%d screens,
831#>43	byte	x	%d commands
832# Based on empirical evidence, DL version 3 have several nulls following the
833# \003.  Most of them start with non-null values at hex offset 0x34 or so.
834#0	string	\3\0\0\0\0\0\0\0\0\0\0\0	DL version 3
835
836# iso 13818 transport stream
837#
838# from Oskar Schirmer <schirmer@scara.com> Feb 3, 2001 (ISO 13818.1)
839# syncbyte      8 bit	0x47
840# error_ind     1 bit	-
841# payload_start 1 bit	1
842# priority      1 bit	-
843# PID          13 bit	0x0000
844# scrambling    2 bit	-
845# adaptfld_ctrl 2 bit	1 or 3
846# conti_count   4 bit	-
8470	belong&0xFF5FFF10	0x47400010
848>188	byte			0x47		MPEG transport stream data
849!:mime  video/MP2T
850
851# DIF digital video file format <mpruett@sgi.com>
8520	belong&0xffffff00	0x1f070000      DIF
853>4	byte			&0x01		(DVCPRO) movie file
854>4	byte			^0x01		(DV) movie file
855>3	byte			&0x80		(PAL)
856>3	byte			^0x80		(NTSC)
857
858# Microsoft Advanced Streaming Format (ASF) <mpruett@sgi.com>
8590	belong			0x3026b275	Microsoft ASF
860!:mime  video/x-ms-asf
861
862# MNG Video Format, <URL:http://www.libpng.org/pub/mng/spec/>
8630	string			\x8aMNG		MNG video data,
864!:mime	video/x-mng
865>4	belong			!0x0d0a1a0a	CORRUPTED,
866>4	belong			0x0d0a1a0a
867>>16    belong	x				%d x
868>>20    belong	x				%d
869
870# JNG Video Format, <URL:http://www.libpng.org/pub/mng/spec/>
8710	string			\x8bJNG		JNG video data,
872!:mime	video/x-jng
873>4	belong			!0x0d0a1a0a	CORRUPTED,
874>4	belong			0x0d0a1a0a
875>>16    belong	x				%d x
876>>20    belong	x				%d
877
878# Vivo video (Wolfram Kleff)
8793	string		\x0D\x0AVersion:Vivo	Vivo video data
880
881# ABC (alembic.io 3d models)
8820	string	0gawa		ABC 3d model
883
884# VRML (Virtual Reality Modelling Language)
8850       string/w        #VRML\ V1.0\ ascii	VRML 1 file
886!:mime	model/vrml
8870	string/w	#VRML\ V2.0\ utf8	ISO/IEC 14772 VRML 97 file
888!:mime	model/vrml
889
890# X3D (Extensible 3D) [https://www.web3d.org/specifications/x3d-3.0.dtd]
891# From Michel Briand <michelbriand@free.fr>
892# mimetype from https://www.iana.org/assignments/media-types/model/x3d+xml
893# Example https://www.web3d.org/x3d/content/examples/Basic/course/CreateX3DFromStringRandomSpheres.x3d
8940	string/w	\<?xml\ version=
895!:strength + 5
896>20	search/1000/w	\<!DOCTYPE\ X3D		X3D (Extensible 3D) model xml text
897!:mime model/x3d+xml
898
899#---------------------------------------------------------------------------
900# HVQM4: compressed movie format designed by Hudson for Nintendo GameCube
901# From Mark Sheppard <msheppard@climax.co.uk>, 2002-10-03
902#
9030	string		HVQM4		%s
904>6	string		>\0		v%s
905>0	byte		x		GameCube movie,
906>0x34	ubeshort	x		%d x
907>0x36	ubeshort	x		%d,
908>0x26	ubeshort	x		%dus,
909>0x42	ubeshort	0		no audio
910>0x42	ubeshort	>0		%dHz audio
911
912# From: "Stefan A. Haubenthal" <polluks@web.de>
9130	string		DVDVIDEO-VTS	Video title set,
914>0x21	byte		x		v%x
9150	string		DVDVIDEO-VMG	Video manager,
916>0x21	byte		x		v%x
917
918# From: Behan Webster <behanw@websterwood.com>
919# NuppelVideo used by Mythtv (*.nuv)
920# Note: there are two identical stanzas here differing only in the
921# initial string matched. It used to be done with a regex, but we're
922# trying to get rid of those.
9230	string		NuppelVideo	MythTV NuppelVideo
924>12	string		x		v%s
925>20	lelong		x		(%d
926>24	lelong		x		\bx%d),
927>36	string		P		\bprogressive,
928>36	string		I		\binterlaced,
929>40	ledouble	x		\baspect:%.2f,
930>48	ledouble	x		\bfps:%.2f
9310	string		MythTV		MythTV NuppelVideo
932>12	string		x		v%s
933>20	lelong		x		(%d
934>24	lelong		x		\bx%d),
935>36	string		P		\bprogressive,
936>36	string		I		\binterlaced,
937>40	ledouble	x		\baspect:%.2f,
938>48	ledouble	x		\bfps:%.2f
939
940#						MPEG file
941# MPEG sequences
942# FIXME: This section is from the old magic.mime file and needs
943# integrating with the rest
944#0       belong             0x000001BA
945#>4      byte               &0x40
946#!:mime	video/mp2p
947#>4      byte               ^0x40
948#!:mime	video/mpeg
949#0       belong             0x000001BB
950#!:mime	video/mpeg
951#0       belong             0x000001B0
952#!:mime	video/mp4v-es
953#0       belong             0x000001B5
954#!:mime	video/mp4v-es
955#0       belong             0x000001B3
956#!:mime	video/mpv
957#0       belong&0xFF5FFF10  0x47400010
958#!:mime	video/mp2t
959#0       belong             0x00000001
960#>4      byte&0x1F	   0x07
961#!:mime	video/h264
962
963# Type: Bink Video
964# Extension: .bik
965# URL:  https://wiki.multimedia.cx/index.php?title=Bink_Container
966# From: <hoehle@users.sourceforge.net>  2008-07-18
9670	name		bik
968#>4	ulelong		x	size %d
969>20	ulelong		x	\b, %d
970>24	ulelong		x	\bx%d
971>8	ulelong		x	\b, %d frames
972>32	ulelong		x	at rate %d/
973>28	ulelong		>1	\b%d
974>40	ulelong		=0	\b, no audio
975>40	ulelong		!0	\b, %d audio track
976>>40	ulelong		!1	\bs
977# follow properties of the first audio track only
978>>48	uleshort	x	%dHz
979>>51	byte&0x20	0	mono
980>>51	byte&0x20	!0	stereo
981#>>51	byte&0x10	0	FFT
982#>>51	byte&0x10	!0	DCT
983
9840	string		BIK
985>3	regex		=[bdfghi]	Bink Video rev.%s
986>>0	use		bik
987
9880	string		KB2
989>3	regex		=[adfghi]	Bink Video 2 rev.%s
990>>0	use		bik
991
992# Type:	NUT Container
993# URL:	https://wiki.multimedia.cx/index.php?title=NUT
994# From:	Adam Buchbinder <adam.buchbinder@gmail.com>
9950	string	nut/multimedia\ container\0	NUT multimedia container
996
997# Type: Nullsoft Video (NSV)
998# URL:  https://wiki.multimedia.cx/index.php?title=Nullsoft_Video
999# From: Mike Melanson <mike@multimedia.cx>
10000	string	NSVf	Nullsoft Video
1001
1002# Type: REDCode Video
1003# URL:  https://www.red.com/ ; https://wiki.multimedia.cx/index.php?title=REDCode
1004# From: Mike Melanson <mike@multimedia.cx>
10054	string	RED1	REDCode Video
1006
1007# Type: MTV Multimedia File
1008# URL:  https://wiki.multimedia.cx/index.php?title=MTV
1009# From: Mike Melanson <mike@multimedia.cx>
10100	string	AMVS	MTV Multimedia File
1011
1012# Type: ARMovie
1013# URL:  https://wiki.multimedia.cx/index.php?title=ARMovie
1014# From: Mike Melanson <mike@multimedia.cx>
10150	string	ARMovie\012	ARMovie
1016
1017# Type: Interplay MVE Movie
1018# URL:  https://wiki.multimedia.cx/index.php?title=Interplay_MVE
1019# From: Mike Melanson <mike@multimedia.cx>
10200	string	Interplay\040MVE\040File\032	Interplay MVE Movie
1021
1022# Type: Windows Television DVR File
1023# URL:  https://wiki.multimedia.cx/index.php?title=WTV
1024# From: Mike Melanson <mike@mutlimedia.cx>
1025# This takes the form of a Windows-style GUID
10260	bequad	0xB7D800203749DA11
1027>8	bequad	0xA64E0007E95EAD8D	Windows Television DVR Media
1028
1029# Type: Sega FILM/CPK Multimedia
1030# URL:  https://wiki.multimedia.cx/index.php?title=Sega_FILM
1031# From: Mike Melanson <mike@multimedia.cx>
10320	string	FILM	Sega FILM/CPK Multimedia,
1033>32	belong	x	%d x
1034>28	belong	x	%d
1035
1036# Type: Nintendo THP Multimedia
1037# URL:  https://wiki.multimedia.cx/index.php?title=THP
1038# From: Mike Melanson <mike@multimedia.cx>
10390	string	THP\0	Nintendo THP Multimedia
1040
1041# Type: BBC Dirac Video
1042# URL:  https://wiki.multimedia.cx/index.php?title=Dirac
1043# From: Mike Melanson <mike@multimedia.cx>
10440	string	BBCD	BBC Dirac Video
1045
1046# Type: RAD Game Tools Smacker Multimedia
1047# URL:  https://wiki.multimedia.cx/index.php?title=Smacker
1048# From: Mike Melanson <mike@multimedia.cx>
10490	string	SMK	RAD Game Tools Smacker Multimedia
1050>3	byte	x	version %c,
1051>4	lelong	x	%d x
1052>8	lelong	x	%d,
1053>12	lelong	x	%d frames
1054
1055# Material Exchange Format
1056# More information:
1057# https://en.wikipedia.org/wiki/Material_Exchange_Format
1058# http://www.freemxf.org/
10590	string	\x06\x0e\x2b\x34\x02\x05\x01\x01\x0d\x01\x02\x01\x01\x02	Material exchange container format
1060!:ext	mxf
1061!:mime	application/mxf
1062
1063# Recognize LucasArts Smush video files (cf.
1064# https://wiki.multimedia.cx/index.php/Smush)
10650	string	ANIM
1066>8	string	AHDR	LucasArts Smush Animation Format (SAN) video
10670	string	SANM
1068>8	string	SHDR	LucasArts Smush v2 (SANM) video
1069
1070# Type: Scaleform video
1071# Extension: .usm
1072# URL:  https://wiki.multimedia.cx/index.php/USM
1073# From: David Korth <gerbilsoft@gerbilsoft.com>
10740	string	CRID
1075>32	string	@UTF	Scaleform video
1076