2015-07-20 445 views
5

如果我喂urlhttp,比如這個:的ffmpeg通過https失敗

ffmpeg -i http://vjs.zencdn.net/v/oceans.mp4 videojs.mp4 

它完美。然而,當我喂urlhttps,比如這個:

ffmpeg -i https://s3-us-west-2.amazonaws.com/bucket/check.mp4 video.mp4 

這給了我一個錯誤:

https protocol not found, recompile FFmpeg with openssl, gnutls, or securetransport enabled. https://s3-us-west-2.amazonaws.com/bucket/check.mp4 : Protocol not found

我應該怎麼做,以啓用HTTPS?

回答

6

答案可以在錯誤消息中找到。

Recompile FFmpeg with openssl, ...

因此,重新編譯ffmpeg與所需的依賴關係。 您可以閱讀更多關於here的流程,並在步驟./configure期間,只需添加--with-openssl即可。

請確保您已經安裝了這些包:build-essentialopenssllibssl-dev

在你說你正在使用Ubuntu,所以你可以很容易地安裝使用apt-get install這些軟件包的意見。

安裝完成後,您可以執行ffmpeg -protocols以確保您在此處列出了https

順便說一句,您的視頻(在AWS),可以通過http協議訪問。

+0

是的,我要如何安裝呢?我在一個virtualbox裏面使用了ubuntu,但不是很擅長。請問你好嗎? – Robin

+0

當然。請檢查更新後的答案。 – vitozev

+0

對不起,但它仍然顯示相同的錯誤。 – Robin

10

截至2015年9月,此問題的正確答案是 ./configure --enable-openssl如果您有ubuntu,請確保您的sudo apt-get install libssl-dev

+0

任何想法如何做到這一點openwrt? –

+1

@owengerig'opkg install openssl-util'?也許它是'libopenssl'? – Teque5

+0

這兩個都已安裝,但https未列爲協議,錯誤相同。 ID認爲我需要改變一個配置或用opensll重建 –

5

Add --enable-openssl to the ./configure line

--with-openssl目前無法正常工作。

這是我的整條生產線:

$ ./configure --prefix="$HOME/scr1/ffmpeg_build" --extra-cflags="- 
I$HOME/scr1/ffmpeg_build/include" --extra-ldflags="- 
L$HOME/scr1/ffmpeg_build/lib" --bindir="$HOME/scr1/bin" --pkg-config- 
flags="--static" --enable-gpl --enable-nonfree --enable-libfdk-aac -- 
enable-libfreetype --enable-libmp3lame --enable-libopus --enable- 
libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-openssl