littletry/video-frame-custom

Extract the first, last, middle, specific, or evenly spaced frames from a video.

Public
16K runs

Run time and cost

This model costs approximately $0.00010 to run on Replicate, or 10000 runs per $1, but this varies depending on your inputs. It is also open source and you can run it on your own computer with Docker.

This model runs on CPU hardware. Predictions typically complete within 1 seconds.

Readme

Video Frame Extractor

Extract the first, last, middle, specific, or evenly spaced frames from a video.

Supports:

  • First, last, and middle frame extraction
  • Specific single or multiple frame numbers
  • Uniform sampling of up to 32 frames
  • JPEG and PNG output

The model returns an array of image URLs. Even when extracting one frame, the result is a one-item array.

For a representative preview, use uniform mode with num_frames: 5.

Frame sampling may miss content that appears for only a few frames. Codec support depends on OpenCV and FFmpeg.

This is an independent implementation inspired by lucataco/cog-frame-extractor. It is not affiliated with or endorsed by the upstream author.

Model created
Model updated