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

音频视频合并失败 #23

Closed
Jooyer opened this issue Mar 14, 2019 · 7 comments
Closed

音频视频合并失败 #23

Jooyer opened this issue Mar 14, 2019 · 7 comments

Comments

@Jooyer
Copy link

Jooyer commented Mar 14, 2019

你好,大佬:
我直接clone了此项目,然后试着提取音频,视频等都正常, 但是在合并音频和视频时报错:
"ffmpeg –i -y " + DIR + "video.mp4" + " –i " + DIR + "tempMusic.aac" + " –vcodec copy –acodec copy " + DIR + "videoMusicAudio.mp4"
,上面是我写的命令,请问是什么问题呢?

@microshow
Copy link
Owner

–vcodec copy –acodec copy 去掉试试

@Jooyer
Copy link
Author

Jooyer commented Mar 14, 2019

commands = new String[11];
commands[0] = "ffmpeg";
commands[1] = "-i";
commands[2] = DIR + "video.mp4";
commands[3] = "-i";
commands[4] = DIR + "tempMusic.aac";
commands[5] = "-acodec";
commands[6] = "copy";
commands[7] = "-vcodec";
commands[8] = "copy";
commands[9] = DIR + "videoMusicAudio.mp4";
commands[10] = "-y";
这么写可以了!多谢大佬

@KnnethKong
Copy link

我也遇到了,我是把aac转成mp3了 ,然后mp3和mp4合并成功了

@microshow
Copy link
Owner

如果是aac的话,可以指定-acodec libfdk_aac

@KnnethKong
Copy link

好的 谢谢

@microshow
Copy link
Owner

可以使用Gradle依赖:)
dependencies {
implementation 'com.github.microshow:RxFFmpeg:1.2.2'
}

@microshow
Copy link
Owner

可以更新V2.0.0版本,速度嗖嗖的

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