YouTube Video Frame Extractor avatar

YouTube Video Frame Extractor

Pricing

from $1.90 / 1,000 frame captureds

Go to Apify Store
YouTube Video Frame Extractor

YouTube Video Frame Extractor

Extract JPEG frames from any YouTube video: at exact timestamps (to the millisecond), every N seconds, N evenly spaced, or one per chapter, at 360p-1080p. Free contact sheets. Downloads only the seconds around each frame, so long videos are fast. Pay per frame; failed frames are free.

Pricing

from $1.90 / 1,000 frame captureds

Rating

5.0

(1)

Developer

TTech

TTech

Maintained by Community

Actor stats

2

Bookmarked

18

Total users

7

Monthly active users

3 days ago

Last modified

Features

Limited permissions

Share

Paste YouTube links and get JPEG frames from them. You choose which frames:

  • Exact timestamps, to the millisecond, such as 00:01:23.250
  • One frame every N seconds, such as every 10 seconds
  • N evenly spaced frames across the whole video or a part of it
  • One frame per chapter, with the chapter's title, start and end

Frames come at 360p, 480p, 720p or 1080p. The Actor returns one image link per frame, and can also put each video's frames on a contact sheet (one labelled grid image), free.

Why this Actor

This ActorTypical frame extractors
YouTube linksPaste any YouTube, Shorts or youtu.be linkMany accept only direct video files (MP4 URLs)
What it downloadsOnly the few seconds that hold each frameOften the whole video
SpeedSeconds for a handful of frames, even from hour-long videosGrows with video length
PrecisionThe first frame at or after that millisecond, decoded exactlyVaries; some snap to the nearest keyframe
PricingPer frame. No per-video, per-minute or per-megabyte feesOften per video plus per frame, sometimes per MB
ProxiesNone needed: nothing to set upOften extra, or your own
Failed framesFreeVaries
RetriesBusy or failed calls are retried automatically; a frame that still fails is marked failed and not chargedVaries
Contact sheetsFree, one grid image per videoRare, or extra

What you can use it for

  • Thumbnails and preview images at chosen moments
  • Frame-by-frame study of editing, animation or camera style
  • Stills from YouTube for computer vision, AI training or AI agents
  • Screenshots for articles, reports and documentation
  • Chapter images for blog posts, course notes and video summaries
  • Contact sheets: a whole video at a glance, or one image to send to an AI vision model instead of many

Input

FieldDescription
videosYouTube URLs (watch?v=, youtu.be/, Shorts, embed or live links) or 11-character video ids. Up to 500.
modetimestamps (default), interval, evenly or chapters.
timestampsExact timestamps mode: HH:MM:SS or HH:MM:SS.mmm, such as 00:01:23 or 00:01:23.250. Up to 1000, captured from every video.
intervalSecondsInterval mode: seconds between frames, from 0.1 up. Default 10.
frameCountEvenly spaced mode: frames per video, 1-1000. Default 10.
positionChapter mode: start (default; 1 second into each chapter, often its title card) or middle.
startTime, endTimeInterval, evenly spaced and chapter modes: optional range, such as 00:01:00 to 00:05:00. Default: the whole video.
resolution360, 480, 720 (default) or 1080. A video smaller than this keeps its native size.
contactSheettrue to also make a contact sheet of each video's frames. Free. Default false.
sheetColumnsContact sheet: tiles per row, 1-10. Default: a near-square grid.
sheetTileWidthContact sheet: tile width in pixels, 120-640. Default 320.

Exact timestamps:

{
"videos": ["https://www.youtube.com/watch?v=Ap8jTCMK3c4"],
"timestamps": ["00:00:50", "00:01:10.500"],
"resolution": "720"
}

One frame every 30 seconds of the first 5 minutes:

{
"videos": ["https://youtu.be/Ap8jTCMK3c4"],
"mode": "interval",
"intervalSeconds": 30,
"endTime": "00:05:00"
}

20 frames spread over the whole video, in 1080p:

{
"videos": ["Ap8jTCMK3c4"],
"mode": "evenly",
"frameCount": 20,
"resolution": "1080"
}

One frame per chapter, with a free contact sheet of them:

{
"videos": ["Ap8jTCMK3c4"],
"mode": "chapters",
"contactSheet": true
}

In the interval, evenly spaced and chapter modes, frames follow each video's own length, so one input works for a mix of short and long videos. Evenly spaced frames sit in the middle of equal parts of the range. This skips the often-black first frame and the very end.

Output

The Actor pushes one dataset item per video and frame. The image is saved in the run's key-value store, and imageUrl links to it directly.

{
"videoId": "Ap8jTCMK3c4",
"videoUrl": "https://www.youtube.com/watch?v=Ap8jTCMK3c4",
"timestamp": "00:01:10.500",
"resolution": "720p",
"status": "OK",
"imageUrl": "https://api.apify.com/v2/key-value-stores/.../records/Ap8jTCMK3c4_00-01-10.500_720p.jpg",
"imageKey": "Ap8jTCMK3c4_00-01-10.500_720p.jpg",
"error": null
}

resolution is the size you actually got, by the shorter side. It can be below what you asked for when the video itself is smaller.

A frame that could not be captured has "status": "fail", imageUrl: null and the reason in error, for example a timestamp past the end of the video. Other frames of the run are not affected. In exact timestamps mode, timestamp is echoed as you sent it (without surrounding spaces). In the interval and evenly spaced modes, a video that cannot be opened at all gets a single failed item with "timestamp": null.

In chapter mode, each item also has chapterTitle, chapterStart and chapterEnd:

{
"timestamp": "00:02:59",
"chapterTitle": "The Jaguar's dry season hunt",
"chapterStart": "00:02:58",
"chapterEnd": "00:08:58"
}

Chapters are the ones YouTube shows on the video, usually from timestamps in its description. A video without chapters gets a single failed item with the reason, free. Items of the other modes do not have these fields.

Contact sheets are saved in the run's key-value store as <videoId>_sheet.jpg (or <videoId>_sheet_1.jpg, _sheet_2.jpg, ... when a video has more than 100 frames), each tile labelled with its time. The CONTACT_SHEETS record lists them per video, and the run's Output tab links to it. A sheet shows the frames that were captured; failed frames are left out.

Which frame you get: the first frame at or after the timestamp, so at most one frame later (up to 33 ms at 30 fps). Near the very end of a video, you get its last frame.

Pricing

You pay per captured frame, and failed frames are free. Contact sheets are free.

Try it free: the prefilled input (two frames of the example video at 720p) costs nothing for the frames, and answers in seconds.

Per framePer 1,000 frames
360p, 480p or 720p$0.0025$2.50
1080p$0.006$6

There's also a small start fee of $0.005 per run (per GB of memory, with a minimum of one, so $0.005 at the default 256 MB). There are no per-video, per-minute or per-megabyte fees. 1080p costs more because each 1080p frame needs about three times the video data. You pay for the resolution you actually get: a 1080p request on a video that only goes up to 720p is charged as 720p.

The Actor respects your run's maximum charge setting: it stops capturing once that limit is reached, and keeps everything captured so far. If Apify moves a run to another server, the run continues where it was: frames already captured are not captured or charged again.

Limits

  • Live streams that are still live are not supported. Private, deleted, region-locked and age-restricted videos fail with an error.
  • At most 1000 frames per video in the interval, evenly spaced and chapter modes, and 1000 timestamps per run.
  • On Apify's Free plan, 100 frames per calendar month. Paid Apify plans have no monthly limit.
  • Timestamps go up to 99:59:59.999.
  • For very large runs, raise the run timeout. The Actor stops cleanly before the timeout and keeps everything captured so far.

Support

Questions, problems or feature requests: message us on Telegram at @ttech_support_official, or open an issue in the Issues tab. Include the run's ID.