package bimage-unix

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Ffmpeg is used to load images from video files. The ffmpeg command line tool is required

type input

Video file

type output
val frames : input -> int

Get the number of frames for a video file

val index : input -> int

Get the current frame index for a video file

val shape : input -> int * int

Get the width and height of a video file

val skip : input -> int -> unit

Skip frames

val set_index : input -> int -> unit

Set the frame index

val load : string -> input

Open a video file

val create : ?framerate:int -> string -> int -> int -> output
val write_frame : output -> (int, Bimage.u8, Bimage.rgb) Bimage.Image.t -> unit
val finish : output -> unit
val reset : input -> unit

Reset the frame index to 0

val next : ?create: (string -> ?layout:Bimage.Image.layout -> int -> int -> (int, Bimage.u8, Bimage.rgb) Bimage.Image.t) -> ?layout:Bimage.Image.layout -> input -> (int, Bimage.u8, Bimage.rgb) Bimage.Image.t option

Get the next frame

val read_n : input -> ?create: (string -> ?layout:Bimage.Image.layout -> int -> int -> (int, Bimage.u8, Bimage.rgb) Bimage.Image.t) -> int -> (int, Bimage.u8, Bimage.rgb) Bimage.Input.t

Read multiple images directly into an Input array. The resulting array will not contain the number of frames requested if you've reached the end of the video

OCaml

Innovation. Community. Security.