我從編譯的ffmpeg收到openssl的下一條消息:Protocol not found
。我正在通過https測試hls。無法打開https流 - 找不到協議(ffmpeg with openssl)
ffmpeg是3.3
和openssl是1.0.0a
版本。
我旁邊配置腳本:
./configure \
--target-os=linux \
--incdir=$BUILD_DIR/include/$ABI \
--libdir=$BUILD_DIR/lib/$ABI \
--prefix=$BUILD_DIR/lib/$ABI \
--enable-cross-compile \
--extra-libs="-lgcc" \
--arch=$ARCH \
--cc=$PREBUILT/bin/$HOST-gcc \
--cross-prefix=$PREBUILT/bin/$HOST- \
--nm=$PREBUILT/bin/$HOST-nm \
--sysroot=$PLATFORM \
--extra-cflags="$OPTIMIZE_CFLAGS -I${OPENSSL_INCLUDE_DIR}" \
--extra-cxxflags="I${OPENSSL_INCLUDE_DIR}" \
--extra-ldflags="-Wl,-rpath-link=${PLATFORM}usr/lib -L${PLATFORM}usr/lib -nostdlib -lc -lm -ldl -llog -lz -L${OPENSSL_BUILD_DIR}/${ABI} $openssl_addi_ldflags -lssl -lcrypto" \
--disable-static \
--disable-ffplay \
--disable-ffmpeg \
--disable-ffprobe \
--disable-ffserver \
--disable-doc \
--disable-symver \
--disable-postproc \
--disable-gpl \
--disable-encoders \
--disable-muxers \
--disable-bsfs \
--disable-protocols \
--disable-indevs \
--disable-outdevs \
--disable-devices \
--enable-shared \
--enable-small \
--enable-encoder=png \
--enable-openssl \
--enable-runtime-cpudetect \
--enable-protocol=file,ftp,http,https,httpproxy,hls,mmsh,mmst,pipe,rtmp,rtmps,rtmpt,rtmpts,rtp,sctp,srtp,tcp,udp \
--pkg-config=$(which pkg-config) \
$ADDITIONAL_CONFIGURE_FLAG || die "Couldn't configure ffmpeg!"
之前我配置它,我收到這樣的錯誤openssl not found
。我修正了這一點,但我嘗試加載通過https工作的流,我收到Protocol not found
。此外,我認爲這是奇怪的,在啓用協議列表中配置https被忽略之後。
Enabled protocols:
ffrtmphttp hls mmsh rtmp srtp
file http mmst rtmpt tcp
ftp httpproxy pipe rtp udp
更新2017年4月23日
我OpenSSL的構建腳本:
# environment variables
top_root=$PWD
src_root=${top_root}/src
patch_root=${top_root}/patches
dist_root=${top_root}/libs/openssl
dist_bin_root=${dist_root}/bin
dist_include_root=${dist_root}/include
dist_lib_root=${dist_root}/lib
build_log=${top_root}/openssl_build.log
# create our folder structure
cd ${top_root}
test -d ${src_root} || mkdir -p ${src_root}
test -d ${dist_root} || mkdir -p ${dist_root}
test -d ${dist_bin_root} || mkdir -p ${dist_bin_root}
test -d ${dist_include_root} || mkdir -p ${dist_include_root}
test -d ${dist_lib_root} || mkdir -p ${dist_lib_root}
touch ${build_log}
rm -f ${build_log}
echo "Building openssl-android ..."
test -d ${src_root}/openssl-android || \
git clone https://github.com/guardianproject/openssl-android.git ${src_root}/openssl-android >> ${build_log} 2>&1 || \
die "Couldn't clone openssl-android repository!"
cd ${src_root}/openssl-android
${NDK}/ndk-build >> ${build_log} 2>&1 || die "Couldn't build openssl-android!"
# copy the versioned libraries
#cp -r ${src_root}/openssl-android/libs/armeabi/lib*.so --parents ${dist_lib_root}/.
rsync -a --include '*/' --include '*.so' --exclude '*' ${src_root}/openssl-android/libs/ ${dist_lib_root}/
# copy the executables
#cp -r ${src_root}/openssl-android/libs/armeabi/openssl ${dist_bin_root}/. # work only for one abi folder
rsync -a --include '*/openssl' --exclude '*.so' ${src_root}/openssl-android/libs/ ${dist_bin_root}/
#cp -r ${src_root}/openssl-android/libs/armeabi/ssltest ${dist_bin_root}/. # work only for one abi folder
rsync -a --include '*/ssltest' --exclude '*.so' ${src_root}/openssl-android/libs/ ${dist_bin_root}/
# copy the headers
cp -r ${src_root}/openssl-android/include/* ${dist_include_root}/.
cd ${top_root}
請問感謝任何幫助。
我已經添加了這個標誌'--enable-nonfree'並重新編譯,但是在'Enabled Protocols'列表中https(和其他安全協議)不存在。 我想問你一個關於編譯實際上如何工作的問題。 ffmpeg鏈接到openssl的源代碼並嘗試在自編譯時進行編譯,或者ffmpeg鏈接到靜態(或共享)庫(libssl和libcrypto)? –
還沒有編譯在linux上,所以看https://superuser.com/a/1126696/114058 – Mulvya