ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

Raster To Video

  • Summary
  • Usage
  • Syntax
  • Code sample
  • Environments
  • Licensing information

Summary

Creates an AVI or Quicktime video file from a set of images.

Usage

  • The images in the Input Folder will be read in alphabetical order, and be loaded into the Output Video File in the order the images were read. If you wish to create a title frame, make sure to give the corresponding image a name that would place it before any other image when the folder is alphabetically sorted. For example, if the images have names like image_001.bmp, image_002.bmp, through to image_020.bmp, you can add an image named aimage_001.bmp that contains your desired title.
  • The resolution (width x height) of the output video is based on the resolution of the first image in the folder of images supplied to the tool. If the first image has a smaller or larger resolution than the others, the rest of the images will be stretched to fit the resolution of the first image. So try to keep the resolution of the images in the folder consistent.

Syntax

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

The folder containing the images that will be used to create the video. The images must all be of the same format, either bitmap (*.bmp) or JPEG (*.jpg).

Folder
out_video_file

The output video file can be stored in the AVI format (*.avi) or in the Quicktime format (*.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)
  • JPG —JPEG (*.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 based on a number of factors such as the applications installed on the machine.

String
duration_method
(Optional)

The method to be used for defining the duration of the Output Video File.

  • FRAME_RATE — Defines the duration of the output video based on the number of frames per second. Each image represents one frame. If the frame rate is 24 and there are 360 images, the resulting video will be 15 seconds long. This method is the default
  • TIME — Defines the duration of the output video in seconds. If the total time is 10 seconds and there are 360 images, the resulting video's frame rate will be 36.
String
time
(Optional)

Duration of the video to be output. If the Output Duration Method is specified using frame rate, the number must be an integer. If the method is using time, the number is expressed in units of seconds.

Double
quality
(Optional)

The quality of the output video. The higher the value, the better the quality, and the lower the compression rate. The quality value can range from 1 to 100, if The default value is 100.

Long

Code sample

RasterToVideo Example

The following sample demonstrates the use of this tool in the Python window.

# 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

  • Current Workspace

Licensing information

  • Basic: Yes
  • Standard: Yes
  • Advanced: Yes

Related topics

  • About converting from raster data

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2020 Esri. | Privacy | Legal