Binary Blinken Movie English: Difference between revisions

From BlinkenArea Wiki
Jump to: navigation, search
No edit summary
Line 73: Line 73:
** 0 for off, maxval for on, values between 0 and maxval for grayscales
** 0 for off, maxval for on, values between 0 and maxval for grayscales
** from left to right, then from top to bottom (i.e. channels of top left pixel first, pixel right to it next, ...)
** from left to right, then from top to bottom (i.e. channels of top left pixel first, pixel right to it next, ...)
[[Category:DateiformateEnglish]]

Revision as of 23:41, 2 October 2007

Zur deutschsprachigen Version dieser Seite

back to summary

The Binary Blinken Movie format was created to have a small and easy to process format. It was designed with the MCUF protocol in mind.

Every *.bbm file starts with a main header containing some geneal information about the movie. After that, some additional headers may be placed. Then the frames follow one after another. All values that are longer than one single byte are stored in network-byte order, i.e. big-endian or highbyte first.

*.bbm file:

  • main header
  • [additional headers]
  • frame start marker
  • frames

main header:

  • magic (32 bit)
    • always 0x23542666
  • height (16 bit)
    • the height of the movie in pixels
  • width (16 bit)
    • the width of the movie in pixels
  • channels (16 bit)
    • the number of channels for each pixel
    • 1 for greyscale, 3 for RGB
  • maxval (16 bit)
    • the maximum value in the pixel data
    • should be 255
    • programs may reject files with other values than 255
  • framecnt (32 bit)
    • the number of frames in the movie
    • if this value is greater than the real number of frames in the file, the last frame may used for the remaining frames
    • if this value is smaller than the real number of frames in the file, the movie may be truncated
    • it is allowed to ignore this value and use the real number of frames in the file instead
  • duration (32 bit)
    • the duration of the entire movie in milliseconds
    • this value may be rounded by programs (e.g. to 25fps: "frame_cnt = (duration + 20) / 40")
    • if this value is greater than the sum of the frame durations, the last frame may be left on the screen for the remaining time
    • if this value is smaller than the sum of the frame durations, the movie may be truncated
    • it is allowed to ignore this value and use the durations of the frames instead
  • frameptr (32 bit)
    • pointer to frame start marker
    • contains the absolute offset of the first byte of frame start marker

additional header:

  • sub-magic (32 bit)
  • size (16 bit)
    • total size fo this additional header
  • ...

info header (may occur multiple times):

  • sub-magic (32 bit)
    • always 'i' 'n' 'f' 'o' (ASCII)
  • size (16 bit)
    • total size of this info header
  • type of information (zero-terminated ASCII string)
    • e.g. "author"
  • information (zero-terminated ASCII string)
    • e.g. "blinking suspect"
  • frameptr (32 bit)
    • Zeiger auf frame start marker
    • enthält den absoluten Offset des ersten Bytes des frame start marker

frame start marker:

  • magic (32 bit)
    • always 'f' 'r' 'm' 's' (ASCII)

frame:

  • duration (16 bit)
    • the time in milliseconds this frame shall be shown
    • this value may be rounded by programs (e.g. to 25fps: "frame_cnt = (duration + 20) / 40")
  • pixels (8 bit each)
    • the value of the channels * width * height pixels
    • 0 for off, maxval for on, values between 0 and maxval for grayscales
    • from left to right, then from top to bottom (i.e. channels of top left pixel first, pixel right to it next, ...)