Name

avifile — Create a new video file to write. (experimental)

Calling Sequence

n = avifile(filename, dims)
n = avifile(filename, dims, fps)

Parameters

filename
A string, the video filename to be created.
dims
A 2x1 vector, which indicates the frame size (width, height).
fps
A integer scalar, and the default value is 25.
n
A number, the opened video file index.

Description

avifile create a new video file. After the video file is created, addframe can be used to add frame to the file. Remember to close the opened file using aviclose(n) or avicloseall().

Video support for SIVP is only available when SIVP is compiled with OpenCV which support video I/O.

Examples

	
    im = imread('lena.png');
    n = avifile('lena.avi', [300;300], 30);

    for ii=1:200
        ims = im(ii:512-ii, ii:512-ii, :);
        addframe(n, ims);
    end

    aviclose(n);

Authors

Shiqi Yu <shiqi.yu[at]gmail.com>

Availability

The latest version of SIVP can be found at

http://sivp.sf.net

See Also

aviinfo , aviopen , camopen , addframe , aviclose , avicloseall , avilistopened , avireadframe