android - 加快视频处理时间 FFMPEG,同时将多个图像添加到视频

标签 android ffmpeg video-processing android-ffmpeg

我正在尝试以特定时间间隔将多个图像叠加到视频中...... 但是对于 1 分钟的视频长度来说,处理时间太多了。 我用了VideoKit图书馆。 这是我将多张图片添加到视频的代码。

 String[] command = {"-i", inputPath, 
                "-i", imagePath1,"-i", imagePath2,"-i",imagePath3,
                "-filter_complex",
                "[0][1]overlay=y=H-h:enable='between(t,2,10)'[v1];
                 [v1][2]overlay=y=H-h:enable='between(t,10,20)'[v2];
                 [v2][3]overlay=y=H-h:enable='between(t,20,30)'[v3]",
                "-map", "[v3]",  outputPath};

有没有更快的视频处理库

最佳答案

我刚刚添加了两个标签以加快处理速度。

String[] command = {"-i", inputPath, 
\"-i", imagePath1,"-i", imagePath2,"-i",imagePath3,
"-filter_complex",
"[0][1]overlay=y=H-h:enable='between(t,2,10)'[v1];
[v1][2]overlay=y=H-h:enable='between(t,10,20)'[v2];
[v2][3]overlay=y=H-h:enable='between(t,20,30)'[v3]",
"-map", "[v3]",
**"-preset", "ultrafast",**  outputPath};

关于android - 加快视频处理时间 FFMPEG,同时将多个图像添加到视频,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54977603/

相关文章:

android - 按钮文本周围的填充过多

android - 代码覆盖内联函数

android - 可绘制边框

ffmpeg - 每30秒就是剪一个视频3s

python - 用python将视频分成帧

android - 微调器 If Strings** == 不工作

FFmpeg : Overlay GIF Rotation and scale

video - 使用 fps 过滤器的 ffmpeg 时间戳信息与 ffprobe 不一致

ios - 如何在 ios swift 中将相机预览 View 添加到三个自定义 uiview

ios - 为什么 Y 平面和 CbCr 平面报告的大小不同?