gpt4 book ai didi

android - FFmpeg:如何转换背景模糊的垂直视频

转载 作者:行者123 更新时间:2023-11-29 02:22:42 31 4
gpt4 key购买 nike

我执行以下命令来模糊视频背景,但出现错误。

String[] complexCommand = {"-i", "" + yourRealPath, "-lavfi", "[0:v]scale=ih*16/9:-1",
"boxblur=luma_radius=min(640,356)/20", ":luma_power=1:chroma_radius=min(cw,ch)/20",
":chroma_power=1[bg]", ";[bg][0:v]", "overlay=(W-w)/2:(H-h)/2",
"crop=h=iw*9/16", "-vb", "800K", filePath};

错误:

Unable to find a suitable output format for'boxblur=luma_radius=min(640,356)/20' boxblur=luma_radius=min(640,356)/20: Invalid argument

最佳答案

这段代码对我来说效果很好:

"-i", input,
"-strict", "-2",
"-filter_complex", "[0:v]scale=ih*16/9:-1,boxblur=luma_radius=min(h\\,w)/20:luma_power=1:chroma_radius=min(cw\\,ch)/20:chroma_power=1[bg];[bg][0:v]overlay=(W-w)/2:(H-h)/2,crop=h=iw*9/16",
"-c:v", "libx264",
"-pix_fmt", "yuv420p",
output

关于android - FFmpeg:如何转换背景模糊的垂直视频,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54284446/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com