returns time intervals of video for which the criterion crit is satisfied.
evaluates criterion crit on partitions of n video frames.
evaluates crit on partitions with offset d.
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
- 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.
Examplesopen allclose all
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:
By default, using MaxItems∞, the whole input is evaluated for possible intervals of interest:
Wolfram Research (2020), VideoIntervals, Wolfram Language function, 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.
Wolfram Language. (2020). VideoIntervals. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/VideoIntervals.html