VideoExtractFrames

VideoExtractFrames[video,t]

extracts a frame at time t from video.

VideoExtractFrames[video,tspec]

extracts video frames at time specification tspec.

Details and Options

  • VideoExtractFrames can be used for extracting frames from a video. Frames can be used as thumbnails, in thumbnail grids or can be used to inspect a video at desired times.
  • Possible settings for time specification tspec include:
  • ta single frame at time t
    {t1,t2,}a list of frames at times t1, t2,
    Interval[{t1,t2}]all frames from time t1 to time t2
    Allall frames
  • The times ti can be any of the following:
  • ttime given in seconds
    Quantity[t,"unit"]time given in "unit" compatible with seconds
    Quantity[t,"Frames"]time given as a number of frames
  • The following options can be specified:
  • MaxItemsInfinitymaximum number of frames to extract
    VideoTracks1video tracks of interest
  • If video has multiple video tracks, by default frames from the only first track are returned. Use VideoTracksn to extract frames from the n^(th) track.

Examples

open allclose all

Basic Examples  (1)

Extract a single frame at a given time:

Extract multiple frames at given times:

Scope  (3)

Extract a single frame from a video:

Extract a single frame at the 10^(th) second:

Extract a frame at a given time specified by a time quantity:

Extract a frame at a given time specified by a frames quantity:

Extract multiple frames at specified times:

Extract all frames in the specified interval:

Extract frames from a remote video file:

Options  (1)

MaxItems  (1)

By default, all requested frames are returned:

Limit the result to a maximum number of frames:

Applications  (3)

Extract a video frame at every 10 seconds:

Create a thumbnail grid from a video:

Extract a single frame from the video as a background to show the result of some computation:

Properties & Relations  (1)

Use Import to extract frames from a video file:

This is equivalent to extracting frames from the Video object:

Introduced in 2020
 (12.1)