ffmpeg 将拆分的数据合成一帧,FFmpeg将图像合并到视频

How can I create a mpg/mp4 file from let's say 10 images using ffmpeg.

Each image shall stay for 5 minutes, after the 5 minutes are over the next image shall appear and so on....

How can I achieve this?

解决方案

If your images are numbered in a sequence (img001, img002, img003..), use

ffmpeg -framerate 1/300 -i img%3d.jpg -r 5 video.mp4

(I've set an output framerate of 5 for player compatibility. Each image will still remain for 300 seconds)

If your filenames are irregular, and you are executing in a Unix shell like bash, you can run

ffmpeg -framerate 1/300 -pattern_type glob -i '*.jpg' -r 5 video.mp4

For MPEG-2,

ffmpeg -framerate 1/300 -i img%3d.jpg -c:v mpeg2video -b:v 2000k -r 5 video.mpg

No idea what minimum output framerates are expected of MPEG-2. Experiment.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值