VideoIntervals
✖
VideoIntervals
returns time intervals of video for which the criterion crit is satisfied.
applies crit to a list of inputs extracted from each videoi.
Details and Options

- VideoIntervals can be used to detect time intervals of interest in a video, such as constant frame, silent audio intervals, intervals containing a specific object, etc.
- A criterion crit of a single argument gets applied to image frames or a list of image frames.
- A pure function crit can access video and audio data as well as time using the following arguments:
-
#Image video frames as Image objects #Audio a chunk of the audio as an Audio object #Time time from the beginning of the video #TimeInterval beginning and end time stamps for the current partition #FrameIndex index of the current output frame #InputFrameIndex index of the current input frame - In VideoIntervals[{video1,video2,…},crit,…], data provided to each of the arguments is a list where the
element corresponds to the data extracted from videoi.
- By default, partitions are offset by one frame.
- VideoIntervals supports video containers and codecs specified by $VideoDecoders.
- The following options can be given:
-
Alignment Center alignment of the time stamps with partitions MaxItems Infinity maximum number of intervals to return - By default, measurements are returned at the center of each partition. Using the Alignment option, measurements can be returned at the beginning (Left) or end (Right) of each partition.

Examples
open allclose allBasic Examples (2)Summary of the most common use cases
Find video intervals with constant frames:

https://wolfram.com/xid/0g7lynvrock-w4zuyc

https://wolfram.com/xid/0g7lynvrock-v149ey

Find video intervals with loud audio:

https://wolfram.com/xid/0g7lynvrock-0rhvb1

https://wolfram.com/xid/0g7lynvrock-inmknh

Scope (5)Survey of the scope of standard use cases
Specify the criterion as a pure function:

https://wolfram.com/xid/0g7lynvrock-fhqbjz

https://wolfram.com/xid/0g7lynvrock-6rbkd

Specify the criterion as a normal function:

https://wolfram.com/xid/0g7lynvrock-k2rvme

https://wolfram.com/xid/0g7lynvrock-p9lamk

The input to the criterion function is an association with keys "Time", "TimeInterval", "Image", "FrameIndex", "InputFrameIndex" and "Audio" (if present):

https://wolfram.com/xid/0g7lynvrock-u6zedc

https://wolfram.com/xid/0g7lynvrock-ii1j3z

Evaluate the criterion on a buffer of five frames:

https://wolfram.com/xid/0g7lynvrock-tlw2k1

https://wolfram.com/xid/0g7lynvrock-kx84zj

If the partition size is not Automatic, the value for "Image" will be a list of images:

https://wolfram.com/xid/0g7lynvrock-vdx750

https://wolfram.com/xid/0g7lynvrock-1vgxrc

The value for "Audio" is always a single Audio object of the appropriate duration:

https://wolfram.com/xid/0g7lynvrock-jehao

Evaluate the criterion on non-overlapping partitions of five frames:

https://wolfram.com/xid/0g7lynvrock-ksxxul

Specify partition size and offset using time quantities:

https://wolfram.com/xid/0g7lynvrock-67naiy

Options (1)Common values & functionality for each option
MaxItems (1)
By default, using MaxItems∞, the whole input is evaluated for possible intervals of interest:

https://wolfram.com/xid/0g7lynvrock-dq9geh

https://wolfram.com/xid/0g7lynvrock-yvnbv5


https://wolfram.com/xid/0g7lynvrock-uwghb9

Stop the computation once n complete intervals have been detected:

https://wolfram.com/xid/0g7lynvrock-ffzrkb

Applications (2)Sample problems that can be solved with this function
Find the intervals that contain the most motion in a video:

https://wolfram.com/xid/0g7lynvrock-lvcbwb

Extract the corresponding frames:

https://wolfram.com/xid/0g7lynvrock-tx3tej

Find the intervals that contain constant frames:

https://wolfram.com/xid/0g7lynvrock-va28jx

https://wolfram.com/xid/0g7lynvrock-ysa594

Delete such intervals from the video:

https://wolfram.com/xid/0g7lynvrock-7f6ht0

Compare the duration of the original and resulting videos:

https://wolfram.com/xid/0g7lynvrock-xay5j2

Wolfram Research (2020), VideoIntervals, Wolfram Language function, https://reference.wolfram.com/language/ref/VideoIntervals.html.
Text
Wolfram Research (2020), VideoIntervals, Wolfram Language function, https://reference.wolfram.com/language/ref/VideoIntervals.html.
Wolfram Research (2020), VideoIntervals, Wolfram Language function, https://reference.wolfram.com/language/ref/VideoIntervals.html.
CMS
Wolfram Language. 2020. "VideoIntervals." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/VideoIntervals.html.
Wolfram Language. 2020. "VideoIntervals." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/VideoIntervals.html.
APA
Wolfram Language. (2020). VideoIntervals. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/VideoIntervals.html
Wolfram Language. (2020). VideoIntervals. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/VideoIntervals.html
BibTeX
@misc{reference.wolfram_2025_videointervals, author="Wolfram Research", title="{VideoIntervals}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/VideoIntervals.html}", note=[Accessed: 16-April-2025
]}
BibLaTeX
@online{reference.wolfram_2025_videointervals, organization={Wolfram Research}, title={VideoIntervals}, year={2020}, url={https://reference.wolfram.com/language/ref/VideoIntervals.html}, note=[Accessed: 16-April-2025
]}