gpt4 book ai didi

android:视频水印显示错误

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

我想给视频加水印,下面是我的代码,但是当我尝试运行时,它会显示像 Failed to validate license file, existing! 这样的错误.

    public class MainActivity extends AppCompatActivity {
private String strAudioFolderPath;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

// here my ffmpeg command to watermark video.
String s = "ffmpeg -i /sdcard/Download/testing.mp4 -i /sdcard/temp1.jpg -filter_complex 'overlay=10:main_h-overlay_h-10' /sdcard/Download/out.mp4";

GeneralUtils.deleteFileUtil(strAudioFolderPath + "vk.log");
PowerManager powerManager = (PowerManager) this.getSystemService(Activity.POWER_SERVICE);
PowerManager.WakeLock wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "VK_LOCK");
wakeLock.acquire();
LoadJNI vk = new LoadJNI();
try {
try {
vk.run(GeneralUtils.utilConvertToComplex(s), strAudioFolderPath, MainActivity.this);
Log.e("Checking water marker", ">>>>>>>>>>>>>>>");

} catch (Throwable e) {
} finally {
if (wakeLock.isHeld())
wakeLock.release();
else {
}
}
} catch (Exception e)
{
e.printStackTrace();
}
}
}

并在 logcat 中显示错误,如下所示。
    04-26 17:13:18.211 20492-20492/com.example.android.watermarkvideo I/Videokit: license file not found...
04-26 17:13:18.211 20492-20492/com.example.android.watermarkvideo I/Videokit: license file /sdcard/Download/testing.mp4/ffmpeglicense.lic not created.
04-26 17:13:18.211 20492-20492/com.example.android.watermarkvideo D/Videokit: license check rc: -3
04-26 17:13:18.211 20492-20492/com.example.android.watermarkvideo E/Videokit: Failed to validate license file, existing!

实际上,我已经使用 ffmpeg 库对视频文件进行了 watermak,但它没有工作,而且我还没有找到任何合适的解决方案,所以请帮忙。
提前致谢。

最佳答案

我已经解决了Failed to validate license file, existing!的问题通过在 onCreate 方法中声明路径,例如 String strAudioFolderPath = "/sdcard/Download";

关于android:视频水印显示错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36864303/

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