Saturday, March 7, 2015

convert bunch of images to video using ffmpeg

sample code:

avconv -framerate 7 -i img%03d.png -qscale 1 -c:v libx264 -pix_fmt yuv420p out.mp4

-use avconv, cause ffmpeg command is deprecated
-framerate is the desired visual result in fps units, can be a fraction like 1/5
-i is the regexp to retrieve pics
-qscale is quality: 1 for best, 31 for worst
-c:v is the video codec
-pix_fmt is the color space setting, yuv240p is the most portable
NOTE: the order of the arguments is important: some come before -i, some after -i


Src: https://trac.ffmpeg.org/wiki/Create%20a%20video%20slideshow%20from%20images

keywords: video, mpg, mpeg, mp4, movie, film

No comments:

Post a Comment