opencv-0.0.2.1: Haskell binding to OpenCV-3.x

Safe HaskellNone
LanguageHaskell2010

OpenCV.VideoIO.VideoWriter

Synopsis

Documentation

videoWriterOpen :: VideoWriterSink -> IO VideoWriter Source #

The API might change in the future, but currently we can:

Open/create a new file:

  wr <- videoWriterOpen $ VideoFileSink'
     (VideoFileSink
        "tst.MOV"
        "avc1"
        30
        (3840, 2160)
     )

Now, we can write some frames, but they need to have exactly the same size as the one we have opened with:

  exceptErrorIO $ videoWriterWrite wr img

We need to close at the end or it will not finalize the file:

  exceptErrorIO $ videoWriterRelease wr