How exactly do I build OpenCV for Android with an FFMPEG/GStreamer backend?
I've built OpenCV for Android several times from source using CMake's GUI, but my current project needs me to have an FFMPEG/GStreamer (either opens MP4 files, right?) backend for its videoio
. This got me stumped even now.
My FFMPEG isn't exactly installed, but unzipped in F:/, while my GStreamer (Windows binary install) is in E:/
Every time I add the WITH_FFMPEG
entry to the CMakeconfig, it disappears when I configure it again. The WITH_GSTREAMER_0_10
flag doesn't seem to do anything either, as the Video I/O part of the config remains blank.
What exactly am I supposed to do here? I've been searching all over Google and no one's saying anything about this. Am I supposed to provide the path to either FFMPEG or GStreamer into the OpenCV CMake config? Because I don't see the option to do so anywhere.
and both are entirely useless, since you need arm (or whatever) versions, so you have to (cross-) compile those first.
Compile both of them for android-arm? By the way, I just downloaded the
gstreamer-1.0-android-universal-1.14.1
. Would that work? Also, after (cross-)compiling either one or both of them, what do I do in the cmake config?i have no idea, what will work for you in the end (never done that), but for sure, the win binaries are useless (and thus ignored from cmake)
In the most recent repo of OpenCV, I see a
ffmpeg-download.ps1.in
file in<opencv-master-dir>/3rdparty/ffmpeg
. Should I make a custom CMake toolchain if I want to use it?again, idk. but i guess, it's more related to the windows (prebuilt ffmpeg) version, than to android.