movie format changes

This commit is contained in:
minjaesong
2022-04-16 18:21:24 +09:00
parent b46c1d6f01
commit 59ce7e5fac
3 changed files with 28 additions and 8 deletions

View File

@@ -130,6 +130,8 @@ let height = readShort()
let fps = readShort(); if (fps == 0) fps = 9999
let frameTime = 1.0 / fps
let frameCount = readInt() % 16777216
let type = readShort()
sys.free(readBytes(12)) // skip 12 bytes
let akku = frameTime
let framesRendered = 0
//serial.println(readCount) // must say 18

View File

@@ -21,11 +21,13 @@ function appendToOutfilePtr(ptr, len) {
// write header to the file
let headerBytes = [
0x1F, 0x54, 0x53, 0x56, 0x4D, 0x4D, 0x4F, 0x56,
0x30, 0x02,
0xC0, 0x01,
0x1E, 0x00,
0x34, 0x00, 0x00, 0x7C
0x1F, 0x54, 0x53, 0x56, 0x4D, 0x4D, 0x4F, 0x56, // magic
0x30, 0x02, // width (560)
0xC0, 0x01, // height (448)
0x1E, 0x00, // FPS (30)
0x34, 0x00, 0x00, 0x00, // frame count (52)
0x00, 0x00, // type 0 frames
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 // reserved
]
filesystem.open("A", outfilename, "W")