一、問題描述
- 使用ffmpeg通過url下載視頻時(shí)出現(xiàn)如下報(bào)錯(cuò):
os.system("ffmpeg -i \"{}\" -q 2 {}".format(cur_url, sv_path)) # 下載視頻 -q2為原始
二、問題分析
- 從提示信息可以判斷,下載失敗與openssl有關(guān),所以需要進(jìn)行相關(guān)的配置;
- 同時(shí)需要對ffmpeg進(jìn)行重新安裝;
三、問題解決
2.1 安裝并開啟openssl
apt install openssh-server
server ssh start
server ssh status
2.2 ffmpeg進(jìn)行openssl有關(guān)配置及安裝
1、在指定ffmpeg安裝路徑時(shí),帶上–enable-openssl
cd ffmpeg-3.4.9
./configure --enable-shared --enable-openssl --prefix=/usr/local/ffmpeg
2、如果你是ubuntu,請確保安裝了libssl-dev
sudo apt-get install libssl-dev
3、安裝
make
make install
4、動態(tài)鏈接庫
使用vi打開配置文件
vi /etc/ld.so.conf
添加以下內(nèi)容:
/usr/local/ffmpeg/lib
保存并退出vim,然后執(zhí)行:
ldconfig
5、為 ffmpeg 加入環(huán)境變量
首先打開配置文件:
vi /etc/profile
在文件最后添加環(huán)境變量PATH:
export PATH=$PATH:/usr/local/ffmpeg/bin
保存并退出vim
注;如果已經(jīng)有了export PATH=$PATH:/usr/local/ffmpeg/bin,就不需要重復(fù)添加了。
6、使修改立即生效
source /etc/profile
7、檢查版本
ffmpeg -version
版本顯示:文章來源:http://www.zghlxwxcb.cn/news/detail-600061.html
文章來源地址http://www.zghlxwxcb.cn/news/detail-600061.html
參考文獻(xiàn)
- https://blog.csdn.net/wjinjie/article/details/125876247
- http://cn.voidcc.com/question/p-wleojnwt-ph.html
到了這里,關(guān)于https protocol not found, recompile FFmpeg with openssl, gnutls or securetransport enabled.問題解決的文章就介紹完了。如果您還想了解更多內(nèi)容,請?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!