EinsteinSlideShow.mp4: output video file name.Using the options -pix_fmt yuv420p or -vf format=yuv420p will maximize compatibility.". Technically this is preferred, but unfortunately almost all video players, excluding FFmpeg based players, and many online video services only support the YUV color space with 4:2:0 chroma subsampling. "By default when using libx264, and depending on your input, ffmpeg will attempt to avoid color subsampling. When given an array of an image in the Y'UV420p format, all the Y' values come first, followed by all the U values, followed finally by all the V values." - wiki. The reason for this is that by grouping the U and V values together, the image becomes much more compressible. "Y'UV420p is a planar format, meaning that the Y', U, and V values are grouped together instead of interspersed. -r 30: will have a frame rate of 30 fps by duplicating the frames accordingly. -r 1/5: each image will have a duration of 5 seconds (the inverse of 1/5 frames per second).If the input -r is higher than the output -r then ffmpeg will drop frames to reach your desired output frame rate.įfmpeg -r 1/5 -i e%02d.png -c:v libx264 -r 30 -pix_fmt yuv420p EinsteinSlideShow.mp4 If the input -r is lower than the output -r then ffmpeg will duplicate frames to reach our desired output frame rate. If we want the input and output frame rates to be the same, then just declare an input -r and the output will inherit the same value.īy using a separate -r (frames per second) for the input and output we can control the duration at which each input is displayed and tell ffmpeg the frame rate we want for the output file. The output frame rate for the video stream by setting -r after -i, or by using the fps filter.The default for reading input is -r 25 which will be set if no -r is specified. The rate according to which the images are read, by setting -r before -i.Now, it's time to create a video (using the encoder libx264) from series of numerically sequential images such as e01.png, e02.png, e03.png, etc.Īs explained in Create a video slideshow from images
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |