VideoIntervals
VideoIntervals[video,crit]
returns time intervals of video for which the criterion crit is satisfied.
VideoIntervals[video,crit,n]
evaluates criterion crit on partitions of n video frames.
VideoIntervals[video,crit,n,d]
evaluates crit on partitions with offset d.
VideoIntervals[{video1,video2,…},crit,…]
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 allScope (5)
Specify the criterion as a pure function:
Specify the criterion as a normal function:
The input to the criterion function is an association with keys "Time", "TimeInterval", "Image", "FrameIndex", "InputFrameIndex" and "Audio" (if present):
Evaluate the criterion on a buffer of five frames:
If the partition size is not Automatic, the value for "Image" will be a list of images:
The value for "Audio" is always a single Audio object of the appropriate duration:
Evaluate the criterion on non-overlapping partitions of five frames:
Options (1)
MaxItems (1)
By default, using MaxItems∞, the whole input is evaluated for possible intervals of interest:
Stop the computation once n complete intervals have been detected:
Text
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.
APA
Wolfram Language. (2020). VideoIntervals. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/VideoIntervals.html