This document is archived and information here might be outdated.  Recommended version.


How to export animations to video (ArcObjects .NET 10.4 SDK)

How to export animations to video


Summary
Animations created in ArcMap, ArcGlobe, and ArcScene can be exported as Audio Video Interleaved (AVI) and QuickTime (QT) videos. This topic shows how to export an ArcGIS animation to a video file.

In this topic


Exporting animations to an AVI video

Use the AnimationExporterAVI with the IVideoExporter interface to export animations to an AVI (*.avi) video file.
Animation exporting honors the animation environment settings. When exporting an animation to a video, specify the output file name and the CodecCode used in compression. Optionally, you can set other video properties, such as the frame rate, quality, and so on.
To export animations to an AVI video, follow these steps:
  1. Find the animation extension.
  2. Create an instance of Video Exporter.
See the following code example:
[C#]
private void Export_Animation_AVI()
{
    //Find the animation extension. 
    IAnimationExtension animExt;
    animExt=FindAnimationExtension();
    //Create an instance of videoexporter.
    IVideoExporter videoExporter;
    videoExporter=new AnimationExporterAVI();
    videoExporter.ExportFileName="C:\\Temp\\VideoExp.avi";
    //The CodecCode property can be different depending on the codecs installed on your machine. 
    videoExporter.CodecCode="CVID";
    videoExporter.ExportAnimation(animExt.AnimationTracks,
        animExt.AnimationEnvironment, null);
}
[VB.NET]
Public Sub Export_Animation_AVI()
    'Find the animation extension.
    Dim animExt As IAnimationExtension
    animExt=FindAnimationExtension()
    'Create an instance of videoexporter.
    Dim videoExporter As IVideoExporter
    videoExporter=New AnimationExporterAVI
    videoExporter.ExportFileName="C:\Temp\VideoExp.avi"
    'The CodecCode property can be different depending on the codecs installed on your machine.
    videoExporter.CodecCode="CVID"
    videoExporter.ExportAnimation(animExt.AnimationTracks, animExt.AnimationEnvironment, Nothing)
End Sub

Exporting animations to a QuickTime video

Use the AnimationExporterQT with the IVideoExporter interface to export animations to a QuickTime (*.movi) video file.
To export animations to a QuickTime video, follow these steps:
  1. Install Apple's QuickTime player.
  2. Find the animation extension.
  3. Create an instance of Video Exporter.
  4. Set the animation exporter properties.
  5. Export the animation.
See the following code example: 
[C#]
private void Export_Animation_QT()
{
    //Find the animation extension. 
    IAnimationExtension animExt;
    animExt=FindAnimationExtension();
    //Create an instance of videoexporter. 
    IVideoExporter videoExporter;
    videoExporter=new AnimationExporterQT();
    //Set the animation exporter properties. 
    videoExporter.ExportFileName="C:\\Temp\\VideoExp.mov";
    videoExporter.ShowSettingsDialog=false;
    //The codec property can be different depending on the codecs installed on your machine. 
    videoExporter.Codec="8BPS:Planar RGB";
    videoExporter.FrameRate=30;
    //Export the animation. 
    videoExporter.ExportAnimation(animExt.AnimationTracks,
        animExt.AnimationEnvironment, null);
}
[VB.NET]
Private Sub Export_Animation_QT()
    'Find the animation extension.
    Dim animExt As IAnimationExtension
    animExt=FindAnimationExtension()
    'Create an instance of videoexporter.
    Dim videoExporter As IVideoExporter
    videoExporter=New AnimationExporterQT
    'Set the animation exporter properties.
    videoExporter.ExportFileName="C:\Temp\VideoExp.mov"
    videoExporter.ShowSettingsDialog=False
    'The codec property can be different depending on the codecs installed on your machine.
    videoExporter.Codec="8BPS:Planar RGB"
    videoExporter.FrameRate=30
    'Export the animation.
    videoExporter.ExportAnimation(animExt.AnimationTracks, animExt.AnimationEnvironment, Nothing)
End Sub






Development licensing Deployment licensing
ArcGIS for Desktop Basic ArcGIS for Desktop Basic
ArcGIS for Desktop Standard ArcGIS for Desktop Standard
ArcGIS for Desktop Advanced ArcGIS for Desktop Advanced