polyfile-weave 0.5.5__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of polyfile-weave might be problematic. Click here for more details.

Files changed (585) hide show
  1. polyfile/__init__.py +15 -0
  2. polyfile/__main__.py +394 -0
  3. polyfile/arithmetic.py +27 -0
  4. polyfile/ast.py +114 -0
  5. polyfile/debugger.py +1039 -0
  6. polyfile/expressions.py +346 -0
  7. polyfile/fileutils.py +343 -0
  8. polyfile/html.py +135 -0
  9. polyfile/http/__init__.py +1 -0
  10. polyfile/http/defacto.py +37 -0
  11. polyfile/http/deprecated.py +51 -0
  12. polyfile/http/experimental.py +67 -0
  13. polyfile/http/http_11.py +548 -0
  14. polyfile/http/matcher.py +37 -0
  15. polyfile/http/structured_headers.py +48 -0
  16. polyfile/iterators.py +72 -0
  17. polyfile/jpeg.py +24 -0
  18. polyfile/kaitai/__init__.py +0 -0
  19. polyfile/kaitai/compiler.py +156 -0
  20. polyfile/kaitai/parser.py +312 -0
  21. polyfile/kaitai/parsers/__init__.py +0 -0
  22. polyfile/kaitai/parsers/aix_utmp.py +116 -0
  23. polyfile/kaitai/parsers/allegro_dat.py +367 -0
  24. polyfile/kaitai/parsers/andes_firmware.py +64 -0
  25. polyfile/kaitai/parsers/android_bootldr_asus.py +105 -0
  26. polyfile/kaitai/parsers/android_bootldr_huawei.py +181 -0
  27. polyfile/kaitai/parsers/android_bootldr_qcom.py +217 -0
  28. polyfile/kaitai/parsers/android_dto.py +138 -0
  29. polyfile/kaitai/parsers/android_img.py +319 -0
  30. polyfile/kaitai/parsers/android_nanoapp_header.py +83 -0
  31. polyfile/kaitai/parsers/android_opengl_shaders_cache.py +151 -0
  32. polyfile/kaitai/parsers/android_sparse.py +237 -0
  33. polyfile/kaitai/parsers/android_super.py +401 -0
  34. polyfile/kaitai/parsers/apm_partition_table.py +196 -0
  35. polyfile/kaitai/parsers/apple_single_double.py +180 -0
  36. polyfile/kaitai/parsers/asn1_der.py +235 -0
  37. polyfile/kaitai/parsers/au.py +138 -0
  38. polyfile/kaitai/parsers/avantes_roh60.py +112 -0
  39. polyfile/kaitai/parsers/avi.py +296 -0
  40. polyfile/kaitai/parsers/bcd.py +111 -0
  41. polyfile/kaitai/parsers/bitcoin_transaction.py +210 -0
  42. polyfile/kaitai/parsers/blender_blend.py +334 -0
  43. polyfile/kaitai/parsers/bmp.py +780 -0
  44. polyfile/kaitai/parsers/bson.py +411 -0
  45. polyfile/kaitai/parsers/btrfs_stream.py +318 -0
  46. polyfile/kaitai/parsers/bytes_with_io.py +27 -0
  47. polyfile/kaitai/parsers/chrome_pak.py +194 -0
  48. polyfile/kaitai/parsers/code_6502.py +456 -0
  49. polyfile/kaitai/parsers/compressed_resource.py +217 -0
  50. polyfile/kaitai/parsers/cpio_old_le.py +154 -0
  51. polyfile/kaitai/parsers/cramfs.py +344 -0
  52. polyfile/kaitai/parsers/creative_voice_file.py +342 -0
  53. polyfile/kaitai/parsers/dbf.py +274 -0
  54. polyfile/kaitai/parsers/dcmp_0.py +664 -0
  55. polyfile/kaitai/parsers/dcmp_1.py +422 -0
  56. polyfile/kaitai/parsers/dcmp_2.py +312 -0
  57. polyfile/kaitai/parsers/dcmp_variable_length_integer.py +66 -0
  58. polyfile/kaitai/parsers/dex.py +1086 -0
  59. polyfile/kaitai/parsers/dicom.py +4370 -0
  60. polyfile/kaitai/parsers/dime_message.py +201 -0
  61. polyfile/kaitai/parsers/dns_packet.py +569 -0
  62. polyfile/kaitai/parsers/doom_wad.py +654 -0
  63. polyfile/kaitai/parsers/dos_datetime.py +191 -0
  64. polyfile/kaitai/parsers/dos_mz.py +172 -0
  65. polyfile/kaitai/parsers/ds_store.py +513 -0
  66. polyfile/kaitai/parsers/dtb.py +310 -0
  67. polyfile/kaitai/parsers/dune_2_pak.py +126 -0
  68. polyfile/kaitai/parsers/edid.py +472 -0
  69. polyfile/kaitai/parsers/efivar_signature_list.py +331 -0
  70. polyfile/kaitai/parsers/elf.py +2482 -0
  71. polyfile/kaitai/parsers/ethernet_frame.py +114 -0
  72. polyfile/kaitai/parsers/exif.py +723 -0
  73. polyfile/kaitai/parsers/ext2.py +537 -0
  74. polyfile/kaitai/parsers/fallout2_dat.py +187 -0
  75. polyfile/kaitai/parsers/fallout_dat.py +156 -0
  76. polyfile/kaitai/parsers/fasttracker_xm_module.py +558 -0
  77. polyfile/kaitai/parsers/ftl_dat.py +90 -0
  78. polyfile/kaitai/parsers/genmidi_op2.py +161 -0
  79. polyfile/kaitai/parsers/gettext_mo.py +541 -0
  80. polyfile/kaitai/parsers/gif.py +492 -0
  81. polyfile/kaitai/parsers/gimp_brush.py +244 -0
  82. polyfile/kaitai/parsers/glibc_utmp.py +114 -0
  83. polyfile/kaitai/parsers/gltf_binary.py +132 -0
  84. polyfile/kaitai/parsers/google_protobuf.py +151 -0
  85. polyfile/kaitai/parsers/gpt_partition_table.py +175 -0
  86. polyfile/kaitai/parsers/gran_turismo_vol.py +140 -0
  87. polyfile/kaitai/parsers/grub2_font.py +337 -0
  88. polyfile/kaitai/parsers/gzip.py +232 -0
  89. polyfile/kaitai/parsers/hashcat_restore.py +60 -0
  90. polyfile/kaitai/parsers/hccap.py +111 -0
  91. polyfile/kaitai/parsers/hccapx.py +103 -0
  92. polyfile/kaitai/parsers/heaps_pak.py +177 -0
  93. polyfile/kaitai/parsers/heroes_of_might_and_magic_agg.py +116 -0
  94. polyfile/kaitai/parsers/heroes_of_might_and_magic_bmp.py +34 -0
  95. polyfile/kaitai/parsers/icmp_packet.py +136 -0
  96. polyfile/kaitai/parsers/ico.py +129 -0
  97. polyfile/kaitai/parsers/id3v1_1.py +220 -0
  98. polyfile/kaitai/parsers/id3v2_3.py +324 -0
  99. polyfile/kaitai/parsers/id3v2_4.py +423 -0
  100. polyfile/kaitai/parsers/ines.py +282 -0
  101. polyfile/kaitai/parsers/ipv4_packet.py +158 -0
  102. polyfile/kaitai/parsers/ipv6_packet.py +55 -0
  103. polyfile/kaitai/parsers/iso9660.py +544 -0
  104. polyfile/kaitai/parsers/java_class.py +1113 -0
  105. polyfile/kaitai/parsers/jpeg.py +361 -0
  106. polyfile/kaitai/parsers/luks.py +149 -0
  107. polyfile/kaitai/parsers/lzh.py +165 -0
  108. polyfile/kaitai/parsers/mac_os_resource_snd.py +493 -0
  109. polyfile/kaitai/parsers/mach_o.py +3033 -0
  110. polyfile/kaitai/parsers/mach_o_fat.py +92 -0
  111. polyfile/kaitai/parsers/magicavoxel_vox.py +391 -0
  112. polyfile/kaitai/parsers/manifest.json +1 -0
  113. polyfile/kaitai/parsers/mbr_partition_table.py +119 -0
  114. polyfile/kaitai/parsers/mcap.py +1015 -0
  115. polyfile/kaitai/parsers/microsoft_cfb.py +293 -0
  116. polyfile/kaitai/parsers/microsoft_network_monitor_v2.py +309 -0
  117. polyfile/kaitai/parsers/microsoft_pe.py +765 -0
  118. polyfile/kaitai/parsers/mifare_classic.py +706 -0
  119. polyfile/kaitai/parsers/minecraft_nbt.py +449 -0
  120. polyfile/kaitai/parsers/monomakh_sapr_chg.py +69 -0
  121. polyfile/kaitai/parsers/mozilla_mar.py +239 -0
  122. polyfile/kaitai/parsers/mp4.py +333 -0
  123. polyfile/kaitai/parsers/msgpack.py +467 -0
  124. polyfile/kaitai/parsers/nitf.py +1189 -0
  125. polyfile/kaitai/parsers/nt_mdt_pal.py +155 -0
  126. polyfile/kaitai/parsers/ogg.py +118 -0
  127. polyfile/kaitai/parsers/openpgp_message.py +993 -0
  128. polyfile/kaitai/parsers/packet_ppi.py +515 -0
  129. polyfile/kaitai/parsers/pcap.py +344 -0
  130. polyfile/kaitai/parsers/pcf_font.py +506 -0
  131. polyfile/kaitai/parsers/pcx.py +195 -0
  132. polyfile/kaitai/parsers/pcx_dcx.py +79 -0
  133. polyfile/kaitai/parsers/phar_without_stub.py +399 -0
  134. polyfile/kaitai/parsers/php_serialized_value.py +505 -0
  135. polyfile/kaitai/parsers/png.py +721 -0
  136. polyfile/kaitai/parsers/protocol_body.py +260 -0
  137. polyfile/kaitai/parsers/psx_tim.py +104 -0
  138. polyfile/kaitai/parsers/python_pickle.py +718 -0
  139. polyfile/kaitai/parsers/python_pyc_27.py +510 -0
  140. polyfile/kaitai/parsers/quake_mdl.py +441 -0
  141. polyfile/kaitai/parsers/quake_pak.py +112 -0
  142. polyfile/kaitai/parsers/quicktime_mov.py +634 -0
  143. polyfile/kaitai/parsers/rar.py +265 -0
  144. polyfile/kaitai/parsers/regf.py +569 -0
  145. polyfile/kaitai/parsers/renderware_binary_stream.py +877 -0
  146. polyfile/kaitai/parsers/resource_fork.py +611 -0
  147. polyfile/kaitai/parsers/respack.py +57 -0
  148. polyfile/kaitai/parsers/riff.py +409 -0
  149. polyfile/kaitai/parsers/rpm.py +964 -0
  150. polyfile/kaitai/parsers/rtcp_payload.py +579 -0
  151. polyfile/kaitai/parsers/rtp_packet.py +150 -0
  152. polyfile/kaitai/parsers/rtpdump.py +115 -0
  153. polyfile/kaitai/parsers/ruby_marshal.py +423 -0
  154. polyfile/kaitai/parsers/s3m.py +493 -0
  155. polyfile/kaitai/parsers/saints_row_2_vpp_pc.py +254 -0
  156. polyfile/kaitai/parsers/shapefile_index.py +174 -0
  157. polyfile/kaitai/parsers/shapefile_main.py +893 -0
  158. polyfile/kaitai/parsers/some_ip.py +209 -0
  159. polyfile/kaitai/parsers/some_ip_container.py +37 -0
  160. polyfile/kaitai/parsers/some_ip_sd.py +86 -0
  161. polyfile/kaitai/parsers/some_ip_sd_entries.py +160 -0
  162. polyfile/kaitai/parsers/some_ip_sd_options.py +374 -0
  163. polyfile/kaitai/parsers/specpr.py +404 -0
  164. polyfile/kaitai/parsers/sqlite3.py +472 -0
  165. polyfile/kaitai/parsers/ssh_public_key.py +252 -0
  166. polyfile/kaitai/parsers/standard_midi_file.py +390 -0
  167. polyfile/kaitai/parsers/stl.py +111 -0
  168. polyfile/kaitai/parsers/sudoers_ts.py +201 -0
  169. polyfile/kaitai/parsers/swf.py +406 -0
  170. polyfile/kaitai/parsers/systemd_journal.py +361 -0
  171. polyfile/kaitai/parsers/tcp_segment.py +57 -0
  172. polyfile/kaitai/parsers/tga.py +213 -0
  173. polyfile/kaitai/parsers/tls_client_hello.py +293 -0
  174. polyfile/kaitai/parsers/tr_dos_image.py +322 -0
  175. polyfile/kaitai/parsers/tsm.py +198 -0
  176. polyfile/kaitai/parsers/ttf.py +1847 -0
  177. polyfile/kaitai/parsers/udp_datagram.py +42 -0
  178. polyfile/kaitai/parsers/uefi_te.py +236 -0
  179. polyfile/kaitai/parsers/uimage.py +198 -0
  180. polyfile/kaitai/parsers/utf8_string.py +137 -0
  181. polyfile/kaitai/parsers/vfat.py +410 -0
  182. polyfile/kaitai/parsers/vlq_base128_be.py +104 -0
  183. polyfile/kaitai/parsers/vlq_base128_le.py +129 -0
  184. polyfile/kaitai/parsers/vmware_vmdk.py +167 -0
  185. polyfile/kaitai/parsers/vp8_ivf.py +112 -0
  186. polyfile/kaitai/parsers/warcraft_2_pud.py +423 -0
  187. polyfile/kaitai/parsers/wav.py +1014 -0
  188. polyfile/kaitai/parsers/websocket.py +167 -0
  189. polyfile/kaitai/parsers/windows_evt_log.py +304 -0
  190. polyfile/kaitai/parsers/windows_lnk_file.py +467 -0
  191. polyfile/kaitai/parsers/windows_minidump.py +575 -0
  192. polyfile/kaitai/parsers/windows_resource_file.py +243 -0
  193. polyfile/kaitai/parsers/windows_shell_items.py +190 -0
  194. polyfile/kaitai/parsers/windows_systemtime.py +52 -0
  195. polyfile/kaitai/parsers/wmf.py +502 -0
  196. polyfile/kaitai/parsers/xar.py +181 -0
  197. polyfile/kaitai/parsers/xwd.py +189 -0
  198. polyfile/kaitai/parsers/zip.py +685 -0
  199. polyfile/kaitai/parsers/zisofs.py +158 -0
  200. polyfile/kaitai/parsers/zx_spectrum_tap.py +184 -0
  201. polyfile/kaitaimatcher.py +113 -0
  202. polyfile/languagematcher.py +217 -0
  203. polyfile/logger.py +135 -0
  204. polyfile/magic.py +2983 -0
  205. polyfile/magic_defs/COPYING +29 -0
  206. polyfile/magic_defs/__init__.py +0 -0
  207. polyfile/magic_defs/acorn +102 -0
  208. polyfile/magic_defs/adi +13 -0
  209. polyfile/magic_defs/adventure +122 -0
  210. polyfile/magic_defs/aes +29 -0
  211. polyfile/magic_defs/algol68 +35 -0
  212. polyfile/magic_defs/allegro +9 -0
  213. polyfile/magic_defs/alliant +18 -0
  214. polyfile/magic_defs/alpha +32 -0
  215. polyfile/magic_defs/amanda +12 -0
  216. polyfile/magic_defs/amigaos +218 -0
  217. polyfile/magic_defs/android +259 -0
  218. polyfile/magic_defs/animation +1197 -0
  219. polyfile/magic_defs/aout +46 -0
  220. polyfile/magic_defs/apache +28 -0
  221. polyfile/magic_defs/apl +7 -0
  222. polyfile/magic_defs/apple +773 -0
  223. polyfile/magic_defs/application +7 -0
  224. polyfile/magic_defs/applix +13 -0
  225. polyfile/magic_defs/apt +52 -0
  226. polyfile/magic_defs/archive +2586 -0
  227. polyfile/magic_defs/aria +38 -0
  228. polyfile/magic_defs/arm +50 -0
  229. polyfile/magic_defs/asf +132 -0
  230. polyfile/magic_defs/assembler +18 -0
  231. polyfile/magic_defs/asterix +18 -0
  232. polyfile/magic_defs/att3b +41 -0
  233. polyfile/magic_defs/audio +1291 -0
  234. polyfile/magic_defs/avm +33 -0
  235. polyfile/magic_defs/basis +18 -0
  236. polyfile/magic_defs/beetle +7 -0
  237. polyfile/magic_defs/ber +65 -0
  238. polyfile/magic_defs/bflt +14 -0
  239. polyfile/magic_defs/bhl +10 -0
  240. polyfile/magic_defs/bioinformatics +178 -0
  241. polyfile/magic_defs/biosig +154 -0
  242. polyfile/magic_defs/blackberry +8 -0
  243. polyfile/magic_defs/blcr +25 -0
  244. polyfile/magic_defs/blender +50 -0
  245. polyfile/magic_defs/blit +24 -0
  246. polyfile/magic_defs/bm +10 -0
  247. polyfile/magic_defs/bout +11 -0
  248. polyfile/magic_defs/bsdi +33 -0
  249. polyfile/magic_defs/bsi +10 -0
  250. polyfile/magic_defs/btsnoop +13 -0
  251. polyfile/magic_defs/burp +7 -0
  252. polyfile/magic_defs/bytecode +41 -0
  253. polyfile/magic_defs/c-lang +110 -0
  254. polyfile/magic_defs/c64 +531 -0
  255. polyfile/magic_defs/cad +437 -0
  256. polyfile/magic_defs/cafebabe +107 -0
  257. polyfile/magic_defs/cbor +21 -0
  258. polyfile/magic_defs/ccf +14 -0
  259. polyfile/magic_defs/cddb +12 -0
  260. polyfile/magic_defs/chord +15 -0
  261. polyfile/magic_defs/cisco +12 -0
  262. polyfile/magic_defs/citrus +12 -0
  263. polyfile/magic_defs/clarion +27 -0
  264. polyfile/magic_defs/claris +48 -0
  265. polyfile/magic_defs/clipper +65 -0
  266. polyfile/magic_defs/clojure +30 -0
  267. polyfile/magic_defs/coff +98 -0
  268. polyfile/magic_defs/commands +201 -0
  269. polyfile/magic_defs/communications +22 -0
  270. polyfile/magic_defs/compress +461 -0
  271. polyfile/magic_defs/console +1213 -0
  272. polyfile/magic_defs/convex +69 -0
  273. polyfile/magic_defs/coverage +91 -0
  274. polyfile/magic_defs/cracklib +14 -0
  275. polyfile/magic_defs/crypto +31 -0
  276. polyfile/magic_defs/csv +8 -0
  277. polyfile/magic_defs/ctags +6 -0
  278. polyfile/magic_defs/ctf +23 -0
  279. polyfile/magic_defs/cubemap +8 -0
  280. polyfile/magic_defs/cups +56 -0
  281. polyfile/magic_defs/dact +11 -0
  282. polyfile/magic_defs/database +886 -0
  283. polyfile/magic_defs/dataone +47 -0
  284. polyfile/magic_defs/dbpf +15 -0
  285. polyfile/magic_defs/der +146 -0
  286. polyfile/magic_defs/diamond +12 -0
  287. polyfile/magic_defs/dif +33 -0
  288. polyfile/magic_defs/diff +41 -0
  289. polyfile/magic_defs/digital +59 -0
  290. polyfile/magic_defs/dolby +69 -0
  291. polyfile/magic_defs/dsf +25 -0
  292. polyfile/magic_defs/dump +96 -0
  293. polyfile/magic_defs/dwarfs +45 -0
  294. polyfile/magic_defs/dyadic +61 -0
  295. polyfile/magic_defs/ebml +8 -0
  296. polyfile/magic_defs/edid +11 -0
  297. polyfile/magic_defs/editors +43 -0
  298. polyfile/magic_defs/efi +15 -0
  299. polyfile/magic_defs/elf +379 -0
  300. polyfile/magic_defs/encore +22 -0
  301. polyfile/magic_defs/epoc +62 -0
  302. polyfile/magic_defs/erlang +21 -0
  303. polyfile/magic_defs/espressif +57 -0
  304. polyfile/magic_defs/esri +28 -0
  305. polyfile/magic_defs/etf +33 -0
  306. polyfile/magic_defs/fcs +9 -0
  307. polyfile/magic_defs/filesystems +2694 -0
  308. polyfile/magic_defs/finger +16 -0
  309. polyfile/magic_defs/firmware +133 -0
  310. polyfile/magic_defs/flash +62 -0
  311. polyfile/magic_defs/flif +36 -0
  312. polyfile/magic_defs/fonts +449 -0
  313. polyfile/magic_defs/forth +82 -0
  314. polyfile/magic_defs/fortran +9 -0
  315. polyfile/magic_defs/frame +62 -0
  316. polyfile/magic_defs/freebsd +164 -0
  317. polyfile/magic_defs/fsav +128 -0
  318. polyfile/magic_defs/fusecompress +12 -0
  319. polyfile/magic_defs/games +696 -0
  320. polyfile/magic_defs/gcc +17 -0
  321. polyfile/magic_defs/gconv +10 -0
  322. polyfile/magic_defs/gentoo +85 -0
  323. polyfile/magic_defs/geo +166 -0
  324. polyfile/magic_defs/geos +20 -0
  325. polyfile/magic_defs/gimp +77 -0
  326. polyfile/magic_defs/git +13 -0
  327. polyfile/magic_defs/glibc +21 -0
  328. polyfile/magic_defs/gnome +59 -0
  329. polyfile/magic_defs/gnu +173 -0
  330. polyfile/magic_defs/gnumeric +8 -0
  331. polyfile/magic_defs/gpt +240 -0
  332. polyfile/magic_defs/gpu +28 -0
  333. polyfile/magic_defs/grace +21 -0
  334. polyfile/magic_defs/graphviz +12 -0
  335. polyfile/magic_defs/gringotts +48 -0
  336. polyfile/magic_defs/guile +13 -0
  337. polyfile/magic_defs/hardware +12 -0
  338. polyfile/magic_defs/hitachi-sh +30 -0
  339. polyfile/magic_defs/hp +433 -0
  340. polyfile/magic_defs/human68k +26 -0
  341. polyfile/magic_defs/ibm370 +52 -0
  342. polyfile/magic_defs/ibm6000 +35 -0
  343. polyfile/magic_defs/icc +214 -0
  344. polyfile/magic_defs/iff +80 -0
  345. polyfile/magic_defs/images +4210 -0
  346. polyfile/magic_defs/inform +9 -0
  347. polyfile/magic_defs/intel +310 -0
  348. polyfile/magic_defs/interleaf +9 -0
  349. polyfile/magic_defs/island +10 -0
  350. polyfile/magic_defs/ispell +63 -0
  351. polyfile/magic_defs/isz +15 -0
  352. polyfile/magic_defs/java +52 -0
  353. polyfile/magic_defs/javascript +171 -0
  354. polyfile/magic_defs/jpeg +252 -0
  355. polyfile/magic_defs/json +8 -0
  356. polyfile/magic_defs/karma +9 -0
  357. polyfile/magic_defs/kde +11 -0
  358. polyfile/magic_defs/keepass +20 -0
  359. polyfile/magic_defs/kerberos +45 -0
  360. polyfile/magic_defs/kicad +85 -0
  361. polyfile/magic_defs/kml +34 -0
  362. polyfile/magic_defs/lammps +64 -0
  363. polyfile/magic_defs/lecter +6 -0
  364. polyfile/magic_defs/lex +12 -0
  365. polyfile/magic_defs/lif +50 -0
  366. polyfile/magic_defs/linux +557 -0
  367. polyfile/magic_defs/lisp +78 -0
  368. polyfile/magic_defs/llvm +22 -0
  369. polyfile/magic_defs/locoscript +12 -0
  370. polyfile/magic_defs/lua +31 -0
  371. polyfile/magic_defs/luks +126 -0
  372. polyfile/magic_defs/m4 +11 -0
  373. polyfile/magic_defs/mach +303 -0
  374. polyfile/magic_defs/macintosh +505 -0
  375. polyfile/magic_defs/macos +7 -0
  376. polyfile/magic_defs/magic +10 -0
  377. polyfile/magic_defs/magic.mgc +0 -0
  378. polyfile/magic_defs/mail.news +132 -0
  379. polyfile/magic_defs/make +21 -0
  380. polyfile/magic_defs/map +413 -0
  381. polyfile/magic_defs/maple +109 -0
  382. polyfile/magic_defs/marc21 +30 -0
  383. polyfile/magic_defs/mathcad +8 -0
  384. polyfile/magic_defs/mathematica +188 -0
  385. polyfile/magic_defs/matroska +17 -0
  386. polyfile/magic_defs/mcrypt +52 -0
  387. polyfile/magic_defs/measure +44 -0
  388. polyfile/magic_defs/mercurial +13 -0
  389. polyfile/magic_defs/metastore +8 -0
  390. polyfile/magic_defs/meteorological +53 -0
  391. polyfile/magic_defs/microfocus +21 -0
  392. polyfile/magic_defs/mime +9 -0
  393. polyfile/magic_defs/mips +120 -0
  394. polyfile/magic_defs/mirage +8 -0
  395. polyfile/magic_defs/misctools +140 -0
  396. polyfile/magic_defs/mkid +11 -0
  397. polyfile/magic_defs/mlssa +8 -0
  398. polyfile/magic_defs/mmdf +6 -0
  399. polyfile/magic_defs/modem +92 -0
  400. polyfile/magic_defs/modulefile +9 -0
  401. polyfile/magic_defs/motorola +71 -0
  402. polyfile/magic_defs/mozilla +37 -0
  403. polyfile/magic_defs/msdos +2304 -0
  404. polyfile/magic_defs/msooxml +68 -0
  405. polyfile/magic_defs/msvc +222 -0
  406. polyfile/magic_defs/msx +309 -0
  407. polyfile/magic_defs/mup +24 -0
  408. polyfile/magic_defs/music +17 -0
  409. polyfile/magic_defs/nasa +7 -0
  410. polyfile/magic_defs/natinst +24 -0
  411. polyfile/magic_defs/ncr +49 -0
  412. polyfile/magic_defs/neko +12 -0
  413. polyfile/magic_defs/netbsd +251 -0
  414. polyfile/magic_defs/netscape +26 -0
  415. polyfile/magic_defs/netware +11 -0
  416. polyfile/magic_defs/news +13 -0
  417. polyfile/magic_defs/nifty +202 -0
  418. polyfile/magic_defs/nim-lang +29 -0
  419. polyfile/magic_defs/nitpicker +14 -0
  420. polyfile/magic_defs/numpy +9 -0
  421. polyfile/magic_defs/oasis +12 -0
  422. polyfile/magic_defs/ocaml +14 -0
  423. polyfile/magic_defs/octave +6 -0
  424. polyfile/magic_defs/ole2compounddocs +760 -0
  425. polyfile/magic_defs/olf +98 -0
  426. polyfile/magic_defs/openfst +17 -0
  427. polyfile/magic_defs/opentimestamps +16 -0
  428. polyfile/magic_defs/oric +16 -0
  429. polyfile/magic_defs/os2 +186 -0
  430. polyfile/magic_defs/os400 +39 -0
  431. polyfile/magic_defs/os9 +80 -0
  432. polyfile/magic_defs/osf1 +10 -0
  433. polyfile/magic_defs/palm +156 -0
  434. polyfile/magic_defs/parix +13 -0
  435. polyfile/magic_defs/parrot +22 -0
  436. polyfile/magic_defs/pascal +39 -0
  437. polyfile/magic_defs/pbf +11 -0
  438. polyfile/magic_defs/pbm +8 -0
  439. polyfile/magic_defs/pc88 +24 -0
  440. polyfile/magic_defs/pc98 +77 -0
  441. polyfile/magic_defs/pci_ids +116 -0
  442. polyfile/magic_defs/pcjr +8 -0
  443. polyfile/magic_defs/pdf +51 -0
  444. polyfile/magic_defs/pdp +42 -0
  445. polyfile/magic_defs/perl +100 -0
  446. polyfile/magic_defs/pgf +52 -0
  447. polyfile/magic_defs/pgp +581 -0
  448. polyfile/magic_defs/pgp-binary-keys +388 -0
  449. polyfile/magic_defs/pkgadd +7 -0
  450. polyfile/magic_defs/plan9 +25 -0
  451. polyfile/magic_defs/playdate +57 -0
  452. polyfile/magic_defs/plus5 +18 -0
  453. polyfile/magic_defs/pmem +46 -0
  454. polyfile/magic_defs/polyfile_zip +5 -0
  455. polyfile/magic_defs/polyml +23 -0
  456. polyfile/magic_defs/printer +269 -0
  457. polyfile/magic_defs/project +10 -0
  458. polyfile/magic_defs/psdbms +14 -0
  459. polyfile/magic_defs/psl +14 -0
  460. polyfile/magic_defs/pulsar +13 -0
  461. polyfile/magic_defs/puzzle +17 -0
  462. polyfile/magic_defs/pwsafe +14 -0
  463. polyfile/magic_defs/pyramid +12 -0
  464. polyfile/magic_defs/python +305 -0
  465. polyfile/magic_defs/qt +30 -0
  466. polyfile/magic_defs/revision +66 -0
  467. polyfile/magic_defs/riff +840 -0
  468. polyfile/magic_defs/rinex +44 -0
  469. polyfile/magic_defs/ringdove +45 -0
  470. polyfile/magic_defs/rpi +52 -0
  471. polyfile/magic_defs/rpm +45 -0
  472. polyfile/magic_defs/rpmsg +7 -0
  473. polyfile/magic_defs/rst +11 -0
  474. polyfile/magic_defs/rtf +94 -0
  475. polyfile/magic_defs/ruby +55 -0
  476. polyfile/magic_defs/rust +21 -0
  477. polyfile/magic_defs/sc +7 -0
  478. polyfile/magic_defs/sccs +24 -0
  479. polyfile/magic_defs/scientific +144 -0
  480. polyfile/magic_defs/securitycerts +6 -0
  481. polyfile/magic_defs/selinux +24 -0
  482. polyfile/magic_defs/sendmail +37 -0
  483. polyfile/magic_defs/sequent +42 -0
  484. polyfile/magic_defs/sereal +35 -0
  485. polyfile/magic_defs/sgi +144 -0
  486. polyfile/magic_defs/sgml +161 -0
  487. polyfile/magic_defs/sharc +23 -0
  488. polyfile/magic_defs/sinclair +40 -0
  489. polyfile/magic_defs/sisu +18 -0
  490. polyfile/magic_defs/sketch +6 -0
  491. polyfile/magic_defs/smalltalk +25 -0
  492. polyfile/magic_defs/smile +34 -0
  493. polyfile/magic_defs/sniffer +482 -0
  494. polyfile/magic_defs/softquad +40 -0
  495. polyfile/magic_defs/sosi +40 -0
  496. polyfile/magic_defs/spec +21 -0
  497. polyfile/magic_defs/spectrum +184 -0
  498. polyfile/magic_defs/sql +288 -0
  499. polyfile/magic_defs/ssh +39 -0
  500. polyfile/magic_defs/ssl +20 -0
  501. polyfile/magic_defs/statistics +45 -0
  502. polyfile/magic_defs/subtitle +38 -0
  503. polyfile/magic_defs/sun +141 -0
  504. polyfile/magic_defs/svf +5 -0
  505. polyfile/magic_defs/sylk +36 -0
  506. polyfile/magic_defs/symbos +42 -0
  507. polyfile/magic_defs/sysex +429 -0
  508. polyfile/magic_defs/tcl +29 -0
  509. polyfile/magic_defs/teapot +6 -0
  510. polyfile/magic_defs/terminfo +63 -0
  511. polyfile/magic_defs/tex +141 -0
  512. polyfile/magic_defs/tgif +7 -0
  513. polyfile/magic_defs/ti-8x +239 -0
  514. polyfile/magic_defs/timezone +42 -0
  515. polyfile/magic_defs/tplink +95 -0
  516. polyfile/magic_defs/troff +38 -0
  517. polyfile/magic_defs/tuxedo +8 -0
  518. polyfile/magic_defs/typeset +8 -0
  519. polyfile/magic_defs/uf2 +72 -0
  520. polyfile/magic_defs/unicode +15 -0
  521. polyfile/magic_defs/unisig +12 -0
  522. polyfile/magic_defs/unknown +34 -0
  523. polyfile/magic_defs/usd +21 -0
  524. polyfile/magic_defs/uterus +16 -0
  525. polyfile/magic_defs/uuencode +28 -0
  526. polyfile/magic_defs/vacuum-cleaner +54 -0
  527. polyfile/magic_defs/varied.out +46 -0
  528. polyfile/magic_defs/varied.script +21 -0
  529. polyfile/magic_defs/vax +32 -0
  530. polyfile/magic_defs/vicar +17 -0
  531. polyfile/magic_defs/virtual +307 -0
  532. polyfile/magic_defs/virtutech +12 -0
  533. polyfile/magic_defs/visx +32 -0
  534. polyfile/magic_defs/vms +30 -0
  535. polyfile/magic_defs/vmware +6 -0
  536. polyfile/magic_defs/vorbis +155 -0
  537. polyfile/magic_defs/vxl +14 -0
  538. polyfile/magic_defs/warc +16 -0
  539. polyfile/magic_defs/weak +16 -0
  540. polyfile/magic_defs/web +18 -0
  541. polyfile/magic_defs/webassembly +17 -0
  542. polyfile/magic_defs/windows +1811 -0
  543. polyfile/magic_defs/wireless +7 -0
  544. polyfile/magic_defs/wordprocessors +630 -0
  545. polyfile/magic_defs/wsdl +23 -0
  546. polyfile/magic_defs/x68000 +25 -0
  547. polyfile/magic_defs/xdelta +13 -0
  548. polyfile/magic_defs/xenix +106 -0
  549. polyfile/magic_defs/xilinx +58 -0
  550. polyfile/magic_defs/xo65 +37 -0
  551. polyfile/magic_defs/xwindows +43 -0
  552. polyfile/magic_defs/yara +17 -0
  553. polyfile/magic_defs/zfs +96 -0
  554. polyfile/magic_defs/zilog +12 -0
  555. polyfile/magic_defs/zip +126 -0
  556. polyfile/magic_defs/zyxel +17 -0
  557. polyfile/nes.py +144 -0
  558. polyfile/nitf.py +15 -0
  559. polyfile/pdf.py +1264 -0
  560. polyfile/pickles.py +45 -0
  561. polyfile/polyfile.py +409 -0
  562. polyfile/profiling.py +115 -0
  563. polyfile/repl.py +624 -0
  564. polyfile/search.py +310 -0
  565. polyfile/serialization.py +323 -0
  566. polyfile/structmatcher.py +46 -0
  567. polyfile/structs.py +281 -0
  568. polyfile/templates/download.js +162 -0
  569. polyfile/templates/hexdump.css +268 -0
  570. polyfile/templates/hexdump.js +756 -0
  571. polyfile/templates/jquery-3.4.1.min.js +2 -0
  572. polyfile/templates/template.html +119 -0
  573. polyfile/wildcards.py +62 -0
  574. polyfile/zipmatcher.py +183 -0
  575. polyfile_weave-0.5.5.dist-info/METADATA +173 -0
  576. polyfile_weave-0.5.5.dist-info/RECORD +585 -0
  577. polyfile_weave-0.5.5.dist-info/WHEEL +5 -0
  578. polyfile_weave-0.5.5.dist-info/entry_points.txt +2 -0
  579. polyfile_weave-0.5.5.dist-info/licenses/LICENSE +202 -0
  580. polyfile_weave-0.5.5.dist-info/top_level.txt +2 -0
  581. polymerge/__init__.py +1 -0
  582. polymerge/__main__.py +296 -0
  583. polymerge/cfg.py +127 -0
  584. polymerge/polymerge.py +227 -0
  585. polymerge/polytracker.py +190 -0
@@ -0,0 +1,1197 @@
1
+
2
+ #------------------------------------------------------------------------------
3
+ # $File: animation,v 1.93 2023/05/21 17:13:19 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
11
+ 0 string MOVI Silicon Graphics movie file
12
+ !:mime video/x-sgi-movie
13
+ 4 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
19
+ 4 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
27
+ 4 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
31
+ 4 string pckg Apple QuickTime compressed archive
32
+ !:mime application/x-quicktime-player
33
+
34
+ #### MP4 ####
35
+ # https://www.ftyps.com/ with local additions
36
+ # https://cconcolato.github.io/mp4ra/filetype.html
37
+ 4 string ftyp ISO Media
38
+ # https://aeroquartet.com/wordpress/2016/03/05/3-xavc-s/
39
+ >8 string XAVC \b, MPEG v4 system, Sony XAVC Codec
40
+ !:mime video/mp4
41
+ >>96 string x \b, Audio "%.4s"
42
+ >>118 beshort x at %dHz
43
+ >>140 string x \b, Video "%.4s"
44
+ >>168 beshort x %d
45
+ >>170 beshort x \bx%d
46
+ >8 string 3g2 \b, MPEG v4 system, 3GPP2
47
+ !:mime video/3gpp2
48
+ >>11 byte 4 \b v4 (H.263/AMR GSM 6.10)
49
+ >>11 byte 5 \b v5 (H.263/AMR GSM 6.10)
50
+ >>11 byte 6 \b v6 (ITU H.264/AMR GSM 6.10)
51
+ # https://www.3gpp2.org/Public_html/Specs/C.S0050-B_v1.0_070521.pdf
52
+ # Section 8.1.1, corresponds to a, b, c
53
+ >>11 byte 0x61 \b C.S0050-0 V1.0
54
+ >>11 byte 0x62 \b C.S0050-0-A V1.0.0
55
+ >>11 byte 0x63 \b C.S0050-0-B V1.0
56
+ >8 string 3ge \b, MPEG v4 system, 3GPP
57
+ !:mime video/3gpp
58
+ >>11 byte 6 \b, Release %d MBMS Extended Presentations
59
+ >>11 byte 7 \b, Release %d MBMS Extended Presentations
60
+ >>11 byte 9 \b, Release %d MBMS Extended Presentations
61
+ >8 string 3gf \b, MPEG v4 system, 3GPP
62
+ >>11 byte 9 \b, Release %d File-delivery profile
63
+ >8 string 3gg \b, MPEG v4 system, 3GPP
64
+ !:mime video/3gpp
65
+ >>11 byte 6 \b, Release %d General Profile
66
+ >>11 byte 9 \b, Release %d General Profile
67
+ >8 string 3gh \b, MPEG v4 system, 3GPP
68
+ !:mime video/3gpp
69
+ >>11 byte 9 \b, Release %d Adaptive Streaming Profile
70
+ >8 string 3gm \b, MPEG v4 system, 3GPP
71
+ !:mime video/3gpp
72
+ >>11 byte 9 \b, Release %d Media Segment Profile
73
+ >8 string 3gp \b, MPEG v4 system, 3GPP
74
+ !:mime video/3gpp
75
+ >>11 byte 1 \b, Release %d (non existent)
76
+ >>11 byte 2 \b, Release %d (non existent)
77
+ >>11 byte 3 \b, Release %d (non existent)
78
+ >>11 byte 4 \b, Release %d
79
+ >>11 byte 5 \b, Release %d
80
+ >>11 byte 6 \b, Release %d
81
+ >>11 byte 7 \b, Release %d Streaming Servers
82
+ >8 string 3gr \b, MPEG v4 system, 3GPP
83
+ !:mime video/3gpp
84
+ >>11 byte 6 \b, Release %d Progressive Download Profile
85
+ >>11 byte 9 \b, Release %d Progressive Download Profile
86
+ >8 string 3gs \b, MPEG v4 system, 3GPP
87
+ !:mime video/3gpp
88
+ >>11 byte 6 \b, Release %d Streaming Servers
89
+ >>11 byte 7 \b, Release %d Streaming Servers
90
+ >>11 byte 9 \b, Release %d Streaming Servers
91
+ >8 string 3gt \b, MPEG v4 system, 3GPP
92
+ !:mime video/3gpp
93
+ >>11 byte 8 \b, Release %d Media Stream Recording Profile
94
+ >>11 byte 9 \b, Release %d Media Stream Recording Profile
95
+ >8 string ARRI \b, MPEG v4 system, ARRI Digital Camera
96
+ !:mime video/mp4
97
+ >8 string avc1 \b, MPEG v4 system, 3GPP JVT AVC [ISO 14496-12:2005]
98
+ !:mime video/mp4
99
+ >8 string bbxm \b, Blinkbox Master File: H.264 video/16-bit LE LPCM audio
100
+ !:mime video/mp4
101
+ >8 string/W qt \b, Apple QuickTime movie
102
+ !:mime video/quicktime
103
+ >8 string CAEP \b, Canon Digital Camera
104
+ >8 string caqv \b, Casio Digital Camera
105
+ >8 string CDes \b, Convergent Design
106
+ >8 string caaa \b, CMAF Media Profile - AAC Adaptive Audio
107
+ >8 string caac \b, CMAF Media Profile - AAC Core
108
+ >8 string caqv \b, Casio Digital Camera Casio
109
+ >8 string ccea \b, CMAF Supplemental Data - CEA-608/708
110
+ >8 string ccff \b, Common container file format
111
+ >8 string cfhd \b, CMAF Media Profile - AVC HD
112
+ >8 string cfsd \b, CMAF Media Profile - AVC SD
113
+ >8 string chd1 \b, CMAF Media Profile - HEVC HDR10
114
+ >8 string chdf \b, CMAF Media Profile - AVC HDHF
115
+ >8 string chhd \b, CMAF Media Profile - HEVC HHD8
116
+ >8 string chh1 \b, CMAF Media Profile - HEVC HHD10
117
+ >8 string clg1 \b, CMAF Media Profile - HEVC HLG10
118
+ >8 string cmfc \b, CMAF Track Format
119
+ >8 string cmff \b, CMAF Fragment Format
120
+ >8 string cmfl \b, CMAF Chunk Format
121
+ >8 string cmfs \b, CMAF Segment Format
122
+ >8 string cud1 \b, CMAF Media Profile - HEVC UHD10
123
+ >8 string cud8 \b, CMAF Media Profile - HEVC UHD8
124
+ >8 string cwvt \b, CMAF Media Profile - WebVTT
125
+ >8 string da0a \b, DMB MAF w/ MPEG Layer II aud, MOT slides, DLS, JPG/PNG/MNG
126
+ >8 string da0b \b, DMB MAF, ext DA0A, with 3GPP timed text, DID, TVA, REL, IPMP
127
+ >8 string da1a \b, DMB MAF audio with ER-BSAC audio, JPG/PNG/MNG images
128
+ >8 string da1b \b, DMB MAF, ext da1a, with 3GPP timed text, DID, TVA, REL, IPMP
129
+ >8 string da2a \b, DMB MAF aud w/ HE-AAC v2 aud, MOT slides, DLS, JPG/PNG/MNG
130
+ >8 string da2b \b, DMB MAF, ext da2a, with 3GPP timed text, DID, TVA, REL, IPMP
131
+ >8 string da3a \b, DMB MAF aud with HE-AAC aud, JPG/PNG/MNG images
132
+ >8 string da3b \b, DMB MAF, ext da3a w/ BIFS, 3GPP, DID, TVA, REL, IPMP
133
+ >8 string dash \b, MPEG v4 system, Dynamic Adaptive Streaming over HTTP
134
+ !:mime video/mp4
135
+ >8 string dby1 \b, MP4 files with Dolby content
136
+ >8 string dsms \b, Media Segment DASH conformant
137
+ >8 string dts1 \b, MP4 track file with audio codecs dtsc dtsh or dtse
138
+ >8 string dts2 \b, MP4 track file with audio codec dtsx
139
+ >8 string dts3 \b, MP4 track file with audio codec dtsy
140
+ >8 string dxo$20 \b, DxO ONE camera
141
+ >8 string dmb1 \b, DMB MAF supporting all the components defined in the spec
142
+ >8 string dmpf \b, Digital Media Project
143
+ >8 string drc1 \b, Dirac (wavelet compression), encap in ISO base media (MP4)
144
+ >8 string dv1a \b, DMB MAF vid w/ AVC vid, ER-BSAC aud, BIFS, JPG/PNG/MNG, TS
145
+ >8 string dv1b \b, DMB MAF, ext dv1a, with 3GPP timed text, DID, TVA, REL, IPMP
146
+ >8 string dv2a \b, DMB MAF vid w/ AVC vid, HE-AAC v2 aud, BIFS, JPG/PNG/MNG, TS
147
+ >8 string dv2b \b, DMB MAF, ext dv2a, with 3GPP timed text, DID, TVA, REL, IPMP
148
+ >8 string dv3a \b, DMB MAF vid w/ AVC vid, HE-AAC aud, BIFS, JPG/PNG/MNG, TS
149
+ >8 string dv3b \b, DMB MAF, ext dv3a, with 3GPP timed text, DID, TVA, REL, IPMP
150
+ >8 string dvr1 \b, DVB (.DVB) over RTP
151
+ !:mime video/vnd.dvb.file
152
+ >8 string dvt1 \b, DVB (.DVB) over MPEG-2 Transport Stream
153
+ >8 string emsg \b, Event message box present
154
+ !:mime video/vnd.dvb.file
155
+ >8 string F4V \b, Video for Adobe Flash Player 9+ (.F4V)
156
+ !:mime video/mp4
157
+ >8 string F4P \b, Protected Video for Adobe Flash Player 9+ (.F4P)
158
+ !:mime video/mp4
159
+ >8 string F4A \b, Audio for Adobe Flash Player 9+ (.F4A)
160
+ !:mime audio/mp4
161
+ >8 string F4B \b, Audio Book for Adobe Flash Player 9+ (.F4B)
162
+ !:mime audio/mp4
163
+ >8 string ifrm \b, Apple iFrame Specification, Version 8.1 Jan 2013
164
+ >8 string im1i \b, CMAF Media Profile - IMSC1 Image
165
+ >8 string im1t \b, CMAF Media Profile - IMSC1 Text
166
+ >8 string isc2 \b, ISMACryp 2.0 Encrypted File
167
+ # ?/enc-isoff-generic
168
+ >8 string iso \b, MP4 Base Media
169
+ !:mime video/mp4
170
+ !:ext mp4
171
+ >>11 string m v1 [ISO 14496-12:2003]
172
+ >>11 string 2 v2 [ISO 14496-12:2005]
173
+ >>11 string 4 v4
174
+ >>11 string 5 v5
175
+ >>11 string 6 v6
176
+ >8 string isml \b, MP4 Base Media v2 [ISO 14496-12:2005]
177
+ !:mime video/mp4
178
+ >8 string J2P0 \b, JPEG2000 Profile 0
179
+ >8 string J2P1 \b, JPEG2000 Profile 1
180
+ >8 string/W jp2 \b, JPEG 2000
181
+ !:mime image/jp2
182
+ >8 string JP2 \b, JPEG 2000 Image (.JP2) [ISO 15444-1 ?]
183
+ !:mime image/jp2
184
+ >8 string JP20 \b, Unknown, from GPAC samples (prob non-existent)
185
+ >8 string jpm \b, JPEG 2000 Compound Image (.JPM) [ISO 15444-6]
186
+ !:mime image/jpm
187
+ >8 string jpsi \b, The JPSearch data interchange format
188
+ >8 string jpx \b, JPEG 2000 w/ extensions (.JPX) [ISO 15444-2]
189
+ !:mime image/jpx
190
+ >8 string KDDI \b, 3GPP2 EZmovie for KDDI 3G cellphones
191
+ !:mime video/3gpp2
192
+ >8 string LCAG \b, Leica digital camera
193
+ >8 string lmsg \b, Last Media Segment indicator for ISO base media file format.
194
+ >8 string M4A \b, Apple iTunes ALAC/AAC-LC (.M4A) Audio
195
+ !:mime audio/x-m4a
196
+ >8 string M4B \b, Apple iTunes ALAC/AAC-LC (.M4B) Audio Book
197
+ !:mime audio/mp4
198
+ >8 string M4P \b, Apple iTunes ALAC/AAC-LC (.M4P) AES Protected Audio
199
+ !:mime video/mp4
200
+ >8 string M4V \b, Apple iTunes Video (.M4V) Video
201
+ !:mime video/x-m4v
202
+ >8 string M4VH \b, Apple TV (.M4V)
203
+ !:mime video/x-m4v
204
+ >8 string M4VP \b, Apple iPhone (.M4V)
205
+ !:mime video/x-m4v
206
+ >8 string mj2s \b, Motion JPEG 2000 [ISO 15444-3] Simple Profile
207
+ !:mime video/mj2
208
+ >8 string mjp2 \b, Motion JPEG 2000 [ISO 15444-3] General Profile
209
+ >8 string MFSM \b, Media File for Samsung video Metadata
210
+ >8 string MGSV \b, Sony Home and Mobile Multimedia Platform (HMMP)
211
+ !:mime video/mj2
212
+ >8 string mmp4 \b, MPEG-4/3GPP Mobile Profile (.MP4 / .3GP) (for NTT)
213
+ !:mime video/mp4
214
+ >8 string mobi \b, MPEG-4, MOBI format
215
+ !:mime video/mp4
216
+ >8 string mp21 \b, MPEG-21 [ISO/IEC 21000-9]
217
+ >8 string mp41 \b, MP4 v1 [ISO 14496-1:ch13]
218
+ !:mime video/mp4
219
+ >8 string mp42 \b, MP4 v2 [ISO 14496-14]
220
+ !:mime video/mp4
221
+ >8 string mp71 \b, MP4 w/ MPEG-7 Metadata [per ISO 14496-12]
222
+ >8 string mp7t \b, MPEG v4 system, MPEG v7 XML
223
+ >8 string mp7b \b, MPEG v4 system, MPEG v7 binary XML
224
+ >8 string mpuf \b, Compliance with the MMT Processing Unit format
225
+ >8 string msdh \b, Media Segment conforming to ISO base media file format.
226
+ >8 string msix \b, Media Segment conforming to ISO base media file format.
227
+ >8 string mmp4 \b, MPEG v4 system, 3GPP Mobile
228
+ !:mime video/mp4
229
+ >8 string MPPI \b, Photo Player, MAF [ISO/IEC 23000-3]
230
+ >8 string mqt \b, Sony / Mobile QuickTime (.MQV) US Pat 7,477,830
231
+ !:mime video/quicktime
232
+ >8 string MSNV \b, MPEG-4 (.MP4) for SonyPSP
233
+ !:mime audio/mp4
234
+ >8 string NDAS \b, MP4 v2 [ISO 14496-14] Nero Digital AAC Audio
235
+ !:mime audio/mp4
236
+ >8 string NDSC \b, MPEG-4 (.MP4) Nero Cinema Profile
237
+ !:mime video/mp4
238
+ >8 string NDSH \b, MPEG-4 (.MP4) Nero HDTV Profile
239
+ !:mime video/mp4
240
+ >8 string NDSM \b, MPEG-4 (.MP4) Nero Mobile Profile
241
+ !:mime video/mp4
242
+ >8 string NDSP \b, MPEG-4 (.MP4) Nero Portable Profile
243
+ !:mime video/mp4
244
+ >8 string NDSS \b, MPEG-4 (.MP4) Nero Standard Profile
245
+ !:mime video/mp4
246
+ >8 string NDXC \b, H.264/MPEG-4 AVC (.MP4) Nero Cinema Profile
247
+ !:mime video/mp4
248
+ >8 string NDXH \b, H.264/MPEG-4 AVC (.MP4) Nero HDTV Profile
249
+ !:mime video/mp4
250
+ >8 string NDXM \b, H.264/MPEG-4 AVC (.MP4) Nero Mobile Profile
251
+ !:mime video/mp4
252
+ >8 string NDXP \b, H.264/MPEG-4 AVC (.MP4) Nero Portable Profile
253
+ !:mime video/mp4
254
+ >8 string NDXS \b, H.264/MPEG-4 AVC (.MP4) Nero Standard Profile
255
+ >8 string niko \b, Nikon Digital Camera
256
+ !:mime video/mp4
257
+ >8 string odcf \b, OMA DCF DRM Format 2.0 (OMA-TS-DRM-DCF-V2_0-20060303-A)
258
+ >8 string opf2 \b, OMA PDCF DRM Format 2.1 (OMA-TS-DRM-DCF-V2_1-20070724-C)
259
+ >8 string opx2 \b, OMA PDCF DRM + XBS ext (OMA-TS-DRM_XBS-V1_0-20070529-C)
260
+ >8 string pana \b, Panasonic Digital Camera
261
+ >8 string piff \b, Protected Interoperable File Format
262
+ >8 string pnvi ]b, Panasonic Video Intercom
263
+ >8 string qt \b, Apple QuickTime (.MOV/QT)
264
+ !:mime video/quicktime
265
+ # HEIF image format
266
+ # see https://nokiatech.github.io/heif/technical.html
267
+ >8 string mif1 \b, HEIF Image
268
+ !:mime image/heif
269
+ >8 string msf1 \b, HEIF Image Sequence
270
+ !:mime image/heif-sequence
271
+ >8 string heic \b, HEIF Image HEVC Main or Main Still Picture Profile
272
+ !:mime image/heic
273
+ >8 string heix \b, HEIF Image HEVC Main 10 Profile
274
+ !:mime image/heic
275
+ >8 string hevc \b, HEIF Image Sequenz HEVC Main or Main Still Picture Profile
276
+ !:mime image/heic-sequence
277
+ >8 string hevx \b, HEIF Image Sequence HEVC Main 10 Profile
278
+ !:mime image/heic-sequence
279
+ # following HEIF brands are not mentioned in the heif technical info currently (Oct 2017)
280
+ # but used in the reference implementation:
281
+ # https://github.com/nokiatech/heif/blob/d5e9a21c8ba8df712bdf643021dd9f6518134776/Srcs/reader/hevcimagefilereader.cpp
282
+ >8 string heim \b, HEIF Image L-HEVC
283
+ !:mime image/heif
284
+ >8 string heis \b, HEIF Image L-HEVC
285
+ !:mime image/heif
286
+ >8 string avic \b, HEIF Image AVC
287
+ !:mime image/heif
288
+ >8 string hevm \b, HEIF Image Sequence L-HEVC
289
+ !:mime image/heif-sequence
290
+ >8 string hevs \b, HEIF Image Sequence L-HEVC
291
+ !:mime image/heif-sequence
292
+ >8 string avcs \b, HEIF Image Sequence AVC
293
+ !:mime image/heif-sequence
294
+ # AVIF image format
295
+ # see https://aomediacodec.github.io/av1-avif/
296
+ >8 string avif \b, AVIF Image
297
+ !:mime image/avif
298
+ >8 string avis \b, AVIF Image Sequence
299
+ !:mime image/avif
300
+ >8 string risx \b, Representation Index Segment for MPEG-2 TS Segments
301
+ >8 string ROSS \b, Ross Video
302
+ >8 string sdv \b, SD Memory Card Video
303
+ >8 string ssc1 \b, Samsung stereo, single stream (patent pending)
304
+ >8 string ssc2 \b, Samsung stereo, dual stream (patent pending)
305
+ >8 string SEAU \b, Sony Home and Mobile Multimedia Platform (HMMP)
306
+ >8 string SEBK \b, Sony Home and Mobile Multimedia Platform (HMMP)
307
+ >8 string senv \b, Video contents Sony Entertainment Network
308
+ >8 string sims \b, Media Segment for Sub-Indexed Media Segment format
309
+ >8 string sisx \b, Single Index Segment forindex MPEG-2 TS
310
+ >8 string ssss \b, Subsegment Index Segment used to index MPEG-2 Segments
311
+ >8 string uvvu \b, UltraViolet file brand for DECE Common Format
312
+
313
+ # MPEG sequences
314
+ # Scans for all common MPEG header start codes
315
+ 0 belong 0x00000001
316
+ >4 byte&0x1F 0x07 JVT NAL sequence, H.264 video
317
+ >>5 byte 66 \b, baseline
318
+ >>5 byte 77 \b, main
319
+ >>5 byte 88 \b, extended
320
+ >>7 byte x \b @ L %u
321
+ 0 belong&0xFFFFFF00 0x00000100
322
+ >3 byte 0xBA MPEG sequence
323
+ !:mime video/mpeg
324
+ # http://fileformats.archiveteam.org/wiki/Enhanced_VOB
325
+ # https://reposcope.com/mimetype/video/mpeg
326
+ !:ext vob/evo/mpg/mpeg
327
+ >>4 byte &0x40 \b, v2, program multiplex
328
+ >>4 byte ^0x40 \b, v1, system multiplex
329
+ >3 byte 0xBB MPEG sequence, v1/2, multiplex (missing pack header)
330
+ >3 byte&0x1F 0x07 MPEG sequence, H.264 video
331
+ >>4 byte 66 \b, baseline
332
+ >>4 byte 77 \b, main
333
+ >>4 byte 88 \b, extended
334
+ >>6 byte x \b @ L %u
335
+ # GRR too general as it catches also FoxPro Memo example NG.FPT
336
+ >3 byte 0xB0 MPEG sequence, v4
337
+ # TODO: maybe this extra line exclude FoxPro Memo example NG.FPT starting with 000001b0 00000100 00000000
338
+ #>>4 byte !0 MPEG sequence, v4
339
+ !:mime video/mpeg4-generic
340
+ >>5 belong 0x000001B5
341
+ >>>9 byte &0x80
342
+ >>>>10 byte&0xF0 16 \b, video
343
+ >>>>10 byte&0xF0 32 \b, still texture
344
+ >>>>10 byte&0xF0 48 \b, mesh
345
+ >>>>10 byte&0xF0 64 \b, face
346
+ >>>9 byte&0xF8 8 \b, video
347
+ >>>9 byte&0xF8 16 \b, still texture
348
+ >>>9 byte&0xF8 24 \b, mesh
349
+ >>>9 byte&0xF8 32 \b, face
350
+ >>4 byte 1 \b, simple @ L1
351
+ >>4 byte 2 \b, simple @ L2
352
+ >>4 byte 3 \b, simple @ L3
353
+ >>4 byte 4 \b, simple @ L0
354
+ >>4 byte 17 \b, simple scalable @ L1
355
+ >>4 byte 18 \b, simple scalable @ L2
356
+ >>4 byte 33 \b, core @ L1
357
+ >>4 byte 34 \b, core @ L2
358
+ >>4 byte 50 \b, main @ L2
359
+ >>4 byte 51 \b, main @ L3
360
+ >>4 byte 53 \b, main @ L4
361
+ >>4 byte 66 \b, n-bit @ L2
362
+ >>4 byte 81 \b, scalable texture @ L1
363
+ >>4 byte 97 \b, simple face animation @ L1
364
+ >>4 byte 98 \b, simple face animation @ L2
365
+ >>4 byte 99 \b, simple face basic animation @ L1
366
+ >>4 byte 100 \b, simple face basic animation @ L2
367
+ >>4 byte 113 \b, basic animation text @ L1
368
+ >>4 byte 114 \b, basic animation text @ L2
369
+ >>4 byte 129 \b, hybrid @ L1
370
+ >>4 byte 130 \b, hybrid @ L2
371
+ >>4 byte 145 \b, advanced RT simple @ L!
372
+ >>4 byte 146 \b, advanced RT simple @ L2
373
+ >>4 byte 147 \b, advanced RT simple @ L3
374
+ >>4 byte 148 \b, advanced RT simple @ L4
375
+ >>4 byte 161 \b, core scalable @ L1
376
+ >>4 byte 162 \b, core scalable @ L2
377
+ >>4 byte 163 \b, core scalable @ L3
378
+ >>4 byte 177 \b, advanced coding efficiency @ L1
379
+ >>4 byte 178 \b, advanced coding efficiency @ L2
380
+ >>4 byte 179 \b, advanced coding efficiency @ L3
381
+ >>4 byte 180 \b, advanced coding efficiency @ L4
382
+ >>4 byte 193 \b, advanced core @ L1
383
+ >>4 byte 194 \b, advanced core @ L2
384
+ >>4 byte 209 \b, advanced scalable texture @ L1
385
+ >>4 byte 210 \b, advanced scalable texture @ L2
386
+ >>4 byte 211 \b, advanced scalable texture @ L3
387
+ >>4 byte 225 \b, simple studio @ L1
388
+ >>4 byte 226 \b, simple studio @ L2
389
+ >>4 byte 227 \b, simple studio @ L3
390
+ >>4 byte 228 \b, simple studio @ L4
391
+ >>4 byte 229 \b, core studio @ L1
392
+ >>4 byte 230 \b, core studio @ L2
393
+ >>4 byte 231 \b, core studio @ L3
394
+ >>4 byte 232 \b, core studio @ L4
395
+ >>4 byte 240 \b, advanced simple @ L0
396
+ >>4 byte 241 \b, advanced simple @ L1
397
+ >>4 byte 242 \b, advanced simple @ L2
398
+ >>4 byte 243 \b, advanced simple @ L3
399
+ >>4 byte 244 \b, advanced simple @ L4
400
+ >>4 byte 245 \b, advanced simple @ L5
401
+ >>4 byte 247 \b, advanced simple @ L3b
402
+ >>4 byte 248 \b, FGS @ L0
403
+ >>4 byte 249 \b, FGS @ L1
404
+ >>4 byte 250 \b, FGS @ L2
405
+ >>4 byte 251 \b, FGS @ L3
406
+ >>4 byte 252 \b, FGS @ L4
407
+ >>4 byte 253 \b, FGS @ L5
408
+ >3 byte 0xB5 MPEG sequence, v4
409
+ !:mime video/mpeg4-generic
410
+ >>4 byte &0x80
411
+ >>>5 byte&0xF0 16 \b, video (missing profile header)
412
+ >>>5 byte&0xF0 32 \b, still texture (missing profile header)
413
+ >>>5 byte&0xF0 48 \b, mesh (missing profile header)
414
+ >>>5 byte&0xF0 64 \b, face (missing profile header)
415
+ >>4 byte&0xF8 8 \b, video (missing profile header)
416
+ >>4 byte&0xF8 16 \b, still texture (missing profile header)
417
+ >>4 byte&0xF8 24 \b, mesh (missing profile header)
418
+ >>4 byte&0xF8 32 \b, face (missing profile header)
419
+ >3 byte 0xB3 MPEG sequence
420
+ !:mime video/mpeg
421
+ >>12 belong 0x000001B8 \b, v1, progressive Y'CbCr 4:2:0 video
422
+ >>12 belong 0x000001B2 \b, v1, progressive Y'CbCr 4:2:0 video
423
+ >>12 belong 0x000001B5 \b, v2,
424
+ >>>16 byte&0x0F 1 \b HP
425
+ >>>16 byte&0x0F 2 \b Spt
426
+ >>>16 byte&0x0F 3 \b SNR
427
+ >>>16 byte&0x0F 4 \b MP
428
+ >>>16 byte&0x0F 5 \b SP
429
+ >>>17 byte&0xF0 64 \b@HL
430
+ >>>17 byte&0xF0 96 \b@H-14
431
+ >>>17 byte&0xF0 128 \b@ML
432
+ >>>17 byte&0xF0 160 \b@LL
433
+ >>>17 byte &0x08 \b progressive
434
+ >>>17 byte ^0x08 \b interlaced
435
+ >>>17 byte&0x06 2 \b Y'CbCr 4:2:0 video
436
+ >>>17 byte&0x06 4 \b Y'CbCr 4:2:2 video
437
+ >>>17 byte&0x06 6 \b Y'CbCr 4:4:4 video
438
+ >>11 byte &0x02
439
+ >>>75 byte &0x01
440
+ >>>>140 belong 0x000001B8 \b, v1, progressive Y'CbCr 4:2:0 video
441
+ >>>>140 belong 0x000001B2 \b, v1, progressive Y'CbCr 4:2:0 video
442
+ >>>>140 belong 0x000001B5 \b, v2,
443
+ >>>>>144 byte&0x0F 1 \b HP
444
+ >>>>>144 byte&0x0F 2 \b Spt
445
+ >>>>>144 byte&0x0F 3 \b SNR
446
+ >>>>>144 byte&0x0F 4 \b MP
447
+ >>>>>144 byte&0x0F 5 \b SP
448
+ >>>>>145 byte&0xF0 64 \b@HL
449
+ >>>>>145 byte&0xF0 96 \b@H-14
450
+ >>>>>145 byte&0xF0 128 \b@ML
451
+ >>>>>145 byte&0xF0 160 \b@LL
452
+ >>>>>145 byte &0x08 \b progressive
453
+ >>>>>145 byte ^0x08 \b interlaced
454
+ >>>>>145 byte&0x06 2 \b Y'CbCr 4:2:0 video
455
+ >>>>>145 byte&0x06 4 \b Y'CbCr 4:2:2 video
456
+ >>>>>145 byte&0x06 6 \b Y'CbCr 4:4:4 video
457
+ >>76 belong 0x000001B8 \b, v1, progressive Y'CbCr 4:2:0 video
458
+ >>76 belong 0x000001B2 \b, v1, progressive Y'CbCr 4:2:0 video
459
+ >>76 belong 0x000001B5 \b, v2,
460
+ >>>80 byte&0x0F 1 \b HP
461
+ >>>80 byte&0x0F 2 \b Spt
462
+ >>>80 byte&0x0F 3 \b SNR
463
+ >>>80 byte&0x0F 4 \b MP
464
+ >>>80 byte&0x0F 5 \b SP
465
+ >>>81 byte&0xF0 64 \b@HL
466
+ >>>81 byte&0xF0 96 \b@H-14
467
+ >>>81 byte&0xF0 128 \b@ML
468
+ >>>81 byte&0xF0 160 \b@LL
469
+ >>>81 byte &0x08 \b progressive
470
+ >>>81 byte ^0x08 \b interlaced
471
+ >>>81 byte&0x06 2 \b Y'CbCr 4:2:0 video
472
+ >>>81 byte&0x06 4 \b Y'CbCr 4:2:2 video
473
+ >>>81 byte&0x06 6 \b Y'CbCr 4:4:4 video
474
+ >>4 belong&0xFFFFFF00 0x78043800 \b, HD-TV 1920P
475
+ >>>7 byte&0xF0 0x10 \b, 16:9
476
+ >>4 belong&0xFFFFFF00 0x50002D00 \b, SD-TV 1280I
477
+ >>>7 byte&0xF0 0x10 \b, 16:9
478
+ >>4 belong&0xFFFFFF00 0x30024000 \b, PAL Capture
479
+ >>>7 byte&0xF0 0x10 \b, 4:3
480
+ >>4 beshort&0xFFF0 0x2C00 \b, 4CIF
481
+ >>>5 beshort&0x0FFF 0x01E0 \b NTSC
482
+ >>>5 beshort&0x0FFF 0x0240 \b PAL
483
+ >>>7 byte&0xF0 0x20 \b, 4:3
484
+ >>>7 byte&0xF0 0x30 \b, 16:9
485
+ >>>7 byte&0xF0 0x40 \b, 11:5
486
+ >>>7 byte&0xF0 0x80 \b, PAL 4:3
487
+ >>>7 byte&0xF0 0xC0 \b, NTSC 4:3
488
+ >>4 belong&0xFFFFFF00 0x2801E000 \b, LD-TV 640P
489
+ >>>7 byte&0xF0 0x10 \b, 4:3
490
+ >>4 belong&0xFFFFFF00 0x1400F000 \b, 320x240
491
+ >>>7 byte&0xF0 0x10 \b, 4:3
492
+ >>4 belong&0xFFFFFF00 0x0F00A000 \b, 240x160
493
+ >>>7 byte&0xF0 0x10 \b, 4:3
494
+ >>4 belong&0xFFFFFF00 0x0A007800 \b, 160x120
495
+ >>>7 byte&0xF0 0x10 \b, 4:3
496
+ >>4 beshort&0xFFF0 0x1600 \b, CIF
497
+ >>>5 beshort&0x0FFF 0x00F0 \b NTSC
498
+ >>>5 beshort&0x0FFF 0x0120 \b PAL
499
+ >>>7 byte&0xF0 0x20 \b, 4:3
500
+ >>>7 byte&0xF0 0x30 \b, 16:9
501
+ >>>7 byte&0xF0 0x40 \b, 11:5
502
+ >>>7 byte&0xF0 0x80 \b, PAL 4:3
503
+ >>>7 byte&0xF0 0xC0 \b, NTSC 4:3
504
+ >>>5 beshort&0x0FFF 0x0240 \b PAL 625
505
+ >>>>7 byte&0xF0 0x20 \b, 4:3
506
+ >>>>7 byte&0xF0 0x30 \b, 16:9
507
+ >>>>7 byte&0xF0 0x40 \b, 11:5
508
+ >>4 beshort&0xFFF0 0x2D00 \b, CCIR/ITU
509
+ >>>5 beshort&0x0FFF 0x01E0 \b NTSC 525
510
+ >>>5 beshort&0x0FFF 0x0240 \b PAL 625
511
+ >>>7 byte&0xF0 0x20 \b, 4:3
512
+ >>>7 byte&0xF0 0x30 \b, 16:9
513
+ >>>7 byte&0xF0 0x40 \b, 11:5
514
+ >>4 beshort&0xFFF0 0x1E00 \b, SVCD
515
+ >>>5 beshort&0x0FFF 0x01E0 \b NTSC 525
516
+ >>>5 beshort&0x0FFF 0x0240 \b PAL 625
517
+ >>>7 byte&0xF0 0x20 \b, 4:3
518
+ >>>7 byte&0xF0 0x30 \b, 16:9
519
+ >>>7 byte&0xF0 0x40 \b, 11:5
520
+ >>7 byte&0x0F 1 \b, 23.976 fps
521
+ >>7 byte&0x0F 2 \b, 24 fps
522
+ >>7 byte&0x0F 3 \b, 25 fps
523
+ >>7 byte&0x0F 4 \b, 29.97 fps
524
+ >>7 byte&0x0F 5 \b, 30 fps
525
+ >>7 byte&0x0F 6 \b, 50 fps
526
+ >>7 byte&0x0F 7 \b, 59.94 fps
527
+ >>7 byte&0x0F 8 \b, 60 fps
528
+ >>11 byte &0x04 \b, Constrained
529
+
530
+ # MPEG ADTS Audio (*.mpx/mxa/aac)
531
+ # from dreesen@math.fu-berlin.de
532
+ # modified to fully support MPEG ADTS
533
+
534
+ # MP3, M1A
535
+ # modified by Joerg Jenderek
536
+ # GRR the original test are too common for many DOS files
537
+ # so don't accept as MP3 until we've tested the rate
538
+ # But also beat GEMDOS fonts
539
+ 0 beshort&0xFFFE 0xFFFA
540
+ # rates
541
+ >2 byte&0xF0 !0
542
+ >>2 byte&0xF0 !0xF0 MPEG ADTS, layer III, v1
543
+ !:strength +20
544
+ !:mime audio/mpeg
545
+ >2 byte&0xF0 0x10 \b, 32 kbps
546
+ >2 byte&0xF0 0x20 \b, 40 kbps
547
+ >2 byte&0xF0 0x30 \b, 48 kbps
548
+ >2 byte&0xF0 0x40 \b, 56 kbps
549
+ >2 byte&0xF0 0x50 \b, 64 kbps
550
+ >2 byte&0xF0 0x60 \b, 80 kbps
551
+ >2 byte&0xF0 0x70 \b, 96 kbps
552
+ >2 byte&0xF0 0x80 \b, 112 kbps
553
+ >2 byte&0xF0 0x90 \b, 128 kbps
554
+ >2 byte&0xF0 0xA0 \b, 160 kbps
555
+ >2 byte&0xF0 0xB0 \b, 192 kbps
556
+ >2 byte&0xF0 0xC0 \b, 224 kbps
557
+ >2 byte&0xF0 0xD0 \b, 256 kbps
558
+ >2 byte&0xF0 0xE0 \b, 320 kbps
559
+ # timing
560
+ >2 byte&0x0C 0x00 \b, 44.1 kHz
561
+ >2 byte&0x0C 0x04 \b, 48 kHz
562
+ >2 byte&0x0C 0x08 \b, 32 kHz
563
+ # channels/options
564
+ >3 byte&0xC0 0x00 \b, Stereo
565
+ >3 byte&0xC0 0x40 \b, JntStereo
566
+ >3 byte&0xC0 0x80 \b, 2x Monaural
567
+ >3 byte&0xC0 0xC0 \b, Monaural
568
+ #>1 byte ^0x01 \b, Data Verify
569
+ #>2 byte &0x02 \b, Packet Pad
570
+ #>2 byte &0x01 \b, Custom Flag
571
+ #>3 byte &0x08 \b, Copyrighted
572
+ #>3 byte &0x04 \b, Original Source
573
+ #>3 byte&0x03 1 \b, NR: 50/15 ms
574
+ #>3 byte&0x03 3 \b, NR: CCIT J.17
575
+
576
+ # MP2, M1A
577
+ 0 beshort&0xFFFE 0xFFFC MPEG ADTS, layer II, v1
578
+ !:mime audio/mpeg
579
+ # rates
580
+ >2 byte&0xF0 0x10 \b, 32 kbps
581
+ >2 byte&0xF0 0x20 \b, 48 kbps
582
+ >2 byte&0xF0 0x30 \b, 56 kbps
583
+ >2 byte&0xF0 0x40 \b, 64 kbps
584
+ >2 byte&0xF0 0x50 \b, 80 kbps
585
+ >2 byte&0xF0 0x60 \b, 96 kbps
586
+ >2 byte&0xF0 0x70 \b, 112 kbps
587
+ >2 byte&0xF0 0x80 \b, 128 kbps
588
+ >2 byte&0xF0 0x90 \b, 160 kbps
589
+ >2 byte&0xF0 0xA0 \b, 192 kbps
590
+ >2 byte&0xF0 0xB0 \b, 224 kbps
591
+ >2 byte&0xF0 0xC0 \b, 256 kbps
592
+ >2 byte&0xF0 0xD0 \b, 320 kbps
593
+ >2 byte&0xF0 0xE0 \b, 384 kbps
594
+ # timing
595
+ >2 byte&0x0C 0x00 \b, 44.1 kHz
596
+ >2 byte&0x0C 0x04 \b, 48 kHz
597
+ >2 byte&0x0C 0x08 \b, 32 kHz
598
+ # channels/options
599
+ >3 byte&0xC0 0x00 \b, Stereo
600
+ >3 byte&0xC0 0x40 \b, JntStereo
601
+ >3 byte&0xC0 0x80 \b, 2x Monaural
602
+ >3 byte&0xC0 0xC0 \b, Monaural
603
+ #>1 byte ^0x01 \b, Data Verify
604
+ #>2 byte &0x02 \b, Packet Pad
605
+ #>2 byte &0x01 \b, Custom Flag
606
+ #>3 byte &0x08 \b, Copyrighted
607
+ #>3 byte &0x04 \b, Original Source
608
+ #>3 byte&0x03 1 \b, NR: 50/15 ms
609
+ #>3 byte&0x03 3 \b, NR: CCIT J.17
610
+
611
+ # MPA, M1A
612
+ # updated by Joerg Jenderek
613
+ # GRR the original test are too common for many DOS files, so test 32 <= kbits <= 448
614
+ # GRR this test is still too general as it catches a BOM of UTF-16 files (0xFFFE)
615
+ # FIXME: Almost all little endian UTF-16 text with BOM are clobbered by these entries
616
+ #0 beshort&0xFFFE 0xFFFE
617
+ #>2 ubyte&0xF0 >0x0F
618
+ #>>2 ubyte&0xF0 <0xE1 MPEG ADTS, layer I, v1
619
+ ## rate
620
+ #>>>2 byte&0xF0 0x10 \b, 32 kbps
621
+ #>>>2 byte&0xF0 0x20 \b, 64 kbps
622
+ #>>>2 byte&0xF0 0x30 \b, 96 kbps
623
+ #>>>2 byte&0xF0 0x40 \b, 128 kbps
624
+ #>>>2 byte&0xF0 0x50 \b, 160 kbps
625
+ #>>>2 byte&0xF0 0x60 \b, 192 kbps
626
+ #>>>2 byte&0xF0 0x70 \b, 224 kbps
627
+ #>>>2 byte&0xF0 0x80 \b, 256 kbps
628
+ #>>>2 byte&0xF0 0x90 \b, 288 kbps
629
+ #>>>2 byte&0xF0 0xA0 \b, 320 kbps
630
+ #>>>2 byte&0xF0 0xB0 \b, 352 kbps
631
+ #>>>2 byte&0xF0 0xC0 \b, 384 kbps
632
+ #>>>2 byte&0xF0 0xD0 \b, 416 kbps
633
+ #>>>2 byte&0xF0 0xE0 \b, 448 kbps
634
+ ## timing
635
+ #>>>2 byte&0x0C 0x00 \b, 44.1 kHz
636
+ #>>>2 byte&0x0C 0x04 \b, 48 kHz
637
+ #>>>2 byte&0x0C 0x08 \b, 32 kHz
638
+ ## channels/options
639
+ #>>>3 byte&0xC0 0x00 \b, Stereo
640
+ #>>>3 byte&0xC0 0x40 \b, JntStereo
641
+ #>>>3 byte&0xC0 0x80 \b, 2x Monaural
642
+ #>>>3 byte&0xC0 0xC0 \b, Monaural
643
+ ##>1 byte ^0x01 \b, Data Verify
644
+ ##>2 byte &0x02 \b, Packet Pad
645
+ ##>2 byte &0x01 \b, Custom Flag
646
+ ##>3 byte &0x08 \b, Copyrighted
647
+ ##>3 byte &0x04 \b, Original Source
648
+ ##>3 byte&0x03 1 \b, NR: 50/15 ms
649
+ ##>3 byte&0x03 3 \b, NR: CCIT J.17
650
+
651
+ # MP3, M2A
652
+ 0 beshort&0xFFFE 0xFFF2 MPEG ADTS, layer III, v2
653
+ !:mime audio/mpeg
654
+ # rate
655
+ >2 byte&0xF0 0x10 \b, 8 kbps
656
+ >2 byte&0xF0 0x20 \b, 16 kbps
657
+ >2 byte&0xF0 0x30 \b, 24 kbps
658
+ >2 byte&0xF0 0x40 \b, 32 kbps
659
+ >2 byte&0xF0 0x50 \b, 40 kbps
660
+ >2 byte&0xF0 0x60 \b, 48 kbps
661
+ >2 byte&0xF0 0x70 \b, 56 kbps
662
+ >2 byte&0xF0 0x80 \b, 64 kbps
663
+ >2 byte&0xF0 0x90 \b, 80 kbps
664
+ >2 byte&0xF0 0xA0 \b, 96 kbps
665
+ >2 byte&0xF0 0xB0 \b, 112 kbps
666
+ >2 byte&0xF0 0xC0 \b, 128 kbps
667
+ >2 byte&0xF0 0xD0 \b, 144 kbps
668
+ >2 byte&0xF0 0xE0 \b, 160 kbps
669
+ # timing
670
+ >2 byte&0x0C 0x00 \b, 22.05 kHz
671
+ >2 byte&0x0C 0x04 \b, 24 kHz
672
+ >2 byte&0x0C 0x08 \b, 16 kHz
673
+ # channels/options
674
+ >3 byte&0xC0 0x00 \b, Stereo
675
+ >3 byte&0xC0 0x40 \b, JntStereo
676
+ >3 byte&0xC0 0x80 \b, 2x Monaural
677
+ >3 byte&0xC0 0xC0 \b, Monaural
678
+ #>1 byte ^0x01 \b, Data Verify
679
+ #>2 byte &0x02 \b, Packet Pad
680
+ #>2 byte &0x01 \b, Custom Flag
681
+ #>3 byte &0x08 \b, Copyrighted
682
+ #>3 byte &0x04 \b, Original Source
683
+ #>3 byte&0x03 1 \b, NR: 50/15 ms
684
+ #>3 byte&0x03 3 \b, NR: CCIT J.17
685
+
686
+ # MP2, M2A
687
+ 0 beshort&0xFFFE 0xFFF4 MPEG ADTS, layer II, v2
688
+ !:mime audio/mpeg
689
+ # rate
690
+ >2 byte&0xF0 0x10 \b, 8 kbps
691
+ >2 byte&0xF0 0x20 \b, 16 kbps
692
+ >2 byte&0xF0 0x30 \b, 24 kbps
693
+ >2 byte&0xF0 0x40 \b, 32 kbps
694
+ >2 byte&0xF0 0x50 \b, 40 kbps
695
+ >2 byte&0xF0 0x60 \b, 48 kbps
696
+ >2 byte&0xF0 0x70 \b, 56 kbps
697
+ >2 byte&0xF0 0x80 \b, 64 kbps
698
+ >2 byte&0xF0 0x90 \b, 80 kbps
699
+ >2 byte&0xF0 0xA0 \b, 96 kbps
700
+ >2 byte&0xF0 0xB0 \b, 112 kbps
701
+ >2 byte&0xF0 0xC0 \b, 128 kbps
702
+ >2 byte&0xF0 0xD0 \b, 144 kbps
703
+ >2 byte&0xF0 0xE0 \b, 160 kbps
704
+ # timing
705
+ >2 byte&0x0C 0x00 \b, 22.05 kHz
706
+ >2 byte&0x0C 0x04 \b, 24 kHz
707
+ >2 byte&0x0C 0x08 \b, 16 kHz
708
+ # channels/options
709
+ >3 byte&0xC0 0x00 \b, Stereo
710
+ >3 byte&0xC0 0x40 \b, JntStereo
711
+ >3 byte&0xC0 0x80 \b, 2x Monaural
712
+ >3 byte&0xC0 0xC0 \b, Monaural
713
+ #>1 byte ^0x01 \b, Data Verify
714
+ #>2 byte &0x02 \b, Packet Pad
715
+ #>2 byte &0x01 \b, Custom Flag
716
+ #>3 byte &0x08 \b, Copyrighted
717
+ #>3 byte &0x04 \b, Original Source
718
+ #>3 byte&0x03 1 \b, NR: 50/15 ms
719
+ #>3 byte&0x03 3 \b, NR: CCIT J.17
720
+
721
+ # MPA, M2A
722
+ 0 beshort&0xFFFE 0xFFF6 MPEG ADTS, layer I, v2
723
+ !:mime audio/mpeg
724
+ # rate
725
+ >2 byte&0xF0 0x10 \b, 32 kbps
726
+ >2 byte&0xF0 0x20 \b, 48 kbps
727
+ >2 byte&0xF0 0x30 \b, 56 kbps
728
+ >2 byte&0xF0 0x40 \b, 64 kbps
729
+ >2 byte&0xF0 0x50 \b, 80 kbps
730
+ >2 byte&0xF0 0x60 \b, 96 kbps
731
+ >2 byte&0xF0 0x70 \b, 112 kbps
732
+ >2 byte&0xF0 0x80 \b, 128 kbps
733
+ >2 byte&0xF0 0x90 \b, 144 kbps
734
+ >2 byte&0xF0 0xA0 \b, 160 kbps
735
+ >2 byte&0xF0 0xB0 \b, 176 kbps
736
+ >2 byte&0xF0 0xC0 \b, 192 kbps
737
+ >2 byte&0xF0 0xD0 \b, 224 kbps
738
+ >2 byte&0xF0 0xE0 \b, 256 kbps
739
+ # timing
740
+ >2 byte&0x0C 0x00 \b, 22.05 kHz
741
+ >2 byte&0x0C 0x04 \b, 24 kHz
742
+ >2 byte&0x0C 0x08 \b, 16 kHz
743
+ # channels/options
744
+ >3 byte&0xC0 0x00 \b, Stereo
745
+ >3 byte&0xC0 0x40 \b, JntStereo
746
+ >3 byte&0xC0 0x80 \b, 2x Monaural
747
+ >3 byte&0xC0 0xC0 \b, Monaural
748
+ #>1 byte ^0x01 \b, Data Verify
749
+ #>2 byte &0x02 \b, Packet Pad
750
+ #>2 byte &0x01 \b, Custom Flag
751
+ #>3 byte &0x08 \b, Copyrighted
752
+ #>3 byte &0x04 \b, Original Source
753
+ #>3 byte&0x03 1 \b, NR: 50/15 ms
754
+ #>3 byte&0x03 3 \b, NR: CCIT J.17
755
+
756
+ # MP3, M25A
757
+ 0 beshort&0xFFFE 0xFFE2 MPEG ADTS, layer III, v2.5
758
+ !:mime audio/mpeg
759
+ # rate
760
+ >2 byte&0xF0 0x10 \b, 8 kbps
761
+ >2 byte&0xF0 0x20 \b, 16 kbps
762
+ >2 byte&0xF0 0x30 \b, 24 kbps
763
+ >2 byte&0xF0 0x40 \b, 32 kbps
764
+ >2 byte&0xF0 0x50 \b, 40 kbps
765
+ >2 byte&0xF0 0x60 \b, 48 kbps
766
+ >2 byte&0xF0 0x70 \b, 56 kbps
767
+ >2 byte&0xF0 0x80 \b, 64 kbps
768
+ >2 byte&0xF0 0x90 \b, 80 kbps
769
+ >2 byte&0xF0 0xA0 \b, 96 kbps
770
+ >2 byte&0xF0 0xB0 \b, 112 kbps
771
+ >2 byte&0xF0 0xC0 \b, 128 kbps
772
+ >2 byte&0xF0 0xD0 \b, 144 kbps
773
+ >2 byte&0xF0 0xE0 \b, 160 kbps
774
+ # timing
775
+ >2 byte&0x0C 0x00 \b, 11.025 kHz
776
+ >2 byte&0x0C 0x04 \b, 12 kHz
777
+ >2 byte&0x0C 0x08 \b, 8 kHz
778
+ # channels/options
779
+ >3 byte&0xC0 0x00 \b, Stereo
780
+ >3 byte&0xC0 0x40 \b, JntStereo
781
+ >3 byte&0xC0 0x80 \b, 2x Monaural
782
+ >3 byte&0xC0 0xC0 \b, Monaural
783
+ #>1 byte ^0x01 \b, Data Verify
784
+ #>2 byte &0x02 \b, Packet Pad
785
+ #>2 byte &0x01 \b, Custom Flag
786
+ #>3 byte &0x08 \b, Copyrighted
787
+ #>3 byte &0x04 \b, Original Source
788
+ #>3 byte&0x03 1 \b, NR: 50/15 ms
789
+ #>3 byte&0x03 3 \b, NR: CCIT J.17
790
+
791
+ # AAC (aka MPEG-2 NBC audio) and MPEG-4 audio
792
+
793
+ # Stored AAC streams (instead of the MP4 format)
794
+ 0 string ADIF MPEG ADIF, AAC
795
+ !:mime audio/x-hx-aac-adif
796
+ >4 byte &0x80
797
+ >>13 byte &0x10 \b, VBR
798
+ >>13 byte ^0x10 \b, CBR
799
+ >>16 byte&0x1E 0x02 \b, single stream
800
+ >>16 byte&0x1E 0x04 \b, 2 streams
801
+ >>16 byte&0x1E 0x06 \b, 3 streams
802
+ >>16 byte &0x08 \b, 4 or more streams
803
+ >>16 byte &0x10 \b, 8 or more streams
804
+ >>4 byte &0x80 \b, Copyrighted
805
+ >>13 byte &0x40 \b, Original Source
806
+ >>13 byte &0x20 \b, Home Flag
807
+ >4 byte ^0x80
808
+ >>4 byte &0x10 \b, VBR
809
+ >>4 byte ^0x10 \b, CBR
810
+ >>7 byte&0x1E 0x02 \b, single stream
811
+ >>7 byte&0x1E 0x04 \b, 2 streams
812
+ >>7 byte&0x1E 0x06 \b, 3 streams
813
+ >>7 byte &0x08 \b, 4 or more streams
814
+ >>7 byte &0x10 \b, 8 or more streams
815
+ >>4 byte &0x40 \b, Original Stream(s)
816
+ >>4 byte &0x20 \b, Home Source
817
+
818
+ # Live or stored single AAC stream (used with MPEG-2 systems)
819
+ 0 beshort&0xFFF6 0xFFF0 MPEG ADTS, AAC
820
+ !:mime audio/x-hx-aac-adts
821
+ >1 byte &0x08 \b, v2
822
+ >1 byte ^0x08 \b, v4
823
+ # profile
824
+ >>2 byte &0xC0 \b LTP
825
+ >2 byte&0xc0 0x00 \b Main
826
+ >2 byte&0xc0 0x40 \b LC
827
+ >2 byte&0xc0 0x80 \b SSR
828
+ # timing
829
+ >2 byte&0x3c 0x00 \b, 96 kHz
830
+ >2 byte&0x3c 0x04 \b, 88.2 kHz
831
+ >2 byte&0x3c 0x08 \b, 64 kHz
832
+ >2 byte&0x3c 0x0c \b, 48 kHz
833
+ >2 byte&0x3c 0x10 \b, 44.1 kHz
834
+ >2 byte&0x3c 0x14 \b, 32 kHz
835
+ >2 byte&0x3c 0x18 \b, 24 kHz
836
+ >2 byte&0x3c 0x1c \b, 22.05 kHz
837
+ >2 byte&0x3c 0x20 \b, 16 kHz
838
+ >2 byte&0x3c 0x24 \b, 12 kHz
839
+ >2 byte&0x3c 0x28 \b, 11.025 kHz
840
+ >2 byte&0x3c 0x2c \b, 8 kHz
841
+ # channels
842
+ >2 beshort&0x01c0 0x0040 \b, monaural
843
+ >2 beshort&0x01c0 0x0080 \b, stereo
844
+ >2 beshort&0x01c0 0x00c0 \b, stereo + center
845
+ >2 beshort&0x01c0 0x0100 \b, stereo+center+LFE
846
+ >2 beshort&0x01c0 0x0140 \b, surround
847
+ >2 beshort&0x01c0 0x0180 \b, surround + LFE
848
+ >2 beshort &0x01C0 \b, surround + side
849
+ #>1 byte ^0x01 \b, Data Verify
850
+ #>2 byte &0x02 \b, Custom Flag
851
+ #>3 byte &0x20 \b, Original Stream
852
+ #>3 byte &0x10 \b, Home Source
853
+ #>3 byte &0x08 \b, Copyrighted
854
+
855
+ # Live MPEG-4 audio streams (instead of RTP FlexMux)
856
+ 0 beshort&0xFFE0 0x56E0 MPEG-4 LOAS
857
+ !:mime audio/x-mp4a-latm
858
+ #>1 beshort&0x1FFF x \b, %hu byte packet
859
+ >3 byte&0xE0 0x40
860
+ >>4 byte&0x3C 0x04 \b, single stream
861
+ >>4 byte&0x3C 0x08 \b, 2 streams
862
+ >>4 byte&0x3C 0x0C \b, 3 streams
863
+ >>4 byte &0x08 \b, 4 or more streams
864
+ >>4 byte &0x20 \b, 8 or more streams
865
+ >3 byte&0xC0 0
866
+ >>4 byte&0x78 0x08 \b, single stream
867
+ >>4 byte&0x78 0x10 \b, 2 streams
868
+ >>4 byte&0x78 0x18 \b, 3 streams
869
+ >>4 byte &0x20 \b, 4 or more streams
870
+ >>4 byte &0x40 \b, 8 or more streams
871
+ # This magic isn't strong enough (matches plausible ISO-8859-1 text)
872
+ #0 beshort 0x4DE1 MPEG-4 LO-EP audio stream
873
+ #!:mime audio/x-mp4a-latm
874
+
875
+ # Summary: FLI animation format
876
+ # Created by: Daniel Quinlan <quinlan@yggdrasil.com>
877
+ # Modified by (1): Abel Cheung <abelcheung@gmail.com> (avoid over-generic detection)
878
+ 4 leshort 0xAF11
879
+ # standard FLI always has 320x200 resolution and 8 bit color
880
+ >8 leshort 320
881
+ >>10 leshort 200
882
+ >>>12 leshort 8 FLI animation, 320x200x8
883
+ !:mime video/x-fli
884
+ >>>>6 leshort x \b, %d frames
885
+ # frame speed is multiple of 1/70s
886
+ >>>>16 leshort x \b, %d/70s per frame
887
+
888
+ # Summary: FLC animation format
889
+ # Created by: Daniel Quinlan <quinlan@yggdrasil.com>
890
+ # Modified by (1): Abel Cheung <abelcheung@gmail.com> (avoid over-generic detection)
891
+ 4 leshort 0xAF12
892
+ # standard FLC always use 8 bit color
893
+ >12 leshort 8 FLC animation
894
+ !:mime video/x-flc
895
+ >>8 leshort x \b, %d
896
+ >>10 leshort x \bx%dx8
897
+ >>6 uleshort x \b, %d frames
898
+ >>16 uleshort x \b, %dms per frame
899
+
900
+ # DL animation format
901
+ # XXX - collision with most `mips' magic
902
+ #
903
+ # I couldn't find a real magic number for these, however, this
904
+ # -appears- to work. Note that it might catch other files, too, so be
905
+ # careful!
906
+ #
907
+ # Note that title and author appear in the two 20-byte chunks
908
+ # at decimal offsets 2 and 22, respectively, but they are XOR'ed with
909
+ # 255 (hex FF)! The DL format is really bad.
910
+ #
911
+ #0 byte 1 DL version 1, medium format (160x100, 4 images/screen)
912
+ #!:mime video/x-unknown
913
+ #>42 byte x - %d screens,
914
+ #>43 byte x %d commands
915
+ #0 byte 2 DL version 2
916
+ #!:mime video/x-unknown
917
+ #>1 byte 1 - large format (320x200,1 image/screen),
918
+ #>1 byte 2 - medium format (160x100,4 images/screen),
919
+ #>1 byte >2 - unknown format,
920
+ #>42 byte x %d screens,
921
+ #>43 byte x %d commands
922
+ # Based on empirical evidence, DL version 3 have several nulls following the
923
+ # \003. Most of them start with non-null values at hex offset 0x34 or so.
924
+ #0 string \3\0\0\0\0\0\0\0\0\0\0\0 DL version 3
925
+
926
+ # iso 13818 transport stream
927
+ #
928
+ # from Oskar Schirmer <schirmer@scara.com> Feb 3, 2001 (ISO 13818.1)
929
+ # syncbyte 8 bit 0x47
930
+ # error_ind 1 bit -
931
+ # payload_start 1 bit 1
932
+ # priority 1 bit -
933
+ # PID 13 bit 0x0000
934
+ # scrambling 2 bit -
935
+ # adaptfld_ctrl 2 bit 1 or 3
936
+ # conti_count 4 bit -
937
+ 0 belong&0xFF5FFF10 0x47400010
938
+ >188 byte 0x47 MPEG transport stream data
939
+ !:mime video/MP2T
940
+ !:ext ts
941
+
942
+ # Blu-ray disc Audio-Video MPEG-2 transport stream
943
+ # From: Alexandre Iooss <erdnaxe@crans.org>
944
+ # URL: https://en.wikipedia.org/wiki/MPEG_transport_stream
945
+ # Note: similar to ISO 13818.1 but with 4 extra bytes per packets
946
+ 4 belong&0xFF5FFF10 =0x47400010
947
+ >196 byte =0x47 BDAV MPEG-2 Transport Stream (M2TS)
948
+ !:mime video/MP2T
949
+ !:ext m2ts/mts
950
+
951
+ # DIF digital video file format <mpruett@sgi.com>
952
+ 0 belong&0xffffff00 0x1f070000 DIF
953
+ !:mime video/x-dv
954
+ >4 byte &0x01 (DVCPRO) movie file
955
+ >4 byte ^0x01 (DV) movie file
956
+ >3 byte &0x80 (PAL)
957
+ >3 byte ^0x80 (NTSC)
958
+
959
+ # MNG Video Format, <URL:http://www.libpng.org/pub/mng/spec/>
960
+ 0 string \x8aMNG MNG video data,
961
+ !:mime video/x-mng
962
+ >4 belong !0x0d0a1a0a CORRUPTED,
963
+ >4 belong 0x0d0a1a0a
964
+ >>16 belong x %d x
965
+ >>20 belong x %d
966
+
967
+ # JNG Video Format, <URL:http://www.libpng.org/pub/mng/spec/>
968
+ 0 string \x8bJNG JNG video data,
969
+ !:mime video/x-jng
970
+ >4 belong !0x0d0a1a0a CORRUPTED,
971
+ >4 belong 0x0d0a1a0a
972
+ >>16 belong x %d x
973
+ >>20 belong x %d
974
+
975
+ # Vivo video (Wolfram Kleff)
976
+ 3 string \x0D\x0AVersion:Vivo Vivo video data
977
+
978
+ # ABC (alembic.io 3d models)
979
+ 0 string 0gawa ABC 3d model
980
+
981
+ #---------------------------------------------------------------------------
982
+ # HVQM4: compressed movie format designed by Hudson for Nintendo GameCube
983
+ # From Mark Sheppard <msheppard@climax.co.uk>, 2002-10-03
984
+ #
985
+ 0 string HVQM4 %s
986
+ >6 string >\0 v%s
987
+ >0 byte x GameCube movie,
988
+ >0x34 ubeshort x %d x
989
+ >0x36 ubeshort x %d,
990
+ >0x26 ubeshort x %dus,
991
+ >0x42 ubeshort 0 no audio
992
+ >0x42 ubeshort >0 %dHz audio
993
+
994
+ # From: Stefan A. Haubenthal <polluks@sdf.lonestar.org>
995
+ # Update: Joerg Jenderek
996
+ # URL: https://en.wikipedia.org/wiki/VOB
997
+ 0 string DVDVIDEO-VTS Video title set,
998
+ !:mime video/x-ifo
999
+ !:ext ifo/bup
1000
+ >0x21 byte x v%x
1001
+ 0 string DVDVIDEO-VMG Video manager,
1002
+ !:mime video/x-ifo
1003
+ !:ext ifo/bup
1004
+ >0x21 byte x v%x
1005
+
1006
+ # From: Stefan A. Haubenthal <polluks@sdf.lonestar.org>
1007
+ 0 string xMovieSetter MovieSetter movie
1008
+ 0 string xSceneEditor MovieSetter movie
1009
+
1010
+ # From: Behan Webster <behanw@websterwood.com>
1011
+ # NuppelVideo used by Mythtv (*.nuv)
1012
+ # Note: there are two identical stanzas here differing only in the
1013
+ # initial string matched. It used to be done with a regex, but we're
1014
+ # trying to get rid of those.
1015
+ 0 string NuppelVideo MythTV NuppelVideo
1016
+ >12 string x v%s
1017
+ >20 lelong x (%d
1018
+ >24 lelong x \bx%d),
1019
+ >36 string P \bprogressive,
1020
+ >36 string I \binterlaced,
1021
+ >40 ledouble x \baspect:%.2f,
1022
+ >48 ledouble x \bfps:%.2f
1023
+ 0 string MythTV MythTV NuppelVideo
1024
+ >12 string x v%s
1025
+ >20 lelong x (%d
1026
+ >24 lelong x \bx%d),
1027
+ >36 string P \bprogressive,
1028
+ >36 string I \binterlaced,
1029
+ >40 ledouble x \baspect:%.2f,
1030
+ >48 ledouble x \bfps:%.2f
1031
+
1032
+ # MPEG file
1033
+ # MPEG sequences
1034
+ # FIXME: This section is from the old magic.mime file and needs
1035
+ # integrating with the rest
1036
+ #0 belong 0x000001BA
1037
+ #>4 byte &0x40
1038
+ #!:mime video/mp2p
1039
+ #>4 byte ^0x40
1040
+ #!:mime video/mpeg
1041
+ #0 belong 0x000001BB
1042
+ #!:mime video/mpeg
1043
+ #0 belong 0x000001B0
1044
+ #!:mime video/mp4v-es
1045
+ #0 belong 0x000001B5
1046
+ #!:mime video/mp4v-es
1047
+ #0 belong 0x000001B3
1048
+ #!:mime video/mpv
1049
+ #0 belong&0xFF5FFF10 0x47400010
1050
+ #!:mime video/mp2t
1051
+ #0 belong 0x00000001
1052
+ #>4 byte&0x1F 0x07
1053
+ #!:mime video/h264
1054
+
1055
+ # Type: Bink Video
1056
+ # Extension: .bik
1057
+ # URL: https://wiki.multimedia.cx/index.php?title=Bink_Container
1058
+ # From: <hoehle@users.sourceforge.net> 2008-07-18
1059
+ 0 name bik
1060
+ #>4 ulelong x size %d
1061
+ >20 ulelong x \b, %d
1062
+ >24 ulelong x \bx%d
1063
+ >8 ulelong x \b, %d frames
1064
+ >32 ulelong x at rate %d/
1065
+ >28 ulelong >1 \b%d
1066
+ >40 ulelong =0 \b, no audio
1067
+ >40 ulelong !0 \b, %d audio track
1068
+ >>40 ulelong !1 \bs
1069
+ # follow properties of the first audio track only
1070
+ >>48 uleshort x %dHz
1071
+ >>51 byte&0x20 0 mono
1072
+ >>51 byte&0x20 !0 stereo
1073
+ #>>51 byte&0x10 0 FFT
1074
+ #>>51 byte&0x10 !0 DCT
1075
+
1076
+ 0 string BIK
1077
+ >3 regex =[bdfghi] Bink Video rev.%s
1078
+ >>0 use bik
1079
+
1080
+ 0 string KB2
1081
+ >3 regex =[adfghi] Bink Video 2 rev.%s
1082
+ >>0 use bik
1083
+
1084
+ # Type: NUT Container
1085
+ # URL: https://wiki.multimedia.cx/index.php?title=NUT
1086
+ # From: Adam Buchbinder <adam.buchbinder@gmail.com>
1087
+ 0 string nut/multimedia\ container\0 NUT multimedia container
1088
+
1089
+ # Type: Nullsoft Video (NSV)
1090
+ # URL: https://wiki.multimedia.cx/index.php?title=Nullsoft_Video
1091
+ # From: Mike Melanson <mike@multimedia.cx>
1092
+ 0 string NSVf Nullsoft Video
1093
+
1094
+ # Type: REDCode Video
1095
+ # URL: https://www.red.com/ ; https://wiki.multimedia.cx/index.php?title=REDCode
1096
+ # From: Mike Melanson <mike@multimedia.cx>
1097
+ 4 string RED1 REDCode Video
1098
+
1099
+ # Type: MTV Multimedia File
1100
+ # URL: https://wiki.multimedia.cx/index.php?title=MTV
1101
+ # From: Mike Melanson <mike@multimedia.cx>
1102
+ 0 string AMVS MTV Multimedia File
1103
+
1104
+ # Type: ARMovie
1105
+ # URL: https://wiki.multimedia.cx/index.php?title=ARMovie
1106
+ # From: Mike Melanson <mike@multimedia.cx>
1107
+ 0 string ARMovie\012 ARMovie
1108
+
1109
+ # Type: Interplay MVE Movie
1110
+ # URL: https://wiki.multimedia.cx/index.php?title=Interplay_MVE
1111
+ # From: Mike Melanson <mike@multimedia.cx>
1112
+ 0 string Interplay\040MVE\040File\032 Interplay MVE Movie
1113
+
1114
+ # Type: Windows Television DVR File
1115
+ # URL: https://wiki.multimedia.cx/index.php?title=WTV
1116
+ # From: Mike Melanson <mike@mutlimedia.cx>
1117
+ # This takes the form of a Windows-style GUID
1118
+ 0 bequad 0xB7D800203749DA11
1119
+ >8 bequad 0xA64E0007E95EAD8D Windows Television DVR Media
1120
+
1121
+ # Type: Sega FILM/CPK Multimedia
1122
+ # URL: https://wiki.multimedia.cx/index.php?title=Sega_FILM
1123
+ # From: Mike Melanson <mike@multimedia.cx>
1124
+ 0 string FILM Sega FILM/CPK Multimedia,
1125
+ >32 belong x %d x
1126
+ >28 belong x %d
1127
+
1128
+ # Type: Nintendo THP Multimedia
1129
+ # URL: https://wiki.multimedia.cx/index.php?title=THP
1130
+ # From: Mike Melanson <mike@multimedia.cx>
1131
+ 0 string THP\0 Nintendo THP Multimedia
1132
+
1133
+ # Type: BBC Dirac Video
1134
+ # URL: https://wiki.multimedia.cx/index.php?title=Dirac
1135
+ # From: Mike Melanson <mike@multimedia.cx>
1136
+ 0 string BBCD BBC Dirac Video
1137
+
1138
+ # Type: RAD Game Tools Smacker Multimedia
1139
+ # URL: https://wiki.multimedia.cx/index.php?title=Smacker
1140
+ # From: Mike Melanson <mike@multimedia.cx>
1141
+ 0 string SMK RAD Game Tools Smacker Multimedia
1142
+ >3 byte x version %c,
1143
+ >4 lelong x %d x
1144
+ >8 lelong x %d,
1145
+ >12 lelong x %d frames
1146
+
1147
+ # Material Exchange Format
1148
+ # More information:
1149
+ # https://en.wikipedia.org/wiki/Material_Exchange_Format
1150
+ # http://www.freemxf.org/
1151
+ 0 string \x06\x0e\x2b\x34\x02\x05\x01\x01\x0d\x01\x02\x01\x01\x02 Material exchange container format
1152
+ !:ext mxf
1153
+ !:mime application/mxf
1154
+
1155
+ # Recognize LucasArts Smush video files (cf.
1156
+ # https://wiki.multimedia.cx/index.php/Smush)
1157
+ 0 string ANIM
1158
+ >8 string AHDR LucasArts Smush Animation Format (SAN) video
1159
+ 0 string SANM
1160
+ >8 string SHDR LucasArts Smush v2 (SANM) video
1161
+
1162
+ # Type: Scaleform video
1163
+ # Extension: .usm
1164
+ # URL: https://wiki.multimedia.cx/index.php/USM
1165
+ # From: David Korth <gerbilsoft@gerbilsoft.com>
1166
+ 0 string CRID
1167
+ >32 string @UTF Scaleform video
1168
+
1169
+ # http://www.jerrysguide.com/tips/demystify-tvs-file-format.html
1170
+ 0 string TVS\015\012
1171
+ >&0 string Version\040 TeamViewer Session File
1172
+ >>&0 string x \b, version %s
1173
+
1174
+ # SER file format - simple uncompressed video format for astronomical use
1175
+ # Initially developed by Lucam Recorder,
1176
+ # as of 2021 maintained by Heiko Wilkens, Grischa Hahn
1177
+ # Typical extensions: .SER
1178
+ # http://www.grischa-hahn.homepage.t-online.de/astro/ser/SER%20Doc%20V3b.pdf
1179
+ 0 string LUCAM-RECORDER SER video sequence
1180
+ !:ext ser
1181
+ >18 lelong 0 \b, bayer: mono
1182
+ >18 lelong 8 \b, bayer: RGGB
1183
+ >18 lelong 9 \b, bayer: GRBG
1184
+ >18 lelong 10 \b, bayer: GBRG
1185
+ >18 lelong 11 \b, bayer: BGGR
1186
+ >18 lelong 16 \b, bayer: CYYM
1187
+ >18 lelong 17 \b, bayer: YCMY
1188
+ >18 lelong 18 \b, bayer: YMCY
1189
+ >18 lelong 19 \b, bayer: MYYC
1190
+ >18 lelong 100 \b, bayer: RGB
1191
+ >18 lelong 101 \b, bayer: BGR
1192
+ >22 lelong 0 \b, big-endian
1193
+ >22 lelong 1 \b, little-endian
1194
+ >26 lelong x \b, width: %d
1195
+ >30 lelong x \b, height: %d
1196
+ >34 lelong x \b, %d bit
1197
+ >38 lelong x \b, frames: %d