gpt4 book ai didi

android - 使用 Galaxy s6 edge 设备使用 ffmpeg4android 时崩溃

转载 作者:行者123 更新时间:2023-12-04 23:27:36 25 4
gpt4 key购买 nike

我正在使用 ffmpeg4android_lib 在我的 android 应用程序中压缩视频,它几乎可以在所有测试设备中使用,但在 Galaxy s6 edge 和 Galaxy s7 edge 中不起作用。

我的代码如下:

String inputFile = FileManager.getInstance().getRealPathFromVideoUri(context, video);
Log.i("INPUT FILE PATH", inputFile);

LoadJNI vk = new LoadJNI();
try {
String workFolder = context.getApplicationContext().getFilesDir().getAbsolutePath();
String outputFile = FileManager.getInstance().getFileFullName(ForSaleConstants.VIDEO_FOLDER,
String.format(ForSaleConstants.VIDEO_NAME_FILE_FORMAT, ForSaleConstants.VIDEO_NAME_FILE_NAME_PREFIX, System.currentTimeMillis()));

String complexCommand[] = {
"ffmpeg", "-y"
, "-i", inputFile
, "-strict", "experimental"
, "-s", "320x240"
, "-r", "25"
, "-aspect", "4:3"
, "-ab", "48000"
, "-ac", "2"
, "-vcodec", "mpeg4"
, "-movflags", "+faststart"
, "-ar", "22050"
, "-b", "2097k"
, outputFile};
vk.run(complexCommand, workFolder, context.getApplicationContext());
Log.i("OUTPUT FILE PATH", outputFile);
return outputFile;
} catch (Throwable e) {
ForSaleServerManager.getInstance().logAndroidError("Couldn't compress video file");
return null;
}

崩溃如下:
nativeLibraryDirectories=[/data/app/com.forsale.forsale-1/lib/arm64, /data/app/com.forsale.forsale-1/base.apk!/lib/arm64-v8a, /vendor/lib64, /system/lib64]]] couldn't find "libloader-jni.so"
at java.lang.Runtime.loadLibrary(Runtime.java:367)
at java.lang.System.loadLibrary(System.java:1076)
at com.netcompss.loader.LoadJNI.<clinit>(LoadJNI.java:13)

最佳答案

最新版本解决了这个问题
从这里下载:
androidwarzone.blogspot.co.il/2011/12/ffmpeg4android.html?m=1

关于android - 使用 Galaxy s6 edge 设备使用 ffmpeg4android 时崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37988291/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com