VideoTimeStretch [video,spec]
applies time stretching to video using the specified spec.
VideoTimeStretch
VideoTimeStretch [video,spec]
applies time stretching to video using the specified spec.
Details and Options
- VideoTimeStretch can be used to change the speed of a video or parts of a video to create slower or faster video.
- Time stretch specification spec can be any of the following:
-
r uniformly stretch with a ratio r{{t11,t12}r1,…} stretch ratio ri for the time interval {t11,t12}func an arbitrary function func
- VideoTimeStretch processes only the video tracks, dropping all audio and subtitle tracks.
- By default, VideoTimeStretch places the new video under the "Video" directory in $WolframDocumentsDirectory .
- The following options are supported:
-
Examples
open all close allBasic Examples (2)
Slow down a video by a factor of 2:
Speed up by a factor of 2:
Slow down just a portion of a video:
Scope (3)
Stretch the whole video:
Stretch only a specified time segment:
Plot the stretch function over the duration of the input video:
Applications (1)
Reverse a video and join it with the original video:
Properties & Relations (3)
Apart from duration, the video track properties of the input video are not changed by default:
VideoTimeStretch only operates on the video tracks:
Stretch with a uniform ratio:
Stretch the audio track using AudioTimeStretch :
Combine the video and audio tracks:
Use VideoFrameMap to create a file from all original frames at a different frame rate:
This effectively only changes time stamps of all frames:
Compare with the result of VideoTimeStretch :
Possible Issues (2)
Time intervals should not overlap:
The stretch factor should not be zero:
If a function is provided, it should never evaluate to zero:
Related Guides
Text
Wolfram Research (2021), VideoTimeStretch, Wolfram Language function, https://reference.wolfram.com/language/ref/VideoTimeStretch.html (updated 2022).
CMS
Wolfram Language. 2021. "VideoTimeStretch." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2022. https://reference.wolfram.com/language/ref/VideoTimeStretch.html.
APA
Wolfram Language. (2021). VideoTimeStretch. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/VideoTimeStretch.html
BibTeX
@misc{reference.wolfram_2025_videotimestretch, author="Wolfram Research", title="{VideoTimeStretch}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/VideoTimeStretch.html}", note=[Accessed: 16-November-2025]}
BibLaTeX
@online{reference.wolfram_2025_videotimestretch, organization={Wolfram Research}, title={VideoTimeStretch}, year={2022}, url={https://reference.wolfram.com/language/ref/VideoTimeStretch.html}, note=[Accessed: 16-November-2025]}