Creating a video from a single image for a specific duration in ffmpeg

送分小仙女□ 提交于 2020-06-23 21:18:34

问题


How do I generate a movie using ffmpeg using a single image (image1.png) for a duration of 15 seconds with a specific resolution so when I play the video, the image will appear on screen for 15 seconds.


回答1:


ffmpeg -loop 1 -i image.png -c:v libx264 -t 15 -pix_fmt yuv420p -vf scale=320:240 out.mp4
  • The -t 15 makes it 15 seconds long.
  • The -vf scale=320:240 sets the width/height.

Make sure to use an actual ffmpeg version e.g. http://johnvansickle.com/ffmpeg/



来源:https://stackoverflow.com/questions/25891342/creating-a-video-from-a-single-image-for-a-specific-duration-in-ffmpeg

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