Skip to main content
Extract multiple frames from a video in a single call, each at its own timestamp. Cheaper than N separate calls since the input is decoded once.

Code

How the FFmpeg command works

  • split=2[first][second] — duplicate the video stream so we can select frames at two different times
  • select='gte(t,10)'[thumb1] — pick the first frame at or after 10 s
  • select='gte(t,20)'[thumb2] — pick the first frame at or after 20 s
  • -map [thumb1] -frames:v 1 {{out_1}} — write one frame to thumbnail1.jpg
  • -map [thumb2] -frames:v 1 {{out_2}} — write one frame to thumbnail2.jpg
For N thumbnails, extend the split count and add another select + -map pair per output.

Response