VideoWriter
OpenCV VideoWriter for writing video files
Operations
FourCC
Computes a FourCC code from four characters. Example: FourCC('m', 'p', '4', 'v') for MP4V codec.
function : FourCC(c1:Char, c2:Char, c3:Char, c4:Char) ~ IntParameters
| Name | Type | Description |
|---|---|---|
| c1 | Char | first character |
| c2 | Char | second character |
| c3 | Char | third character |
| c4 | Char | fourth character |
Return
| Type | Description |
|---|---|
| Int | integer FourCC code |
IsOpen
Checks if the VideoWriter has been successfully opened.
method : public : IsOpen() ~ BoolReturn
| Type | Description |
|---|---|
| Bool | true if the writer is open, false otherwise |
New
Creates a new VideoWriter.
New(filename:String, fourcc:Int, fps:Float, width:Int, height:Int)Parameters
| Name | Type | Description |
|---|---|---|
| filename | String | output video file path |
| fourcc | Int | 4-character codec code (use FourCC to compute) |
| fps | Float | frames per second |
| width | Int | frame width |
| height | Int | frame height |
Write
Writes a frame to the video file.
method : public : Write(image:Image) ~ NilParameters
| Name | Type | Description |
|---|---|---|
| image | Image | the frame to write |