Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

一些问题反馈 #60

Closed
GitHubWorkAndroid opened this issue Jul 18, 2019 · 4 comments
Closed

一些问题反馈 #60

GitHubWorkAndroid opened this issue Jul 18, 2019 · 4 comments

Comments

@GitHubWorkAndroid
Copy link

1,目前还不支持生成webp动态图吗?
2,我昨天用的1.24版本,今天看到升级了2.0.0版本,我用1.24版本去合成视频水印,发现并不成功,要么报错,要么生成1k的错误视频,合成命令都是百度搜的,能用的都试过,不行能够,希望能给提供解决的方法。

@microshow
Copy link
Owner

目前还不支持webp;
你可以贴一下你的命令出来

@GitHubWorkAndroid
Copy link
Author

public static String[] addwaterMark(String imageUrl, String videoUrl, String outUrl) {
String[] commands = new String[8];
commands[0] = "ffmpeg";
commands[1] = "-i";
commands[2] = videoUrl;
commands[3] = "-i";
commands[4] = imageUrl;
commands[5] = "-filter_complex";
commands[6] = "'overlay=main_w-overlay_w-10:main_h-overlay_h-10'";
commands[7] = outUrl;
return commands;
}
上面的是报 ffmpeg paser option error 的错

public static String[] addwaterMark(String imageUrl, String videoUrl, String outputUrl) {
String[] commands = new String[9];
commands[0] = "ffmpeg";
//输入
commands[1] = "-i";
commands[2] = videoUrl;
//水印
commands[3] = "-i";
commands[4] = imageUrl;//此处的图片地址换成带透明通道的视频就可以合成动态视频遮罩。
commands[5] = "-filter_complex";
commands[6] = "overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2";
//覆盖输出
commands[7] = "-y";//直接覆盖输出文件
//输出文件
commands[8] = outputUrl;
return commands;
}
上面的是生成1k不能播放的视频

合成命令都是百度搜的,基本上都不行,就这两种情况

@microshow
Copy link
Owner

命令有问题啊 欢迎进群畅聊

@microshow
Copy link
Owner

添加水印例子 ffmpeg -y -i /storage/emulated/0/1/input.mp4 -i /storage/emulated/0/1/1.png -filter_complex [0:v]scale=iw:ih[outv0];[1:0]scale=536.0:712.0[outv1];[outv0][outv1]overlay=0:0 -preset superfast /storage/emulated/0/1/result.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants