Skip to content
Console

Extract frames from video and animations

frame extracts a single frame from a video or animated image, which is commonly used to generate covers, thumbnails, and previews. You can apply any other image parameter to the extracted frame, including resize, crop, watermark, and format conversion.

Parameters

ParameterSource typeMeaningValues
frameVideoTimestamp, in millisecondsInteger, 0 or greater
frameAnimated imageFrame number, starting from 1Integer, 1 or greater
frame=autoVideoAutomatic cover frame selectionauto

Video

  • frame=0: the first frame
  • frame=5000: the frame at 5 seconds
  • frame=60000: the frame at 1 minute

Frames captured from HDR video (including Dolby Vision) keep HDR by default. See HDR images and video.

Animated images

Supported formats: GIF, animated WebP, APNG, and animated AVIF.

  • frame=1: the first frame
  • frame=n: the nth frame

If the specified frame number exceeds the actual number of frames, the last frame is returned.

Automatic cover frame selection

frame=auto automatically picks a frame from the video that works well as a cover: it avoids black frames, white flashes, and solid-color frames, and favors a sharp, colorful, well-composed frame.

  • The selected timestamp is returned in the x-coreix-frame-time response header, in milliseconds.
  • If frame selection fails, the first frame is returned.

To extract a segment rather than a single frame (clipping video, converting video to an animation, or extracting part of an animated image), use the range syntax of frame. See Clip video and convert to animations.

Examples

Source video: https://demo.bitiful.com/hdr-img/rainbow.mov

Capture the frame at 4950 ms and resize it to 1000 px wide: https://demo.bitiful.com/hdr-img/rainbow.mov? frame=4950 & w=1000

Video frame capture: 4950 ms

Automatic cover frame selection:

https://demo.bitiful.com/hdr-img/rainbow.mov?frame=auto&w=1000