<< delete_VideoWriter Video writing

scicv >> Video > Video writing > new_VideoWriter

new_VideoWriter

Create a new video writer object.

Syntax

videoWriter = new_VideoWriter()
videoWriter = new_VideoWriter(filename, fourcc, fps, frameSize)

Parameters

filename

Path of the video file (string).

fourcc

Code of codec used to compress the frames (double).

fps

Number of frames per second (double).

frameSize

Width and height of the frame (double 1x2).

videoWriter

Created video writer object (VideoWriter).

Description

new_VideoWriter creates an VideoWriter object.

The code of codec can be computed from a 4-character code using the CV_FOURCC function.

Examples

scicv_Init();

// Create a 640x480 MP4 file (20 FPS)
videoCapture = new_VideoWriter(getSampleVideo("video.mpg"), CV_FOURCC('M', 'P', '4', '2'), 20, [640, 480]);
        
delete_VideoWriter(videoCapture);

See also


Report an issue
<< delete_VideoWriter Video writing