<p>I am running the following command to extract frames at a rate of 1 per second. This works fine, except that the first extracted frame is not the first frame of the video, but the frame after 1 second of video.</p>
<pre><code>ffmpeg -i input.mp4 -f image2 -vf fps=1 ./out_%01d.jpg
</code></pre>
<p>How can I force ffmpeg to extract frames starting at the very first frame of the video?</p>

CC BY-SA 4.0
2021-05-11T10:10:05.520Z
See https://stackoverflow.com/q/47671742/
Gyan
CC BY-SA 4.0
2021-05-11T11:33:09.530Z
Thank you! Is there a way to also force the very last frame (if not on a round timestamp?). So if video is 3.5s long, frames at timestamps 0, 1, 2, 3 and 3.5s. I tried  round=up:eof_action=pass but am not getting the last frame
David
<ffmpeg>
FFMPEG -vf does not extract first frame
David
# FFMPEG -vf does not extract first frame

(Asked by: username_0 on 2021-05-11)

I am running the following command to extract frames at a rate of 1 per second. This works fine, except that the first extracted frame is not the first frame of the video, but the frame after 1 second of video.
ffmpeg -i input.mp4 -f image2 -vf fps=1 ./out_%01d.jpg

How can I force ffmpeg to extract frames starting at the very first frame of the video?

**Tags:** ffmpeg

> **Comments:**
> **username_1**: See https://stackoverflow.com/q/47671742/  
> **username_0**: Thank you! Is there a way to also force the very last frame (if not on a round timestamp?). So if video is 3.5s long, frames at timestamps 0, 1, 2, 3 and 3.5s. I tried  round=up:eof_action=pass but am not getting the last frame  

---

## 0 answers

