
c:v libx264 -r 30 -pix_fmt yuv420p out.mp4Īdd some music to it, cutoff when the presumably longer audio when the images end: ffmpeg -framerate 1 -pattern_type glob -i '*.png' -i audio.ogg \ Slideshow video with one image per second ffmpeg -framerate 1 -pattern_type glob -i '*.png' \ This great option makes it easier to select the images in many cases. safe 0 parameter prevents Unsafe file name errorįFmpeg making a video from images placed in different foldersįFMPEG An Intermediate Guide/image sequence Sample usage as follows "h:\ffmpeg\ffmpeg.exe" -y -r 1/5 -f concat -safe 0 -i "E:\images\imagepaths.txt" -c:v libx264 -vf "fps=25,format=yuv420p" "e:\out.mp4"

Making a video from images placed in different foldersįirst, add image paths to imagepaths.txt like below. I tested below parameters, it worked for me "e:\ffmpeg\ffmpeg.exe" -r 1/5 -start_number 0 -i "E:\images\01\padlock%3d.png" -c:v libx264 -vf "fps=25,format=yuv420p" e:\out.mp4īelow parameters also worked but it always skips the first image "e:\ffmpeg\ffmpeg.exe" -r 1/5 -start_number 0 -i "E:\images\01\padlock%3d.png" -c:v libx264 -r 30 -pix_fmt yuv420p e:\out.mp4 The advantage of this method is that you can control which filter goes first ffmpeg -r 1/5 -i img%03d.png -c:v libx264 -vf "fps=25,format=yuv420p" out.mp4 If your video does not show the frames correctly If you encounter problems, such as the first image is skipped or only shows for one frame, then use the fps video filter instead of -r for the output framerate ffmpeg -r 1/5 -i img%03d.png -c:v libx264 -vf fps=25 -pix_fmt yuv420p out.mp4Īlternatively the format video filter can be added to the filter chain to replace -pix_fmt yuv420p like "fps=25,format=yuv420p". See the Create a video slideshow from images – FFmpeg
