在ffmpeg中根据特定时间从单个图像创建视频 [英] Creating a video from a single image for a specific duration in ffmpeg
本文介绍了在ffmpeg中根据特定时间从单个图像创建视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用ffmpeg使用单幅图像(image1.png)以特定分辨率播放15秒钟的影片,所以当我播放视频时,该图像将在屏幕上显示15秒钟.
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.
推荐答案
ffmpeg -loop 1 -i image.png -c:v libx264 -t 15 -pix_fmt yuv420p -vf scale=320:240 out.mp4
- -t 15使其长15秒.
- -vf scale = 320:240设置 宽度/高度.
- The -t 15 makes it 15 seconds long.
- The -vf scale=320:240 sets the width/height.
确保使用实际的ffmpeg版本,例如 http://johnvansickle.com/ffmpeg/
Make sure to use an actual ffmpeg version e.g. http://johnvansickle.com/ffmpeg/
这篇关于在ffmpeg中根据特定时间从单个图像创建视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文