Video capture and processing
To grab a video on MacOS use Command + Shift + 5
.
To refer to the video in markdown like README.md use this (btw GitHub automatically embeds video):
![description](demo.mov)
Speed up video
To speed up video install moviepy, provide input and output video, and speed_factor (default is 2):
pip install moviepy
from moviepy.editor import VideoFileClip
def speed_up_video(input_video_path, output_video_path, speed_factor=2):
# Load the video file
= VideoFileClip(input_video_path)
video_clip
# Speed up the video
= video_clip.speedx(factor=speed_factor)
new_clip
# Write the resulting video to the output file
='libx264', audio_codec='aac')
new_clip.write_videofile(output_video_path, codec
# Example usage
= 'demo.mov'
input_video_path = 'demo_2x.mov'
output_video_path 2) speed_up_video(input_video_path, output_video_path,