I am trying to create a sample video that shows every half-second frame using ffmpeg.
For example, if a video is 24 fps, I would like to create a video show every 12, 24, 36, 48.. and so on frames and create video with those frames.
I found a way to do that by extracting image files and encoding the result to video.
ffmpeg -i input -vf select='not(mod(n\,12))' -vsync vfr image_%05d.jpg
and to create video,
ffmpeg -framerate 24 -i image_%05d.jpg -c:v libx264 -r 24 -pix_fmt yuv420p output.mpeg
Now, I want to know if there is a way to skip the step of saving image files and get re-encoded video in one process.