VideoToRasterSeries Task

This task exports frames from a video file to a raster series.

Example

; Start the application

e = ENVI()

 

; Open a video file

File = FILEPATH('CME.mp4', $

  SUBDIR=['examples','data'])

 

; Get the task from the catalog of ENVITasks

Task = ENVITask('VideoToRasterSeries')

 

; Define inputs

Task.INPUT_VIDEO_URI = File

Task.FRAME_BASENAME = 'SolarFlare'

Task.START_SECONDS = 3.00

Task.SKIP_SECONDS = 0.5

Task.TOTAL_SECONDS = 9.0

 

; Run the task

Task.Execute

Series = Task.OUTPUT_RASTERSERIES

 

; Create a view

View = e.GetView()

 

; Create a raster series layer

Layer = View.CreateLayer(Series)

Syntax

Result = ENVITask('VideoToRasterSeries')

Input properties (Set, Get): COMPUTE_SKIP, FRAME_BASENAME, INPUT_VIDEO_URI, OUTPUT_RASTERSERIES_URI, SEEK_TO_METADATA, SKIP_FRAMES, SKIP_SECONDS, START_FRAME, START_SECONDS, TOTAL_FRAMES, TOTAL_SECONDS

Output properties (Get only): OUTPUT_RASTERSERIES

Properties marked as "Set" are those that you can set to specific values. You can also retrieve their current values any time. Properties marked as "Get" are those whose values you can retrieve but not set.

Methods

This task inherits the following methods from ENVITask:

AddParameter

Execute

Parameter

ParameterNames

RemoveParameter

Properties

This task inherits the following properties from ENVITask:

COMMUTE_ON_DOWNSAMPLE

COMMUTE_ON_SUBSET

DESCRIPTION

DISPLAY_NAME

NAME

REVISION

TAGS

This task also contains the following properties:

COMPUTE_SKIP (optional)

If you set this property to true, the SKIP_FRAMES value will be determined by the TOTAL_FRAMES value. The captured frames will be evenly spaced over the requested video range. The valid values are true or false.

FRAME_BASENAME (optional)

Specify a string with the base name to use when writing each frame. The base name will be appended with a time stamp to create each filename.

INPUT_VIDEO_URI (required)

Specify a string with a fully qualified path and filename to the video file.

OUTPUT_RASTERSERIES

This is a reference to the output raster series. Each frame will be written to the same folder as the raster series file.

OUTPUT_RASTERSERIES_URI (optional)

Specify a string with the fully qualified path and filename for OUTPUT_RASTERSERIES.

SEEK_TO_METADATA (optional)

If the input video has a metadata track and this property is set to true, the process will seek to the first metadata frame and treat that frame as the start of the file. Some videos may not have metadata at the beginning of the video. This ensures that you will get metadata with each frame.

SKIP_FRAMES (optional)

Specify an integer value indicating the number of frames to skip between each captured frame.

SKIP_SECONDS (optional)

Specify a floating-point value indicating the number of seconds to skip between each captured frame. The minimum value is 0.

START_FRAME (optional)

Specify an integer value indicating the frame number from which to start capturing frames.

START_SECONDS (optional)

Specify a floating-point value indicating the number of seconds into the video from which the frames will start to be captured.

TOTAL_FRAMES (optional)

Specify an integer value indicating the total number of frames to capture from the video. The default is all frames.

TOTAL_SECONDS (optional)

Specify a floating-point value indicating the total number of seconds of video to capture.

Version History

ENVI 5.2

Introduced

ENVI 5.2. 1

Added SEEEK_TO_METADATA property

API Version

4.2

See Also

ENVITask, ENVIRasterSeries, ENVIRasterSeriesLayer, BuildRasterSeries Task, ENVIView::ChipToVideo