# Extract Frame

> Pull one frame out of a video as a lossless PNG, such as the first, the last, a timestamp or an exact frame number, to chain clips or make thumbnails.

Source: https://nodaro.ai/docs/nodes/image/extract-frame

The **Extract Frame** node takes one frame out of a video and returns it as a PNG image. You choose which frame: the first, the last, the frame at a timestamp, or an exact frame number. The still can then feed any image node, for example as the start frame of the next clip.

- Found in: Image › Edit & Retouch
- Output: image
- API type: `extract-frame`

## When to use it
- Chain clips. Use the last frame of a generated clip as the start frame of the next one, so the story continues from shot to shot.
- Make a thumbnail. Pull a representative still from a video before you post it.
- Reuse a moment. Take a frame from a long video to edit it, or to use it as a reference in [Generate Image](https://nodaro.ai/docs/nodes/image/generate-image).
- Check what an upstream video starts with when you chain nodes.

## Quick start
### Add the node

Press Tab on the canvas and choose **Image › Edit & Retouch › Extract Frame**.

### Connect the video

Drag from a video node, such as [Generate Video](https://nodaro.ai/docs/nodes/video/generate-video) or [Upload Video](https://nodaro.ai/docs/nodes/video/upload-video), to the **Video** input.

### Choose the frame

Open the settings panel and choose a mode under **Frame Selection**, for example **Last Frame**.

### Run it

Click **Run** on the node. The frame appears on the node as an image.

Workflow: The last frame of clip 1 becomes the first frame of clip 2, so the second clip continues where the first one ends.

- Generate Video → Extract Frame (video)
- Extract Frame → Generate Video (start frame)

## Inputs
| Input | Accepts | What it does |
| --- | --- | --- |
| **Video** | Video nodes, such as Generate Video, Upload Video and Trim Video | The video to take the frame from. Required. |

The output, **Image**, is the frame as a PNG, at the resolution of the video.

## Settings
| Setting | What it does |
| --- | --- |
| **Frame Selection** | Which frame to take. The default is **First Frame**. See [Frame modes](#frame-modes). |
| **Timestamp (seconds)** | For **At Timestamp (s)**: how many seconds into the video. Decimals work, such as `2.5`. A time outside the video moves to the nearest valid frame. |
| **Seek to (seconds)** | For **Nearest keyframe**: the point to search from. `0` means the first keyframe. |
| **Frame index (from start)** | For **Frame # from start**: the frame number, where `0` is the first frame. |
| **Frames back from end** | For **Frame # from end**: how many frames before the end, where `0` is the last frame and `1` the second-to-last. |

## Frame modes

| Mode | Takes | Use it when |
| --- | --- | --- |
| **First Frame** | The first frame | You want to check or reuse the opening image. |
| **Last Frame** | The final frame | You start the next clip where this one ends. |
| **At Timestamp (s)** | The frame at a time in seconds | You know the moment, such as `2.5` seconds in. |
| **Frame # from start** | The frame with this number, counted from `0` | You need an exact frame, such as frame 24, which is one second into a 24 fps clip. |
| **Frame # from end** | The frame this many frames before the end | You want "10 frames before the end" without knowing the clip length. |
| **Nearest keyframe** | The first keyframe at or after a time | Speed matters, or the video has a high bitrate. A keyframe is faster to read than the frames between keyframes. |

For the two frame-number modes, the node reads the frame rate and the length of the video, so it can find the exact frame.

## Credits
Every extraction costs 10 credits, whatever the mode or the length of the video.

## Troubleshooting
**The last frame is faded or blurred.** Some clips end on a dissolve or with artifacts. Use **Frame # from end** with a small value, such as `5`, to take a clean frame just before the end.

**A frame-number mode fails.** **Frame # from start** and **Frame # from end** need the frame rate and the frame count of the video. When the node cannot read them from the file, the run fails instead of returning the wrong frame. Use a time-based mode, such as **At Timestamp (s)**, for that video.

## Tips
- **PNG keeps every detail.** The frame is lossless, so it is safe to upscale, edit or use as the first frame of a continuation without adding compression artifacts.
- **Resize elsewhere.** The frame has the resolution of the video. For a larger still, send it to [Upscale Image](https://nodaro.ai/docs/nodes/image/upscale-image). To make it smaller, resize the video first with [Resize Video](https://nodaro.ai/docs/nodes/video/resize-video).
- **Remix a moment.** Take a still from one clip and restyle it with [Generate Image](https://nodaro.ai/docs/nodes/image/generate-image) or [Modify Image](https://nodaro.ai/docs/nodes/image/modify-image). Animate it, then join the result to the original with [Combine Videos](https://nodaro.ai/docs/nodes/video/combine-videos).

## Frequently asked questions

### How do I get the last frame of a video?

Set Frame Selection to Last Frame. The node returns the final frame as a PNG, which you can use as the start frame of the next clip.

### How many credits does Extract Frame cost?

10 credits per frame, whatever the mode or the length of the video.

### What format and size is the extracted frame?

A PNG, which is lossless, at the resolution of the video. For a larger still, send the frame to Upscale Image.

### What happens if my timestamp is past the end of the video?

A timestamp outside the video is moved to the nearest valid frame, so the node still returns an image.

### How do I avoid a faded last frame?

Some clips end on a dissolve. Use Frame
