ffmpeg convert a series of images to video - with crossfade or any other transition between every two frames

做~自己de王妃 提交于 2019-12-04 11:21:22
Maxito

Two approaches

1) Create a video for each image/slide and add the fade-in fade-out to each one, then add the videos together. This link explains how to create a fade effect for images.

2) Use the a mixture of filters along with the -loop option as explained in this link.

I would suggest you to find more information about Frame Blending or Motion interpolation.

This is for example used in timelapse videos to smooth the render.

  • To blend frames, use ffmpeg with the tblend filter. For example the following command can help : ffmpeg -i {input} -vf "tblend=average,framestep=2,setpts=0.50*PTS" -r {srcfps} -{encoding parameters} {output}. Replace {input} by your input file, {output} by the name of the output file, {srcfps} by your source frames per second, and -{encoding parameters} the parameters you tell ffmpeg to output. You could also add minterpolate filter to the filter stack to add some motion blur.

  • To generate new frames based on motion, the Butterflow project can help : https://github.com/dthpham/butterflow

    Features

    Makes motion interpolated videos (increase a video's frame rate by rendering intermediate frames based on motion, uses a combination of pixel-warping and blending).

    Makes smooth motion videos (simple blending between frames).

    Leverages interpolated frames to make fluid slow motion videos.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!