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