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

音视频倍速1分钟60M #80

Open
906990152 opened this issue Sep 11, 2019 · 2 comments
Open

音视频倍速1分钟60M #80

906990152 opened this issue Sep 11, 2019 · 2 comments

Comments

@906990152
Copy link

音视频倍速1分钟60M 编译速度如何可以提高啊,如何可以像裁剪速度那样快
一下是命令:
RxFFmpegCommandList cmd = new RxFFmpegCommandList();
cmd.append("-i").append(source);
String t = "atempo=" + speed;
if (speed < 0.5f) {
t = "atempo=0.5,atempo=" + (speed / 0.5f);
} else if (speed > 2.0f) {
t = "atempo=2.0,atempo=" + (speed / 2.0f);
}
Log.v("ffmpeg", "atempo:" + t);
switch (pts) {
case VIDEO:
cmd.append("-filter_complex").append("[0:v]setpts=" + (1 / speed) + "*PTS").append("-an");
break;
case AUDIO:
cmd.append("-filter:a").append(t);
break;
case ALL:
cmd.append("-filter_complex").append("[0:v]setpts=" + (1 / speed) + "*PTS[v];[0:a]" + t + "[a]")
.append("-map").append("[v]").append("-map").append("[a]");
break;
}
cmd.append("-preset").append("superfast").append(output);

@microshow
Copy link
Owner

如果你的视频比较高清的话会慢点,建议加入arm64的so库,速度会提升很多

@wanwan12
Copy link

image
怎么总是有这两个

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

3 participants