%% Specify Profile for Uncompressed AVI and Write Video
% Create a video object with a specified profile, make an array containing an RGB image, and then write the array into a video file.
% Create a VideoWriter object for a new uncompressed AVI file for RGB24 video.

v = VideoWriter('newfile.avi','Uncompressed AVI');

% Open the file for writing.

open(v)

% Create an array containing data from the sample still image, peppers.png. Write the image in A to the video file.

A = imread('peppers.png');
writeVideo(v,A)

% Close the file.

close(v)

% Copyright 2015 The MathWorks, Inc.