Video Frames

Extract frames or short clips from videos using ffmpeg.

casibase Updated

File contents

Video Frames (ffmpeg)

Extract a single frame from a video, or create quick thumbnails for inspection.

Quick start

First frame:

ffmpeg -hide_banner -loglevel error -y \
  -i /path/to/video.mp4 \
  -vf "select=eq(n\,0)" \
  -vframes 1 \
  /tmp/frame.jpg

At a timestamp:

ffmpeg -hide_banner -loglevel error -y \
  -ss 00:00:10 \
  -i /path/to/video.mp4 \
  -frames:v 1 \
  /tmp/frame-10s.jpg

By frame index:

ffmpeg -hide_banner -loglevel error -y \
  -i /path/to/video.mp4 \
  -vf "select=eq(n\,42)" \
  -vframes 1 \
  /tmp/frame42.jpg

Notes

  • Prefer -ss + timestamp for "what is happening around here?".
  • Use .jpg for quick sharing; use .png for crisp UI frames.
  • Use -hide_banner -loglevel error to suppress verbose ffmpeg output.

casibase/casibase commit ab235fc092

Frequently asked questions

npx skillmds@latest add casibase/video-frames