我注意到许多网站,例如 https://biteable.com , https://animoto.com/apps/online-video-maker等,它们本质上是在线视频编辑器,允许用户应用效果、添加自定义文本等并渲染视频。
我做了一些研究,但找不到任何关于这些网站如何以编程方式完成创建视频的高级答案。我见过提到“FFmpeg”,但这似乎只能完成基本任务,例如将一系列图像转换为视频(我错了吗?)。
我对视频渲染知之甚少,希望有人有想法让我开始研究。是否存在可以帮助完成这些网站正在做的事情的图书馆?还是这些网站是从头开始使用较低级别的语言来实现这一点的?
最佳答案
I've seen mention of "FFmpeg", but this seems like it would only be able to accomplish basic tasks such as converting a series of images into a video (am I wrong?).
FFmpeg(
ffmpeg
命令行工具或使用它的 libav* 库)可以完成示例视频中显示的许多功能,但如果您没有使用 FFmpeg 的经验,则某些效果会很困难。知道如何编写算术表达式将有助于操作某些过滤器效果。其次,
ffmpeg
不是编辑。它可以用于有一些挑战的简单编辑,但它肯定是可能的。Are there libraries that exist that can aid to accomplish what these websites are doing?
MLT 框架 (
melt
) 是另一个示例。Or are these websites starting from the ground up with lower-level languages to accomplish this?
未知。我不认为我们可以回答这个问题。据我所知,他们没有透露任何流程细节,如果有人知道他们可能签署了保密协议(protocol)。
他们的例子告诉我们什么
查看其中一个示例视频,我可以看出他们至少使用 FFmpeg 和 x264 进行编码:
$ ffmpeg -i Promo-video-created-with-Animoto-online-video-maker-bf8660fd0c.mp4
…
encoder : Lavf57.56.100
Lavf 是 libavformat 的别名,它是 FFmpeg 复用/解复用库。 57.56.100 是 major.minor.micro 版本号。这个特定版本表明他们可能正在为该视频使用 FFmpeg 3.2 发布分支。$ strings Promo-video-created-with-Animoto-online-video-maker-bf8660fd0c.mp4 | grep x264
x264 - core 123 r0+5540M 04d6470 - H.264/MPEG-4 AVC codec - Copyright 2003-2012 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0x1:0x111 me=umh subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=8 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=120 keyint_min=1 scenecut=40 intra_refresh=0 rc_lookahead=120 rc=crf mbtree=1 crf=18.0 qcomp=0.60 qpmin=10 qpmax=51 qpstep=4 vbv_maxrate=5000 vbv_bufsize=10000 crf_max=0.0 nal_hrd=none ip_ratio=1.41 aq=1:1.00
一个过时的 x264 被用来创建这个例子,但这个例子可能同样古老。他们使用了-crf 18 -maxrate 5000k -bufsize 10000k
关于ffmpeg - 网站如何以编程方式呈现自定义视频?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62961887/