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

没有上传代码仓库,我们用不了依赖哦 #4

Closed
senonwx opened this issue Dec 11, 2018 · 11 comments
Closed

没有上传代码仓库,我们用不了依赖哦 #4

senonwx opened this issue Dec 11, 2018 · 11 comments

Comments

@senonwx
Copy link

senonwx commented Dec 11, 2018

直接用你的so文件会报本地方法找不到的错,有什么解决办法?

@microshow
Copy link
Owner

是这样的,native方法只是会报红 ,但还是可以编译的过哦,这个demo其实就是直接使用so的,你在试试,或者下载这个demo你本地跑下~~~

@senonwx
Copy link
Author

senonwx commented Dec 11, 2018

我把clone下来的demo 的so文件放在我项目的lib下,把类FFmpegInvoke放在我的com.senon.ffmpegdemo包下,就报了如下这个错了:

12-11 16:02:19.185 24355-24355/com.senon.ffmpegdemo E/art: No implementation found for void com.senon.ffmpegdemo.FFmpegInvoke.setDebug(boolean) (tried Java_com_senon_ffmpegdemo_FFmpegInvoke_setDebug and Java_com_senon_ffmpegdemo_FFmpegInvoke_setDebug__Z)
12-11 16:02:19.191 24355-24355/com.senon.ffmpegdemo E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.senon.ffmpegdemo, PID: 24355
java.lang.UnsatisfiedLinkError: No implementation found for void com.senon.ffmpegdemo.FFmpegInvoke.setDebug(boolean) (tried Java_com_senon_ffmpegdemo_FFmpegInvoke_setDebug and Java_com_senon_ffmpegdemo_FFmpegInvoke_setDebug__Z)
at com.senon.ffmpegdemo.FFmpegInvoke.setDebug(Native Method)
at com.senon.ffmpegdemo.SelectRecordActivity.onCreate(SelectRecordActivity.java:20)

@microshow
Copy link
Owner

com.superman.ffmpeg.FFmpegInvoke JNI有限制的 FFmpegInvoke这个类必须在com.superman.ffmpeg包下,才能调用里面的native方法

@senonwx
Copy link
Author

senonwx commented Dec 11, 2018

我已放在com.superman.ffmpeg包下,可以获得FFmpegInvoke实例,现在我需要把视频中的音频单独提取出来,但是用你封装的ffmpeg执行 -i inUrl -acodec copy -vn -y outUrl, inUrl是拍摄的mp4格式文件,outUrl用acc或者wav等格式都会抛出
Unable to find a suitable output format for inurl

@microshow
Copy link
Owner

ffmpeg -y -i /storage/emulated/0/1/input.mp4 -vn -acodec libmp3lame /storage/emulated/0/1/result.mp3

@microshow
Copy link
Owner

或者这样 ffmpeg -y -i /storage/emulated/0/1/input.mp4 -vn /storage/emulated/0/1/result.mp3 现在提取音频主流都是mp3格式的

@senonwx
Copy link
Author

senonwx commented Dec 11, 2018

好的 我试下那种方式好
我需要做的是先提取出音频,视频,再选择一个背景乐,然后将两个音频合成一个,在与单独提出的视频合成,

@microshow
Copy link
Owner

可以的 Good Luck 你这里还涉及到混音

@microshow
Copy link
Owner

@senonwx V1.2.0版本特性:提升转码效率,重新编译ffmpeg,修复拼接视频出错的bug,支持更多格式,包括支持mp3,aac,wav等格式的音频导出,丰富了更多功能,欢迎更新!

@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

2 participants