0

I am working on laying out video stills in a book. I am pretty new to using the command line and discovered ffmpeg just yesterday.

Right now, I want to extract 8fps from a video between, for example, 00:05:30 and 00:42:30. This is what I have written. I am not sure how to include the out point or if I am using the right option to begin with (-ss).

ffmpeg -ss 00:05:30 -i video.mp4 -vf fps=8 out%05d.png

As another approach, I know this segment is 37 seconds. So:

ffmpeg -ss 00:05:30 -i video.mp4 -t 00:00:37 -vf fps=8/16 out%05d.png

I am also wondering if -ss has to be specified before the input or if it can be placed after. I guess I'm confused about syntax. Could it be ffmpeg -i video.mp4 -ss 00:05:30 ... as well? It seems to be running, but slower.

  • 1
    ffmpeg -ss 00:05:30 -to 00:42:30 -i video.mp4 -vf fps=8 out%05d.png – Gyan Dec 30 '18 at 18:16
  • Please read: trac.ffmpeg.org/wiki/Seeking – slhck Dec 30 '18 at 21:11
  • @slhck You marked this as duplicate, but it is not quite the same. That is only cutting the video but I am asking how to take screenshots from a segment of the video? Is the solution to just add -vf fps=8 out%05d.png after ffmpeg -ss [start] -i in.mp4 -t [duration]? – AFG Dec 30 '18 at 23:10
  • Yes, isn't that what your original command does, except for the missing "to" option? (Or duration using the "t" option, both are valid.) I thought you were unclear about the seeking behavior, hence the link to the other question. – slhck Dec 30 '18 at 23:24
  • Yes I was just not sure if adding -vf ... was all that it took. Thank you a lot for sending both links about the seeking behavior. It definitely cleared up a lot. – AFG Dec 30 '18 at 23:28