使用ffmpeg从具有Ken Burns效果的图像生成视频 [英] Generate video from images with ken burns effect using ffmpeg

查看:69
本文介绍了使用ffmpeg从具有Ken Burns效果的图像生成视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从图像生成视频.

I am trying to generate video from images.

以下代码生成视频,每3秒1帧.

The following code generates the video, 1 frames per 3 seconds.

     exec("ffmpeg -f image2 -r 1/3 -loop_input -shortest -y  -i tmp/image%3d.jpg -i tmp/ag1.mp3 -target ntsc-dvd -s 1280x720 tmp/video.mwv");

我想对其应用ken burns效果,我进行了很多搜索,但找不到任何解决方法.

I want to apply ken burns effect to it, I have searched a lot but couldn't find any solution.

有人可以帮我吗?如果可以提供任何代码段,将不胜感激.

Can anybody help me out ? If can provide any code snippet, will be really appreciated.

推荐答案

我不认为仅靠ffmpeg就能做到这一点.过去,我是使用名为 diascope 的工具完成此操作的.我从没听说过,但是它可以产生一些我见过的最好的图片幻灯片,因为可以使用Ken Burns之类的效果.它在最后一步中确实使用了ffmpeg来对视频进行实际编码.

I don't think this can be done with ffmpeg alone. I have done this in the past with a tool called diascope. I never hear much about it, but it produces some of the best picture slideshows I have seen since you can use effects like Ken Burns. It does use ffmpeg in its final step to actually encode the video.

看看例子,它应该很简单.

Take a look at the examples, it should be pretty straightforward.

这篇关于使用ffmpeg从具有Ken Burns效果的图像生成视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆