ffmpeg - Create a video from image frame with a start and a count
You do this by stating the number of frames you want with -vframes 100
:
ffmpeg -start_number 1 -i test_%d.jpg -vframes 100 -vcodec mpeg4 test.avi
- You might need to specify other parameters such as
pix_fmt
, etc. depending on other factors, and usually one uses something liketest_%05d.jpg
with the numbered sequence having preceding zeroes with five digits; if you don't have it in that format you might need to use a globbing pattern.
This always works well for me:
ffmpeg -i yourfile.mp4 -r 1 -ss 15 -t 16 -f image2 snapshot.jpg
^ ^
^ ^
start end
time time
yourfile.mp4
: movie clipsnapshot.jpg
: new image file- IMPORTANT: leave
image2
alone, as it was the only way to get what I wanted
Time is in seconds only; If it's 2 minutes ahead of the reel, then it's 120
.
One image file is always one-second worth, thus calculate your desired image by that approach.