Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

video-frames

Extract evenly-spaced still frames from a video file or YouTube URL.

Install

Homebrew (recommended)

brew install wimdetroyer/toolz/video-frames

Dependencies (ffmpeg, yt-dlp) are installed automatically.

Manual

git clone https://github.com/wimdetroyer/video-frames.git
cp video-frames/bin/video-frames /usr/local/bin/

Or install the script directly:

curl -fsSL https://raw.githubusercontent.com/wimdetroyer/video-frames/main/bin/video-frames \
  -o /usr/local/bin/video-frames && chmod +x /usr/local/bin/video-frames

Usage

video-frames [options] <video-file-or-youtube-url>

Options

Flag Description Default
-n N Number of frames to extract 6
-o DIR Output directory /tmp/frames-XXXXXXXX/
-w WIDTH Max width in px (preserves aspect ratio) 1080
-f FORMAT Output format: png or jpg jpg

Examples

# Extract 6 frames from a local video
video-frames video.mp4

# Extract 12 frames from a YouTube video
video-frames -n 12 https://www.youtube.com/watch?v=dQw4w9WgXcQ

# Save as PNG to a specific directory
video-frames -f png -o ./my-frames video.mov

Output is one absolute frame path per line on stdout. Progress/info goes to stderr.

Dependencies

  • ffmpeg (required) - install via your package manager
  • yt-dlp (optional) - only needed for YouTube URL support

License

MIT

About

Extract evenly-spaced still frames from a video file or YouTube URL

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages