VideoExtractFrames[video,t]
extracts a frame at time t from video.
VideoExtractFrames[video,tspec]
extracts video frames at time specification tspec.
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 or in thumbnail grids, or can be used to inspect a video at desired times.
- Possible settings for time specification tspec include:
-
t a 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 All all frames - The times ti can be any of the following:
-
t time 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 option can be specified:
-
MaxItems Infinity maximum number of frames to extract
Examples
open all close allBasic Examples (1)
Scope (3)
Extract a single frame from a video:
v = Video["ExampleData/Caminandes.mp4"];Extract a single frame at the 10
second:
VideoExtractFrames[v, 10]Extract a frame at a given time specified by a time quantity:
VideoExtractFrames[v, Quantity[10, "Seconds"]]Extract a frame at a given time specified by a frames quantity:
VideoExtractFrames[v, Quantity[300, IndependentUnit["frames"]]]Extract multiple frames at specified times:
v = Video["ExampleData/Caminandes.mp4"];VideoExtractFrames[v, {10, 20, 50}]Extract all frames in the specified interval:
VideoExtractFrames[v, Interval[{10, 11}]]//LengthExtract frames from a remote video file:
v = Video["http://exampledata.wolfram.com/agent327.mp4"];VideoExtractFrames[v, {10, 20, 50, 100}]Options (1)
MaxItems (1)
By default, all requested frames are returned:
v = Video["ExampleData/Caminandes.mp4"];times = Range[1, 90, 10];
Length[times]VideoExtractFrames[v, times]Limit the result to a maximum number of frames:
VideoExtractFrames[v, times, MaxItems -> 4]Applications (4)
Extract a video frame at every 10 seconds:
v = Video["ExampleData/Caminandes.mp4"];VideoExtractFrames[v, Range[10, 60, 10]]Generate a Video object with multiple video tracks:
i = ResourceData["Sample Image: White Dog on a Beach"];
f[time_] := {Blur[i, 20 * time], ColorQuantize[i, Round[1 + 3 * time]]};
v = VideoGenerator[f];Information[v, "VideoTracks"]Extract a list of images from the first video track:
VideoExtractFrames[v, {.1, .4, .8}]Extract a list of images from the second video track:
VideoExtractFrames[Video[v, VideoTrackSelection -> 2], {.1, .4, .8}]Create a thumbnail grid from a video:
v = Video["ExampleData/Caminandes.mp4"];dur = QuantityMagnitude[Duration[v], "Seconds"]ImageAssemble[Partition[VideoExtractFrames[v, Range[10, dur, 10], MaxItems -> 9], 3], Spacings -> 5]Extract a single frame from the video as a background to show the result of some computation:
v = Video["ExampleData/bullfinch.mkv"];ts = VideoMapTimeSeries[Point[ImagePosition[#Image, "bird"]]&, v];HighlightImage[VideoExtractFrames[v, 5], Normal@Values[ts]]Properties & Relations (1)
Use Import to extract frames from a video file:
Import["ExampleData/Caminandes.mp4", {"ImageList", {100, 500}}]This is equivalent to extracting frames from the Video object:
VideoExtractFrames[Video["ExampleData/Caminandes.mp4"], QuantityArray[{100, 500}, "Frames"]]Related Guides
History
Text
Wolfram Research (2020), VideoExtractFrames, Wolfram Language function, https://reference.wolfram.com/language/ref/VideoExtractFrames.html.
CMS
Wolfram Language. 2020. "VideoExtractFrames." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/VideoExtractFrames.html.
APA
Wolfram Language. (2020). VideoExtractFrames. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/VideoExtractFrames.html
BibTeX
@misc{reference.wolfram_2026_videoextractframes, author="Wolfram Research", title="{VideoExtractFrames}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/VideoExtractFrames.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_videoextractframes, organization={Wolfram Research}, title={VideoExtractFrames}, year={2020}, url={https://reference.wolfram.com/language/ref/VideoExtractFrames.html}, note=[Accessed: 13-June-2026]}