【问题标题】:Speed Up Video Processing time FFMPEG while adding multiple images to Video在将多个图像添加到视频时加快视频处理时间 FFMPEG
【发布时间】:2019-07-25 10:23:03
【问题描述】:

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

 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};

有没有更快的视频处理库。

【问题讨论】:

  • 如果您使用 libx264(H.264 视频)或 libx265(H.265/HEVC)进行编码,请使用更快的编码预设(-preset 选项)。请参阅 FFmpeg Wiki:H.264H.265
  • @llogan 正如你所说,我使用了“-preset”、“ultrafast”命令,它使处理速度更快,但我仍然需要像这个应用程序一样流畅地工作:play.google.com/store/apps/details?id=com.newbiz.mvmaster

标签: android ffmpeg video-processing android-ffmpeg


【解决方案1】:

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

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};

【讨论】:

    猜你喜欢
    • 2021-03-16
    • 1970-01-01
    • 1970-01-01
    • 2016-04-11
    • 2018-08-28
    • 2019-05-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多