標籤:tar.gz img 產品 vedio images ons figure lib 技術分享
項目中使用的一直都是 httpd 2.2.15 用於播放視頻資源,近期有個新產品上線發現快進視頻會出現卡頓情況,因此添加了流媒體模組。(懷疑是新產品中的播放器進行了更改)
原文:http://liuhongjiang.github.io/tech/blog/2015/06/26/apache-vedio-streaming/
安裝mod_h264_streaming
安裝apache httpd的apxs:
yum install httpd-devel
下載模組 並編譯安裝
wget http://h264.code-shop.com/download/apache_mod_h264_streaming-2.2.7.tar.gztar -xzvf apache_mod_h264_streaming-2.2.7.tar.gzcd mod_h264_streaming-2.2.7./configure --with-apxs=‘which apxs‘make && make install
配置apache, 在httpd.conf中添加配置, mod_h264_streaming.so的路徑可能不一樣,可以find 一下
AddType video/mp4 .mp4 .m4vAddType video/ogg .ogvAddType video/webm .webmLoadModule h264_streaming_module /usr/lib64/httpd/modules/mod_h264_streaming.soAddHandler h264-streaming.extensions .mp4
重啟apache. 然後測試
apachectl -t -D DUMP_MODULES 查看是否載入成功,我這已經可以看到了現在載入成功。
httpd 2.2.15 添加流媒體模組