gpt4 book ai didi

android - 如何在android中使用FFMPEG修剪视频

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

我有

Fatal signal 11(SIGSEGV), code 1, fault addr 0x5 in tid 5823 (e.mypc.videocut)



当我在阅读此行时尝试调试应用程序崩溃时:
vk.run(complexCommand, workFolder, getApplicationContext());

视频剪辑屏幕:
PowerManager powerManager = (PowerManager)VideoCut.this.getSystemService(Activity.POWER_SERVICE);
PowerManager.WakeLock wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "VK_LOCK");
Log.d(Prefs.TAG, "Acquire wake lock");
wakeLock.acquire();

LoadJNI vk = new LoadJNI();
try {
String workFolder= getApplicationContext().getFilesDir().getAbsolutePath();
Log.d("workfolder",workFolder);
String[] complexCommand = {"ffmpeg", "-i", path, "-ss 00:00:03 -t 00:00:08 -async 1", "/storage/emulated/0/VID.mp4"};

// String commandStr = "ffmpeg -i "+path +"-ss 00:00:03 -t 00:00:08 -async 1 /storage/emulated/0/DCIM/Camera/VID.mp4";
vk.run(complexCommand, workFolder, getApplicationContext());

Log.i("test", "ffmpeg4android finished successfully");
GeneralUtils.copyFileToFolder(vkLogPath, demoVideoFolder);

} catch (Throwable e) {
Log.e("test", "vk run exception.", e);

} finally {
if (wakeLock.isHeld()) {
wakeLock.release();
Log.i(Prefs.TAG, "Wake lock released");

} else {
Log.i(Prefs.TAG, "Wake lock is already released, doing nothing");
}
}

最佳答案

我有一种强烈的感觉,你为不同的 ABI 构建了 ffmpeg。请提供有关您的环境的更多信息。

关于android - 如何在android中使用FFMPEG修剪视频,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36856368/

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