head	1.1;
branch	1.1.1;
access;
symbols
	netbsd-11-0-RC4:1.1.1.20
	netbsd-11-0-RC3:1.1.1.20
	netbsd-11-0-RC2:1.1.1.20
	netbsd-11-0-RC1:1.1.1.20
	perseant-exfatfs-base-20250801:1.1.1.20
	netbsd-11:1.1.1.20.0.4
	netbsd-11-base:1.1.1.20
	netbsd-10-1-RELEASE:1.1.1.19
	perseant-exfatfs-base-20240630:1.1.1.20
	perseant-exfatfs:1.1.1.20.0.2
	perseant-exfatfs-base:1.1.1.20
	netbsd-8-3-RELEASE:1.1.1.11
	netbsd-9-4-RELEASE:1.1.1.15
	netbsd-10-0-RELEASE:1.1.1.19
	netbsd-10-0-RC6:1.1.1.19
	netbsd-10-0-RC5:1.1.1.19
	netbsd-10-0-RC4:1.1.1.19
	netbsd-10-0-RC3:1.1.1.19
	netbsd-10-0-RC2:1.1.1.19
	netbsd-10-0-RC1:1.1.1.19
	FILE5_45:1.1.1.20
	netbsd-10:1.1.1.19.0.2
	netbsd-10-base:1.1.1.19
	FILE5_43:1.1.1.19
	netbsd-9-3-RELEASE:1.1.1.15
	cjep_sun2x-base1:1.1.1.18
	cjep_sun2x:1.1.1.18.0.4
	cjep_sun2x-base:1.1.1.18
	cjep_staticlib_x-base1:1.1.1.18
	netbsd-9-2-RELEASE:1.1.1.15
	cjep_staticlib_x:1.1.1.18.0.2
	cjep_staticlib_x-base:1.1.1.18
	FILE5_40:1.1.1.18
	netbsd-9-1-RELEASE:1.1.1.15
	FILE5_39:1.1.1.17
	phil-wifi-20200421:1.1.1.16
	phil-wifi-20200411:1.1.1.16
	is-mlppp:1.1.1.16.0.2
	is-mlppp-base:1.1.1.16
	phil-wifi-20200406:1.1.1.16
	netbsd-8-2-RELEASE:1.1.1.11
	netbsd-9-0-RELEASE:1.1.1.15
	netbsd-9-0-RC2:1.1.1.15
	FILE5_38:1.1.1.16
	netbsd-9-0-RC1:1.1.1.15
	phil-wifi-20191119:1.1.1.15
	netbsd-9:1.1.1.15.0.2
	netbsd-9-base:1.1.1.15
	phil-wifi-20190609:1.1.1.15
	netbsd-8-1-RELEASE:1.1.1.11
	FILE5_37:1.1.1.15
	netbsd-8-1-RC1:1.1.1.11
	pgoyette-compat-merge-20190127:1.1.1.12.2.2
	pgoyette-compat-20190127:1.1.1.14
	pgoyette-compat-20190118:1.1.1.14
	pgoyette-compat-1226:1.1.1.14
	pgoyette-compat-1126:1.1.1.14
	pgoyette-compat-1020:1.1.1.14
	FILE5_35:1.1.1.14
	pgoyette-compat-0930:1.1.1.13
	pgoyette-compat-0906:1.1.1.13
	netbsd-7-2-RELEASE:1.1.1.7
	pgoyette-compat-0728:1.1.1.13
	netbsd-8-0-RELEASE:1.1.1.11
	phil-wifi:1.1.1.13.0.2
	phil-wifi-base:1.1.1.13
	pgoyette-compat-0625:1.1.1.13
	netbsd-8-0-RC2:1.1.1.11
	pgoyette-compat-0521:1.1.1.13
	pgoyette-compat-0502:1.1.1.13
	pgoyette-compat-0422:1.1.1.13
	netbsd-8-0-RC1:1.1.1.11
	FILE5_33:1.1.1.13
	pgoyette-compat-0415:1.1.1.12
	pgoyette-compat-0407:1.1.1.12
	pgoyette-compat-0330:1.1.1.12
	pgoyette-compat-0322:1.1.1.12
	pgoyette-compat-0315:1.1.1.12
	netbsd-7-1-2-RELEASE:1.1.1.7
	pgoyette-compat:1.1.1.12.0.2
	pgoyette-compat-base:1.1.1.12
	netbsd-7-1-1-RELEASE:1.1.1.7
	matt-nb8-mediatek:1.1.1.11.0.6
	matt-nb8-mediatek-base:1.1.1.11
	FILE5_32:1.1.1.12
	perseant-stdc-iso10646:1.1.1.11.0.4
	perseant-stdc-iso10646-base:1.1.1.11
	netbsd-8:1.1.1.11.0.2
	netbsd-8-base:1.1.1.11
	FILE5_31:1.1.1.11
	prg-localcount2-base3:1.1.1.10
	prg-localcount2-base2:1.1.1.10
	prg-localcount2-base1:1.1.1.10
	prg-localcount2:1.1.1.10.0.2
	prg-localcount2-base:1.1.1.10
	pgoyette-localcount-20170426:1.1.1.10
	bouyer-socketcan-base1:1.1.1.10
	pgoyette-localcount-20170320:1.1.1.10
	netbsd-7-1:1.1.1.7.0.8
	netbsd-7-1-RELEASE:1.1.1.7
	netbsd-7-1-RC2:1.1.1.7
	FILE5_30:1.1.1.10
	netbsd-7-nhusb-base-20170116:1.1.1.7
	bouyer-socketcan:1.1.1.9.0.4
	bouyer-socketcan-base:1.1.1.9
	pgoyette-localcount-20170107:1.1.1.9
	netbsd-7-1-RC1:1.1.1.7
	pgoyette-localcount-20161104:1.1.1.9
	netbsd-7-0-2-RELEASE:1.1.1.7
	localcount-20160914:1.1.1.9
	netbsd-7-nhusb:1.1.1.7.0.6
	netbsd-7-nhusb-base:1.1.1.7
	pgoyette-localcount-20160806:1.1.1.9
	pgoyette-localcount-20160726:1.1.1.9
	pgoyette-localcount:1.1.1.9.0.2
	pgoyette-localcount-base:1.1.1.9
	netbsd-7-0-1-RELEASE:1.1.1.7
	netbsd-7-0:1.1.1.7.0.4
	netbsd-7-0-RELEASE:1.1.1.7
	netbsd-7-0-RC3:1.1.1.7
	netbsd-7-0-RC2:1.1.1.7
	netbsd-7-0-RC1:1.1.1.7
	FILE5_22:1.1.1.9
	FILE5_20:1.1.1.8
	netbsd-6-0-6-RELEASE:1.1.1.3
	netbsd-6-1-5-RELEASE:1.1.1.3
	netbsd-7:1.1.1.7.0.2
	netbsd-7-base:1.1.1.7
	FILE5_19:1.1.1.7
	yamt-pagecache-base9:1.1.1.6
	yamt-pagecache-tag8:1.1.1.3.2.1
	netbsd-6-1-4-RELEASE:1.1.1.3
	netbsd-6-0-5-RELEASE:1.1.1.3
	tls-earlyentropy:1.1.1.6.0.2
	tls-earlyentropy-base:1.1.1.7
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.1.1.6
	riastradh-drm2-base3:1.1.1.6
	netbsd-6-1-3-RELEASE:1.1.1.3
	netbsd-6-0-4-RELEASE:1.1.1.3
	FILE5_16:1.1.1.6
	netbsd-6-1-2-RELEASE:1.1.1.3
	netbsd-6-0-3-RELEASE:1.1.1.3
	netbsd-6-1-1-RELEASE:1.1.1.3
	riastradh-drm2-base2:1.1.1.5
	riastradh-drm2-base1:1.1.1.5
	riastradh-drm2:1.1.1.5.0.6
	riastradh-drm2-base:1.1.1.5
	netbsd-6-1:1.1.1.3.0.12
	netbsd-6-0-2-RELEASE:1.1.1.3
	netbsd-6-1-RELEASE:1.1.1.3
	khorben-n900:1.1.1.5.0.4
	netbsd-6-1-RC4:1.1.1.3
	netbsd-6-1-RC3:1.1.1.3
	agc-symver:1.1.1.5.0.2
	agc-symver-base:1.1.1.5
	FILE5_14:1.1.1.5
	netbsd-6-1-RC2:1.1.1.3
	netbsd-6-1-RC1:1.1.1.3
	yamt-pagecache-base8:1.1.1.4
	FILE_5_12:1.1.1.4
	netbsd-6-0-1-RELEASE:1.1.1.3
	yamt-pagecache-base7:1.1.1.3
	matt-nb6-plus-nbase:1.1.1.3
	yamt-pagecache-base6:1.1.1.3
	netbsd-6-0:1.1.1.3.0.10
	netbsd-6-0-RELEASE:1.1.1.3
	netbsd-6-0-RC2:1.1.1.3
	tls-maxphys:1.1.1.3.0.8
	tls-maxphys-base:1.1.1.7
	matt-nb6-plus:1.1.1.3.0.6
	matt-nb6-plus-base:1.1.1.3
	netbsd-6-0-RC1:1.1.1.3
	yamt-pagecache-base5:1.1.1.3
	yamt-pagecache-base4:1.1.1.3
	FILE5_11:1.1.1.3
	netbsd-6:1.1.1.3.0.4
	netbsd-6-base:1.1.1.3
	yamt-pagecache-base3:1.1.1.3
	yamt-pagecache-base2:1.1.1.3
	yamt-pagecache:1.1.1.3.0.2
	yamt-pagecache-base:1.1.1.3
	FILE5_09:1.1.1.3
	cherry-xenmp:1.1.1.2.0.2
	cherry-xenmp-base:1.1.1.2
	FILE5_07:1.1.1.2
	bouyer-quota2-nbase:1.1.1.1
	bouyer-quota2:1.1.1.1.0.4
	bouyer-quota2-base:1.1.1.1
	matt-mips64-premerge-20101231:1.1.1.1
	matt-premerge-20091211:1.1.1.1
	jym-xensuspend-base:1.1.1.1
	jym-xensuspend:1.1.1.1.0.2
	jym-xensuspend-nbase:1.1.1.1
	FILE5_03:1.1.1.1
	CHRISTOS:1.1.1;
locks; strict;
comment	@# @;


1.1
date	2009.05.08.16.35.07;	author christos;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2009.05.08.16.35.07;	author christos;	state Exp;
branches
	1.1.1.1.2.1;
next	1.1.1.2;

1.1.1.2
date	2011.05.12.20.46.57;	author christos;	state Exp;
branches;
next	1.1.1.3;

1.1.1.3
date	2011.09.16.20.37.42;	author christos;	state Exp;
branches
	1.1.1.3.2.1
	1.1.1.3.8.1;
next	1.1.1.4;

1.1.1.4
date	2013.01.03.16.27.53;	author christos;	state Exp;
branches;
next	1.1.1.5;

1.1.1.5
date	2013.03.23.15.49.16;	author christos;	state Exp;
branches;
next	1.1.1.6;

1.1.1.6
date	2013.12.01.19.28.17;	author christos;	state Exp;
branches
	1.1.1.6.2.1;
next	1.1.1.7;
commitid	RVQIxe3FpM3lSsfx;

1.1.1.7
date	2014.06.13.01.48.23;	author christos;	state Exp;
branches;
next	1.1.1.8;
commitid	jtTYsE5FmJU6MiEx;

1.1.1.8
date	2014.10.10.20.08.20;	author christos;	state Exp;
branches;
next	1.1.1.9;
commitid	pfOzhE33qnut2HTx;

1.1.1.9
date	2015.01.02.20.34.28;	author christos;	state Exp;
branches
	1.1.1.9.2.1
	1.1.1.9.4.1;
next	1.1.1.10;
commitid	VjK78yRsQNs8uu4y;

1.1.1.10
date	2017.02.10.17.42.57;	author christos;	state Exp;
branches;
next	1.1.1.11;
commitid	HAP3kn9Hn6ovMqFz;

1.1.1.11
date	2017.05.24.23.59.57;	author christos;	state Exp;
branches;
next	1.1.1.12;
commitid	WbyOU2LBE5qOyHSz;

1.1.1.12
date	2017.09.08.13.22.42;	author christos;	state Exp;
branches
	1.1.1.12.2.1;
next	1.1.1.13;
commitid	Hp7DmePhD4aVAo6A;

1.1.1.13
date	2018.04.15.19.32.47;	author christos;	state Exp;
branches
	1.1.1.13.2.1;
next	1.1.1.14;
commitid	unKSwpX2g9VqBzyA;

1.1.1.14
date	2018.10.18.23.54.09;	author christos;	state Exp;
branches;
next	1.1.1.15;
commitid	e8WctwerBeEm4vWA;

1.1.1.15
date	2019.05.22.17.19.56;	author christos;	state Exp;
branches;
next	1.1.1.16;
commitid	VXeNRYYruN1MWdoB;

1.1.1.16
date	2019.12.17.02.23.53;	author christos;	state Exp;
branches;
next	1.1.1.17;
commitid	vqYTz60fS9PNg0PB;

1.1.1.17
date	2020.06.15.00.18.48;	author christos;	state Exp;
branches;
next	1.1.1.18;
commitid	HMbuXSjPojU5LfcC;

1.1.1.18
date	2021.04.09.18.58.01;	author christos;	state Exp;
branches;
next	1.1.1.19;
commitid	W9ddLLbSkHHinEOC;

1.1.1.19
date	2022.09.24.20.07.53;	author christos;	state Exp;
branches;
next	1.1.1.20;
commitid	Nf6F9kcpc0EPC9VD;

1.1.1.20
date	2023.08.18.18.36.50;	author christos;	state Exp;
branches;
next	;
commitid	IX26ghc1E2S0AiBE;

1.1.1.1.2.1
date	2009.05.08.16.35.07;	author jym;	state dead;
branches;
next	1.1.1.1.2.2;

1.1.1.1.2.2
date	2009.05.13.18.51.54;	author jym;	state Exp;
branches;
next	;

1.1.1.3.2.1
date	2013.01.23.00.04.34;	author yamt;	state Exp;
branches;
next	1.1.1.3.2.2;

1.1.1.3.2.2
date	2014.05.22.15.44.59;	author yamt;	state Exp;
branches;
next	;
commitid	tYJXbWAuFvTh7yBx;

1.1.1.3.8.1
date	2013.02.25.00.26.05;	author tls;	state Exp;
branches;
next	1.1.1.3.8.2;

1.1.1.3.8.2
date	2013.06.23.06.26.32;	author tls;	state Exp;
branches;
next	1.1.1.3.8.3;
commitid	OnlO1cBgtQRcIHUw;

1.1.1.3.8.3
date	2014.08.19.23.46.47;	author tls;	state Exp;
branches;
next	;
commitid	jTnpym9Qu0o4R1Nx;

1.1.1.6.2.1
date	2014.08.10.07.07.10;	author tls;	state Exp;
branches;
next	;
commitid	b1wUlsZGswrdGMLx;

1.1.1.9.2.1
date	2017.03.20.06.52.19;	author pgoyette;	state Exp;
branches;
next	;
commitid	jjw7cAwgyKq7RfKz;

1.1.1.9.4.1
date	2017.04.21.16.51.23;	author bouyer;	state Exp;
branches;
next	;
commitid	dUG7nkTKALCadqOz;

1.1.1.12.2.1
date	2018.04.22.07.20.08;	author pgoyette;	state Exp;
branches;
next	1.1.1.12.2.2;
commitid	W6xykws0Zbl4kpzA;

1.1.1.12.2.2
date	2018.10.20.06.58.20;	author pgoyette;	state Exp;
branches;
next	;
commitid	mTSoqZEZ4arHnFWA;

1.1.1.13.2.1
date	2019.06.10.21.44.46;	author christos;	state Exp;
branches;
next	1.1.1.13.2.2;
commitid	jtc8rnCzWiEEHGqB;

1.1.1.13.2.2
date	2020.04.08.14.04.04;	author martin;	state Exp;
branches;
next	;
commitid	Qli2aW9E74UFuA3C;


desc
@@


1.1
log
@Initial revision
@
text
@
#------------------------------------------------------------------------------
# animation:  file(1) magic for animation/movie formats
#
# animation formats
# MPEG, FLI, DL originally from vax@@ccwf.cc.utexas.edu (VaX#n8)
# FLC, SGI, Apple originally from Daniel Quinlan (quinlan@@yggdrasil.com)

# SGI and Apple formats
0	string		MOVI		Silicon Graphics movie file
!:mime	video/x-sgi-movie
4       string          moov            Apple QuickTime
!:mime	video/quicktime
>12     string          mvhd            \b movie (fast start)
>12     string          mdra            \b URL
>12     string          cmov            \b movie (fast start, compressed header)
>12     string          rmra            \b multiple URLs
4       string          mdat            Apple QuickTime movie (unoptimized)
!:mime	video/quicktime
#4       string          wide            Apple QuickTime movie (unoptimized)
#!:mime	video/quicktime
#4       string          skip            Apple QuickTime movie (modified)
#!:mime	video/quicktime
#4       string          free            Apple QuickTime movie (modified)
#!:mime	video/quicktime
4       string          idsc            Apple QuickTime image (fast start)
!:mime	image/x-quicktime
#4       string          idat            Apple QuickTime image (unoptimized)
#!:mime	image/x-quicktime
4       string          pckg            Apple QuickTime compressed archive
!:mime	application/x-quicktime-player
4	string/B	jP		JPEG 2000 image
!:mime	image/jp2
4	string		ftyp		ISO Media
>8	string		isom		\b, MPEG v4 system, version 1
!:mime	video/mp4
>8	string		iso2		\b, MPEG v4 system, part 12 revision
>8	string		mp41		\b, MPEG v4 system, version 1
!:mime	video/mp4
>8	string		mp42		\b, MPEG v4 system, version 2
!:mime	video/mp4
>8	string		mp7t		\b, MPEG v4 system, MPEG v7 XML
>8	string		mp7b		\b, MPEG v4 system, MPEG v7 binary XML
>8	string/B	jp2		\b, JPEG 2000
!:mime	image/jp2
>8	string		3gp		\b, MPEG v4 system, 3GPP
!:mime	video/3gpp
>>11	byte		4		\b v4 (H.263/AMR GSM 6.10)
>>11	byte		5		\b v5 (H.263/AMR GSM 6.10)
>>11	byte		6		\b v6 (ITU H.264/AMR GSM 6.10)
>8	string		mmp4		\b, MPEG v4 system, 3GPP Mobile
!:mime	video/mp4
>8	string		avc1		\b, MPEG v4 system, 3GPP JVT AVC
!:mime	video/3gpp
>8	string/B	M4A		\b, MPEG v4 system, iTunes AAC-LC
!:mime	audio/mp4
>8	string/B	M4V		\b, MPEG v4 system, iTunes AVC-LC
!:mime	video/mp4
>8	string/B	M4P		\b, MPEG v4 system, iTunes AES encrypted
>8	string/B	M4B		\b, MPEG v4 system, iTunes bookmarked
>8	string/B	qt		\b, Apple QuickTime movie
!:mime	video/quicktime

# MPEG sequences
# Scans for all common MPEG header start codes
0	 belong		    0x00000001     
>4	 byte&0x1F	    0x07	   JVT NAL sequence, H.264 video
>>5      byte               66             \b, baseline
>>5      byte               77             \b, main
>>5      byte               88             \b, extended
>>7      byte               x              \b @@ L %u
0        belong&0xFFFFFF00  0x00000100     
>3       byte               0xBA           MPEG sequence
>>4      byte               &0x40          \b, v2, program multiplex
>>4      byte               ^0x40          \b, v1, system multiplex
>3       byte               0xBB           MPEG sequence, v1/2, multiplex (missing pack header)
>3       byte&0x1F          0x07           MPEG sequence, H.264 video
>>4      byte               66             \b, baseline
>>4      byte               77             \b, main
>>4      byte               88             \b, extended
>>6      byte               x              \b @@ L %u
>3       byte               0xB0           MPEG sequence, v4
>>5      belong             0x000001B5
>>>9     byte               &0x80
>>>>10   byte&0xF0          16             \b, video
>>>>10   byte&0xF0          32             \b, still texture
>>>>10   byte&0xF0          48             \b, mesh
>>>>10   byte&0xF0          64             \b, face
>>>9     byte&0xF8          8              \b, video
>>>9     byte&0xF8          16             \b, still texture
>>>9     byte&0xF8          24             \b, mesh
>>>9     byte&0xF8          32             \b, face
>>4      byte               1              \b, simple @@ L1
>>4      byte               2              \b, simple @@ L2
>>4      byte               3              \b, simple @@ L3
>>4      byte               4              \b, simple @@ L0
>>4      byte               17             \b, simple scalable @@ L1
>>4      byte               18             \b, simple scalable @@ L2
>>4      byte               33             \b, core @@ L1
>>4      byte               34             \b, core @@ L2
>>4      byte               50             \b, main @@ L2
>>4      byte               51             \b, main @@ L3
>>4      byte               53             \b, main @@ L4
>>4      byte               66             \b, n-bit @@ L2
>>4      byte               81             \b, scalable texture @@ L1
>>4      byte               97             \b, simple face animation @@ L1
>>4      byte               98             \b, simple face animation @@ L2
>>4      byte               99             \b, simple face basic animation @@ L1
>>4      byte               100            \b, simple face basic animation @@ L2
>>4      byte               113            \b, basic animation text @@ L1
>>4      byte               114            \b, basic animation text @@ L2
>>4      byte               129            \b, hybrid @@ L1
>>4      byte               130            \b, hybrid @@ L2
>>4      byte               145            \b, advanced RT simple @@ L!
>>4      byte               146            \b, advanced RT simple @@ L2
>>4      byte               147            \b, advanced RT simple @@ L3
>>4      byte               148            \b, advanced RT simple @@ L4
>>4      byte               161            \b, core scalable @@ L1
>>4      byte               162            \b, core scalable @@ L2
>>4      byte               163            \b, core scalable @@ L3
>>4      byte               177            \b, advanced coding efficiency @@ L1
>>4      byte               178            \b, advanced coding efficiency @@ L2
>>4      byte               179            \b, advanced coding efficiency @@ L3
>>4      byte               180            \b, advanced coding efficiency @@ L4
>>4      byte               193            \b, advanced core @@ L1
>>4      byte               194            \b, advanced core @@ L2
>>4      byte               209            \b, advanced scalable texture @@ L1
>>4      byte               210            \b, advanced scalable texture @@ L2
>>4      byte               211            \b, advanced scalable texture @@ L3
>>4      byte               225            \b, simple studio @@ L1
>>4      byte               226            \b, simple studio @@ L2
>>4      byte               227            \b, simple studio @@ L3
>>4      byte               228            \b, simple studio @@ L4
>>4      byte               229            \b, core studio @@ L1
>>4      byte               230            \b, core studio @@ L2
>>4      byte               231            \b, core studio @@ L3
>>4      byte               232            \b, core studio @@ L4
>>4      byte               240            \b, advanced simple @@ L0
>>4      byte               241            \b, advanced simple @@ L1
>>4      byte               242            \b, advanced simple @@ L2
>>4      byte               243            \b, advanced simple @@ L3
>>4      byte               244            \b, advanced simple @@ L4
>>4      byte               245            \b, advanced simple @@ L5
>>4      byte               247            \b, advanced simple @@ L3b
>>4      byte               248            \b, FGS @@ L0
>>4      byte               249            \b, FGS @@ L1
>>4      byte               250            \b, FGS @@ L2
>>4      byte               251            \b, FGS @@ L3
>>4      byte               252            \b, FGS @@ L4
>>4      byte               253            \b, FGS @@ L5
>3       byte               0xB5           MPEG sequence, v4
>>4      byte               &0x80
>>>5     byte&0xF0          16             \b, video (missing profile header)
>>>5     byte&0xF0          32             \b, still texture (missing profile header)
>>>5     byte&0xF0          48             \b, mesh (missing profile header)
>>>5     byte&0xF0          64             \b, face (missing profile header)
>>4      byte&0xF8          8              \b, video (missing profile header)
>>4      byte&0xF8          16             \b, still texture (missing profile header)
>>4      byte&0xF8          24             \b, mesh (missing profile header)
>>4      byte&0xF8          32             \b, face (missing profile header)
>3       byte               0xB3           MPEG sequence
>>12     belong             0x000001B8     \b, v1, progressive Y'CbCr 4:2:0 video
>>12     belong             0x000001B2     \b, v1, progressive Y'CbCr 4:2:0 video
>>12     belong             0x000001B5     \b, v2,
>>>16    byte&0x0F          1              \b HP
>>>16    byte&0x0F          2              \b Spt
>>>16    byte&0x0F          3              \b SNR
>>>16    byte&0x0F          4              \b MP
>>>16    byte&0x0F          5              \b SP
>>>17    byte&0xF0          64             \b@@HL
>>>17    byte&0xF0          96             \b@@H-14
>>>17    byte&0xF0          128            \b@@ML
>>>17    byte&0xF0          160            \b@@LL
>>>17    byte               &0x08          \b progressive
>>>17    byte               ^0x08          \b interlaced
>>>17    byte&0x06          2              \b Y'CbCr 4:2:0 video
>>>17    byte&0x06          4              \b Y'CbCr 4:2:2 video
>>>17    byte&0x06          6              \b Y'CbCr 4:4:4 video
>>11     byte               &0x02
>>>75    byte               &0x01
>>>>140  belong             0x000001B8     \b, v1, progressive Y'CbCr 4:2:0 video
>>>>140  belong             0x000001B2     \b, v1, progressive Y'CbCr 4:2:0 video
>>>>140  belong             0x000001B5     \b, v2,
>>>>>144 byte&0x0F          1              \b HP
>>>>>144 byte&0x0F          2              \b Spt
>>>>>144 byte&0x0F          3              \b SNR
>>>>>144 byte&0x0F          4              \b MP
>>>>>144 byte&0x0F          5              \b SP
>>>>>145 byte&0xF0          64             \b@@HL
>>>>>145 byte&0xF0          96             \b@@H-14
>>>>>145 byte&0xF0          128            \b@@ML
>>>>>145 byte&0xF0          160            \b@@LL
>>>>>145 byte               &0x08          \b progressive
>>>>>145 byte               ^0x08          \b interlaced
>>>>>145 byte&0x06          2              \b Y'CbCr 4:2:0 video
>>>>>145 byte&0x06          4              \b Y'CbCr 4:2:2 video
>>>>>145 byte&0x06          6              \b Y'CbCr 4:4:4 video
>>76    belong             0x000001B8     \b, v1, progressive Y'CbCr 4:2:0 video
>>76    belong             0x000001B2     \b, v1, progressive Y'CbCr 4:2:0 video
>>76    belong             0x000001B5     \b, v2,
>>>80   byte&0x0F          1              \b HP
>>>80   byte&0x0F          2              \b Spt
>>>80   byte&0x0F          3              \b SNR
>>>80   byte&0x0F          4              \b MP
>>>80   byte&0x0F          5              \b SP
>>>81   byte&0xF0          64             \b@@HL
>>>81   byte&0xF0          96             \b@@H-14
>>>81   byte&0xF0          128            \b@@ML
>>>81   byte&0xF0          160            \b@@LL
>>>81   byte               &0x08          \b progressive
>>>81   byte               ^0x08          \b interlaced
>>>81   byte&0x06          2              \b Y'CbCr 4:2:0 video
>>>81   byte&0x06          4              \b Y'CbCr 4:2:2 video
>>>81   byte&0x06          6              \b Y'CbCr 4:4:4 video
>>4      belong&0xFFFFFF00  0x78043800     \b, HD-TV 1920P
>>>7     byte&0xF0          0x10           \b, 16:9
>>4      belong&0xFFFFFF00  0x50002D00     \b, SD-TV 1280I
>>>7     byte&0xF0          0x10           \b, 16:9
>>4      belong&0xFFFFFF00  0x30024000     \b, PAL Capture
>>>7     byte&0xF0          0x10           \b, 4:3
>>4      beshort&0xFFF0     0x2C00         \b, 4CIF
>>>5     beshort&0x0FFF     0x01E0         \b NTSC
>>>5     beshort&0x0FFF     0x0240         \b PAL
>>>7     byte&0xF0          0x20           \b, 4:3
>>>7     byte&0xF0          0x30           \b, 16:9
>>>7     byte&0xF0          0x40           \b, 11:5
>>>7     byte&0xF0          0x80           \b, PAL 4:3
>>>7     byte&0xF0          0xC0           \b, NTSC 4:3
>>4      belong&0xFFFFFF00  0x2801E000     \b, LD-TV 640P
>>>7     byte&0xF0          0x10           \b, 4:3
>>4      belong&0xFFFFFF00  0x1400F000     \b, 320x240
>>>7     byte&0xF0          0x10           \b, 4:3
>>4      belong&0xFFFFFF00  0x0F00A000     \b, 240x160
>>>7     byte&0xF0          0x10           \b, 4:3
>>4      belong&0xFFFFFF00  0x0A007800     \b, 160x120
>>>7     byte&0xF0          0x10           \b, 4:3
>>4      beshort&0xFFF0     0x1600         \b, CIF
>>>5     beshort&0x0FFF     0x00F0         \b NTSC
>>>5     beshort&0x0FFF     0x0120         \b PAL
>>>7     byte&0xF0          0x20           \b, 4:3
>>>7     byte&0xF0          0x30           \b, 16:9
>>>7     byte&0xF0          0x40           \b, 11:5
>>>7     byte&0xF0          0x80           \b, PAL 4:3
>>>7     byte&0xF0          0xC0           \b, NTSC 4:3
>>>5     beshort&0x0FFF     0x0240         \b PAL 625
>>>>7    byte&0xF0          0x20           \b, 4:3
>>>>7    byte&0xF0          0x30           \b, 16:9
>>>>7    byte&0xF0          0x40           \b, 11:5
>>4      beshort&0xFFF0     0x2D00         \b, CCIR/ITU
>>>5     beshort&0x0FFF     0x01E0         \b NTSC 525
>>>5     beshort&0x0FFF     0x0240         \b PAL 625
>>>7     byte&0xF0          0x20           \b, 4:3
>>>7     byte&0xF0          0x30           \b, 16:9
>>>7     byte&0xF0          0x40           \b, 11:5
>>4      beshort&0xFFF0     0x1E00         \b, SVCD
>>>5     beshort&0x0FFF     0x01E0         \b NTSC 525
>>>5     beshort&0x0FFF     0x0240         \b PAL 625
>>>7     byte&0xF0          0x20           \b, 4:3
>>>7     byte&0xF0          0x30           \b, 16:9
>>>7     byte&0xF0          0x40           \b, 11:5
>>7      byte&0x0F          1              \b, 23.976 fps
>>7      byte&0x0F          2              \b, 24 fps
>>7      byte&0x0F          3              \b, 25 fps
>>7      byte&0x0F          4              \b, 29.97 fps
>>7      byte&0x0F          5              \b, 30 fps
>>7      byte&0x0F          6              \b, 50 fps
>>7      byte&0x0F          7              \b, 59.94 fps
>>7      byte&0x0F          8              \b, 60 fps
>>11     byte               &0x04          \b, Constrained

# MPEG ADTS Audio (*.mpx/mxa/aac)
# from dreesen@@math.fu-berlin.de
# modified to fully support MPEG ADTS

# MP3, M1A
# modified by Joerg Jenderek
# GRR the original test are too common for many DOS files
# so don't accept as MP3 until we've tested the rate
0       beshort&0xFFFE  0xFFFA
# rates
>2      byte&0xF0       0x10           MPEG ADTS, layer III, v1,  32 kbps
!:mime	audio/mpeg
>2      byte&0xF0       0x20           MPEG ADTS, layer III, v1,  40 kbps
!:mime	audio/mpeg
>2      byte&0xF0       0x30           MPEG ADTS, layer III, v1,  48 kbps
!:mime	audio/mpeg
>2      byte&0xF0       0x40           MPEG ADTS, layer III, v1,  56 kbps
!:mime	audio/mpeg
>2      byte&0xF0       0x50           MPEG ADTS, layer III, v1,  64 kbps
!:mime	audio/mpeg
>2      byte&0xF0       0x60           MPEG ADTS, layer III, v1,  80 kbps
!:mime	audio/mpeg
>2      byte&0xF0       0x70           MPEG ADTS, layer III, v1,  96 kbps
!:mime	audio/mpeg
>2      byte&0xF0       0x80           MPEG ADTS, layer III, v1, 112 kbps
!:mime	audio/mpeg
>2      byte&0xF0       0x90           MPEG ADTS, layer III, v1, 128 kbps
!:mime	audio/mpeg
>2      byte&0xF0       0xA0           MPEG ADTS, layer III, v1, 160 kbps
!:mime	audio/mpeg
>2      byte&0xF0       0xB0           MPEG ADTS, layer III, v1, 192 kbps
!:mime	audio/mpeg
>2      byte&0xF0       0xC0           MPEG ADTS, layer III, v1, 224 kbps
!:mime	audio/mpeg
>2      byte&0xF0       0xD0           MPEG ADTS, layer III, v1, 256 kbps
!:mime	audio/mpeg
>2      byte&0xF0       0xE0           MPEG ADTS, layer III, v1, 320 kbps
!:mime	audio/mpeg
# timing
>2      byte&0x0C       0x00           \b, 44.1 kHz
>2      byte&0x0C       0x04           \b, 48 kHz
>2      byte&0x0C       0x08           \b, 32 kHz
# channels/options
>3      byte&0xC0       0x00           \b, Stereo
>3      byte&0xC0       0x40           \b, JntStereo
>3      byte&0xC0       0x80           \b, 2x Monaural
>3      byte&0xC0       0xC0           \b, Monaural
#>1     byte            ^0x01          \b, Data Verify
#>2     byte            &0x02          \b, Packet Pad
#>2     byte            &0x01          \b, Custom Flag
#>3     byte            &0x08          \b, Copyrighted
#>3     byte            &0x04          \b, Original Source
#>3     byte&0x03       1              \b, NR: 50/15 ms
#>3     byte&0x03       3              \b, NR: CCIT J.17

# MP2, M1A
0       beshort&0xFFFE  0xFFFC         MPEG ADTS, layer II, v1
!:mime	audio/mpeg
# rates
>2      byte&0xF0       0x10           \b,  32 kbps
>2      byte&0xF0       0x20           \b,  48 kbps
>2      byte&0xF0       0x30           \b,  56 kbps
>2      byte&0xF0       0x40           \b,  64 kbps
>2      byte&0xF0       0x50           \b,  80 kbps
>2      byte&0xF0       0x60           \b,  96 kbps
>2      byte&0xF0       0x70           \b, 112 kbps
>2      byte&0xF0       0x80           \b, 128 kbps
>2      byte&0xF0       0x90           \b, 160 kbps
>2      byte&0xF0       0xA0           \b, 192 kbps
>2      byte&0xF0       0xB0           \b, 224 kbps
>2      byte&0xF0       0xC0           \b, 256 kbps
>2      byte&0xF0       0xD0           \b, 320 kbps
>2      byte&0xF0       0xE0           \b, 384 kbps
# timing
>2      byte&0x0C       0x00           \b, 44.1 kHz
>2      byte&0x0C       0x04           \b, 48 kHz
>2      byte&0x0C       0x08           \b, 32 kHz
# channels/options
>3      byte&0xC0       0x00           \b, Stereo
>3      byte&0xC0       0x40           \b, JntStereo
>3      byte&0xC0       0x80           \b, 2x Monaural
>3      byte&0xC0       0xC0           \b, Monaural
#>1     byte            ^0x01          \b, Data Verify
#>2     byte            &0x02          \b, Packet Pad
#>2     byte            &0x01          \b, Custom Flag
#>3     byte            &0x08          \b, Copyrighted
#>3     byte            &0x04          \b, Original Source
#>3     byte&0x03       1              \b, NR: 50/15 ms
#>3     byte&0x03       3              \b, NR: CCIT J.17

# MPA, M1A
# updated by Joerg Jenderek
# GRR the original test are too common for many DOS files, so test 32 <= kbits <= 448
# GRR this test is still too general as it catches a BOM of UTF-16 files (0xFFFE)
# FIXME: Almost all little endian UTF-16 text with BOM are clobbered by these entries
#0	beshort&0xFFFE		0xFFFE	
#>2	ubyte&0xF0	>0x0F		
#>>2	ubyte&0xF0	<0xE1		MPEG ADTS, layer I, v1
## rate
#>>>2      byte&0xF0       0x10           \b,  32 kbps
#>>>2      byte&0xF0       0x20           \b,  64 kbps
#>>>2      byte&0xF0       0x30           \b,  96 kbps
#>>>2      byte&0xF0       0x40           \b, 128 kbps
#>>>2      byte&0xF0       0x50           \b, 160 kbps
#>>>2      byte&0xF0       0x60           \b, 192 kbps
#>>>2      byte&0xF0       0x70           \b, 224 kbps
#>>>2      byte&0xF0       0x80           \b, 256 kbps
#>>>2      byte&0xF0       0x90           \b, 288 kbps
#>>>2      byte&0xF0       0xA0           \b, 320 kbps
#>>>2      byte&0xF0       0xB0           \b, 352 kbps
#>>>2      byte&0xF0       0xC0           \b, 384 kbps
#>>>2      byte&0xF0       0xD0           \b, 416 kbps
#>>>2      byte&0xF0       0xE0           \b, 448 kbps
## timing
#>>>2      byte&0x0C       0x00           \b, 44.1 kHz
#>>>2      byte&0x0C       0x04           \b, 48 kHz
#>>>2      byte&0x0C       0x08           \b, 32 kHz
## channels/options
#>>>3      byte&0xC0       0x00           \b, Stereo
#>>>3      byte&0xC0       0x40           \b, JntStereo
#>>>3      byte&0xC0       0x80           \b, 2x Monaural
#>>>3      byte&0xC0       0xC0           \b, Monaural
##>1     byte            ^0x01          \b, Data Verify
##>2     byte            &0x02          \b, Packet Pad
##>2     byte            &0x01          \b, Custom Flag
##>3     byte            &0x08          \b, Copyrighted
##>3     byte            &0x04          \b, Original Source
##>3     byte&0x03       1              \b, NR: 50/15 ms
##>3     byte&0x03       3              \b, NR: CCIT J.17

# MP3, M2A
0       beshort&0xFFFE  0xFFF2         MPEG ADTS, layer III, v2
!:mime	audio/mpeg
# rate
>2      byte&0xF0       0x10           \b,   8 kbps
>2      byte&0xF0       0x20           \b,  16 kbps
>2      byte&0xF0       0x30           \b,  24 kbps
>2      byte&0xF0       0x40           \b,  32 kbps
>2      byte&0xF0       0x50           \b,  40 kbps
>2      byte&0xF0       0x60           \b,  48 kbps
>2      byte&0xF0       0x70           \b,  56 kbps
>2      byte&0xF0       0x80           \b,  64 kbps
>2      byte&0xF0       0x90           \b,  80 kbps
>2      byte&0xF0       0xA0           \b,  96 kbps
>2      byte&0xF0       0xB0           \b, 112 kbps
>2      byte&0xF0       0xC0           \b, 128 kbps
>2      byte&0xF0       0xD0           \b, 144 kbps
>2      byte&0xF0       0xE0           \b, 160 kbps
# timing
>2      byte&0x0C       0x00           \b, 22.05 kHz
>2      byte&0x0C       0x04           \b, 24 kHz
>2      byte&0x0C       0x08           \b, 16 kHz
# channels/options
>3      byte&0xC0       0x00           \b, Stereo
>3      byte&0xC0       0x40           \b, JntStereo
>3      byte&0xC0       0x80           \b, 2x Monaural
>3      byte&0xC0       0xC0           \b, Monaural
#>1     byte            ^0x01          \b, Data Verify
#>2     byte            &0x02          \b, Packet Pad
#>2     byte            &0x01          \b, Custom Flag
#>3     byte            &0x08          \b, Copyrighted
#>3     byte            &0x04          \b, Original Source
#>3     byte&0x03       1              \b, NR: 50/15 ms
#>3     byte&0x03       3              \b, NR: CCIT J.17

# MP2, M2A
0       beshort&0xFFFE  0xFFF4         MPEG ADTS, layer II, v2
# rate 
>2      byte&0xF0       0x10           \b,   8 kbps
>2      byte&0xF0       0x20           \b,  16 kbps 
>2      byte&0xF0       0x30           \b,  24 kbps
>2      byte&0xF0       0x40           \b,  32 kbps
>2      byte&0xF0       0x50           \b,  40 kbps
>2      byte&0xF0       0x60           \b,  48 kbps
>2      byte&0xF0       0x70           \b,  56 kbps
>2      byte&0xF0       0x80           \b,  64 kbps
>2      byte&0xF0       0x90           \b,  80 kbps
>2      byte&0xF0       0xA0           \b,  96 kbps
>2      byte&0xF0       0xB0           \b, 112 kbps
>2      byte&0xF0       0xC0           \b, 128 kbps
>2      byte&0xF0       0xD0           \b, 144 kbps
>2      byte&0xF0       0xE0           \b, 160 kbps
# timing
>2      byte&0x0C       0x00           \b, 22.05 kHz
>2      byte&0x0C       0x04           \b, 24 kHz
>2      byte&0x0C       0x08           \b, 16 kHz
# channels/options
>3      byte&0xC0       0x00           \b, Stereo
>3      byte&0xC0       0x40           \b, JntStereo
>3      byte&0xC0       0x80           \b, 2x Monaural
>3      byte&0xC0       0xC0           \b, Monaural
#>1     byte            ^0x01          \b, Data Verify
#>2     byte            &0x02          \b, Packet Pad
#>2     byte            &0x01          \b, Custom Flag
#>3     byte            &0x08          \b, Copyrighted
#>3     byte            &0x04          \b, Original Source
#>3     byte&0x03       1              \b, NR: 50/15 ms
#>3     byte&0x03       3              \b, NR: CCIT J.17

# MPA, M2A
0       beshort&0xFFFE  0xFFF6         MPEG ADTS, layer I, v2
# rate
>2      byte&0xF0       0x10           \b,  32 kbps
>2      byte&0xF0       0x20           \b,  48 kbps
>2      byte&0xF0       0x30           \b,  56 kbps
>2      byte&0xF0       0x40           \b,  64 kbps
>2      byte&0xF0       0x50           \b,  80 kbps
>2      byte&0xF0       0x60           \b,  96 kbps
>2      byte&0xF0       0x70           \b, 112 kbps
>2      byte&0xF0       0x80           \b, 128 kbps
>2      byte&0xF0       0x90           \b, 144 kbps
>2      byte&0xF0       0xA0           \b, 160 kbps
>2      byte&0xF0       0xB0           \b, 176 kbps
>2      byte&0xF0       0xC0           \b, 192 kbps
>2      byte&0xF0       0xD0           \b, 224 kbps
>2      byte&0xF0       0xE0           \b, 256 kbps
# timing
>2      byte&0x0C       0x00           \b, 22.05 kHz
>2      byte&0x0C       0x04           \b, 24 kHz
>2      byte&0x0C       0x08           \b, 16 kHz
# channels/options
>3      byte&0xC0       0x00           \b, Stereo
>3      byte&0xC0       0x40           \b, JntStereo
>3      byte&0xC0       0x80           \b, 2x Monaural
>3      byte&0xC0       0xC0           \b, Monaural
#>1     byte            ^0x01          \b, Data Verify
#>2     byte            &0x02          \b, Packet Pad
#>2     byte            &0x01          \b, Custom Flag
#>3     byte            &0x08          \b, Copyrighted
#>3     byte            &0x04          \b, Original Source
#>3     byte&0x03       1              \b, NR: 50/15 ms
#>3     byte&0x03       3              \b, NR: CCIT J.17

# MP3, M25A
0       beshort&0xFFFE  0xFFE2         MPEG ADTS, layer III,  v2.5
# rate  
>2      byte&0xF0       0x10           \b,   8 kbps
>2      byte&0xF0       0x20           \b,  16 kbps
>2      byte&0xF0       0x30           \b,  24 kbps
>2      byte&0xF0       0x40           \b,  32 kbps
>2      byte&0xF0       0x50           \b,  40 kbps
>2      byte&0xF0       0x60           \b,  48 kbps
>2      byte&0xF0       0x70           \b,  56 kbps
>2      byte&0xF0       0x80           \b,  64 kbps
>2      byte&0xF0       0x90           \b,  80 kbps
>2      byte&0xF0       0xA0           \b,  96 kbps
>2      byte&0xF0       0xB0           \b, 112 kbps
>2      byte&0xF0       0xC0           \b, 128 kbps
>2      byte&0xF0       0xD0           \b, 144 kbps
>2      byte&0xF0       0xE0           \b, 160 kbps
# timing
>2      byte&0x0C       0x00           \b, 11.025 kHz
>2      byte&0x0C       0x04           \b, 12 kHz
>2      byte&0x0C       0x08           \b, 8 kHz
# channels/options
>3      byte&0xC0       0x00           \b, Stereo
>3      byte&0xC0       0x40           \b, JntStereo
>3      byte&0xC0       0x80           \b, 2x Monaural
>3      byte&0xC0       0xC0           \b, Monaural
#>1     byte            ^0x01          \b, Data Verify
#>2     byte            &0x02          \b, Packet Pad
#>2     byte            &0x01          \b, Custom Flag
#>3     byte            &0x08          \b, Copyrighted
#>3     byte            &0x04          \b, Original Source
#>3     byte&0x03       1              \b, NR: 50/15 ms
#>3     byte&0x03       3              \b, NR: CCIT J.17

# AAC (aka MPEG-2 NBC audio) and MPEG-4 audio

# Stored AAC streams (instead of the MP4 format)
0       string          ADIF           MPEG ADIF, AAC
!:mime	audio/x-hx-aac-adif
>4      byte            &0x80
>>13    byte            &0x10          \b, VBR
>>13    byte            ^0x10          \b, CBR
>>16    byte&0x1E       0x02           \b, single stream
>>16    byte&0x1E       0x04           \b, 2 streams
>>16    byte&0x1E       0x06           \b, 3 streams
>>16    byte            &0x08          \b, 4 or more streams
>>16    byte            &0x10          \b, 8 or more streams
>>4    byte            &0x80          \b, Copyrighted
>>13   byte            &0x40          \b, Original Source
>>13   byte            &0x20          \b, Home Flag
>4      byte            ^0x80
>>4     byte            &0x10          \b, VBR
>>4     byte            ^0x10          \b, CBR
>>7     byte&0x1E       0x02           \b, single stream
>>7     byte&0x1E       0x04           \b, 2 streams
>>7     byte&0x1E       0x06           \b, 3 streams
>>7     byte            &0x08          \b, 4 or more streams
>>7     byte            &0x10          \b, 8 or more streams
>>4    byte            &0x40          \b, Original Stream(s)
>>4    byte            &0x20          \b, Home Source

# Live or stored single AAC stream (used with MPEG-2 systems)
0       beshort&0xFFF6  0xFFF0         MPEG ADTS, AAC
!:mime	audio/x-hx-aac-adts
>1      byte            &0x08          \b, v2
>1      byte            ^0x08          \b, v4
# profile
>>2     byte            &0xC0          \b LTP
>2      byte&0xc0       0x00           \b Main
>2      byte&0xc0       0x40           \b LC
>2      byte&0xc0       0x80           \b SSR
# timing
>2      byte&0x3c       0x00           \b, 96 kHz
>2      byte&0x3c       0x04           \b, 88.2 kHz
>2      byte&0x3c       0x08           \b, 64 kHz
>2      byte&0x3c       0x0c           \b, 48 kHz
>2      byte&0x3c       0x10           \b, 44.1 kHz
>2      byte&0x3c       0x14           \b, 32 kHz
>2      byte&0x3c       0x18           \b, 24 kHz
>2      byte&0x3c       0x1c           \b, 22.05 kHz
>2      byte&0x3c       0x20           \b, 16 kHz
>2      byte&0x3c       0x24           \b, 12 kHz
>2      byte&0x3c       0x28           \b, 11.025 kHz
>2      byte&0x3c       0x2c           \b, 8 kHz
# channels
>2      beshort&0x01c0  0x0040         \b, monaural
>2      beshort&0x01c0  0x0080         \b, stereo
>2      beshort&0x01c0  0x00c0         \b, stereo + center
>2      beshort&0x01c0  0x0100         \b, stereo+center+LFE
>2      beshort&0x01c0  0x0140         \b, surround
>2      beshort&0x01c0  0x0180         \b, surround + LFE
>2      beshort         &0x01C0        \b, surround + side
#>1     byte            ^0x01           \b, Data Verify
#>2     byte            &0x02           \b, Custom Flag
#>3     byte            &0x20           \b, Original Stream
#>3     byte            &0x10           \b, Home Source
#>3     byte            &0x08           \b, Copyrighted

# Live MPEG-4 audio streams (instead of RTP FlexMux)
0       beshort&0xFFE0  0x56E0         MPEG-4 LOAS
!:mime	audio/x-mp4a-latm
#>1     beshort&0x1FFF  x              \b, %u byte packet
>3      byte&0xE0       0x40
>>4     byte&0x3C       0x04           \b, single stream
>>4     byte&0x3C       0x08           \b, 2 streams
>>4     byte&0x3C       0x0C           \b, 3 streams
>>4     byte            &0x08          \b, 4 or more streams
>>4     byte            &0x20          \b, 8 or more streams
>3      byte&0xC0       0
>>4     byte&0x78       0x08           \b, single stream
>>4     byte&0x78       0x10           \b, 2 streams
>>4     byte&0x78       0x18           \b, 3 streams
>>4     byte            &0x20          \b, 4 or more streams
>>4     byte            &0x40          \b, 8 or more streams
# This magic isn't strong enough (matches plausible ISO-8859-1 text)
#0       beshort         0x4DE1         MPEG-4 LO-EP audio stream
#!:mime	audio/x-mp4a-latm

# Summary: FLI animation format
# Created by: Daniel Quinlan <quinlan@@yggdrasil.com>
# Modified by (1): Abel Cheung <abelcheung@@gmail.com> (avoid over-generic detection)
4	leshort		0xAF11
# standard FLI always has 320x200 resolution and 8 bit color
>8	leshort		320
>>10	leshort		200
>>>12	leshort		8			FLI animation, 320x200x8
!:mime	video/x-fli
>>>>6	leshort		x			\b, %d frames
# frame speed is multiple of 1/70s
>>>>16	leshort		x			\b, %d/70s per frame

# Summary: FLC animation format
# Created by: Daniel Quinlan <quinlan@@yggdrasil.com>
# Modified by (1): Abel Cheung <abelcheung@@gmail.com> (avoid over-generic detection)
4	leshort		0xAF12
# standard FLC always use 8 bit color
>12	leshort		8			FLC animation
!:mime	video/x-flc
>>8	leshort		x			\b, %d
>>10	leshort		x			\bx%dx8
>>6	uleshort	x			\b, %d frames
>>16	uleshort	x			\b, %dms per frame

# DL animation format
# XXX - collision with most `mips' magic
#
# I couldn't find a real magic number for these, however, this
# -appears- to work.  Note that it might catch other files, too, so be
# careful!
#
# Note that title and author appear in the two 20-byte chunks
# at decimal offsets 2 and 22, respectively, but they are XOR'ed with
# 255 (hex FF)!  The DL format is really bad.
#
#0	byte	1	DL version 1, medium format (160x100, 4 images/screen)
#!:mime	video/x-unknown
#>42	byte	x	- %d screens,
#>43	byte	x	%d commands
#0	byte	2	DL version 2
#!:mime	video/x-unknown
#>1	byte	1	- large format (320x200,1 image/screen),
#>1	byte	2	- medium format (160x100,4 images/screen),
#>1	byte	>2	- unknown format,
#>42	byte	x	%d screens,
#>43	byte	x	%d commands
# Based on empirical evidence, DL version 3 have several nulls following the
# \003.  Most of them start with non-null values at hex offset 0x34 or so.
#0	string	\3\0\0\0\0\0\0\0\0\0\0\0	DL version 3

# iso 13818 transport stream
#
# from Oskar Schirmer <schirmer@@scara.com> Feb 3, 2001 (ISO 13818.1)
# (the following is a little bit restrictive and works fine for a stream
#  that starts with PAT properly. it won't work for stream data, that is
#  cut from an input device data right in the middle, but this shouldn't
#  disturb)
# syncbyte      8 bit	0x47
# error_ind     1 bit	-
# payload_start 1 bit	1
# priority      1 bit	-
# PID          13 bit	0x0000
# scrambling    2 bit	-
# adaptfld_ctrl 2 bit	1 or 3
# conti_count   4 bit	0
0	belong&0xFF5FFF1F	0x47400010	MPEG transport stream data
>188	byte			!0x47		CORRUPTED

# DIF digital video file format <mpruett@@sgi.com>
0	belong&0xffffff00	0x1f070000      DIF
>4	byte			&0x01		(DVCPRO) movie file
>4	byte			^0x01		(DV) movie file
>3	byte			&0x80		(PAL)
>3	byte			^0x80		(NTSC)

# Microsoft Advanced Streaming Format (ASF) <mpruett@@sgi.com>
0	belong			0x3026b275	Microsoft ASF

# MNG Video Format, <URL:http://www.libpng.org/pub/mng/spec/>
0	string			\x8aMNG		MNG video data,
!:mime	video/x-mng
>4	belong			!0x0d0a1a0a	CORRUPTED,
>4	belong			0x0d0a1a0a
>>16    belong	x				%ld x
>>20    belong	x				%ld

# JNG Video Format, <URL:http://www.libpng.org/pub/mng/spec/>
0	string			\x8bJNG		JNG video data,
!:mime	video/x-jng
>4	belong			!0x0d0a1a0a	CORRUPTED,
>4	belong			0x0d0a1a0a
>>16    belong	x				%ld x
>>20    belong	x				%ld

# Vivo video (Wolfram Kleff)
3	string		\x0D\x0AVersion:Vivo	Vivo video data

# VRML (Virtual Reality Modelling Language)
0       string/b        #VRML\ V1.0\ ascii	VRML 1 file
!:mime	model/vrml
0	string/b	#VRML\ V2.0\ utf8	ISO/IEC 14772 VRML 97 file
!:mime	model/vrml

# X3D (Extensible 3D) [http://www.web3d.org/specifications/x3d-3.0.dtd]
# From Michel Briand <michelbriand@@free.fr>
0	string		\<?xml\ version="
!:strength +1
>20	search/1000/cb  \<!DOCTYPE\ X3D		X3D (Extensible 3D) model xml text
!:mime model/x3d

#---------------------------------------------------------------------------
# HVQM4: compressed movie format designed by Hudson for Nintendo GameCube
# From Mark Sheppard <msheppard@@climax.co.uk>, 2002-10-03
#
0	string		HVQM4		%s
>6	string		>\0		v%s
>0	byte		x		GameCube movie,
>0x34	ubeshort	x		%d x
>0x36	ubeshort	x		%d,
>0x26	ubeshort	x		%dµs,
>0x42	ubeshort	0		no audio
>0x42	ubeshort	>0		%dHz audio

# From: "Stefan A. Haubenthal" <polluks@@web.de>
0	string		DVDVIDEO-VTS	Video title set,
>0x21	byte		x		v%x
0	string		DVDVIDEO-VMG	Video manager,
>0x21	byte		x		v%x

# From: Behan Webster <behanw@@websterwood.com>
# NuppelVideo used by Mythtv (*.nuv)
# Note: there are two identical stanzas here differing only in the
# initial string matched. It used to be done with a regex, but we're
# trying to get rid of those.
0	string		NuppelVideo	MythTV NuppelVideo
>12	string		x		v%s
>20	lelong		x		(%d
>24	lelong		x		\bx%d),
>36	string		P		\bprogressive,
>36	string		I		\binterlaced,
>40	ledouble	x		\baspect:%.2f,
>48	ledouble	x		\bfps:%.2f
0	string		MythTV		MythTV NuppelVideo
>12	string		x		v%s
>20	lelong		x		(%d
>24	lelong		x		\bx%d),
>36	string		P		\bprogressive,
>36	string		I		\binterlaced,
>40	ledouble	x		\baspect:%.2f,
>48	ledouble	x		\bfps:%.2f

#						MPEG file
# MPEG sequences
# FIXME: This section is from the old magic.mime file and needs integrating with the rest
0       belong             0x000001BA
>4      byte               &0x40
!:mime	video/mp2p
>4      byte               ^0x40
!:mime	video/mpeg
0       belong             0x000001BB
!:mime	video/mpeg
0       belong             0x000001B0
!:mime	video/mp4v-es
0       belong             0x000001B5
!:mime	video/mp4v-es
0       belong             0x000001B3
!:mime	video/mpv
0       belong&0xFF5FFF1F  0x47400010
!:mime	video/mp2t
0       belong             0x00000001
>4      byte&0x1F	   0x07
!:mime	video/h264

# Type: Bink Video
# URL:  http://wiki.multimedia.cx/index.php?title=3DBink_Container
# From: <hoehle@@users.sourceforge.net>  2008-07-18
0	string		BIK	Bink Video
>3	regex		=[a-z]	rev.%s
#>4	ulelong		x	size %d
>20	ulelong		x	\b, %d
>24	ulelong		x	\bx%d
>8	ulelong		x	\b, %d frames
>32	ulelong		x	at rate %d/
>28	ulelong		>1	\b%d
>40	ulelong		=0	\b, no audio
>40	ulelong		!0	\b, %d audio track
>>40	ulelong		!1	\bs
# follow properties of the first audio track only
>>48	uleshort	x	%dHz
>>51	byte&0x20	0	mono
>>51	byte&0x20	!0	stereo
#>>51	byte&0x10	0	FFT
#>>51	byte&0x10	!0	DCT
@


1.1.1.1
log
@from ftp.astron.com
@
text
@@


1.1.1.2
log
@from ftp.astron.com.
- many security related fixes
- no MAXPATHLEN limits
- fixed missing text specification on ascii magic
- new ``pascal'' style string formats
- whitespace comparison fix
- more magic
@
text
@a2 1
# $File: animation,v 1.44 2010/11/25 15:00:12 christos Exp $
d32 1
a32 1
4	string/W	jP		JPEG 2000 image
d44 1
a44 1
>8	string/W	jp2		\b, JPEG 2000
a45 4
>8	string		3ge		\b, MPEG v4 system, 3GPP
!:mime	video/3gpp
>8	string		3gg		\b, MPEG v4 system, 3GPP
!:mime	video/3gpp
a47 4
>8	string		3gs		\b, MPEG v4 system, 3GPP
!:mime	video/3gpp
>8	string		3g2		\b, MPEG v4 system, 3GPP2
!:mime	video/3gpp2
d55 1
a55 1
>8	string/W	M4A		\b, MPEG v4 system, iTunes AAC-LC
d57 1
a57 1
>8	string/W	M4V		\b, MPEG v4 system, iTunes AVC-LC
d59 3
a61 3
>8	string/W	M4P		\b, MPEG v4 system, iTunes AES encrypted
>8	string/W	M4B		\b, MPEG v4 system, iTunes bookmarked
>8	string/W	qt		\b, Apple QuickTime movie
a73 1
!:mime  video/mpeg
a82 1
!:mime  video/mpeg4-generic
a151 1
!:mime  video/mpeg4-generic
a161 1
!:mime  video/mpeg
a471 1
!:mime	audio/mpeg
a505 1
!:mime	audio/mpeg
a699 1
!:mime  video/x-ms-asf
d721 1
a721 1
0       string/w        #VRML\ V1.0\ ascii	VRML 1 file
d723 1
a723 1
0	string/w	#VRML\ V2.0\ utf8	ISO/IEC 14772 VRML 97 file
d728 1
a728 1
0	string/t		\<?xml\ version="
d730 1
a730 1
>20	search/1000/cw  \<!DOCTYPE\ X3D		X3D (Extensible 3D) model xml text
d797 1
a797 2
# Extension: .bik
# URL:  http://wiki.multimedia.cx/index.php?title=Bink_Container
a815 5

# Type:	NUT Container
# URL:	http://wiki.multimedia.cx/index.php?title=NUT
# From:	Adam Buchbinder <adam.buchbinder@@gmail.com>
0	string	nut/multimedia\ container\0	NUT multimedia container
@


1.1.1.3
log
@from ftp.astron.com:
- elf seeking fixes
- improvements in cdf parsing
- waitpid only for our child
- magic fixes and additions
@
text
@d3 1
a3 1
# $File: animation,v 1.45 2011/09/06 11:00:06 christos Exp $
a837 58

# Type: Nullsoft Video (NSV)
# URL:  http://wiki.multimedia.cx/index.php?title=Nullsoft_Video
# From: Mike Melanson <mike@@multimedia.cx>
0	string	NSVf	Nullsoft Video

# Type: REDCode Video
# URL:  http://www.red.com/ ; http://wiki.multimedia.cx/index.php?title=REDCode
# From: Mike Melanson <mike@@multimedia.cx>
4	string	RED1	REDCode Video

# Type: MTV Multimedia File
# URL:  http://wiki.multimedia.cx/index.php?title=MTV
# From: Mike Melanson <mike@@multimedia.cx>
0	string	AMVS	MTV Multimedia File

# Type: ARMovie
# URL:  http://wiki.multimedia.cx/index.php?title=ARMovie
# From: Mike Melanson <mike@@multimedia.cx>
0	string	ARMovie\012	ARMovie

# Type: Interplay MVE Movie
# URL:  http://wiki.multimedia.cx/index.php?title=Interplay_MVE
# From: Mike Melanson <mike@@multimedia.cx>
0	string	Interplay\040MVE\040File\032	Interplay MVE Movie

# Type: Windows Television DVR File
# URL:  http://wiki.multimedia.cx/index.php?title=WTV
# From: Mike Melanson <mike@@mutlimedia.cx>
# This takes the form of a Windows-style GUID
0	bequad	0xB7D800203749DA11
>8	bequad	0xA64E0007E95EAD8D	Windows Television DVR Media

# Type: Sega FILM/CPK Multimedia
# URL:  http://wiki.multimedia.cx/index.php?title=Sega_FILM
# From: Mike Melanson <mike@@multimedia.cx>
0	string	FILM	Sega FILM/CPK Multimedia,
>32	belong	x	%d x
>28	belong	x	%d

# Type: Nintendo THP Multimedia
# URL:  http://wiki.multimedia.cx/index.php?title=THP
# From: Mike Melanson <mike@@multimedia.cx>
0	string	THP\0	Nintendo THP Multimedia

# Type: BBC Dirac Video
# URL:  http://wiki.multimedia.cx/index.php?title=Dirac
# From: Mike Melanson <mike@@multimedia.cx>
0	string	BBCD	BBC Dirac Video

# Type: RAD Game Tools Smacker Multimedia
# URL:  http://wiki.multimedia.cx/index.php?title=Smacker
# From: Mike Melanson <mike@@multimedia.cx>
0	string	SMK	RAD Game Tools Smacker Multimedia
>3	byte	x	version %c,
>4	lelong	x	%d x
>8	lelong	x	%d,
>12	lelong	x	%d frames
@


1.1.1.3.8.1
log
@resync with head
@
text
@d3 1
a3 1
# $File: animation,v 1.46 2012/08/26 10:43:05 christos Exp $
d691 4
d702 3
a704 3
# conti_count   4 bit	-
0	belong&0xFF5FFF10	0x47400010
>188	byte			0x47		MPEG transport stream data
@


1.1.1.3.8.2
log
@resync from head
@
text
@d3 1
a3 1
# $File: animation,v 1.48 2013/03/09 22:36:00 christos Exp $
a91 1
# GRR too general as it catches also FoxPro Memo example NG.FPT
a92 2
# TODO: maybe this extra line exclude FoxPro Memo example NG.FPT starting with 000001b0 00000100 00000000
#>>4      byte               !0             MPEG sequence, v4
d754 1
a754 1
>0x26	ubeshort	x		%dus,
@


1.1.1.3.8.3
log
@Rebase to HEAD as of a few days ago.
@
text
@d3 1
a3 1
# $File: animation,v 1.53 2014/04/30 21:41:02 christos Exp $
a453 1
!:mime	audio/mpeg
d623 1
a623 1
#>1     beshort&0x1FFF  x              \b, %hu byte packet
d721 2
a722 2
>>16    belong	x				%d x
>>20    belong	x				%d
d729 2
a730 2
>>16    belong	x				%d x
>>20    belong	x				%d
d791 19
a809 20
# FIXME: This section is from the old magic.mime file and needs
# integrating with the rest
#0       belong             0x000001BA
#>4      byte               &0x40
#!:mime	video/mp2p
#>4      byte               ^0x40
#!:mime	video/mpeg
#0       belong             0x000001BB
#!:mime	video/mpeg
#0       belong             0x000001B0
#!:mime	video/mp4v-es
#0       belong             0x000001B5
#!:mime	video/mp4v-es
#0       belong             0x000001B3
#!:mime	video/mpv
#0       belong&0xFF5FFF10  0x47400010
#!:mime	video/mp2t
#0       belong             0x00000001
#>4      byte&0x1F	   0x07
#!:mime	video/h264
@


1.1.1.3.2.1
log
@sync with head
@
text
@d3 1
a3 1
# $File: animation,v 1.46 2012/08/26 10:43:05 christos Exp $
d691 4
d702 3
a704 3
# conti_count   4 bit	-
0	belong&0xFF5FFF10	0x47400010
>188	byte			0x47		MPEG transport stream data
@


1.1.1.3.2.2
log
@sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")
@
text
@d3 1
a3 1
# $File: animation,v 1.49 2013/08/15 13:15:11 christos Exp $
a91 1
# GRR too general as it catches also FoxPro Memo example NG.FPT
a92 2
# TODO: maybe this extra line exclude FoxPro Memo example NG.FPT starting with 000001b0 00000100 00000000
#>>4      byte               !0             MPEG sequence, v4
d754 1
a754 1
>0x26	ubeshort	x		%dus,
d802 1
a802 1
0       belong&0xFF5FFF10  0x47400010
@


1.1.1.4
log
@from ftp.astron.com
@
text
@d3 1
a3 1
# $File: animation,v 1.46 2012/08/26 10:43:05 christos Exp $
d691 4
d702 3
a704 3
# conti_count   4 bit	-
0	belong&0xFF5FFF10	0x47400010
>188	byte			0x47		MPEG transport stream data
@


1.1.1.5
log
@import file-5.14
changes are "name" + "use" keyword features, bug fixes
@
text
@d3 1
a3 1
# $File: animation,v 1.48 2013/03/09 22:36:00 christos Exp $
a91 1
# GRR too general as it catches also FoxPro Memo example NG.FPT
a92 2
# TODO: maybe this extra line exclude FoxPro Memo example NG.FPT starting with 000001b0 00000100 00000000
#>>4      byte               !0             MPEG sequence, v4
d754 1
a754 1
>0x26	ubeshort	x		%dus,
@


1.1.1.6
log
@from ftp.astron.com, this is a bug fix release:
       * always leave magic file loaded, don't unload for magic_check, etc.
       * fix default encoding to binary instead of unknown which broke recently
       * handle empty and one byte files, less specially so that
         --mime-encoding does not break completely.
       * fix erroneous non-zero exit code from non-existant file and message
       * add CDF MSI file detection (Guy Helmer)
@
text
@d3 1
a3 1
# $File: animation,v 1.49 2013/08/15 13:15:11 christos Exp $
d805 1
a805 1
0       belong&0xFF5FFF10  0x47400010
@


1.1.1.6.2.1
log
@Rebase.
@
text
@d3 1
a3 1
# $File: animation,v 1.53 2014/04/30 21:41:02 christos Exp $
a453 1
!:mime	audio/mpeg
d623 1
a623 1
#>1     beshort&0x1FFF  x              \b, %hu byte packet
d721 2
a722 2
>>16    belong	x				%d x
>>20    belong	x				%d
d729 2
a730 2
>>16    belong	x				%d x
>>20    belong	x				%d
d791 19
a809 20
# FIXME: This section is from the old magic.mime file and needs
# integrating with the rest
#0       belong             0x000001BA
#>4      byte               &0x40
#!:mime	video/mp2p
#>4      byte               ^0x40
#!:mime	video/mpeg
#0       belong             0x000001BB
#!:mime	video/mpeg
#0       belong             0x000001B0
#!:mime	video/mp4v-es
#0       belong             0x000001B5
#!:mime	video/mp4v-es
#0       belong             0x000001B3
#!:mime	video/mpv
#0       belong&0xFF5FFF10  0x47400010
#!:mime	video/mp2t
#0       belong             0x00000001
#>4      byte&0x1F	   0x07
#!:mime	video/h264
@


1.1.1.7
log
@import file-5.19

2014-06-09   9:04  Christos Zoulas <christos@@zoulas.com>

	* Misc buffer overruns and missing buffer size tests in cdf parsing
	  (Francisco Alonso, Jan Kaluza)

2014-06-02  14:50  Christos Zoulas <christos@@zoulas.com>

	* Enforce limit of 8K on regex searches that have no limits
	* Allow the l modifier for regex to mean line count. Default
	  to byte count. If line count is specified, assume a max
	  of 80 characters per line to limit the byte count.
	* Don't allow conversions to be used for dates, allowing
	  the mask field to be used as an offset.

2014-05-30  12:51  Christos Zoulas <christos@@zoulas.com>

	* Make the range operator limit the length of the
	  regex search.

2014-05-14  19:23  Christos Zoulas <christos@@zoulas.com>

	* PR/347: Windows fixes
	* PR/352: Hangul word processor recognition
	* PR/354: Encoding irregularities in text files

2014-05-06  6:12  Christos Zoulas <christos@@zoulas.com>

	* Fix uninitialized title in CDF files (Jan Kaluza)

2014-05-04  14:55  Christos Zoulas <christos@@zoulas.com>

	* PR/351: Fix compilation of empty files

2014-04-30  17:39  Christos Zoulas <christos@@zoulas.com>

	* Fix integer formats: We don't specify 'l' or
	  'h' and 'hh' specifiers anymore, only 'll' for
	  quads and nothing for the rest. This is so that
	  magic writing is simpler.

2014-04-01  15:25  Christos Zoulas <christos@@zoulas.com>

	* PR/341: Jan Kaluza, fix memory leak
	* PR/342: Jan Kaluza, fix out of bounds read

2014-03-28  15:25  Christos Zoulas <christos@@zoulas.com>

	* Fix issue with long formats not matching fmtcheck
@
text
@d3 1
a3 1
# $File: animation,v 1.53 2014/04/30 21:41:02 christos Exp $
a453 1
!:mime	audio/mpeg
d623 1
a623 1
#>1     beshort&0x1FFF  x              \b, %hu byte packet
d721 2
a722 2
>>16    belong	x				%d x
>>20    belong	x				%d
d729 2
a730 2
>>16    belong	x				%d x
>>20    belong	x				%d
d791 19
a809 20
# FIXME: This section is from the old magic.mime file and needs
# integrating with the rest
#0       belong             0x000001BA
#>4      byte               &0x40
#!:mime	video/mp2p
#>4      byte               ^0x40
#!:mime	video/mpeg
#0       belong             0x000001BB
#!:mime	video/mpeg
#0       belong             0x000001B0
#!:mime	video/mp4v-es
#0       belong             0x000001B5
#!:mime	video/mp4v-es
#0       belong             0x000001B3
#!:mime	video/mpv
#0       belong&0xFF5FFF10  0x47400010
#!:mime	video/mp2t
#0       belong             0x00000001
#>4      byte&0x1F	   0x07
#!:mime	video/h264
@


1.1.1.8
log
@import file-5.20; bug fixes and better image magic descriptions.
@
text
@d3 1
a3 1
# $File: animation,v 1.55 2014/09/13 14:29:51 christos Exp $
a34 1
# http://www.ftyps.com/ with local additions
d36 11
a46 8
>8	string		3g2		\b, MPEG v4 system, 3GPP2
!:mime	video/3gpp2
>>11	byte		4		\b v4 (H.263/AMR GSM 6.10)
>>11	byte		5		\b v5 (H.263/AMR GSM 6.10)
>>11	byte		6		\b v6 (ITU H.264/AMR GSM 6.10)
>>11	byte		a		\b C.S0050-0 V1.0
>>11	byte		b		\b C.S0050-0-A V1.0.0
>>11	byte		c		\b C.S0050-0-B V1.0
a48 2
>>11	byte		6		\b, Release 6 MBMS Extended Presentations
>>11	byte		7		\b, Release 7 MBMS Extended Presentations
a49 1
>11	byte		6		\b, Release 6 General Profile
a51 7
>11	byte		1		\b, Release %d (non existent)
>11	byte		2		\b, Release %d (non existent)
>11	byte		3		\b, Release %d (non existent)
>11	byte		4		\b, Release %d
>11	byte		5		\b, Release %d
>11	byte		6		\b, Release %d
>11	byte		7		\b, Release %d Streaming Servers
a53 1
>11	byte		7		\b, Release %d Streaming Servers
d55 1
a55 52
>8	string		avc1		\b, MPEG v4 system, 3GPP JVT AVC [ISO 14496-12:2005]
!:mime	video/mp4
>8	string/W	qt		\b, Apple QuickTime movie
!:mime	video/quicktime
>8	string		CAEP		\b, Canon Digital Camera
>8	string		caqv		\b, Casio Digital Camera
>8	string		CDes		\b, Convergent Design
>8	string		da0a		\b, DMB MAF w/ MPEG Layer II aud, MOT slides, DLS, JPG/PNG/MNG
>8	string		da0b		\b, DMB MAF, ext DA0A, with 3GPP timed text, DID, TVA, REL, IPMP
>8	string		da1a		\b, DMB MAF audio with ER-BSAC audio, JPG/PNG/MNG images
>8	string		da1b		\b, DMB MAF, ext da1a, with 3GPP timed text, DID, TVA, REL, IPMP
>8	string		da2a		\b, DMB MAF aud w/ HE-AAC v2 aud, MOT slides, DLS, JPG/PNG/MNG
>8	string		da2b		\b, DMB MAF, ext da2a, with 3GPP timed text, DID, TVA, REL, IPMP
>8	string		da3a		\b, DMB MAF aud with HE-AAC aud, JPG/PNG/MNG images
>8	string		da3b		\b, DMB MAF, ext da3a w/ BIFS, 3GPP, DID, TVA, REL, IPMP
>8	string		dmb1		\b, DMB MAF supporting all the components defined in the spec
>8	string		dmpf		\b, Digital Media Project
>8	string		drc1		\b, Dirac (wavelet compression), encap in ISO base media (MP4)
>8	string		dv1a		\b, DMB MAF vid w/ AVC vid, ER-BSAC aud, BIFS, JPG/PNG/MNG, TS
>8	string		dv1b		\b, DMB MAF, ext dv1a, with 3GPP timed text, DID, TVA, REL, IPMP
>8	string		dv2a		\b, DMB MAF vid w/ AVC vid, HE-AAC v2 aud, BIFS, JPG/PNG/MNG, TS
>8	string		dv2b		\b, DMB MAF, ext dv2a, with 3GPP timed text, DID, TVA, REL, IPMP
>8	string		dv3a		\b, DMB MAF vid w/ AVC vid, HE-AAC aud, BIFS, JPG/PNG/MNG, TS
>8	string		dv3b		\b, DMB MAF, ext dv3a, with 3GPP timed text, DID, TVA, REL, IPMP
>8	string		dvr1		\b, DVB (.DVB) over RTP
!:mime	video/vnd.dvb.file
>8	string		dvt1		\b, DVB (.DVB) over MPEG-2 Transport Stream
!:mime	video/vnd.dvb.file
>8	string		F4V		\b, Video for Adobe Flash Player 9+ (.F4V)
!:mime	video/mp4
>8	string		F4P		\b, Protected Video for Adobe Flash Player 9+ (.F4P)
!:mime	video/mp4
>8	string		F4A		\b, Audio for Adobe Flash Player 9+ (.F4A)
!:mime	audio/mp4
>8	string		F4B		\b, Audio Book for Adobe Flash Player 9+ (.F4B)
!:mime	audio/mp4
>8	string		isc2		\b, ISMACryp 2.0 Encrypted File
#	?/enc-isoff-generic
>8	string		iso2		\b, MP4 Base Media v2 [ISO 14496-12:2005]
!:mime	video/mp4
>8	string		isom		\b, MP4 Base Media v1 [IS0 14496-12:2003]
!:mime	video/mp4
>8	string/W	jp2		\b, JPEG 2000
!:mime	image/jp2
>8	string		JP2		\b, JPEG 2000 Image (.JP2) [ISO 15444-1 ?]
!:mime	image/jp2
>8	string		JP20		\b, Unknown, from GPAC samples (prob non-existent)
>8	string		jpm		\b, JPEG 2000 Compound Image (.JPM) [ISO 15444-6]
!:mime	image/jpm
>8	string		jpx		\b, JPEG 2000 w/ extensions (.JPX) [ISO 15444-2]
!:mime	image/jpx
>8	string		KDDI		\b, 3GPP2 EZmovie for KDDI 3G cellphones
d57 3
a59 28
>8	string		M4A 		\b, Apple iTunes AAC-LC (.M4A) Audio
!:mime	audio/x-m4a
>8	string		M4B 		\b, Apple iTunes AAC-LC (.M4B) Audio Book
!:mime	audio/mp4
>8	string		M4P 		\b, Apple iTunes AAC-LC (.M4P) AES Protected Audio
!:mime	video/mp4
>8	string		M4V 		\b, Apple iTunes Video (.M4V) Video
!:mime	video/x-m4v
>8	string		M4VH		\b, Apple TV (.M4V)
!:mime	video/x-m4v
>8	string		M4VP		\b, Apple iPhone (.M4V)
!:mime	video/x-m4v
>8	string		mj2s		\b, Motion JPEG 2000 [ISO 15444-3] Simple Profile
!:mime	video/mj2
>8	string		mjp2		\b, Motion JPEG 2000 [ISO 15444-3] General Profile
!:mime	video/mj2
>8	string		mmp4		\b, MPEG-4/3GPP Mobile Profile (.MP4 / .3GP) (for NTT)
!:mime	video/mp4
>8	string		mobi		\b, MPEG-4, MOBI format
!:mime	video/mp4
>8	string		mp21		\b, MPEG-21 [ISO/IEC 21000-9]
>8	string		mp41		\b, MP4 v1 [ISO 14496-1:ch13]
!:mime	video/mp4
>8	string		mp42		\b, MP4 v2 [ISO 14496-14]
!:mime	video/mp4
>8	string		mp71		\b, MP4 w/ MPEG-7 Metadata [per ISO 14496-12]
>8	string		mp7t		\b, MPEG v4 system, MPEG v7 XML
>8	string		mp7b		\b, MPEG v4 system, MPEG v7 binary XML
d62 3
a64 6
>8	string		MPPI		\b, Photo Player, MAF [ISO/IEC 23000-3]
>8	string		mqt		\b, Sony / Mobile QuickTime (.MQV) US Pat 7,477,830
!:mime	video/quicktime
>8	string		MSNV		\b, MPEG-4 (.MP4) for SonyPSP
!:mime	audio/mp4
>8	string		NDAS		\b, MP4 v2 [ISO 14496-14] Nero Digital AAC Audio
d66 1
a66 1
>8	string		NDSC		\b, MPEG-4 (.MP4) Nero Cinema Profile
d68 3
a70 23
>8	string		NDSH		\b, MPEG-4 (.MP4) Nero HDTV Profile
!:mime	video/mp4
>8	string		NDSM		\b, MPEG-4 (.MP4) Nero Mobile Profile
!:mime	video/mp4
>8	string		NDSP		\b, MPEG-4 (.MP4) Nero Portable Profile
!:mime	video/mp4
>8	string		NDSS		\b, MPEG-4 (.MP4) Nero Standard Profile
!:mime	video/mp4
>8	string		NDXC		\b, H.264/MPEG-4 AVC (.MP4) Nero Cinema Profile
!:mime	video/mp4
>8	string		NDXH		\b, H.264/MPEG-4 AVC (.MP4) Nero HDTV Profile
!:mime	video/mp4
>8	string		NDXM		\b, H.264/MPEG-4 AVC (.MP4) Nero Mobile Profile
!:mime	video/mp4
>8	string		NDXP		\b, H.264/MPEG-4 AVC (.MP4) Nero Portable Profile
!:mime	video/mp4
>8	string		NDXS		\b, H.264/MPEG-4 AVC (.MP4) Nero Standard Profile
!:mime	video/mp4
>8	string		odcf  		\b, OMA DCF DRM Format 2.0 (OMA-TS-DRM-DCF-V2_0-20060303-A)
>8	string		opf2 		\b, OMA PDCF DRM Format 2.1 (OMA-TS-DRM-DCF-V2_1-20070724-C)
>8	string		opx2  		\b, OMA PDCF DRM + XBS ext (OMA-TS-DRM_XBS-V1_0-20070529-C)
>8	string		pana		\b, Panasonic Digital Camera
>8	string		qt  		\b, Apple QuickTime (.MOV/QT)
a71 4
>8	string		ROSS		\b, Ross Video
>8	string		sdv		\b, SD Memory Card Video
>8	string		ssc1		\b, Samsung stereo, single stream (patent pending)
>8	string		ssc2		\b, Samsung stereo, dual stream (patent pending)
@


1.1.1.9
log
@Import file-5.22
@
text
@d3 1
a3 1
# $File: animation,v 1.56 2014/10/23 23:12:51 christos Exp $
d117 1
a117 1
>8	string		M4A 		\b, Apple iTunes ALAC/AAC-LC (.M4A) Audio
d119 1
a119 1
>8	string		M4B 		\b, Apple iTunes ALAC/AAC-LC (.M4B) Audio Book
d121 1
a121 1
>8	string		M4P 		\b, Apple iTunes ALAC/AAC-LC (.M4P) AES Protected Audio
@


1.1.1.9.4.1
log
@Sync with HEAD
@
text
@d3 1
a3 1
# $File: animation,v 1.59 2017/01/21 16:07:14 christos Exp $
a78 2
>8	string		dash		\b, MPEG v4 system, Dynamic Adaptive Streaming over HTTP
!:mime	video/mp4
d856 4
a859 6
# mimetype from https://www.iana.org/assignments/media-types/model/x3d+xml
# Example http://www.web3d.org/x3d/content/examples/Basic/course/CreateX3DFromStringRandomSpheres.x3d
0	string/w	\<?xml\ version=
!:strength + 5
>20	search/1000/w	\<!DOCTYPE\ X3D		X3D (Extensible 3D) model xml text
!:mime model/x3d+xml
a1008 8

# Material Exchange Format
# More information:
# https://en.wikipedia.org/wiki/Material_Exchange_Format
# http://www.freemxf.org/
0	string	\x06\x0e\x2b\x34\x02\x05\x01\x01\x0d\x01\x02\x01\x01\x02	Material exchange container format
!:ext	mxf
!:mime	application/mxf
@


1.1.1.9.2.1
log
@Sync with HEAD
@
text
@d3 1
a3 1
# $File: animation,v 1.59 2017/01/21 16:07:14 christos Exp $
a78 2
>8	string		dash		\b, MPEG v4 system, Dynamic Adaptive Streaming over HTTP
!:mime	video/mp4
d856 4
a859 6
# mimetype from https://www.iana.org/assignments/media-types/model/x3d+xml
# Example http://www.web3d.org/x3d/content/examples/Basic/course/CreateX3DFromStringRandomSpheres.x3d
0	string/w	\<?xml\ version=
!:strength + 5
>20	search/1000/w	\<!DOCTYPE\ X3D		X3D (Extensible 3D) model xml text
!:mime model/x3d+xml
a1008 8

# Material Exchange Format
# More information:
# https://en.wikipedia.org/wiki/Material_Exchange_Format
# http://www.freemxf.org/
0	string	\x06\x0e\x2b\x34\x02\x05\x01\x01\x0d\x01\x02\x01\x01\x02	Material exchange container format
!:ext	mxf
!:mime	application/mxf
@


1.1.1.10
log
@2017-02-10  12:24  Christos Zoulas <christos@@zoulas.com>

	* release 5.30

2017-02-07  23:27  Christos Zoulas <christos@@zoulas.com>

	* If we exceeded the offset in a search return no match
	  (Christoph Biedl)
	* Be more lenient on corrupt CDF files (Christoph Biedl)

2017-02-04  16:46  Christos Zoulas <christos@@zoulas.com>

	* pacify ubsan sign extension (oss-fuzz/524)

2017-02-01  12:42  Christos Zoulas <christos@@zoulas.com>

	* off by one in cdf parsing (PR/593)
	* report debugging sections in elf (PR/591)

2016-11-06  10:52  Christos Zoulas <christos@@zoulas.com>

	* Allow @@@@@@ in extensions
	* Add missing overflow check in der magic (Jonas Wagner)

2016-10-25  10:40  Christos Zoulas <christos@@zoulas.com>

	* release 5.29

2016-10-24  11:20  Christos Zoulas <christos@@zoulas.com>

	* der getlength overflow (Jonas Wagner)
	* multiple magic file load failure (Christoph Biedl)

2016-10-17  11:26  Christos Zoulas <christos@@zoulas.com>

	* CDF parsing improvements (Guy Helmer)

2016-07-20   7:26  Christos Zoulas <christos@@zoulas.com>

	* Add support for signed indirect offsets

2016-07-18   7:41  Christos Zoulas <christos@@zoulas.com>

	* cat /dev/null | file - should print empty (Christoph Biedl)

2016-07-05  15:20  Christos Zoulas <christos@@zoulas.com>

	* Bump string size from 64 to 96.

2016-06-13  20:20  Christos Zoulas <christos@@zoulas.com>

	* PR/556: Fix separators on annotations.

2016-06-13  19:40  Christos Zoulas <christos@@zoulas.com>

	* release 5.28
	* fix leak on allocation failure

2016-06-01   1:20  Christos Zoulas <christos@@zoulas.com>

	* PR/555: Avoid overflow for offset > nbytes
	* PR/550: Segv on DER parsing:
	    - use the correct variable for length
	    - set offset to 0 on failure.

2016-05-13  12:00  Christos Zoulas <christos@@zoulas.com>

	* release 5.27

2016-04-18   9:35  Christos Zoulas <christos@@zoulas.com>

	* Errors comparing DER entries or computing offsets
	  are just indications of malformed non-DER files.
	  Don't print them.
	* Offset comparison was off-by-one.
	* Fix compression code (Werner Fink)
	* Put new bytes constant in the right file (not the generated one)

2016-04-16  18:34  Christos Zoulas <christos@@zoulas.com>

	* release 5.26

2016-03-31  13:50  Christos Zoulas <christos@@zoulas.com>

	* make the number of bytes read from files configurable.

2016-03-21  13:40  Christos Zoulas <christos@@zoulas.com>

	* Add bounds checks for DER code (discovered by Thomas Jarosch)
	* Change indirect recursion limit to indirect use count and
	  bump from 15 to 50 to prevent abuse.

2016-03-13  20:39  Christos Zoulas <christos@@zoulas.com>

	* Add -00 which prints filename\0description\0

2016-03-01  13:28  Christos Zoulas <christos@@zoulas.com>

	* Fix ID3 indirect parsing

2016-01-19  10:18  Christos Zoulas <christos@@zoulas.com>

	* add DER parsing capability

2015-11-13  10:35  Christos Zoulas <christos@@zoulas.com>

	* provide dprintf(3) for the OS's that don't have it.

2015-11-11  16:25  Christos Zoulas <christos@@zoulas.com>

	* redo the compression code report decompression errors

2015-11-10  23:25  Christos Zoulas <christos@@zoulas.com>

	* REG_STARTEND code is not working as expected, delete it.

2015-11-09  16:05  Christos Zoulas <christos@@zoulas.com>

	* Add zlib support if we have it.

2015-11-05  11:22  Christos Zoulas <christos@@zoulas.com>

	* PR/492: compression forking was broken with magic_buffer.

2015-09-16   9:50  Christos Zoulas <christos@@zoulas.com>

	* release 5.25

2015-09-11  13:25  Christos Zoulas <christos@@zoulas.com>

	* add a limit to the length of regex searches

2015-09-08   9:50  Christos Zoulas <christos@@zoulas.com>

	* fix problems with --parameter (Christoph Biedl)

2015-07-11  10:35  Christos Zoulas <christos@@zoulas.com>

	* Windows fixes PR/466 (Jason Hood)

2015-07-09  10:35  Christos Zoulas <christos@@zoulas.com>

	* release 5.24

2015-06-11   8:52  Christos Zoulas <christos@@zoulas.com>

	* redo long option encoding to fix off-by-one in 5.23

2015-06-10  13:50  Christos Zoulas <christos@@zoulas.com>

	* release 5.23

2015-06-09  16:10  Christos Zoulas <christos@@zoulas.com>

	* Fix issue with regex range for magic with offset
	* Always return true from mget with USE (success to mget not match
	  indication). Fixes mime evaluation after USE magic
	* PR/459: Don't insert magic entries to the list if there are parsing
	  errors for them.

2015-06-03  16:00  Christos Zoulas <christos@@zoulas.com>

	* PR/455: Add utf-7 encoding

2015-06-03  14:30  Christos Zoulas <christos@@zoulas.com>

	* PR/455: Implement -Z, look inside, but don't report on compression
	* PR/454: Fix allocation error on bad magic.

2015-05-29  10:30  Christos Zoulas <christos@@zoulas.com>

	* handle MAGIC_CONTINUE everywhere, not just in softmagic

2015-05-21  14:30  Christos Zoulas <christos@@zoulas.com>

	* don't print descriptions for NAME types when mime.

2015-04-09  15:59  Christos Zoulas <christos@@zoulas.com>

	* Add --extension to list the known extensions for this file type
	  Idea by Andrew J Roazen

2015-02-14  12:23  Christos Zoulas <christos@@zoulas.com>

	* Bump file search buffer size to 1M.

2015-01-09  14:35  Christos Zoulas <christos@@zoulas.com>

	* Fix multiple issues with date formats reported by Christoph Biedl:
		- T_LOCAL meaning was reversed
		- Arithmetic did not work
	  Also stop adjusting daylight savings for gmt printing.

2015-01-05  13:00  Christos Zoulas <christos@@zoulas.com>

	* PR/411: Fix memory corruption from corrupt cdf file.
@
text
@d3 1
a3 1
# $File: animation,v 1.59 2017/01/21 16:07:14 christos Exp $
a78 2
>8	string		dash		\b, MPEG v4 system, Dynamic Adaptive Streaming over HTTP
!:mime	video/mp4
d856 4
a859 6
# mimetype from https://www.iana.org/assignments/media-types/model/x3d+xml
# Example http://www.web3d.org/x3d/content/examples/Basic/course/CreateX3DFromStringRandomSpheres.x3d
0	string/w	\<?xml\ version=
!:strength + 5
>20	search/1000/w	\<!DOCTYPE\ X3D		X3D (Extensible 3D) model xml text
!:mime model/x3d+xml
a1008 8

# Material Exchange Format
# More information:
# https://en.wikipedia.org/wiki/Material_Exchange_Format
# http://www.freemxf.org/
0	string	\x06\x0e\x2b\x34\x02\x05\x01\x01\x0d\x01\x02\x01\x01\x02	Material exchange container format
!:ext	mxf
!:mime	application/mxf
@


1.1.1.11
log
@Import file-5.31; mostly oss-fuzz found bugs.
@
text
@d3 1
a3 1
# $File: animation,v 1.61 2017/04/01 18:26:03 christos Exp $
a36 7
# http://aeroquartet.com/wordpress/2016/03/05/3-xavc-s/
>8	string		XAVC		\b, MPEG v4 system, Sony XAVC Codec
>>96	string		x		\b, Audio "%.4s"
>>118	beshort		x		at %dHz
>>140	string		x		\b, Video "%.4s"
>>168	beshort		x		%d
>>170	beshort		x		\bx%d
d189 1
a189 1
0	 belong		    0x00000001
d195 1
a195 1
0        belong&0xFFFFFF00  0x00000100
d496 2
a497 2
#0	beshort&0xFFFE		0xFFFE
#>2	ubyte&0xF0	>0x0F
d569 1
a569 1
# rate
d571 1
a571 1
>2      byte&0xF0       0x20           \b,  16 kbps
d639 1
a639 1
# rate
@


1.1.1.12
log
@2017-09-02  11:53  Christos Zoulas <christos@@zoulas.com>

	* release 5.32

2017-08-28  16:37  Christos Zoulas <christos@@zoulas.com>

	* Always reset state in {file,buffer}_apprentice (Krzysztof Wilczynski)

2017-08-27  03:55  Christos Zoulas <christos@@zoulas.com>

	* Fix always true condition (Thomas Jarosch)

2017-05-24  17:30  Christos Zoulas <christos@@zoulas.com>

	* pickier parsing of numeric values in magic files.

2017-05-23  17:55  Christos Zoulas <christos@@zoulas.com>

	* PR/615 add magic_getflags()

2017-05-23  13:55  Christos Zoulas <christos@@zoulas.com>

	* release 5.31

2017-03-17  20:32  Christos Zoulas <christos@@zoulas.com>

	* remove trailing spaces from magic files
	* refactor is_tar
	* better bounds checks for cdf
@
text
@d3 1
a3 1
# $File: animation,v 1.63 2017/05/26 14:33:07 christos Exp $
d49 3
a51 5
# http://www.3gpp2.org/Public_html/Specs/C.S0050-B_v1.0_070521.pdf
# Section 8.1.1, corresponds to a, b, c
>>11	byte		0x61		\b C.S0050-0 V1.0
>>11	byte		0x62		\b C.S0050-0-A V1.0.0
>>11	byte		0x63		\b C.S0050-0-B V1.0
@


1.1.1.12.2.1
log
@Sync with HEAD
@
text
@d3 1
a3 1
# $File: animation,v 1.66 2017/10/06 15:36:38 christos Exp $
d59 1
a60 1
>>11	byte		6		\b, Release 6 General Profile
d62 7
a69 7
>>11	byte		1		\b, Release %d (non existent)
>>11	byte		2		\b, Release %d (non existent)
>>11	byte		3		\b, Release %d (non existent)
>>11	byte		4		\b, Release %d
>>11	byte		5		\b, Release %d
>>11	byte		6		\b, Release %d
>>11	byte		7		\b, Release %d Streaming Servers
d71 1
a72 1
>>11	byte		7		\b, Release %d Streaming Servers
a190 30
# HEIF image format
# see https://nokiatech.github.io/heif/technical.html
>8	string		mif1		\b, HEIF Image
!:mime image/heif
>8	string		msf1		\b, HEIF Image Sequence
!:mime image/heif-sequence
>8	string		heic		\b, HEIF Image HEVC Main or Main Still Picture Profile
!:mime image/heic
>8	string		heix		\b, HEIF Image HEVC Main 10 Profile
!:mime image/heic
>8	string		hevc		\b, HEIF Image Sequenz HEVC Main or Main Still Picture Profile
!:mime image/heic-sequence
>8	string		hevx		\b, HEIF Image Sequence HEVC Main 10 Profile
!:mime image/heic-sequence
# following HEIF brands are not mentioned in the heif technical info currently (Oct 2017)
# but used in the reference implementation:
# https://github.com/nokiatech/heif/blob/d5e9a21c8ba8df712bdf643021dd9f6518134776/Srcs/reader/hevcimagefilereader.cpp
>8	string		heim		\b, HEIF Image L-HEVC
!:mime image/heif
>8	string		heis		\b, HEIF Image L-HEVC
!:mime image/heif
>8	string		avic		\b, HEIF Image AVC
!:mime image/heif
>8	string		hevm		\b, HEIF Image Sequence L-HEVC
!:mime image/heif-sequence
>8	string		hevs		\b, HEIF Image Sequence L-HEVC
!:mime image/heif-sequence
>8	string		avcs		\b, HEIF Image Sequence AVC
!:mime image/heif-sequence

@


1.1.1.12.2.2
log
@Sync with head
@
text
@d3 1
a3 1
# $File: animation,v 1.69 2018/08/21 12:48:06 christos Exp $
a857 1
!:mime  video/MP2T
a1059 7

# Recognize LucasArts Smush video files (cf.
# https://wiki.multimedia.cx/index.php/Smush)
0	string	ANIM
>8	string	AHDR	LucasArts Smush Animation Format (SAN) video
0	string	SANM
>8	string	SHDR	LucasArts Smush v2 (SANM) video
@


1.1.1.13
log
@2018-04-15  14:52  Christos Zoulas <christos@@zoulas.com>

	* release 5.33

2018-02-24  14:50  Christos Zoulas <christos@@zoulas.com>

	* extend the support for ${x?:} expansions for magic descriptions

2018-02-21  16:25  Christos Zoulas <christos@@zoulas.com>

	* add support for ${x?:} in mime types to handle
	  pie binaries.

2017-11-03   9:23  Christos Zoulas <christos@@zoulas.com>

	* add support for negative offsets (offsets from the end of file)

2017-09-26   8:22  Christos Zoulas <christos@@zoulas.com>

	* close the file on error when writing magic (Steve Grubb)

2017-09-24  12:02  Christos Zoulas <christos@@zoulas.com>

	* seccomp support (Paul Moore)

2017-09-02  11:53  Christos Zoulas <christos@@zoulas.com>

	* release 5.32

2017-08-28  16:37  Christos Zoulas <christos@@zoulas.com>

	* Always reset state in {file,buffer}_apprentice (Krzysztof Wilczynski)

2017-08-27  03:55  Christos Zoulas <christos@@zoulas.com>

	* Fix always true condition (Thomas Jarosch)

2017-05-24  17:30  Christos Zoulas <christos@@zoulas.com>

	* pickier parsing of numeric values in magic files.

2017-05-23  17:55  Christos Zoulas <christos@@zoulas.com>

	* PR/615 add magic_getflags()
@
text
@d3 1
a3 1
# $File: animation,v 1.66 2017/10/06 15:36:38 christos Exp $
d59 1
a60 1
>>11	byte		6		\b, Release 6 General Profile
d62 7
a69 7
>>11	byte		1		\b, Release %d (non existent)
>>11	byte		2		\b, Release %d (non existent)
>>11	byte		3		\b, Release %d (non existent)
>>11	byte		4		\b, Release %d
>>11	byte		5		\b, Release %d
>>11	byte		6		\b, Release %d
>>11	byte		7		\b, Release %d Streaming Servers
d71 1
a72 1
>>11	byte		7		\b, Release %d Streaming Servers
a190 30
# HEIF image format
# see https://nokiatech.github.io/heif/technical.html
>8	string		mif1		\b, HEIF Image
!:mime image/heif
>8	string		msf1		\b, HEIF Image Sequence
!:mime image/heif-sequence
>8	string		heic		\b, HEIF Image HEVC Main or Main Still Picture Profile
!:mime image/heic
>8	string		heix		\b, HEIF Image HEVC Main 10 Profile
!:mime image/heic
>8	string		hevc		\b, HEIF Image Sequenz HEVC Main or Main Still Picture Profile
!:mime image/heic-sequence
>8	string		hevx		\b, HEIF Image Sequence HEVC Main 10 Profile
!:mime image/heic-sequence
# following HEIF brands are not mentioned in the heif technical info currently (Oct 2017)
# but used in the reference implementation:
# https://github.com/nokiatech/heif/blob/d5e9a21c8ba8df712bdf643021dd9f6518134776/Srcs/reader/hevcimagefilereader.cpp
>8	string		heim		\b, HEIF Image L-HEVC
!:mime image/heif
>8	string		heis		\b, HEIF Image L-HEVC
!:mime image/heif
>8	string		avic		\b, HEIF Image AVC
!:mime image/heif
>8	string		hevm		\b, HEIF Image Sequence L-HEVC
!:mime image/heif-sequence
>8	string		hevs		\b, HEIF Image Sequence L-HEVC
!:mime image/heif-sequence
>8	string		avcs		\b, HEIF Image Sequence AVC
!:mime image/heif-sequence

@


1.1.1.13.2.1
log
@Sync with HEAD
@
text
@d3 1
a3 1
# $File: animation,v 1.71 2019/04/19 00:42:27 christos Exp $
d35 1
a35 1
# https://www.ftyps.com/ with local additions
d37 1
a37 1
# https://aeroquartet.com/wordpress/2016/03/05/3-xavc-s/
d49 1
a49 1
# https://www.3gpp2.org/Public_html/Specs/C.S0050-B_v1.0_070521.pdf
a857 1
!:mime  video/MP2T
d895 1
a895 1
# X3D (Extensible 3D) [https://www.web3d.org/specifications/x3d-3.0.dtd]
d898 1
a898 1
# Example https://www.web3d.org/x3d/content/examples/Basic/course/CreateX3DFromStringRandomSpheres.x3d
d970 1
a970 1
# URL:  https://wiki.multimedia.cx/index.php?title=Bink_Container
d991 1
a991 1
# URL:	https://wiki.multimedia.cx/index.php?title=NUT
d996 1
a996 1
# URL:  https://wiki.multimedia.cx/index.php?title=Nullsoft_Video
d1001 1
a1001 1
# URL:  https://www.red.com/ ; https://wiki.multimedia.cx/index.php?title=REDCode
d1006 1
a1006 1
# URL:  https://wiki.multimedia.cx/index.php?title=MTV
d1011 1
a1011 1
# URL:  https://wiki.multimedia.cx/index.php?title=ARMovie
d1016 1
a1016 1
# URL:  https://wiki.multimedia.cx/index.php?title=Interplay_MVE
d1021 1
a1021 1
# URL:  https://wiki.multimedia.cx/index.php?title=WTV
d1028 1
a1028 1
# URL:  https://wiki.multimedia.cx/index.php?title=Sega_FILM
d1035 1
a1035 1
# URL:  https://wiki.multimedia.cx/index.php?title=THP
d1040 1
a1040 1
# URL:  https://wiki.multimedia.cx/index.php?title=Dirac
d1045 1
a1045 1
# URL:  https://wiki.multimedia.cx/index.php?title=Smacker
a1059 14

# Recognize LucasArts Smush video files (cf.
# https://wiki.multimedia.cx/index.php/Smush)
0	string	ANIM
>8	string	AHDR	LucasArts Smush Animation Format (SAN) video
0	string	SANM
>8	string	SHDR	LucasArts Smush v2 (SANM) video

# Type: Scaleform video
# Extension: .usm
# URL:  https://wiki.multimedia.cx/index.php/USM
# From: David Korth <gerbilsoft@@gerbilsoft.com>
0	string	CRID
>32	string	@@UTF	Scaleform video
@


1.1.1.13.2.2
log
@Merge changes from current as of 20200406
@
text
@d3 1
a3 1
# $File: animation,v 1.74 2019/10/29 01:06:20 christos Exp $
a447 1
# But also beat GEMDOS fonts
d450 27
a476 3
>2	byte&0xF0	!0	
>>2	byte&0xF0	!0xF0		MPEG ADTS, layer III, v1
!:strength +20
a477 14
>2	byte&0xF0	0x10		\b, 32 kbps
>2	byte&0xF0	0x20		\b, 40 kbps
>2	byte&0xF0	0x30		\b, 48 kbps
>2	byte&0xF0	0x40		\b, 56 kbps
>2	byte&0xF0	0x50		\b, 64 kbps
>2	byte&0xF0	0x60		\b, 80 kbps
>2	byte&0xF0	0x70		\b, 96 kbps
>2	byte&0xF0	0x80		\b, 112 kbps
>2	byte&0xF0	0x90		\b, 128 kbps
>2	byte&0xF0	0xA0		\b, 160 kbps
>2	byte&0xF0	0xB0		\b, 192 kbps
>2	byte&0xF0	0xC0		\b, 224 kbps
>2	byte&0xF0	0xD0		\b, 256 kbps
>2	byte&0xF0	0xE0		\b, 320 kbps
d479 3
a481 3
>2	byte&0x0C	0x00		\b, 44.1 kHz
>2	byte&0x0C	0x04		\b, 48 kHz
>2	byte&0x0C	0x08		\b, 32 kHz
d483 11
a493 11
>3	byte&0xC0	0x00		\b, Stereo
>3	byte&0xC0	0x40		\b, JntStereo
>3	byte&0xC0	0x80		\b, 2x Monaural
>3	byte&0xC0	0xC0		\b, Monaural
#>1	byte		^0x01		\b, Data Verify
#>2	byte		&0x02		\b, Packet Pad
#>2	byte		&0x01		\b, Custom Flag
#>3	byte		&0x08		\b, Copyrighted
#>3	byte		&0x04		\b, Original Source
#>3	byte&0x03	1		\b, NR: 50/15 ms
#>3	byte&0x03	3		\b, NR: CCIT J.17
a889 3
# ABC (alembic.io 3d models)
0	string	0gawa		ABC 3d model

d973 2
a974 1
0	name		bik
a990 8
0	string		BIK
>3	regex		=[bdfghi]	Bink Video rev.%s
>>0	use		bik

0	string		KB2
>3	regex		=[adfghi]	Bink Video 2 rev.%s
>>0	use		bik

@


1.1.1.14
log
@2018-10-18  19:32  Christos Zoulas <christos@@zoulas.com>

	* release 5.35

2018-09-10  20:38  Christos Zoulas <christos@@zoulas.com>

	* Add FreeBSD ELF core file support (John Baldwin)

2018-08-20  18:40  Christos Zoulas <christos@@zoulas.com>

	* PR/30: Allow all parameter values to be set (don't treat 0 specially)
	* handle default annotations on the softmagic match instead at the
	  end.

2018-07-25  10:17  Christos Zoulas <christos@@zoulas.com>

	* PR/23: Recognize JSON files

2018-07-25  10:17  Christos Zoulas <christos@@zoulas.com>

	* PR/18: file --mime-encoding should not print mime-type

2018-07-25   8:50  Christos Zoulas <christos@@zoulas.com>

	* release 5.34

2018-06-22  16:38  Christos Zoulas <christos@@zoulas.com>

	* Add Quad indirect offsets

2018-05-24  14:10  Christos Zoulas <christos@@zoulas.com>

	* Enable parsing of ELF dynamic sections to handle PIE better
@
text
@d3 1
a3 1
# $File: animation,v 1.69 2018/08/21 12:48:06 christos Exp $
a857 1
!:mime  video/MP2T
a1059 7

# Recognize LucasArts Smush video files (cf.
# https://wiki.multimedia.cx/index.php/Smush)
0	string	ANIM
>8	string	AHDR	LucasArts Smush Animation Format (SAN) video
0	string	SANM
>8	string	SHDR	LucasArts Smush v2 (SANM) video
@


1.1.1.15
log
@2019-05-14  22:26  Christos Zoulas <christos@@zoulas.com>

	* release 5.37

2019-05-09  22:27  Christos Zoulas <christos@@zoulas.com>

	* Make sure that continuation separators are printed
	  with -k within softmagic

2019-05-06  22:27  Christos Zoulas <christos@@zoulas.com>

	* Change SIGPIPE saving and restoring during compression to use
	  sigaction(2) instead of signal(3) and cache it. (Denys Vlasenko)
	* Cache stat(2) calls more to reduce number of calls (Denys Vlasenko)

2019-05-06  17:25  Christos Zoulas <christos@@zoulas.com>

	* PR/77: Handle --mime-type and -k correctly.

2019-05-03  15:26  Christos Zoulas <christos@@zoulas.com>

	* Switch decompression code to use vfork() because
	  tools like rpmdiff and rpmbuild call libmagic
	  with large process footprints (Denys Vlasenko)

2019-04-07  14:05  Christos Zoulas <christos@@zoulas.com>

	* PR/75: --enable-zlib, did not work.

2019-02-27  11:54  Christos Zoulas <christos@@zoulas.com>

	* Improve regex efficiency (Michael Schroeder) by:
		1. Prefixing regex searches with regular search
		   for keywords where possible
		2. Using memmem(3) where available
@
text
@d3 1
a3 1
# $File: animation,v 1.71 2019/04/19 00:42:27 christos Exp $
d35 1
a35 1
# https://www.ftyps.com/ with local additions
d37 1
a37 1
# https://aeroquartet.com/wordpress/2016/03/05/3-xavc-s/
d49 1
a49 1
# https://www.3gpp2.org/Public_html/Specs/C.S0050-B_v1.0_070521.pdf
d896 1
a896 1
# X3D (Extensible 3D) [https://www.web3d.org/specifications/x3d-3.0.dtd]
d899 1
a899 1
# Example https://www.web3d.org/x3d/content/examples/Basic/course/CreateX3DFromStringRandomSpheres.x3d
d971 1
a971 1
# URL:  https://wiki.multimedia.cx/index.php?title=Bink_Container
d992 1
a992 1
# URL:	https://wiki.multimedia.cx/index.php?title=NUT
d997 1
a997 1
# URL:  https://wiki.multimedia.cx/index.php?title=Nullsoft_Video
d1002 1
a1002 1
# URL:  https://www.red.com/ ; https://wiki.multimedia.cx/index.php?title=REDCode
d1007 1
a1007 1
# URL:  https://wiki.multimedia.cx/index.php?title=MTV
d1012 1
a1012 1
# URL:  https://wiki.multimedia.cx/index.php?title=ARMovie
d1017 1
a1017 1
# URL:  https://wiki.multimedia.cx/index.php?title=Interplay_MVE
d1022 1
a1022 1
# URL:  https://wiki.multimedia.cx/index.php?title=WTV
d1029 1
a1029 1
# URL:  https://wiki.multimedia.cx/index.php?title=Sega_FILM
d1036 1
a1036 1
# URL:  https://wiki.multimedia.cx/index.php?title=THP
d1041 1
a1041 1
# URL:  https://wiki.multimedia.cx/index.php?title=Dirac
d1046 1
a1046 1
# URL:  https://wiki.multimedia.cx/index.php?title=Smacker
a1067 7

# Type: Scaleform video
# Extension: .usm
# URL:  https://wiki.multimedia.cx/index.php/USM
# From: David Korth <gerbilsoft@@gerbilsoft.com>
0	string	CRID
>32	string	@@UTF	Scaleform video
@


1.1.1.16
log
@Import 5.38:
	- Always accept -S (no sandbox) even if we don't support sandboxing
	- More syscalls elided for sandboxiing
	- For ELF dynamic means having an interpreter not just PT_DYNAMIC
	- Check for large ELF session header offset
	- When saving and restoring a locale, keep the locale name in our
	  own storage.
	- Add a flag to disable CSV file detection.
	- Don't pass NULL/0 to memset to appease sanitizers.
	- Avoid spurious prints when looks for extensions or apple strings
	  in fsmagic.
	- Add builtin decompressors for xz and and bzip.
	- Add a limit for the number of CDF elements.
	- More checks for overflow in CDF.
@
text
@d3 1
a3 1
# $File: animation,v 1.74 2019/10/29 01:06:20 christos Exp $
a447 1
# But also beat GEMDOS fonts
d450 27
a476 3
>2	byte&0xF0	!0	
>>2	byte&0xF0	!0xF0		MPEG ADTS, layer III, v1
!:strength +20
a477 14
>2	byte&0xF0	0x10		\b, 32 kbps
>2	byte&0xF0	0x20		\b, 40 kbps
>2	byte&0xF0	0x30		\b, 48 kbps
>2	byte&0xF0	0x40		\b, 56 kbps
>2	byte&0xF0	0x50		\b, 64 kbps
>2	byte&0xF0	0x60		\b, 80 kbps
>2	byte&0xF0	0x70		\b, 96 kbps
>2	byte&0xF0	0x80		\b, 112 kbps
>2	byte&0xF0	0x90		\b, 128 kbps
>2	byte&0xF0	0xA0		\b, 160 kbps
>2	byte&0xF0	0xB0		\b, 192 kbps
>2	byte&0xF0	0xC0		\b, 224 kbps
>2	byte&0xF0	0xD0		\b, 256 kbps
>2	byte&0xF0	0xE0		\b, 320 kbps
d479 3
a481 3
>2	byte&0x0C	0x00		\b, 44.1 kHz
>2	byte&0x0C	0x04		\b, 48 kHz
>2	byte&0x0C	0x08		\b, 32 kHz
d483 11
a493 11
>3	byte&0xC0	0x00		\b, Stereo
>3	byte&0xC0	0x40		\b, JntStereo
>3	byte&0xC0	0x80		\b, 2x Monaural
>3	byte&0xC0	0xC0		\b, Monaural
#>1	byte		^0x01		\b, Data Verify
#>2	byte		&0x02		\b, Packet Pad
#>2	byte		&0x01		\b, Custom Flag
#>3	byte		&0x08		\b, Copyrighted
#>3	byte		&0x04		\b, Original Source
#>3	byte&0x03	1		\b, NR: 50/15 ms
#>3	byte&0x03	3		\b, NR: CCIT J.17
a889 3
# ABC (alembic.io 3d models)
0	string	0gawa		ABC 3d model

d973 2
a974 1
0	name		bik
a990 8
0	string		BIK
>3	regex		=[bdfghi]	Bink Video rev.%s
>>0	use		bik

0	string		KB2
>3	regex		=[adfghi]	Bink Video 2 rev.%s
>>0	use		bik

@


1.1.1.17
log
@Import 5.39:

   * Remove unused subtype_mime (Steve Grubb)
   * Remove unused check in okstat (Steve Grubb)
   * Fix mime-type in elf binaries by making sure $x is set
   * Fix indirect negative offsets broken by OFFNEGATIVE
   * Fix GUID equality check
   * PR/165: Handle empty array and strings in JSON
   * PR/162: Add --exclude-quiet
   * Fix memory leak in ascmagic (Steve Grubb)
   * Fix string comparison length with ignore whitespace
   * Fix mingwin 64 compilation
   * PR/159: whitelist getpid needed for file_pipe2file()
   * Indicate negative offsets with a flag OFFNEGATIVE
     so that -0 works.
   * Introduce "offset" magic type that can be used to
     detect the file size, and bail on short files.
   * document DER better in the magic man page.
   * fix memory leaks (SonarQube)
   * rewrite confusing loops (SonarQube)
   * fix bogus test (SonarQube)
   * pass a sized buffer to file_fmttime() (SonarQube)
   * Don't allow * in printf formats, or the code itself (Christoph Biedl)
   * Introduce a printf output size checker to avoid DoS attacks
   * Avoid memory leak on error (oss-fuzz)
   * Check length of string on DER before derefercing and add new types
   * Add missing DER string (oss-fuzz)
   * Add missing DER types, and debugging
   * PR/140: Avoid abort with hand-crafted magic file (gockelhahn)
   * PR/139:  Avoid DoS in printf with hand-crafted magic file (gockelhahn)
   * PR/138: Avoid crash with hand-crafted magic file (gockelhahn)
   * PR/136: Fix static build by adding a libmagic.pc (Fabrice Fontaine)
   * add guid support native support via the "guid" type.
@
text
@d3 1
a3 1
# $File: animation,v 1.77 2020/04/26 15:23:43 christos Exp $
d162 1
a162 1
!:mime	video/mp4
d858 4
@


1.1.1.18
log
@2021-03-30  20:21  Christos Zoulas <christos@@zoulas.com>

	* release 5.40

2021-02-05  16:31  Christos Zoulas <christos@@zoulas.com>

	* PR/234: Add limit to the number of bytes to scan for encoding
	* PR/230: Fix /T (trim flag) for regex

2021-02-01  12:31  Christos Zoulas <christos@@zoulas.com>
	* PR/77: Trim trailing separator.

2020-12-17  15:44  Christos Zoulas <christos@@zoulas.com>

	* PR/211: Convert system read errors from corrupt ELF
	  files into human readable error messages

2020-12-08  16:24  Christos Zoulas <christos@@zoulas.com>

	* fix multithreaded decompression file descriptor issue
	  by using close-on-exec (Denys Vlasenko)

2020-06-27  11:58  Christos Zoulas <christos@@zoulas.com>

	* Exclude surrogate pairs from utf-8 detection (Michael Liu)

2020-06-25  12:53  Christos Zoulas <christos@@zoulas.com>

	* Include # to the list of ignored format chars (Werner Fink)
@
text
@d3 1
a3 1
# $File: animation,v 1.85 2021/03/14 16:36:53 christos Exp $
a34 2

#### MP4 ####
a35 1
# https://cconcolato.github.io/mp4ra/filetype.html
d56 2
a57 5
>>11	byte		6		\b, Release %d MBMS Extended Presentations
>>11	byte		7		\b, Release %d MBMS Extended Presentations
>>11	byte		9		\b, Release %d MBMS Extended Presentations
>8	string		3gf		\b, MPEG v4 system, 3GPP
>>11	byte		9		\b, Release %d File-delivery profile
d60 1
a60 8
>>11	byte		6		\b, Release %d General Profile
>>11	byte		9		\b, Release %d General Profile
>8	string		3gh		\b, MPEG v4 system, 3GPP
!:mime	video/3gpp
>>11	byte		9		\b, Release %d Adaptive Streaming Profile
>8	string		3gm		\b, MPEG v4 system, 3GPP
!:mime	video/3gpp
>>11	byte		9		\b, Release %d Media Segment Profile
a69 4
>8	string		3gr		\b, MPEG v4 system, 3GPP
!:mime	video/3gpp
>>11	byte		6		\b, Release %d Progressive Download Profile
>>11	byte		9		\b, Release %d Progressive Download Profile
a71 1
>>11	byte		6		\b, Release %d Streaming Servers
a72 7
>>11	byte		9		\b, Release %d Streaming Servers
>8	string		3gt		\b, MPEG v4 system, 3GPP
!:mime	video/3gpp
>>11	byte		8		\b, Release %d Media Stream Recording Profile
>>11	byte		9		\b, Release %d Media Stream Recording Profile
>8	string		ARRI		\b, MPEG v4 system, ARRI Digital Camera
!:mime	video/mp4
a74 2
>8	string		bbxm		\b, Blinkbox Master File: H.264 video/16-bit LE LPCM audio
!:mime	video/mp4
a79 19
>8	string		caaa		\b, CMAF Media Profile - AAC Adaptive Audio
>8	string		caac		\b, CMAF Media Profile - AAC Core
>8	string		caqv		\b, Casio Digital Camera	Casio
>8	string		ccea		\b, CMAF Supplemental Data - CEA-608/708
>8	string		ccff		\b, Common container file format
>8	string		cfhd		\b, CMAF Media Profile - AVC HD
>8	string		cfsd		\b, CMAF Media Profile - AVC SD
>8	string		chd1		\b, CMAF Media Profile - HEVC HDR10
>8	string		chdf		\b, CMAF Media Profile - AVC HDHF
>8	string		chhd		\b, CMAF Media Profile - HEVC HHD8
>8	string		chh1		\b, CMAF Media Profile - HEVC HHD10
>8	string		clg1		\b, CMAF Media Profile - HEVC HLG10
>8	string		cmfc		\b, CMAF Track Format
>8	string		cmff		\b, CMAF Fragment Format
>8	string		cmfl		\b, CMAF Chunk Format
>8	string		cmfs		\b, CMAF Segment Format
>8	string		cud1		\b, CMAF Media Profile - HEVC UHD10
>8	string		cud8		\b, CMAF Media Profile - HEVC UHD8
>8	string		cwvt		\b, CMAF Media Profile - WebVTT
a89 6
>8	string		dby1		\b, MP4 files with Dolby content
>8	string		dsms		\b, Media Segment DASH conformant
>8	string		dts1		\b, MP4 track file with audio codecs dtsc dtsh or dtse
>8	string		dts2		\b, MP4 track file with audio codec dtsx
>8	string		dts3		\b, MP4 track file with audio codec dtsy
>8	string		dxo$20		\b, DxO ONE camera
a101 1
>8	string		emsg		\b, Event message box present
a110 3
>8	string		ifrm		\b, Apple iFrame Specification, Version 8.1 Jan 2013
>8	string		im1i		\b, CMAF Media Profile - IMSC1 Image
>8	string		im1t		\b, CMAF Media Profile - IMSC1 Text
d113 1
a113 1
>8	string		iso		\b, MP4 Base Media
d115 1
a115 6
>>11	string		m 		v1 [ISO 14496-12:2003]
>>11	string		2		v2 [ISO 14496-12:2005]
>>11	string		4		v4
>>11	string		5		v5 
>>11	string		6		v6 
>8	string		isml		\b, MP4 Base Media v2 [ISO 14496-12:2005]
a116 2
>8	string		J2P0		\b, JPEG2000 Profile 0
>8	string		J2P1		\b, JPEG2000 Profile 1
a123 1
>8	string		jpsi		\b, The JPSearch data interchange format
a127 2
>8	string		LCAG		\b,  Leica digital camera
>8	string		lmsg		\b, Last Media Segment indicator for ISO base media file format.
a142 2
>8	string		MFSM		\b, Media File for Samsung video Metadata
>8	string		MGSV		\b, Sony Home and Mobile Multimedia Platform (HMMP)
a155 3
>8	string		mpuf		\b, Compliance with the MMT Processing Unit format
>8	string		msdh		\b, Media Segment conforming to ISO base media file format.
>8	string		msix		\b, Media Segment conforming to ISO base media file format.
d162 1
a162 1
!:mime	audio/mp4
a183 1
>8	string		niko		\b, Nikon Digital Camera
a188 2
>8	string		piff		\b, Protected Interoperable File Format
>8	string		pnvi		]b, Panasonic Video Intercom
d220 1
a220 7
# AVIF image format
# see https://aomediacodec.github.io/av1-avif/
>8	string		avif		\b, AVIF Image
!:mime image/avif
>8	string		avis		\b, AVIF Image Sequence
!:mime image/avif
>8	string		risx		\b, Representation Index Segment for MPEG-2 TS Segments
a224 7
>8	string		SEAU		\b, Sony Home and Mobile Multimedia Platform (HMMP)
>8	string		SEBK		\b, Sony Home and Mobile Multimedia Platform (HMMP)
>8	string		senv		\b, Video contents Sony Entertainment Network
>8	string		sims		\b, Media Segment for Sub-Indexed Media Segment format
>8	string		sisx		\b, Single Index Segment forindex MPEG-2 TS
>8	string		ssss		\b, Subsegment Index Segment used to index MPEG-2 Segments
>8	string		uvvu		\b, UltraViolet file brand for DECE Common Format
a236 3
# http://fileformats.archiveteam.org/wiki/Enhanced_VOB
# https://reposcope.com/mimetype/video/mpeg
!:ext	vob/evo/mpg/mpeg
d908 1
a908 3
# From: Stefan A. Haubenthal <polluks@@sdf.lonestar.org>
# Update: Joerg Jenderek
# URL: https://en.wikipedia.org/wiki/VOB
a909 2
!:mime	video/x-ifo
!:ext	ifo/bup
a911 2
!:mime	video/x-ifo
!:ext	ifo/bup
a913 4
# From: Stefan A. Haubenthal <polluks@@sdf.lonestar.org>
0 string xMovieSetter MovieSetter movie
0 string xSceneEditor MovieSetter movie

a1071 5

# http://www.jerrysguide.com/tips/demystify-tvs-file-format.html
0	string	TVS\015\012
>&0	string	Version\040	TeamViewer Session File
>>&0	string	x		\b, version %s
@


1.1.1.19
log
@Import file-5.43+; last was file-5.40

2022-09-20  17:12  Christos Zoulas <christos@@zoulas.com>

	* fixed various clustefuzz issues

2022-09-19  15:54  Christos Zoulas <christos@@zoulas.com>

	* Fix error detection for decompression code (Vincent Mihalkovic)

2022-09-15  13:50  Christos Zoulas <christos@@zoulas.com>

	* Add MAGIC_NO_COMPRESS_FORK and use it to produce a more
	  meaningful error message if we are sandboxing.

2022-09-15  10:45  Christos Zoulas <christos@@zoulas.com>

	* Add built-in lzip decompression support (Michal Gorny)

2022-09-14  10:35  Christos Zoulas <christos@@zoulas.com>

	* Add built-in zstd decompression support (Martin Rodriguez Reboredo)

2022-09-13  14:55  Christos Zoulas <christos@@zoulas.com>

	* release 5.43

2022-09-10   9:17  Christos Zoulas <christos@@zoulas.com>

	* Add octal indirect magic (Michal Gorny)

2022-08-17  11:43  Christos Zoulas <christos@@zoulas.com>

	* PR/374: avoid infinite loop in non-wide code (piru)
	* PR/373: Obey MAGIC_CONTINUE with multiple magic files (vismarli)

2022-07-26  11:10  Christos Zoulas <christos@@zoulas.com>

	* Fix bug with large flist (Florian Weimer)

2022-07-07  13:21  Christos Zoulas <christos@@zoulas.com>

        * PR/364: Detect non-nul-terminated core filenames from QEMU
	  (mam-ableton)

2022-07-04  15:45  Christos Zoulas <christos@@zoulas.com>

	* PR/359: Add support for http://ndjson.org/ (darose)
	* PR/362: Fix wide printing (ro-ee)
	* PR/358: Fix width for -f - (jpalus)
	* PR/356: Fix JSON constant parsing (davewhite)

2022-06-10   9:40  Christos Zoulas <christos@@zoulas.com>

	* release 5.42

2022-05-31  14:50   Christos Zoulas <christos@@zoulas.com>

	* PR/348: add missing cases to prevent file from aborting on
	  random magic files.

2022-05-27  21:05   Christos Zoulas <christos@@zoulas.com>

	* PR/351: octalify filenames when not raw before printing.

2022-04-18  17:51   Christos Zoulas <christos@@zoulas.com>

	* fix regex cacheing bug (Dirk Mueller)
	* merge file_regcomp and file_regerror() to simplify the code
	  and reduce memory requirements for storing regexes (Dirk Mueller)

2022-03-19  12:56   Christos Zoulas <christos@@zoulas.com>

	* cache regex (Dirk Mueller)
	* detect filesystem full by flushing output (Dirk Mueller)

2021-11-19  12:36   Christos Zoulas <christos@@zoulas.com>

	* implement running decompressor programs using
	  posix_spawnp(2) instead of vfork(2)

2021-10-24  11:51   Christos Zoulas <christos@@zoulas.com>

	* Add support for msdos dates and times

2021-10-20   9:55   Christos Zoulas <christos@@zoulas.com>

	* use the system byte swapping functions if available (Werner Fink)

2021-10-18  11:57  Christos Zoulas <christos@@zoulas.com>

	* release 5.41

2021-09-23  03:51  Christos Zoulas <christos@@zoulas.com>

	* Avinash Sonawane: Fix tzname detection

2021-09-03  09:17  Christos Zoulas <christos@@zoulas.com>

	* Fix relationship tests with "search" magic, don't short circuit
	  logic

2021-07-13  01:06  Christos Zoulas <christos@@zoulas.com>

	* Fix memory leak in compile mode

2021-07-01  03:51  Christos Zoulas <christos@@zoulas.com>

	* PR/272: kiefermat: Only set returnval = 1 when we printed something
	  (in all cases print or !print). This simplifies the logic and fixes
	  the issue in the PR with -k and --mime-type there was no continuation
	  printed before the default case.

2021-06-30  13:07  Christos Zoulas <christos@@zoulas.com>

	* PR/270: Don't translate unprintable characters in %s magic formats
	  when -r
	* PR/269: Avoid undefined behavior with clang (adding offset to NULL)

2021-05-09  18:38  Christos Zoulas <christos@@zoulas.com>

	* Add a new flag (f) that requires that the match is a full word,
	   not a partial word match.
	* Add varint types (unused)

2021-04-19  17:17  Christos Zoulas <christos@@zoulas.com>

	* PR/256: mutableVoid: If the file is less than 3 bytes, use the file
	  length to determine type
	* PR/259: aleksandr.v.novichkov: mime printing through indirect magic
	  is not taken into account, use match directly so that it does.

2021-04-04  17:02  Christos Zoulas <christos@@zoulas.com>

	* count the total bytes found not the total byte positions
	  in order to determine encoding (Anatol Belski)
@
text
@d3 1
a3 1
# $File: animation,v 1.90 2022/08/16 11:16:39 christos Exp $
d33 2
a170 1
!:ext	mp4
a939 1
!:ext	ts
a942 1
!:mime  video/x-dv
d970 15
a1176 25

# SER file format - simple uncompressed video format for astronomical use
# Initially developed by Lucam Recorder,
# as of 2021 maintained by Heiko Wilkens, Grischa Hahn
# Typical extensions: .SER
# http://www.grischa-hahn.homepage.t-online.de/astro/ser/SER%20Doc%20V3b.pdf
0	string	LUCAM-RECORDER	SER video sequence
!:ext	ser
>18	lelong	0	\b, bayer: mono
>18	lelong	8	\b, bayer: RGGB
>18	lelong	9	\b, bayer: GRBG
>18	lelong	10	\b, bayer: GBRG
>18	lelong	11	\b, bayer: BGGR
>18	lelong	16	\b, bayer: CYYM
>18	lelong	17	\b, bayer: YCMY
>18	lelong	18	\b, bayer: YMCY
>18	lelong	19	\b, bayer: MYYC
>18	lelong	100	\b, bayer: RGB
>18	lelong	101	\b, bayer: BGR
>22	lelong	0	\b, big-endian
>22	lelong	1	\b, little-endian
>26	lelong	x	\b, width: %d
>30	lelong	x	\b, height: %d
>34	lelong	x	\b, %d bit
>38	lelong	x	\b, frames: %d
@


1.1.1.20
log
@Update to file-5.45 (Last was file-5.44)

2023-07-27  15:45  Christos Zoulas <christos@@zoulas.com>

	* release 5.45

2023-07-17  11:53  Christos Zoulas <christos@@zoulas.com>

	* PR/465: psrok1: Avoid muslc asctime_r crash

2023-05-21  13:05  Christos Zoulas <christos@@zoulas.com>

	* add SIMH tape format support

2023-02-09  12:50  Christos Zoulas <christos@@zoulas.com>

	* bump the max size of the elf section notes to be read to 128K
	  and make it configurable

2023-01-08   1:08  Christos Zoulas <christos@@zoulas.com>

	* PR/415: Fix decompression with program returning empty

2022-12-26   1:47  Christos Zoulas <christos@@zoulas.com>

	* PR/408: fix -p with seccomp
	* PR/412: fix MinGW compilation
@
text
@d3 1
a3 1
# $File: animation,v 1.94 2023/06/16 20:06:50 christos Exp $
d21 2
a22 2
4       string          wide            Apple QuickTime movie (unoptimized)
!:mime	video/quicktime
a39 1
!:mime	video/mp4
a940 9
# Blu-ray disc Audio-Video MPEG-2 transport stream
# From: Alexandre Iooss <erdnaxe@@crans.org>
# URL: https://en.wikipedia.org/wiki/MPEG_transport_stream
# Note: similar to ISO 13818.1 but with 4 extra bytes per packets
4	belong&0xFF5FFF10	=0x47400010
>196	byte			=0x47		BDAV MPEG-2 Transport Stream (M2TS)
!:mime	video/MP2T
!:ext	m2ts/mts

a1187 9

# https://wiki.multimedia.cx/index.php/Duck_IVF
0	string	DKIF	Duck IVF video file
!:mime	video/x-ivf
>4	leshort	>0	\b, version %d
>8	string	x	\b, codec %s
>12	leshort x	\b, %d
>14	leshort x	\bx%d
>24	lelong	>0	\b, %d frames
@


1.1.1.1.2.1
log
@file animation was added on branch jym-xensuspend on 2009-05-13 18:51:54 +0000
@
text
@d1 815
@


1.1.1.1.2.2
log
@Sync with HEAD.

Second commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
@
text
@a0 815

#------------------------------------------------------------------------------
# animation:  file(1) magic for animation/movie formats
#
# animation formats
# MPEG, FLI, DL originally from vax@@ccwf.cc.utexas.edu (VaX#n8)
# FLC, SGI, Apple originally from Daniel Quinlan (quinlan@@yggdrasil.com)

# SGI and Apple formats
0	string		MOVI		Silicon Graphics movie file
!:mime	video/x-sgi-movie
4       string          moov            Apple QuickTime
!:mime	video/quicktime
>12     string          mvhd            \b movie (fast start)
>12     string          mdra            \b URL
>12     string          cmov            \b movie (fast start, compressed header)
>12     string          rmra            \b multiple URLs
4       string          mdat            Apple QuickTime movie (unoptimized)
!:mime	video/quicktime
#4       string          wide            Apple QuickTime movie (unoptimized)
#!:mime	video/quicktime
#4       string          skip            Apple QuickTime movie (modified)
#!:mime	video/quicktime
#4       string          free            Apple QuickTime movie (modified)
#!:mime	video/quicktime
4       string          idsc            Apple QuickTime image (fast start)
!:mime	image/x-quicktime
#4       string          idat            Apple QuickTime image (unoptimized)
#!:mime	image/x-quicktime
4       string          pckg            Apple QuickTime compressed archive
!:mime	application/x-quicktime-player
4	string/B	jP		JPEG 2000 image
!:mime	image/jp2
4	string		ftyp		ISO Media
>8	string		isom		\b, MPEG v4 system, version 1
!:mime	video/mp4
>8	string		iso2		\b, MPEG v4 system, part 12 revision
>8	string		mp41		\b, MPEG v4 system, version 1
!:mime	video/mp4
>8	string		mp42		\b, MPEG v4 system, version 2
!:mime	video/mp4
>8	string		mp7t		\b, MPEG v4 system, MPEG v7 XML
>8	string		mp7b		\b, MPEG v4 system, MPEG v7 binary XML
>8	string/B	jp2		\b, JPEG 2000
!:mime	image/jp2
>8	string		3gp		\b, MPEG v4 system, 3GPP
!:mime	video/3gpp
>>11	byte		4		\b v4 (H.263/AMR GSM 6.10)
>>11	byte		5		\b v5 (H.263/AMR GSM 6.10)
>>11	byte		6		\b v6 (ITU H.264/AMR GSM 6.10)
>8	string		mmp4		\b, MPEG v4 system, 3GPP Mobile
!:mime	video/mp4
>8	string		avc1		\b, MPEG v4 system, 3GPP JVT AVC
!:mime	video/3gpp
>8	string/B	M4A		\b, MPEG v4 system, iTunes AAC-LC
!:mime	audio/mp4
>8	string/B	M4V		\b, MPEG v4 system, iTunes AVC-LC
!:mime	video/mp4
>8	string/B	M4P		\b, MPEG v4 system, iTunes AES encrypted
>8	string/B	M4B		\b, MPEG v4 system, iTunes bookmarked
>8	string/B	qt		\b, Apple QuickTime movie
!:mime	video/quicktime

# MPEG sequences
# Scans for all common MPEG header start codes
0	 belong		    0x00000001     
>4	 byte&0x1F	    0x07	   JVT NAL sequence, H.264 video
>>5      byte               66             \b, baseline
>>5      byte               77             \b, main
>>5      byte               88             \b, extended
>>7      byte               x              \b @@ L %u
0        belong&0xFFFFFF00  0x00000100     
>3       byte               0xBA           MPEG sequence
>>4      byte               &0x40          \b, v2, program multiplex
>>4      byte               ^0x40          \b, v1, system multiplex
>3       byte               0xBB           MPEG sequence, v1/2, multiplex (missing pack header)
>3       byte&0x1F          0x07           MPEG sequence, H.264 video
>>4      byte               66             \b, baseline
>>4      byte               77             \b, main
>>4      byte               88             \b, extended
>>6      byte               x              \b @@ L %u
>3       byte               0xB0           MPEG sequence, v4
>>5      belong             0x000001B5
>>>9     byte               &0x80
>>>>10   byte&0xF0          16             \b, video
>>>>10   byte&0xF0          32             \b, still texture
>>>>10   byte&0xF0          48             \b, mesh
>>>>10   byte&0xF0          64             \b, face
>>>9     byte&0xF8          8              \b, video
>>>9     byte&0xF8          16             \b, still texture
>>>9     byte&0xF8          24             \b, mesh
>>>9     byte&0xF8          32             \b, face
>>4      byte               1              \b, simple @@ L1
>>4      byte               2              \b, simple @@ L2
>>4      byte               3              \b, simple @@ L3
>>4      byte               4              \b, simple @@ L0
>>4      byte               17             \b, simple scalable @@ L1
>>4      byte               18             \b, simple scalable @@ L2
>>4      byte               33             \b, core @@ L1
>>4      byte               34             \b, core @@ L2
>>4      byte               50             \b, main @@ L2
>>4      byte               51             \b, main @@ L3
>>4      byte               53             \b, main @@ L4
>>4      byte               66             \b, n-bit @@ L2
>>4      byte               81             \b, scalable texture @@ L1
>>4      byte               97             \b, simple face animation @@ L1
>>4      byte               98             \b, simple face animation @@ L2
>>4      byte               99             \b, simple face basic animation @@ L1
>>4      byte               100            \b, simple face basic animation @@ L2
>>4      byte               113            \b, basic animation text @@ L1
>>4      byte               114            \b, basic animation text @@ L2
>>4      byte               129            \b, hybrid @@ L1
>>4      byte               130            \b, hybrid @@ L2
>>4      byte               145            \b, advanced RT simple @@ L!
>>4      byte               146            \b, advanced RT simple @@ L2
>>4      byte               147            \b, advanced RT simple @@ L3
>>4      byte               148            \b, advanced RT simple @@ L4
>>4      byte               161            \b, core scalable @@ L1
>>4      byte               162            \b, core scalable @@ L2
>>4      byte               163            \b, core scalable @@ L3
>>4      byte               177            \b, advanced coding efficiency @@ L1
>>4      byte               178            \b, advanced coding efficiency @@ L2
>>4      byte               179            \b, advanced coding efficiency @@ L3
>>4      byte               180            \b, advanced coding efficiency @@ L4
>>4      byte               193            \b, advanced core @@ L1
>>4      byte               194            \b, advanced core @@ L2
>>4      byte               209            \b, advanced scalable texture @@ L1
>>4      byte               210            \b, advanced scalable texture @@ L2
>>4      byte               211            \b, advanced scalable texture @@ L3
>>4      byte               225            \b, simple studio @@ L1
>>4      byte               226            \b, simple studio @@ L2
>>4      byte               227            \b, simple studio @@ L3
>>4      byte               228            \b, simple studio @@ L4
>>4      byte               229            \b, core studio @@ L1
>>4      byte               230            \b, core studio @@ L2
>>4      byte               231            \b, core studio @@ L3
>>4      byte               232            \b, core studio @@ L4
>>4      byte               240            \b, advanced simple @@ L0
>>4      byte               241            \b, advanced simple @@ L1
>>4      byte               242            \b, advanced simple @@ L2
>>4      byte               243            \b, advanced simple @@ L3
>>4      byte               244            \b, advanced simple @@ L4
>>4      byte               245            \b, advanced simple @@ L5
>>4      byte               247            \b, advanced simple @@ L3b
>>4      byte               248            \b, FGS @@ L0
>>4      byte               249            \b, FGS @@ L1
>>4      byte               250            \b, FGS @@ L2
>>4      byte               251            \b, FGS @@ L3
>>4      byte               252            \b, FGS @@ L4
>>4      byte               253            \b, FGS @@ L5
>3       byte               0xB5           MPEG sequence, v4
>>4      byte               &0x80
>>>5     byte&0xF0          16             \b, video (missing profile header)
>>>5     byte&0xF0          32             \b, still texture (missing profile header)
>>>5     byte&0xF0          48             \b, mesh (missing profile header)
>>>5     byte&0xF0          64             \b, face (missing profile header)
>>4      byte&0xF8          8              \b, video (missing profile header)
>>4      byte&0xF8          16             \b, still texture (missing profile header)
>>4      byte&0xF8          24             \b, mesh (missing profile header)
>>4      byte&0xF8          32             \b, face (missing profile header)
>3       byte               0xB3           MPEG sequence
>>12     belong             0x000001B8     \b, v1, progressive Y'CbCr 4:2:0 video
>>12     belong             0x000001B2     \b, v1, progressive Y'CbCr 4:2:0 video
>>12     belong             0x000001B5     \b, v2,
>>>16    byte&0x0F          1              \b HP
>>>16    byte&0x0F          2              \b Spt
>>>16    byte&0x0F          3              \b SNR
>>>16    byte&0x0F          4              \b MP
>>>16    byte&0x0F          5              \b SP
>>>17    byte&0xF0          64             \b@@HL
>>>17    byte&0xF0          96             \b@@H-14
>>>17    byte&0xF0          128            \b@@ML
>>>17    byte&0xF0          160            \b@@LL
>>>17    byte               &0x08          \b progressive
>>>17    byte               ^0x08          \b interlaced
>>>17    byte&0x06          2              \b Y'CbCr 4:2:0 video
>>>17    byte&0x06          4              \b Y'CbCr 4:2:2 video
>>>17    byte&0x06          6              \b Y'CbCr 4:4:4 video
>>11     byte               &0x02
>>>75    byte               &0x01
>>>>140  belong             0x000001B8     \b, v1, progressive Y'CbCr 4:2:0 video
>>>>140  belong             0x000001B2     \b, v1, progressive Y'CbCr 4:2:0 video
>>>>140  belong             0x000001B5     \b, v2,
>>>>>144 byte&0x0F          1              \b HP
>>>>>144 byte&0x0F          2              \b Spt
>>>>>144 byte&0x0F          3              \b SNR
>>>>>144 byte&0x0F          4              \b MP
>>>>>144 byte&0x0F          5              \b SP
>>>>>145 byte&0xF0          64             \b@@HL
>>>>>145 byte&0xF0          96             \b@@H-14
>>>>>145 byte&0xF0          128            \b@@ML
>>>>>145 byte&0xF0          160            \b@@LL
>>>>>145 byte               &0x08          \b progressive
>>>>>145 byte               ^0x08          \b interlaced
>>>>>145 byte&0x06          2              \b Y'CbCr 4:2:0 video
>>>>>145 byte&0x06          4              \b Y'CbCr 4:2:2 video
>>>>>145 byte&0x06          6              \b Y'CbCr 4:4:4 video
>>76    belong             0x000001B8     \b, v1, progressive Y'CbCr 4:2:0 video
>>76    belong             0x000001B2     \b, v1, progressive Y'CbCr 4:2:0 video
>>76    belong             0x000001B5     \b, v2,
>>>80   byte&0x0F          1              \b HP
>>>80   byte&0x0F          2              \b Spt
>>>80   byte&0x0F          3              \b SNR
>>>80   byte&0x0F          4              \b MP
>>>80   byte&0x0F          5              \b SP
>>>81   byte&0xF0          64             \b@@HL
>>>81   byte&0xF0          96             \b@@H-14
>>>81   byte&0xF0          128            \b@@ML
>>>81   byte&0xF0          160            \b@@LL
>>>81   byte               &0x08          \b progressive
>>>81   byte               ^0x08          \b interlaced
>>>81   byte&0x06          2              \b Y'CbCr 4:2:0 video
>>>81   byte&0x06          4              \b Y'CbCr 4:2:2 video
>>>81   byte&0x06          6              \b Y'CbCr 4:4:4 video
>>4      belong&0xFFFFFF00  0x78043800     \b, HD-TV 1920P
>>>7     byte&0xF0          0x10           \b, 16:9
>>4      belong&0xFFFFFF00  0x50002D00     \b, SD-TV 1280I
>>>7     byte&0xF0          0x10           \b, 16:9
>>4      belong&0xFFFFFF00  0x30024000     \b, PAL Capture
>>>7     byte&0xF0          0x10           \b, 4:3
>>4      beshort&0xFFF0     0x2C00         \b, 4CIF
>>>5     beshort&0x0FFF     0x01E0         \b NTSC
>>>5     beshort&0x0FFF     0x0240         \b PAL
>>>7     byte&0xF0          0x20           \b, 4:3
>>>7     byte&0xF0          0x30           \b, 16:9
>>>7     byte&0xF0          0x40           \b, 11:5
>>>7     byte&0xF0          0x80           \b, PAL 4:3
>>>7     byte&0xF0          0xC0           \b, NTSC 4:3
>>4      belong&0xFFFFFF00  0x2801E000     \b, LD-TV 640P
>>>7     byte&0xF0          0x10           \b, 4:3
>>4      belong&0xFFFFFF00  0x1400F000     \b, 320x240
>>>7     byte&0xF0          0x10           \b, 4:3
>>4      belong&0xFFFFFF00  0x0F00A000     \b, 240x160
>>>7     byte&0xF0          0x10           \b, 4:3
>>4      belong&0xFFFFFF00  0x0A007800     \b, 160x120
>>>7     byte&0xF0          0x10           \b, 4:3
>>4      beshort&0xFFF0     0x1600         \b, CIF
>>>5     beshort&0x0FFF     0x00F0         \b NTSC
>>>5     beshort&0x0FFF     0x0120         \b PAL
>>>7     byte&0xF0          0x20           \b, 4:3
>>>7     byte&0xF0          0x30           \b, 16:9
>>>7     byte&0xF0          0x40           \b, 11:5
>>>7     byte&0xF0          0x80           \b, PAL 4:3
>>>7     byte&0xF0          0xC0           \b, NTSC 4:3
>>>5     beshort&0x0FFF     0x0240         \b PAL 625
>>>>7    byte&0xF0          0x20           \b, 4:3
>>>>7    byte&0xF0          0x30           \b, 16:9
>>>>7    byte&0xF0          0x40           \b, 11:5
>>4      beshort&0xFFF0     0x2D00         \b, CCIR/ITU
>>>5     beshort&0x0FFF     0x01E0         \b NTSC 525
>>>5     beshort&0x0FFF     0x0240         \b PAL 625
>>>7     byte&0xF0          0x20           \b, 4:3
>>>7     byte&0xF0          0x30           \b, 16:9
>>>7     byte&0xF0          0x40           \b, 11:5
>>4      beshort&0xFFF0     0x1E00         \b, SVCD
>>>5     beshort&0x0FFF     0x01E0         \b NTSC 525
>>>5     beshort&0x0FFF     0x0240         \b PAL 625
>>>7     byte&0xF0          0x20           \b, 4:3
>>>7     byte&0xF0          0x30           \b, 16:9
>>>7     byte&0xF0          0x40           \b, 11:5
>>7      byte&0x0F          1              \b, 23.976 fps
>>7      byte&0x0F          2              \b, 24 fps
>>7      byte&0x0F          3              \b, 25 fps
>>7      byte&0x0F          4              \b, 29.97 fps
>>7      byte&0x0F          5              \b, 30 fps
>>7      byte&0x0F          6              \b, 50 fps
>>7      byte&0x0F          7              \b, 59.94 fps
>>7      byte&0x0F          8              \b, 60 fps
>>11     byte               &0x04          \b, Constrained

# MPEG ADTS Audio (*.mpx/mxa/aac)
# from dreesen@@math.fu-berlin.de
# modified to fully support MPEG ADTS

# MP3, M1A
# modified by Joerg Jenderek
# GRR the original test are too common for many DOS files
# so don't accept as MP3 until we've tested the rate
0       beshort&0xFFFE  0xFFFA
# rates
>2      byte&0xF0       0x10           MPEG ADTS, layer III, v1,  32 kbps
!:mime	audio/mpeg
>2      byte&0xF0       0x20           MPEG ADTS, layer III, v1,  40 kbps
!:mime	audio/mpeg
>2      byte&0xF0       0x30           MPEG ADTS, layer III, v1,  48 kbps
!:mime	audio/mpeg
>2      byte&0xF0       0x40           MPEG ADTS, layer III, v1,  56 kbps
!:mime	audio/mpeg
>2      byte&0xF0       0x50           MPEG ADTS, layer III, v1,  64 kbps
!:mime	audio/mpeg
>2      byte&0xF0       0x60           MPEG ADTS, layer III, v1,  80 kbps
!:mime	audio/mpeg
>2      byte&0xF0       0x70           MPEG ADTS, layer III, v1,  96 kbps
!:mime	audio/mpeg
>2      byte&0xF0       0x80           MPEG ADTS, layer III, v1, 112 kbps
!:mime	audio/mpeg
>2      byte&0xF0       0x90           MPEG ADTS, layer III, v1, 128 kbps
!:mime	audio/mpeg
>2      byte&0xF0       0xA0           MPEG ADTS, layer III, v1, 160 kbps
!:mime	audio/mpeg
>2      byte&0xF0       0xB0           MPEG ADTS, layer III, v1, 192 kbps
!:mime	audio/mpeg
>2      byte&0xF0       0xC0           MPEG ADTS, layer III, v1, 224 kbps
!:mime	audio/mpeg
>2      byte&0xF0       0xD0           MPEG ADTS, layer III, v1, 256 kbps
!:mime	audio/mpeg
>2      byte&0xF0       0xE0           MPEG ADTS, layer III, v1, 320 kbps
!:mime	audio/mpeg
# timing
>2      byte&0x0C       0x00           \b, 44.1 kHz
>2      byte&0x0C       0x04           \b, 48 kHz
>2      byte&0x0C       0x08           \b, 32 kHz
# channels/options
>3      byte&0xC0       0x00           \b, Stereo
>3      byte&0xC0       0x40           \b, JntStereo
>3      byte&0xC0       0x80           \b, 2x Monaural
>3      byte&0xC0       0xC0           \b, Monaural
#>1     byte            ^0x01          \b, Data Verify
#>2     byte            &0x02          \b, Packet Pad
#>2     byte            &0x01          \b, Custom Flag
#>3     byte            &0x08          \b, Copyrighted
#>3     byte            &0x04          \b, Original Source
#>3     byte&0x03       1              \b, NR: 50/15 ms
#>3     byte&0x03       3              \b, NR: CCIT J.17

# MP2, M1A
0       beshort&0xFFFE  0xFFFC         MPEG ADTS, layer II, v1
!:mime	audio/mpeg
# rates
>2      byte&0xF0       0x10           \b,  32 kbps
>2      byte&0xF0       0x20           \b,  48 kbps
>2      byte&0xF0       0x30           \b,  56 kbps
>2      byte&0xF0       0x40           \b,  64 kbps
>2      byte&0xF0       0x50           \b,  80 kbps
>2      byte&0xF0       0x60           \b,  96 kbps
>2      byte&0xF0       0x70           \b, 112 kbps
>2      byte&0xF0       0x80           \b, 128 kbps
>2      byte&0xF0       0x90           \b, 160 kbps
>2      byte&0xF0       0xA0           \b, 192 kbps
>2      byte&0xF0       0xB0           \b, 224 kbps
>2      byte&0xF0       0xC0           \b, 256 kbps
>2      byte&0xF0       0xD0           \b, 320 kbps
>2      byte&0xF0       0xE0           \b, 384 kbps
# timing
>2      byte&0x0C       0x00           \b, 44.1 kHz
>2      byte&0x0C       0x04           \b, 48 kHz
>2      byte&0x0C       0x08           \b, 32 kHz
# channels/options
>3      byte&0xC0       0x00           \b, Stereo
>3      byte&0xC0       0x40           \b, JntStereo
>3      byte&0xC0       0x80           \b, 2x Monaural
>3      byte&0xC0       0xC0           \b, Monaural
#>1     byte            ^0x01          \b, Data Verify
#>2     byte            &0x02          \b, Packet Pad
#>2     byte            &0x01          \b, Custom Flag
#>3     byte            &0x08          \b, Copyrighted
#>3     byte            &0x04          \b, Original Source
#>3     byte&0x03       1              \b, NR: 50/15 ms
#>3     byte&0x03       3              \b, NR: CCIT J.17

# MPA, M1A
# updated by Joerg Jenderek
# GRR the original test are too common for many DOS files, so test 32 <= kbits <= 448
# GRR this test is still too general as it catches a BOM of UTF-16 files (0xFFFE)
# FIXME: Almost all little endian UTF-16 text with BOM are clobbered by these entries
#0	beshort&0xFFFE		0xFFFE	
#>2	ubyte&0xF0	>0x0F		
#>>2	ubyte&0xF0	<0xE1		MPEG ADTS, layer I, v1
## rate
#>>>2      byte&0xF0       0x10           \b,  32 kbps
#>>>2      byte&0xF0       0x20           \b,  64 kbps
#>>>2      byte&0xF0       0x30           \b,  96 kbps
#>>>2      byte&0xF0       0x40           \b, 128 kbps
#>>>2      byte&0xF0       0x50           \b, 160 kbps
#>>>2      byte&0xF0       0x60           \b, 192 kbps
#>>>2      byte&0xF0       0x70           \b, 224 kbps
#>>>2      byte&0xF0       0x80           \b, 256 kbps
#>>>2      byte&0xF0       0x90           \b, 288 kbps
#>>>2      byte&0xF0       0xA0           \b, 320 kbps
#>>>2      byte&0xF0       0xB0           \b, 352 kbps
#>>>2      byte&0xF0       0xC0           \b, 384 kbps
#>>>2      byte&0xF0       0xD0           \b, 416 kbps
#>>>2      byte&0xF0       0xE0           \b, 448 kbps
## timing
#>>>2      byte&0x0C       0x00           \b, 44.1 kHz
#>>>2      byte&0x0C       0x04           \b, 48 kHz
#>>>2      byte&0x0C       0x08           \b, 32 kHz
## channels/options
#>>>3      byte&0xC0       0x00           \b, Stereo
#>>>3      byte&0xC0       0x40           \b, JntStereo
#>>>3      byte&0xC0       0x80           \b, 2x Monaural
#>>>3      byte&0xC0       0xC0           \b, Monaural
##>1     byte            ^0x01          \b, Data Verify
##>2     byte            &0x02          \b, Packet Pad
##>2     byte            &0x01          \b, Custom Flag
##>3     byte            &0x08          \b, Copyrighted
##>3     byte            &0x04          \b, Original Source
##>3     byte&0x03       1              \b, NR: 50/15 ms
##>3     byte&0x03       3              \b, NR: CCIT J.17

# MP3, M2A
0       beshort&0xFFFE  0xFFF2         MPEG ADTS, layer III, v2
!:mime	audio/mpeg
# rate
>2      byte&0xF0       0x10           \b,   8 kbps
>2      byte&0xF0       0x20           \b,  16 kbps
>2      byte&0xF0       0x30           \b,  24 kbps
>2      byte&0xF0       0x40           \b,  32 kbps
>2      byte&0xF0       0x50           \b,  40 kbps
>2      byte&0xF0       0x60           \b,  48 kbps
>2      byte&0xF0       0x70           \b,  56 kbps
>2      byte&0xF0       0x80           \b,  64 kbps
>2      byte&0xF0       0x90           \b,  80 kbps
>2      byte&0xF0       0xA0           \b,  96 kbps
>2      byte&0xF0       0xB0           \b, 112 kbps
>2      byte&0xF0       0xC0           \b, 128 kbps
>2      byte&0xF0       0xD0           \b, 144 kbps
>2      byte&0xF0       0xE0           \b, 160 kbps
# timing
>2      byte&0x0C       0x00           \b, 22.05 kHz
>2      byte&0x0C       0x04           \b, 24 kHz
>2      byte&0x0C       0x08           \b, 16 kHz
# channels/options
>3      byte&0xC0       0x00           \b, Stereo
>3      byte&0xC0       0x40           \b, JntStereo
>3      byte&0xC0       0x80           \b, 2x Monaural
>3      byte&0xC0       0xC0           \b, Monaural
#>1     byte            ^0x01          \b, Data Verify
#>2     byte            &0x02          \b, Packet Pad
#>2     byte            &0x01          \b, Custom Flag
#>3     byte            &0x08          \b, Copyrighted
#>3     byte            &0x04          \b, Original Source
#>3     byte&0x03       1              \b, NR: 50/15 ms
#>3     byte&0x03       3              \b, NR: CCIT J.17

# MP2, M2A
0       beshort&0xFFFE  0xFFF4         MPEG ADTS, layer II, v2
# rate 
>2      byte&0xF0       0x10           \b,   8 kbps
>2      byte&0xF0       0x20           \b,  16 kbps 
>2      byte&0xF0       0x30           \b,  24 kbps
>2      byte&0xF0       0x40           \b,  32 kbps
>2      byte&0xF0       0x50           \b,  40 kbps
>2      byte&0xF0       0x60           \b,  48 kbps
>2      byte&0xF0       0x70           \b,  56 kbps
>2      byte&0xF0       0x80           \b,  64 kbps
>2      byte&0xF0       0x90           \b,  80 kbps
>2      byte&0xF0       0xA0           \b,  96 kbps
>2      byte&0xF0       0xB0           \b, 112 kbps
>2      byte&0xF0       0xC0           \b, 128 kbps
>2      byte&0xF0       0xD0           \b, 144 kbps
>2      byte&0xF0       0xE0           \b, 160 kbps
# timing
>2      byte&0x0C       0x00           \b, 22.05 kHz
>2      byte&0x0C       0x04           \b, 24 kHz
>2      byte&0x0C       0x08           \b, 16 kHz
# channels/options
>3      byte&0xC0       0x00           \b, Stereo
>3      byte&0xC0       0x40           \b, JntStereo
>3      byte&0xC0       0x80           \b, 2x Monaural
>3      byte&0xC0       0xC0           \b, Monaural
#>1     byte            ^0x01          \b, Data Verify
#>2     byte            &0x02          \b, Packet Pad
#>2     byte            &0x01          \b, Custom Flag
#>3     byte            &0x08          \b, Copyrighted
#>3     byte            &0x04          \b, Original Source
#>3     byte&0x03       1              \b, NR: 50/15 ms
#>3     byte&0x03       3              \b, NR: CCIT J.17

# MPA, M2A
0       beshort&0xFFFE  0xFFF6         MPEG ADTS, layer I, v2
# rate
>2      byte&0xF0       0x10           \b,  32 kbps
>2      byte&0xF0       0x20           \b,  48 kbps
>2      byte&0xF0       0x30           \b,  56 kbps
>2      byte&0xF0       0x40           \b,  64 kbps
>2      byte&0xF0       0x50           \b,  80 kbps
>2      byte&0xF0       0x60           \b,  96 kbps
>2      byte&0xF0       0x70           \b, 112 kbps
>2      byte&0xF0       0x80           \b, 128 kbps
>2      byte&0xF0       0x90           \b, 144 kbps
>2      byte&0xF0       0xA0           \b, 160 kbps
>2      byte&0xF0       0xB0           \b, 176 kbps
>2      byte&0xF0       0xC0           \b, 192 kbps
>2      byte&0xF0       0xD0           \b, 224 kbps
>2      byte&0xF0       0xE0           \b, 256 kbps
# timing
>2      byte&0x0C       0x00           \b, 22.05 kHz
>2      byte&0x0C       0x04           \b, 24 kHz
>2      byte&0x0C       0x08           \b, 16 kHz
# channels/options
>3      byte&0xC0       0x00           \b, Stereo
>3      byte&0xC0       0x40           \b, JntStereo
>3      byte&0xC0       0x80           \b, 2x Monaural
>3      byte&0xC0       0xC0           \b, Monaural
#>1     byte            ^0x01          \b, Data Verify
#>2     byte            &0x02          \b, Packet Pad
#>2     byte            &0x01          \b, Custom Flag
#>3     byte            &0x08          \b, Copyrighted
#>3     byte            &0x04          \b, Original Source
#>3     byte&0x03       1              \b, NR: 50/15 ms
#>3     byte&0x03       3              \b, NR: CCIT J.17

# MP3, M25A
0       beshort&0xFFFE  0xFFE2         MPEG ADTS, layer III,  v2.5
# rate  
>2      byte&0xF0       0x10           \b,   8 kbps
>2      byte&0xF0       0x20           \b,  16 kbps
>2      byte&0xF0       0x30           \b,  24 kbps
>2      byte&0xF0       0x40           \b,  32 kbps
>2      byte&0xF0       0x50           \b,  40 kbps
>2      byte&0xF0       0x60           \b,  48 kbps
>2      byte&0xF0       0x70           \b,  56 kbps
>2      byte&0xF0       0x80           \b,  64 kbps
>2      byte&0xF0       0x90           \b,  80 kbps
>2      byte&0xF0       0xA0           \b,  96 kbps
>2      byte&0xF0       0xB0           \b, 112 kbps
>2      byte&0xF0       0xC0           \b, 128 kbps
>2      byte&0xF0       0xD0           \b, 144 kbps
>2      byte&0xF0       0xE0           \b, 160 kbps
# timing
>2      byte&0x0C       0x00           \b, 11.025 kHz
>2      byte&0x0C       0x04           \b, 12 kHz
>2      byte&0x0C       0x08           \b, 8 kHz
# channels/options
>3      byte&0xC0       0x00           \b, Stereo
>3      byte&0xC0       0x40           \b, JntStereo
>3      byte&0xC0       0x80           \b, 2x Monaural
>3      byte&0xC0       0xC0           \b, Monaural
#>1     byte            ^0x01          \b, Data Verify
#>2     byte            &0x02          \b, Packet Pad
#>2     byte            &0x01          \b, Custom Flag
#>3     byte            &0x08          \b, Copyrighted
#>3     byte            &0x04          \b, Original Source
#>3     byte&0x03       1              \b, NR: 50/15 ms
#>3     byte&0x03       3              \b, NR: CCIT J.17

# AAC (aka MPEG-2 NBC audio) and MPEG-4 audio

# Stored AAC streams (instead of the MP4 format)
0       string          ADIF           MPEG ADIF, AAC
!:mime	audio/x-hx-aac-adif
>4      byte            &0x80
>>13    byte            &0x10          \b, VBR
>>13    byte            ^0x10          \b, CBR
>>16    byte&0x1E       0x02           \b, single stream
>>16    byte&0x1E       0x04           \b, 2 streams
>>16    byte&0x1E       0x06           \b, 3 streams
>>16    byte            &0x08          \b, 4 or more streams
>>16    byte            &0x10          \b, 8 or more streams
>>4    byte            &0x80          \b, Copyrighted
>>13   byte            &0x40          \b, Original Source
>>13   byte            &0x20          \b, Home Flag
>4      byte            ^0x80
>>4     byte            &0x10          \b, VBR
>>4     byte            ^0x10          \b, CBR
>>7     byte&0x1E       0x02           \b, single stream
>>7     byte&0x1E       0x04           \b, 2 streams
>>7     byte&0x1E       0x06           \b, 3 streams
>>7     byte            &0x08          \b, 4 or more streams
>>7     byte            &0x10          \b, 8 or more streams
>>4    byte            &0x40          \b, Original Stream(s)
>>4    byte            &0x20          \b, Home Source

# Live or stored single AAC stream (used with MPEG-2 systems)
0       beshort&0xFFF6  0xFFF0         MPEG ADTS, AAC
!:mime	audio/x-hx-aac-adts
>1      byte            &0x08          \b, v2
>1      byte            ^0x08          \b, v4
# profile
>>2     byte            &0xC0          \b LTP
>2      byte&0xc0       0x00           \b Main
>2      byte&0xc0       0x40           \b LC
>2      byte&0xc0       0x80           \b SSR
# timing
>2      byte&0x3c       0x00           \b, 96 kHz
>2      byte&0x3c       0x04           \b, 88.2 kHz
>2      byte&0x3c       0x08           \b, 64 kHz
>2      byte&0x3c       0x0c           \b, 48 kHz
>2      byte&0x3c       0x10           \b, 44.1 kHz
>2      byte&0x3c       0x14           \b, 32 kHz
>2      byte&0x3c       0x18           \b, 24 kHz
>2      byte&0x3c       0x1c           \b, 22.05 kHz
>2      byte&0x3c       0x20           \b, 16 kHz
>2      byte&0x3c       0x24           \b, 12 kHz
>2      byte&0x3c       0x28           \b, 11.025 kHz
>2      byte&0x3c       0x2c           \b, 8 kHz
# channels
>2      beshort&0x01c0  0x0040         \b, monaural
>2      beshort&0x01c0  0x0080         \b, stereo
>2      beshort&0x01c0  0x00c0         \b, stereo + center
>2      beshort&0x01c0  0x0100         \b, stereo+center+LFE
>2      beshort&0x01c0  0x0140         \b, surround
>2      beshort&0x01c0  0x0180         \b, surround + LFE
>2      beshort         &0x01C0        \b, surround + side
#>1     byte            ^0x01           \b, Data Verify
#>2     byte            &0x02           \b, Custom Flag
#>3     byte            &0x20           \b, Original Stream
#>3     byte            &0x10           \b, Home Source
#>3     byte            &0x08           \b, Copyrighted

# Live MPEG-4 audio streams (instead of RTP FlexMux)
0       beshort&0xFFE0  0x56E0         MPEG-4 LOAS
!:mime	audio/x-mp4a-latm
#>1     beshort&0x1FFF  x              \b, %u byte packet
>3      byte&0xE0       0x40
>>4     byte&0x3C       0x04           \b, single stream
>>4     byte&0x3C       0x08           \b, 2 streams
>>4     byte&0x3C       0x0C           \b, 3 streams
>>4     byte            &0x08          \b, 4 or more streams
>>4     byte            &0x20          \b, 8 or more streams
>3      byte&0xC0       0
>>4     byte&0x78       0x08           \b, single stream
>>4     byte&0x78       0x10           \b, 2 streams
>>4     byte&0x78       0x18           \b, 3 streams
>>4     byte            &0x20          \b, 4 or more streams
>>4     byte            &0x40          \b, 8 or more streams
# This magic isn't strong enough (matches plausible ISO-8859-1 text)
#0       beshort         0x4DE1         MPEG-4 LO-EP audio stream
#!:mime	audio/x-mp4a-latm

# Summary: FLI animation format
# Created by: Daniel Quinlan <quinlan@@yggdrasil.com>
# Modified by (1): Abel Cheung <abelcheung@@gmail.com> (avoid over-generic detection)
4	leshort		0xAF11
# standard FLI always has 320x200 resolution and 8 bit color
>8	leshort		320
>>10	leshort		200
>>>12	leshort		8			FLI animation, 320x200x8
!:mime	video/x-fli
>>>>6	leshort		x			\b, %d frames
# frame speed is multiple of 1/70s
>>>>16	leshort		x			\b, %d/70s per frame

# Summary: FLC animation format
# Created by: Daniel Quinlan <quinlan@@yggdrasil.com>
# Modified by (1): Abel Cheung <abelcheung@@gmail.com> (avoid over-generic detection)
4	leshort		0xAF12
# standard FLC always use 8 bit color
>12	leshort		8			FLC animation
!:mime	video/x-flc
>>8	leshort		x			\b, %d
>>10	leshort		x			\bx%dx8
>>6	uleshort	x			\b, %d frames
>>16	uleshort	x			\b, %dms per frame

# DL animation format
# XXX - collision with most `mips' magic
#
# I couldn't find a real magic number for these, however, this
# -appears- to work.  Note that it might catch other files, too, so be
# careful!
#
# Note that title and author appear in the two 20-byte chunks
# at decimal offsets 2 and 22, respectively, but they are XOR'ed with
# 255 (hex FF)!  The DL format is really bad.
#
#0	byte	1	DL version 1, medium format (160x100, 4 images/screen)
#!:mime	video/x-unknown
#>42	byte	x	- %d screens,
#>43	byte	x	%d commands
#0	byte	2	DL version 2
#!:mime	video/x-unknown
#>1	byte	1	- large format (320x200,1 image/screen),
#>1	byte	2	- medium format (160x100,4 images/screen),
#>1	byte	>2	- unknown format,
#>42	byte	x	%d screens,
#>43	byte	x	%d commands
# Based on empirical evidence, DL version 3 have several nulls following the
# \003.  Most of them start with non-null values at hex offset 0x34 or so.
#0	string	\3\0\0\0\0\0\0\0\0\0\0\0	DL version 3

# iso 13818 transport stream
#
# from Oskar Schirmer <schirmer@@scara.com> Feb 3, 2001 (ISO 13818.1)
# (the following is a little bit restrictive and works fine for a stream
#  that starts with PAT properly. it won't work for stream data, that is
#  cut from an input device data right in the middle, but this shouldn't
#  disturb)
# syncbyte      8 bit	0x47
# error_ind     1 bit	-
# payload_start 1 bit	1
# priority      1 bit	-
# PID          13 bit	0x0000
# scrambling    2 bit	-
# adaptfld_ctrl 2 bit	1 or 3
# conti_count   4 bit	0
0	belong&0xFF5FFF1F	0x47400010	MPEG transport stream data
>188	byte			!0x47		CORRUPTED

# DIF digital video file format <mpruett@@sgi.com>
0	belong&0xffffff00	0x1f070000      DIF
>4	byte			&0x01		(DVCPRO) movie file
>4	byte			^0x01		(DV) movie file
>3	byte			&0x80		(PAL)
>3	byte			^0x80		(NTSC)

# Microsoft Advanced Streaming Format (ASF) <mpruett@@sgi.com>
0	belong			0x3026b275	Microsoft ASF

# MNG Video Format, <URL:http://www.libpng.org/pub/mng/spec/>
0	string			\x8aMNG		MNG video data,
!:mime	video/x-mng
>4	belong			!0x0d0a1a0a	CORRUPTED,
>4	belong			0x0d0a1a0a
>>16    belong	x				%ld x
>>20    belong	x				%ld

# JNG Video Format, <URL:http://www.libpng.org/pub/mng/spec/>
0	string			\x8bJNG		JNG video data,
!:mime	video/x-jng
>4	belong			!0x0d0a1a0a	CORRUPTED,
>4	belong			0x0d0a1a0a
>>16    belong	x				%ld x
>>20    belong	x				%ld

# Vivo video (Wolfram Kleff)
3	string		\x0D\x0AVersion:Vivo	Vivo video data

# VRML (Virtual Reality Modelling Language)
0       string/b        #VRML\ V1.0\ ascii	VRML 1 file
!:mime	model/vrml
0	string/b	#VRML\ V2.0\ utf8	ISO/IEC 14772 VRML 97 file
!:mime	model/vrml

# X3D (Extensible 3D) [http://www.web3d.org/specifications/x3d-3.0.dtd]
# From Michel Briand <michelbriand@@free.fr>
0	string		\<?xml\ version="
!:strength +1
>20	search/1000/cb  \<!DOCTYPE\ X3D		X3D (Extensible 3D) model xml text
!:mime model/x3d

#---------------------------------------------------------------------------
# HVQM4: compressed movie format designed by Hudson for Nintendo GameCube
# From Mark Sheppard <msheppard@@climax.co.uk>, 2002-10-03
#
0	string		HVQM4		%s
>6	string		>\0		v%s
>0	byte		x		GameCube movie,
>0x34	ubeshort	x		%d x
>0x36	ubeshort	x		%d,
>0x26	ubeshort	x		%dµs,
>0x42	ubeshort	0		no audio
>0x42	ubeshort	>0		%dHz audio

# From: "Stefan A. Haubenthal" <polluks@@web.de>
0	string		DVDVIDEO-VTS	Video title set,
>0x21	byte		x		v%x
0	string		DVDVIDEO-VMG	Video manager,
>0x21	byte		x		v%x

# From: Behan Webster <behanw@@websterwood.com>
# NuppelVideo used by Mythtv (*.nuv)
# Note: there are two identical stanzas here differing only in the
# initial string matched. It used to be done with a regex, but we're
# trying to get rid of those.
0	string		NuppelVideo	MythTV NuppelVideo
>12	string		x		v%s
>20	lelong		x		(%d
>24	lelong		x		\bx%d),
>36	string		P		\bprogressive,
>36	string		I		\binterlaced,
>40	ledouble	x		\baspect:%.2f,
>48	ledouble	x		\bfps:%.2f
0	string		MythTV		MythTV NuppelVideo
>12	string		x		v%s
>20	lelong		x		(%d
>24	lelong		x		\bx%d),
>36	string		P		\bprogressive,
>36	string		I		\binterlaced,
>40	ledouble	x		\baspect:%.2f,
>48	ledouble	x		\bfps:%.2f

#						MPEG file
# MPEG sequences
# FIXME: This section is from the old magic.mime file and needs integrating with the rest
0       belong             0x000001BA
>4      byte               &0x40
!:mime	video/mp2p
>4      byte               ^0x40
!:mime	video/mpeg
0       belong             0x000001BB
!:mime	video/mpeg
0       belong             0x000001B0
!:mime	video/mp4v-es
0       belong             0x000001B5
!:mime	video/mp4v-es
0       belong             0x000001B3
!:mime	video/mpv
0       belong&0xFF5FFF1F  0x47400010
!:mime	video/mp2t
0       belong             0x00000001
>4      byte&0x1F	   0x07
!:mime	video/h264

# Type: Bink Video
# URL:  http://wiki.multimedia.cx/index.php?title=3DBink_Container
# From: <hoehle@@users.sourceforge.net>  2008-07-18
0	string		BIK	Bink Video
>3	regex		=[a-z]	rev.%s
#>4	ulelong		x	size %d
>20	ulelong		x	\b, %d
>24	ulelong		x	\bx%d
>8	ulelong		x	\b, %d frames
>32	ulelong		x	at rate %d/
>28	ulelong		>1	\b%d
>40	ulelong		=0	\b, no audio
>40	ulelong		!0	\b, %d audio track
>>40	ulelong		!1	\bs
# follow properties of the first audio track only
>>48	uleshort	x	%dHz
>>51	byte&0x20	0	mono
>>51	byte&0x20	!0	stereo
#>>51	byte&0x10	0	FFT
#>>51	byte&0x10	!0	DCT
@


