animation 50 KB

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