python3 6使用ffmpeg採坑記

2021-10-05 08:09:20 字數 744 閱讀 4161

ffmpeg原本是乙個命令列工具,只是通過python封裝好的api來執行,所以還是要在你本地安裝ffmpeg的工具包,所以python下安裝ffmpeg分兩步:

1、 sudo pip3 install ffmpeg-python

2、安裝最新版的ffmpeg,一定要最新的版本,不然會出現各種奇怪的問題。

tar -xvf xz解壓後生成的檔案

進入解壓完的資料夾,執行 ./ffmpeg,驗證是否成功

(3)進入/usr/bin下,建立軟連線

ln -s 你剛剛解壓的ffmpeg資料夾的路徑/ffmpeg ffmpeg

ln -s 你剛剛解壓的ffmpeg資料夾的路徑/ffprobe ffprobe

至此,就可以在任何位置使用ffmpeg了。如果/usr/bin 中原來已經已經有了ffmpeg和ffprobe,則將原來的備份並刪除,然後建立你剛剛安裝的ffmpeg的軟連線。

python36無法使用xfeatures2d

報錯 213 the function feature is not implemented this algorithm is patented and is excluded in this configuration set opencv enable nonfree cmake option...

使用Python3 6做文字切割

hi 使用 python 對乙個大檔案按照行數進行切割 coding utf 8 import os python 幹起活來 是真的慢 def split fromfile,todir,linenum 如果我資料夾不存在,則建立 if not os.path.exists todir os.mkdi...

python3 6 爬蟲例子

importurllib.request importre importos importurllib.erroraserror url 請求 request urllib.request.request url 爬取結果 response urllib.request.urlopen reques...