我应该使用哪个图像处理库来创建视频幻灯片? [英] Which image processing library should I use to create a video slideshow?
问题描述
看起来像 FFmpeg 和 MovieMaker库将从一组图像创建幻灯片影片。哪个最好?有没有更好的选择?
It looks like both FFmpeg and the MovieMaker library in Processing will create a slideshow movie from an array of images. Which is best? Is there a better option?
我需要输出一个要上传到第三方网站的视频,所以我想在设备上执行,需要一个真实的视频不仅仅是一个画廊的幻灯片。
I need to output a video to be uploaded to a 3rd party website so I'd like to do it on device and it needs to be a real video not just a gallery slideshow.
推荐答案
FFmpeg 是一个很好的选择。我自己做了很多次, 时间推移摄影实验 即可。
FFmpeg is a great option. I've done it many times myself with time lapse photography experiments.
- 使用x264 CODEC安装FFmpeg
- 将所有幻灯片从0001.jpg开始编号>
- 如下所示运行FFmpeg (这是我用于我的图像 - >视频转换):
- Install FFmpeg with x264 CODEC
- Number all your slides starting at 0001.jpg
- Run FFmpeg like below (this is what I use for my images-->video conversions):
FFmpeg命令:
ffmpeg -f image2 -i %04d.jpg -vcodec libx264 -f mp4 -vpre main -vpre normal \
-r 25 -an -threads 4 -b 3000k -mbd rd -flags +mv4+aic -trellis 2 -cmp 2 \
-subcmp 2 -g 300 -y out.mp4
您可能需要修改命令行以获得所需的输出质量你正在寻找。另外,帧速率( -r 25
)可能太高了。或者用小值进行实验,或以编程方式复制幻灯片。
You may need to tinker with the command line to get the desired output quality you are searching for. Also, the frame rate (-r 25
) is probably too high for you. Either experiment with small values, or duplicate your slides programmatically.
这篇关于我应该使用哪个图像处理库来创建视频幻灯片?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!