Raster To Video (Conversion)

Summary

Creates a video file from a set of images.

Usage

Syntax

RasterToVideo_conversion (input_folder, out_video_file, {image_format}, {codec}, {duration_method}, {time}, {quality})
ParameterExplanationData Type
input_folder

The folder containing the images. The images in the folder should be of the same type (BMP or JPEG).

Folder
out_video_file

The output video file (*.avi or *.mov).

File
image_format
(Optional)

The format of the images files in the folder. The output video will be created using the images of the chosen format.

  • BMP Windows Bitmap (*.bmp)
  • JPGJPEG (*.jpg)
String
codec
(Optional)

The codec used for compressing the frames while writing the video file. The list of codecs can vary on different machines.

String
duration_method
(Optional)

The method to be used for defining the output video duration.

  • FRAME_RATE Defines the duration of the output video based on the number of frames per second
  • TIME Defines the duration of the output video in seconds
String
time
(Optional)

Duration of the video to be output.

Double
quality
(Optional)

The quality of the output video. The video can be exported at different qualities ranging from 1 to 100. The default value is 100.

Long

Code Sample

RasterTo Video Python example

# Name: RasterToVideo_AVI.py
# Description: Creates an AVI video from a folder of images

# Import system modules
import arcpy
from arcpy import env
 
# Set environment settings
env.workspace = "c:/data"

#Set local variables
inFolder = "images"
outputVideoFile = "outputVideo.avi"

#Execute RaserToVideo
arcpy.RasterToVideo_conversion(inFolder, outputVideoFile, "BMP", "Microsoft Video 1", "FRAME_RATE", "2", "90")

Environments

Related Topics

Licensing Information

ArcView: Yes
ArcEditor: Yes
ArcInfo: Yes

11/14/2011