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:
- Find the animation extension.
- 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:
- Install Apple's QuickTime player.
- Find the animation extension.
- Create an instance of Video Exporter.
- Set the animation exporter properties.
- 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 |