如何在 Android Studio 项目中使用最新的 FFMPEG? [英] How to use latest FFMPEG in Android Studio project?
问题描述
我有一个简单的任务是从多个图像和一个音频文件制作视频,经过大量搜索发现它可以使用 FFMPEG,不幸的是没有 FFMPEG 的更新教程,很少但已经过时,其中大部分是不工作.因为我已经按照教程
I have a simple task to make a video from multiple images and an audio file, After searching a lot found that its possible with FFMPEG, Unfortunately there are no updated tutorials for FFMPEG, there are few but outdated and most of them are not working. As I have compiled FFMPEG for Android using NDK android-ndk-r10e and ffmpeg-2.8.6 on my MAC with Android Studio following the tutorial http://www.roman10.net/how-to-build-ffmpeg-with-ndk-r9/ It makes the .so files as
现在我不明白我该怎么做才能将它集成到我的 Android 项目中,我也检查过,
Now I can't understand what should I do to integrate this in my Android project, I have also checked,
主要是这个,
http://www.roman10.net/how-to-build-android-applications-based-on-ffmpeg-by-an-example/
https://github.com/roman10/android-ffmpeg-tutorial
但它不起作用并且有错误无法解决这个问题.任何人都可以请提及使用 FFMPEG .so 文件时应遵循的一些步骤,如附图所示.
But its not working and having errors with no way to resolve this. Can anyone please mention some steps that should be followed to use FFMPEG .so files as in image attached.
推荐答案
有一个非常简单的解决方案,有一个适用于 android 的预编译库,如下 https://github.com/WritingMinds/ffmpeg-android-java只需将其作为 gradle 项目包含在您的代码中,并根据他们的文档添加一些方法,您就可以在 android 中使用 FFMPEG 命令.这个库不是很更新,有一些缺失的功能,但仍然可以很好地用于许多简单的任务.
There's a very easy solution for this, There's a precompiled library for android, as below https://github.com/WritingMinds/ffmpeg-android-java Simply include this as a gradle project in your code and add few methods as per their documentation and you are done with FFMPEG commands in android. This library is not very updated and have some missing features but still its good to use for many simple tasks.
这篇关于如何在 Android Studio 项目中使用最新的 FFMPEG?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!