animation 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #------------------------------------------------------------------------------
  2. # animation: file(1) magic for animation/movie formats
  3. #
  4. # animation formats
  5. # MPEG, FLI, DL originally from vax@ccwf.cc.utexas.edu (VaX#n8)
  6. # FLC, SGI, Apple originally from Daniel Quinlan (quinlan@yggdrasil.com)
  7. # MPEG animation format
  8. 0 belong 0x000001b3 MPEG video stream data
  9. #>4 beshort&0xfff0 x (%d x
  10. #>5 beshort&0x0fff x %d)
  11. 0 belong 0x000001ba MPEG system stream data
  12. 0 beshort&0xfff0 0xfff0 MPEG audio stream data
  13. # FLI animation format
  14. 4 leshort 0xAF11 FLI file
  15. >6 leshort x - %d frames,
  16. >8 leshort x width=%d pixels,
  17. >10 leshort x height=%d pixels,
  18. >12 leshort x depth=%d,
  19. >16 leshort x ticks/frame=%d
  20. # FLC animation format
  21. 4 leshort 0xAF12 FLC file
  22. >6 leshort x - %d frames
  23. >8 leshort x width=%d pixels,
  24. >10 leshort x height=%d pixels,
  25. >12 leshort x depth=%d,
  26. >16 leshort x ticks/frame=%d
  27. # DL animation format
  28. # XXX - collision with most `mips' magic
  29. #
  30. # I couldn't find a real magic number for these, however, this
  31. # -appears- to work. Note that it might catch other files, too, so be
  32. # careful!
  33. #
  34. # Note that title and author appear in the two 20-byte chunks
  35. # at decimal offsets 2 and 22, respectively, but they are XOR'ed with
  36. # 255 (hex FF)! The DL format is really bad.
  37. #
  38. #0 byte 1 DL version 1, medium format (160x100, 4 images/screen)
  39. #>42 byte x - %d screens,
  40. #>43 byte x %d commands
  41. #0 byte 2 DL version 2
  42. #>1 byte 1 - large format (320x200,1 image/screen),
  43. #>1 byte 2 - medium format (160x100,4 images/screen),
  44. #>1 byte >2 - unknown format,
  45. #>42 byte x %d screens,
  46. #>43 byte x %d commands
  47. # Based on empirical evidence, DL version 3 have several nulls following the
  48. # \003. Most of them start with non-null values at hex offset 0x34 or so.
  49. #0 string \3\0\0\0\0\0\0\0\0\0\0\0 DL version 3
  50. # SGI and Apple formats
  51. 0 string MOVI Silicon Graphics movie file
  52. 4 string moov Apple QuickTime movie file (moov)
  53. 4 string mdat Apple QuickTime movie file (mdat)