HTTPS support for Android build
nejatafshar opened this issue · 4 comments
Currently https is not supported in any of Android builds. Is it trivial to add support for https on android?
The Linux builds does not support SSL either. I managed to build FFmpeg with SSL support by adding -enable-openssl
to USER_OPT
in config.sh
. Although it was necessary to install libssl-dev
and openssl
packages.
The Windows builds have SSL support by default so there is no problem with that.
About Android, I was able to successfully build for Android archs by adding -enable-openssl
option to USER_OPT
like Linux, adding NDK path to ANDROID_NDK
in config.sh
and adding path to OpenSSL libs built for Android to --extra-ldflags
and the include path to --extra-cflags
in android_OPT
. So the android_OPT
is something like:
android_OPT="--disable-avdevice \
--extra-ldflags=\"-L/path/to/android_openssl/latest/arm\" \
--extra-cflags=\"-I/path/to/android_openssl/static/include\""
For the OpenSSL builds for Android I used: https://github.com/KDAB/android_openssl.git. Although the .so file names in latest dir should be changed from libcrypto_1_1.so
to libcrypto.so
and libssl_1_1.so
to libssl.so
respectively.
One last note is that I hade to run separate builds for different Android archs and had to change path to proper OpenSSL libs for each arch in --extra-ldflags
respectively. For example android_OPT
for arm64 build should be:
android_OPT="--disable-avdevice \
--extra-ldflags=\"-L/path/to/android_openssl/latest/arm64\" \
--extra-cflags=\"-I/path/to/android_openssl/static/include\""
I couldn't find a way to define pathes for OpenSSL builds for all archs in config.sh
to build them all in one go.
Anyway I think it would be nice to have SSL support for all platforms by default as it's very likely that one wants to play for instance an https stream. If so the user can provide the proper OpenSSL libs alongside the FFmpeg builds and play https streams.
EXTRA_LDFLAGS="-L/path/to/android_openssl/latest/arm64" ./avbuild.sh android arm64
Please add support for SSL for MDK , it is possible to do that
supported in the latest master branch build