安裝ffmpeg及nginx模塊


安裝ffmpeg:

下載文件

wget http://ffmpeg.org/releases/ffmpeg-1.0.1.tar.gz

tar -xf ffmpeg-1.0.1.tar.gz

cd ffmpeg-1.0.1

./configure

顯示錯誤:

[root@tester ffmpeg-1.0.1]# ./configure
yasm not found, use --disable-yasm for a crippled build
If you think configure made a mistake, make sure you are using the latest
version from Git.  If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solving the problem.

yum install yasm

然后再編譯

./make

./make install

安裝libx264

http://www.cnblogs.com/MikeZhang/archive/2012/07/21/installFFmpegFromSourceCode.html

http://zhidao.baidu.com/question/192172258.html

nginx和nginx_mod_h264_streaming模塊

安裝這個模塊的目的是讓視頻可以在線播放,否則視頻就只能下載下來才能看了

下載nginx-1.2.6和nginx_mod_h264_streaming源碼

./configure --add-module=/XXXX/nginx_mod_h264_streaming/

./make

make的時候可能會出現錯誤:

In file included from /root/software/nginx_mod_h264_streaming-2.2.7//src/ngx_http_h264_streaming_module.c:2:
/root/software/nginx_mod_h264_streaming-2.2.7//src/ngx_http_streaming_module.c: In function ‘ngx_streaming_handler’:
/root/software/nginx_mod_h264_streaming-2.2.7//src/ngx_http_streaming_module.c:158: error: ‘ngx_http_request_t’ has no member named ‘zero_in_uri’
make[1]: *** [objs/addon/src/ngx_http_h264_streaming_module.o] Error 1
make[1]: Leaving directory `/root/software/nginx-1.2.6'
make: *** [build] Error 2

解決方法:

注釋掉nginx_mod_h264_streaming-2.2.7/src/ngx_http_streaming_module.c的158到161行

http://lxneng.com/posts/160

然后重新make,make install就安裝成功了


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM