ArcGIS for Desktop

  • Documentation
  • Pricing
  • Support

  • My Profile
  • Help
  • Sign Out
ArcGIS for Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS for Desktop

A complete professional GIS

ArcGIS for Server

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
  • Pricing
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

Help

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • More...

Raster To Video

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

Summary

Creates a video file from a set of images.

Usage

  • When creating a video from images in a folder, make sure that the folder specified has more than one image file of the same type (BMP or JPEG).
  • This tool reads the images in the folder in alphabetical order. The output video will contain frames in the order the images were read from the disk.
  • Keeping in mind that the images are read alphabetically, you can insert images in the folder of images such as a title image for your video. For example, if the folder of images has images with names image_1.bmp, image_2.bmp, and image_20.bmp, you can add an image named _image_1.bmp. Since the tool reads the images in an alphabetical order,_image_1.bmp will appear before image_1.bmp in the output video.

  • 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.

  • Since AVI and QuickTime formats are supported on Windows only, this tool will not work on a non-Windows platform.

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)
  • 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.

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

  • Current Workspace

Licensing information

  • ArcGIS for Desktop Basic: Yes
  • ArcGIS for Desktop Standard: Yes
  • ArcGIS for Desktop Advanced: Yes

Related topics

  • About converting from raster data

ArcGIS for Desktop

  • Home
  • Documentation
  • Pricing
  • Support

ArcGIS Platform

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

About Esri

  • About Us
  • Careers
  • Insiders Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
© Copyright 2016 Environmental Systems Research Institute, Inc. | Privacy | Legal