User:Eml4500.f08.ateam.didomenico/hw 7/animation

Generating Video Using MATLAB
To create video using MATLAB image files must be stored for assembly into movie format. The  command is useful for this. It stores images as movie frames to be accessed and assembled later. The user can manipulate it to define the size and other properties of the frame to be stored. Detailed information on this command can be found here.

MATLAB can create video from these stored frames using the  command. More information on this command can be found here. This command can be used to determine the speed at which the movie is shown as well as how many frames per second are shown and the size and location of the movie. It can also be used to play a movie in reverse. While useful within MATLAB, this type of video cannot be played by other programs. For widespread application, it is advantageous to generate more compatible video files.

Using the command  allows generation of MATLAB movie as an Audio Video Interleave or AVI file. This format is more widely compatible than MATLAB movies. Using this command allows the specification of a filename, video quality and other parameters. More information on this command can be found here.

Example of Video Creation
This example depicts the graph of a function changing over time. The animation helps visualize the change. It creates an array,, of movie frames which are played three times by the   command. An AVI file called  is also created. This AVI file is converted for Wikimedia and shown in the next section.

Conversion for Wikimedia
Wikimedia Commons currently allows video files only in Theora format. All other formats must be converted prior to upload to avoid distribution of patent-encumbered, and therefore not freely distributable, file formats.

A useful and simple tool for converting videos to Theora format is. The Windows version used in this example is a command-line program and can be obtained here. Information pertaining to releases and other versions can be found at the ffmpeg2theora page.

To use this program, open the command prompt window from the Start window. Next click and drag the  file in to the command window. The directory location of the file can also be entered instead of dragging. This should result in the command window seen below.



Next, input a space and then click and drag the file you want to convert into the command window as seen below. Again, the file's location can also be entered manually.



Pressing the  key begins conversion. Depending on the size of the file being converted, the conversion time will vary. The converted video will have the same file name but will be Theora format with a  extension. It will be located in the same directory as the original video file. This format can be uploaded to Wikimedia Commons similarly to other multimedia types. A completed video conversion can be seen below.