This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

AVI (.avi)

Registered MIME type: video/avi
Microsoft AVI format.
Multimedia container format.
Commonly used for archiving and exchanging video content.
Stores audio and video content in a format suitable for synchronous playback.
AVI is an acronym for Audio Video Interleave.
Binary format.
Supports a variety of audio and video codecs as well as uncompressed video frames.
Introduced in 1992 by Microsoft.
  • Export generates uncompressed RGB frames, using a color resolution of 8 bits per channel.
  • Import imports an AVI file and returns a list of frame indices.
  • Export exports a list of graphics, images, or arbitrary expressions, taking each element to be an animation frame.
  • Export exports a list of arbitrary expressions to AVI.
  • When exporting a list , the animation is composed from frames corresponding to rasterized images of the .
  • The exported AVI video will play at the same speed and will have the same size as the Manipulate object.
  • Import imports the specified element from an AVI file.
  • Import imports multiple elements.
  • Export creates an AVI file by treating expr as specifying element elem.
  • Export treats each as specifying the corresponding .
  • Export exports expr with the specified option elements taken to have the specified values.
  • Export uses rules to specify the elements to be exported.
  • See the reference pages for full general information on Import and Export.
"Elements"list of elements and options available in this file
"Rules"full list of rules for each element and option
"Options"list of rules for options, properties, and settings
  • Data representation elements:
"Animation"animation object
"Data"array of raw bitmap data for each frame
"Frames"list of integer indices representing the sequence of still pictures in the file
"Frames",nthe n^(th) frame
"GraphicsList"frames represented as a list of graphics objects
"ImageList"frames represented as a list of images
"ImageList",nthe n^(th) frame as an image
"ImageList",{n1,n2,...}multiple frames
  • Import by default uses the element.
  • Meta-information elements available for Import:
"BitDepth"bits used to represent each color channel in the file
"ColorSpace"color encoding used in the file
"Duration"animation length in seconds
"FrameCount"number of frames in the file
"FrameRate"number of frames to be displayed per second
"ImageSize"raster dimensions
"VideoEncoding"video codec used in the file
  • gives a list of video codecs available on your computer system.
  • Commonly available codecs include , ,, "JPEG", , , and .
  • General options:
BackgroundWhitecolor of area padded around the exported animation
ImageSizeAutomaticpixel dimensions of the animated object
  • With the setting ImageSize -> Automatic, Export will create frames whose pixel dimensions are multiples of 4, as required by common AVI player applications.
"FrameRate"15number of frames to be displayed per second
Export a sequence of images to AVI:
Import metadata:
This gives a list of integer indices which can be used to reference individual frames:
Import frames 5 and 6:
Import the entire AVI file as an animation object:
Export a sequence of images to AVI:
In[1]:=
Click for copyable input
Out[1]=
 
Import metadata:
In[1]:=
Click for copyable input
Out[1]=
 
This gives a list of integer indices which can be used to reference individual frames:
In[1]:=
Click for copyable input
Out[1]=
 
Import frames 5 and 6:
In[1]:=
Click for copyable input
Out[1]=
 
Import the entire AVI file as an animation object:
In[1]:=
Click for copyable input
Out[1]=