Converting images to video using FFMPEG on Windows

Building on Mike's answer above, there are some other useful switches that also work on the Windows solution.

I use the following one liner to get a slower frame rate and to compress the images and have a smaller resulting video:

ffmpeg.exe -f image2 -framerate 25 -pattern_type sequence -start_number 1234 
        -framerate 3 -i "Imgp%%04d.jpg" -s 720x480 test.avi

The -framerate 3 option sets the framerate of the resulting video to 3 frames per second so that I can see each still for a short period of time. Adding -r as an output option will change the framerate of the output if you need it to be different than your -framerate value. The -s option rescales the pictures to the desired resolution to manage the size of the resulting video. Alternatively, the more flexible scale filter can be used instead.

Note, contrary to Jason's comment above, it is not necessary to rename files if using the -start_number switch like so:

ffmpeg -f image2 -start_number n -i "IMGP%%04d.jpg" video.mpg 
    -vcodec mpeg4 test.avi

where n is the start of the sequence of stills.

This will work as long as the sequence is unbroken once it starts. If there are gaps and you want all of the stills included, then renumbering may be necessary to fill the gaps.


Try putting the filename template in double quotes. Also, if you are running the command in a script you may need to use %% instead of %.