I am prototyping a fairly simple camera application to test using MediaRecorder to create camera user activity with a single snag. I want to set the aspect ratio of the recorded videos to 1x1. Thanks to a lot of research, I found that this is only possible using a library, such as FFMPEG, to crop each frame of the video to the required size.
I read a lot of guides and articles about different ways to create FFMPEG in Android, but most of them are either outdated or use older versions of both Android NDK and FFMPEG, or later ones just don't work if you follow. I tried using the popular http://www.roman10.net/how-to-build-ffmpeg-for-android/ and several other similar ones that lead to an error about the missing pkg-config file, since FFMPEG should usually be installed on Linux or other OS. I found some information about creating FFMPEG in android using the make-standalone-toolchain.sh file here http://software.intel.com/en-us/android/blogs/2013/12/06/building-ffmpeg-for- android-on-x86 and can't make heads or tails regarding how to go using this method.
Now this leads to my question: What is the best / proven way to create and use FFMPEG in Android apps? If the single toolchain method is the way to go, is there any material better than the one below that is easier to track? I would even be open to a robust template application with exit-ready FFMPEG libraries (if possible); although, I would rather know how to do this in Android for future use.
Thanks in advance for any advice or suggestions on this issue.
java android ffmpeg android-ndk
Shaggydev
source share