savonet / ocaml-ffmpeg

OCaml bindings to the FFmpeg library.
http://www.liquidsoap.info/ocaml-ffmpeg/
GNU Lesser General Public License v2.1
48 stars 12 forks source link

Fix plane size in swscale. #67

Closed toots closed 1 month ago

toots commented 1 month ago

This PR fixes the plane sizes when converting to bigarray in swscale, preventing extra memory usage.

The following is using the script at: https://www.liquidsoap.info/blog/2024-02-10-video-canvas-and-ai/ with 1080p resolution:

Before

Screenshot 2024-10-20 at 11 39 31 AM

After

Screenshot 2024-10-20 at 11 41 30 AM