ocaml-mm icon indicating copy to clipboard operation
ocaml-mm copied to clipboard

Writing video to AVI does not work

Open choeger opened this issue 8 years ago • 1 comments

When trying to write multiple images, the resulting file cannot be played. This seems to be caused by tools expecting every frame in one CHUNK.

the write method should look like this:

      method write buf ofs len =
        for i = ofs to ofs + len - 1 do
          let s = Image.RGBA32.to_RGB24_string buf.(i) in
          self#output "00db";
          self#output_int (String.length s);
          self#output s;
          datalen <- datalen + String.length s + 8;
        done;
        dataframes <- dataframes + len

(close and initializer need to be adapted as well, I cannot make a patch just now)

choeger avatar May 20 '16 20:05 choeger