php - 从带有转换的图像 unix 命令行创建视频

标签 php unix ffmpeg imagemagick

我发现了几个关于如何从图像创建视频的问题和答案。我设置了其中两个并能够正确制作视频。我尝试了以下方法:

ImageMagick convert -delay 100 -quality 75 photo1.jpg photo2.jpg movie.mpg

FFMPEG ffmpeg -r 10 -b 1800 -i photo1.jpg photo2.jpg movie.mpg

最终结果是视频显示图像有时间,没有效果。我希望了解他们如何在这些图像之间添加淡入和淡出过渡。

最佳答案

我怀疑这是否可以通过开箱即用的库来完成,除非一帧一帧地创建。这两个库都没有真正专注于视频效果。

我能看到的一个命令行解决方案是 dvd-slideshow :

dvd-slideshow is a group of Linux commandline programs that creates a slideshow-style dvd from groups of pictures. Slideshow videos can be made from a directory or some online photo albums. You can add fancy effects like fades, titles, and the Ken Burns effect (slowly zooming and panning at the same time) along with audio to make your slideshows even nicer. There is also a script which generates a menu for your dvd (dvd-menu). The dvd-slideshow tools are open-source programs released under the GNU GPL.

它可以输出 DVD(MPEG-something)和 FLV 等等。您可能需要进行两次转换,但您应该能够结合使用它和 ffmpeg 来构建任何类型的视频文件。

关于php - 从带有转换的图像 unix 命令行创建视频,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3174710/

相关文章:

postgresql - 使用 shell 脚本在 postgresql 中插入列时出错?

FFMPEG DNxHR 与 Alpha 到 Webm

PHP:PHP 变量内的 foreach 循环?

java - 如何使用java代码检查服务是否正在linux机器上运行

linux - Windows 开发人员如何最轻松地让他的软件在 Wine 下运行良好

FFmpeg 延迟超过 3 秒(必须是亚秒级)

android - 用于 android 的 ffmpeg(使用教程 : "ffmpeg and Android.mk")

php - 在页面上显示 Woocommerce 通知

php - Magento 中用于管理员登录身份验证的 API

PHP正则表达式: match several inclusion/exclusion rules for matches consisting of a complex character set