Video Frame Extractor: frames, thumbnails and scene changes avatar

Video Frame Extractor: frames, thumbnails and scene changes

Pricing

from $5.40 / 1,000 frame extracteds

Go to Apify Store
Video Frame Extractor: frames, thumbnails and scene changes

Video Frame Extractor: frames, thumbnails and scene changes

Pulls still frames from video files you link or upload: every N seconds, at the timestamps you list, N evenly spaced frames, or at each scene change. Adds a best thumbnail and a contact sheet, and returns a download link and timestamp for every frame.

Pricing

from $5.40 / 1,000 frame extracteds

Rating

0.0

(0)

Developer

Ed Rayyis

Ed Rayyis

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

19 days ago

Last modified

Features

Limited permissions

Share

Give it video files, by link or from one of your key value stores, and it saves still frames from each one, picked in one of the five ways below. Every frame goes into the run's key value store, and the dataset gives you its download link, timestamp and timecode, with the video's length, size, codec and frame rate.

Modes and image options

  • Evenly spaced: N frames, one from the middle of each of N equal parts of the video
  • Every N seconds: a frame at the start time you set, then one every N seconds. Decimals work, such as 0.5
  • At timestamps: the times you list, as seconds (12.5) or timecodes (1:30, 00:01:30). A time past the end of the video gets an error item and is not charged
  • Scene changes: the first frame plus every frame where the picture changes sharply, found with FFmpeg's scene score. Set the sensitivity from 0.1 (finds subtle changes) to 0.5 (hard cuts only)
  • Thumbnail only: one best thumbnail per video
  • Best thumbnail: on by default in every mode. The FFmpeg thumbnail filter picks the most typical frame of the 150 frames that start 10% into the video
  • Contact sheet: one grid image per video with every saved frame and its timecode, free
  • Image format: JPEG, WebP or PNG, with a quality setting for JPEG and WebP
  • Size: frames are scaled down to a maximum width and height with the aspect ratio kept, and never enlarged. Rotated phone videos come out upright

A file that ends early still gives every frame that can be decoded, and times past the break get an error item.

Accepted files

  • Containers: WebM, MKV and Ogg (.ogv, .ogg)
  • Video codecs: AV1, VP8, VP9 and Theora
  • Audio codecs, when the video has a soundtrack: Opus, Vorbis, FLAC, MP3 and PCM

A file in any other format, or one that holds any other codec, gets an error item that names what it holds and lists what is accepted, and is not charged.

Example

A 10 second 640 by 360 VP8 WebM in evenly spaced mode with 4 frames gave frames at 1.25, 3.75, 6.25 and 8.75 seconds, each 640 by 360, and the best thumbnail came from 3.8 seconds.

Input

  • Video URLs: direct links to video files
  • Files in a key value store: to use videos from your computer, upload them to one of your key value stores and pick that store. Every record whose key ends in .webm, .mkv, .ogv or .ogg is processed
  • Record keys: only process these records from that store
  • Which frames: evenly spaced (default), every N seconds, at timestamps, scene changes, or thumbnail only
  • Number of frames for evenly spaced (default 6)
  • Seconds between frames and start time for every N seconds (defaults 10 and 0)
  • Timestamps for at timestamps
  • Scene change sensitivity (default 0.3)
  • Maximum frames per video (default 50), for every mode. The thumbnail is not counted
  • Add a best thumbnail (default on)
  • Contact sheet (default on) and its number of columns (default 4)
  • Image format: JPEG (default), WebP or PNG, and quality (default 85)
  • Maximum width (default 1280, 0 keeps the full size) and maximum height (default no limit)
  • Maximum video size in MB (default 500)
  • Time limit per ffmpeg step in seconds (default 900)

Output

Dataset: one item per frame with imageUrl (download link), imageKey, kind (frame, scene, thumbnail or contactSheet), frameNumber, timestampSeconds, timecode, imageWidth, imageHeight, imageBytes, and the video's durationSeconds, videoWidth, videoHeight, videoCodec, frameRate, container, videoBytes and hasAudio. Files are named by the video's position in your list, its file name, the frame number and the time, such as 0001-big_buck_bunny_360_10s_1mb-frame-0002-3.750s.jpg.

A video that cannot be read gets one item with ok: false and an error, such as HTTP 404, "the link returns a web page, not a video file", a file over the size limit, "the file has no video stream", or "the file has H.264 video, which this actor does not accept" followed by the accepted formats. One bad video never stops the run.

Pricing

Pay per event: one event per frame image saved, the best thumbnail included. Contact sheets, failed videos and failed timestamps are not charged. The run stops when it reaches the maximum charge you set.

Scope and conduct

Only the files you supply are downloaded. The actor does not log in anywhere, does not download from video sharing sites and uses no proxies. Process videos you have the right to use.

Support

Questions and problems: the Issues tab on this page.