Closed andrevdk closed 6 years ago
Can you tell me the following
I tested on Nexus5x with Android 6 and Huawei p9 Lite with Android 7. In your tutorial for building the library, in the build script ffmpeg is disabled. Could be related to that line? I tried the sample from README and it works fine.
As you mention, the error says
couldn't find "libffmpeg.so".
I assume you are not using the library from jcenter, but rebuilding it. This means that Android is not able to find the library in the libs directory. Can you list the libs directory here?
No, I use the library from jcenter as is described in ReadME. I just added compile "...." in the build.gradle of theapp and jcenter in the build.gradle of the project. I haven't tried to build anything. I just checked your tutorial about how did you build the library and I noticed that line in the build_ffmpeg.sh file.
Can you please list your libs directory
On Wed 28 Mar, 2018, 11:34 AM andrevdk, notifications@github.com wrote:
No, I use the library from jcenter as is described in ReadME. I just added compile "...." in the build.gradle of theapp and jcenter in the build.gradle of the project.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/madhavanmalolan/ffmpegandroidlibrary/issues/13#issuecomment-376771907, or mute the thread https://github.com/notifications/unsubscribe-auth/ACA3FS7TPq080X4ODWGnjfPTCym3yFpgks5tiyf7gaJpZM4S85jM .
I'm getting the same crash. I have no libs
directory. Just added the dependency, compiled, then tested the script on a video I recorded.
private void processVideo(File videoFile) {
File file = new File(Environment.getExternalStoragePublicDirectory(
Environment.DIRECTORY_MOVIES), "instgram-sharer");
if (!file.mkdirs()) {
// Log.e(LOG_TAG, "Directory not created");
}
Log.v("test-tag", String.valueOf(file));
Controller.getInstance().run(new String[]{
"-y",
"-i",
videoFile.getAbsolutePath(),
"-vcodec",
"copy",
"-an",
file.getAbsolutePath(),
});
}
The variable file seems to be a directory. The last argument should be a path to a file, not a dir (it is okay if the file doesn't exist, it will be created). It is also preferable to give the file the appropriate extension.
On Mon 16 Apr, 2018, 1:46 AM Keith Holliday, notifications@github.com wrote:
I'm getting the same crash. I have no libs directory. Just added the dependency, compiled, then tested the script on a video I recorded.
private void processVideo(File videoFile) { File file = new File(Environment.getExternalStoragePublicDirectory( Environment.DIRECTORY_MOVIES), "instgram-sharer"); if (!file.mkdirs()) { // Log.e(LOG_TAG, "Directory not created"); }
Log.v("test-tag", String.valueOf(file)); Controller.getInstance().run(new String[]{ "-y", "-i", videoFile.getAbsolutePath(), "-vcodec", "copy", "-an", file.getAbsolutePath(), });
}
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/madhavanmalolan/ffmpegandroidlibrary/issues/13#issuecomment-381434744, or mute the thread https://github.com/notifications/unsubscribe-auth/ACA3FcGEmnvEFI3mJHUUTUmXZ_lIDuMBks5to6qqgaJpZM4S85jM .
Input code:
Controller.getInstance().run(arrayOf("-i", inputs[0], "-c", "copy", "-bsf:v", "h264_mp4toannexb", "-f", "mpegts", inputs[0].replace("STOR", "MUTE_STOR" ).replace(".mp4", ".ts") ));
Error: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/[]-2/base.apk"],nativeLibraryDirectories=[/data/app/[]-2/lib/arm64, /data/app/[]-2/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64, /system/vendor/lib64, /product/lib64]]] couldn't find "libffmpeg.so". I copied the command from the ffmpeg website. The example of this library works fine. Why is this error happening? Is because ffmpeg is disabled in the build script? Does this project compile every functionality of ffmpeg?