How to Grab the Last Frame of a Video for Your Next Shot
I have a short video, and I want to use its last frame as the starting image for the next shot. I can grab that frame with a single FFmpeg command or capture it directly in Astorie Canvas. Hereβs how to do both.
I have a short video, and I want to use its last frame as the starting image for the next shot. I can grab that frame with a single FFmpeg command or capture it directly in Astorie Canvas. Hereβs how to do both.
Pull the frame in Canvas
- Add a Tool node and choose Keyframe Extraction
- Connect the source video node to it.
- Use the last-frame action to save the ending as a JPEG. To capture a moment in the middle, move the preview to that image and capture the current frame.
For a continuation, Iβd pass the ending still to a video node that accepts a starting image. If the clip ends in a fade or the skier is blurred, Iβd pick a nearby frame where I can see the skierβs position clearly.
The opening and closing frames, extracted from the downloaded MP4 with FFmpeg.
Save the ending from a local MP4
If I already have a short MP4 on disk, this command saves its last decoded video frame as a PNG:
ffmpeg -i "astorie - Video-1-03.mp4" -map 0:V:0 -vf reverse -frames:v 1 last.png
reverse puts the ending frame first, and -frames:v 1 writes just that frame. The filter buffers the full clip, so I use it for short exports like this one. FFmpeg reverse filter documentation
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.