如何搭建一个属于自己的直播平台 编译问题总结
2016-09-26 11:34
519 查看
1. 如何搭建一个属于自己的直播平台 参考 http://www.open-open.com/lib/view/open1473231814360.html
nginx.conf 配置如下,
player.html里面,改为 newplayer({"stream_url": "hls/life.m3u8","poster":"hls/poster.jpg"}); 这样就可以直播 hls里面的m3u8文件了,http://localhost:8080/player.html
2. nginx build on cygwin
运行时出现"the maximum number of files supported by select() is 64", 问题解决参考http://powertech.iteye.com/blog/2126745
这表示FD_SETSIZE的值比nginx配置文件中worker_connections指令所指定的值,加了--with-cc-opt=”-D FD_SETSIZE=4096”后就不会碰到这问题
3. ffmpeg build
build过程参考http://blog.csdn.net/zmlcool/article/details/8141097
a. Builing ffmpeg with libx264 enabled on cygwin, 参考http://stackoverflow.com/questions/4779040/builing-ffmpeg-with-libx264-enabled-on-cygwin
加上 --extra-ldflags="-L /usr/local/lib", 在运行configure的时候。
./configure --extra-ldflags="-L /usr/local/lib" --enable-libx264 --enable-libmp3lame --enable-libfaac --enable-gpl --enable-nonfree
b. build mp3lame
configure: error: cannot guess build type; you must specify one
解决办法:http://stackoverflow.com/questions/4810996/how-to-resolve-configure-guessing-build-type-failure
search for /usr/share/automake*/config.guess
check the latest version of automake
$ which automake
$ automake --version
find the appropriate automake folder in /usr/share/automake.1.11.1/config.guess
replace config.guess from your build tree with /usr/share/automake.1.11.1/config.guess
(The same may/is usually needed for config.sub.)
nginx.conf 配置如下,
#user nobody; worker_processes 1; #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/nginx.pid; events { worker_connections 1024; } rtmp { server { listen 1935; chunk_size 4000; # HLS application hls { live on; hls on; hls_path /tmp/hls; } # MPEG-DASH is similar to HLS application dash { live on; dash on; dash_path /tmp/dash; } } } # HTTP can be used for accessing RTMP stats http { server { listen 8080; #location / { # index index.html; # root /usr/local/nginx/html; #} # This URL provides RTMP statistics in XML #location /stat { #rtmp_stat all; # Use this stylesheet to view XML as web page # in browser #rtmp_stat_stylesheet stat.xsl; #} #location /stat.xsl { # XML stylesheet to view RTMP stats. # Copy stat.xsl wherever you want # and put the full directory path here #root /path/to/stat.xsl/; #} location /hls { # Serve HLS fragments types { application/vnd.apple.mpegurl m3u8; video/mp2t ts; } root /tmp; add_header Cache-Control no-cache; } location /dash { # Serve DASH fragments root /tmp; add_header Cache-Control no-cache; } } }
player.html里面,改为 newplayer({"stream_url": "hls/life.m3u8","poster":"hls/poster.jpg"}); 这样就可以直播 hls里面的m3u8文件了,http://localhost:8080/player.html
2. nginx build on cygwin
运行时出现"the maximum number of files supported by select() is 64", 问题解决参考http://powertech.iteye.com/blog/2126745
这表示FD_SETSIZE的值比nginx配置文件中worker_connections指令所指定的值,加了--with-cc-opt=”-D FD_SETSIZE=4096”后就不会碰到这问题
3. ffmpeg build
build过程参考http://blog.csdn.net/zmlcool/article/details/8141097
a. Builing ffmpeg with libx264 enabled on cygwin, 参考http://stackoverflow.com/questions/4779040/builing-ffmpeg-with-libx264-enabled-on-cygwin
加上 --extra-ldflags="-L /usr/local/lib", 在运行configure的时候。
./configure --extra-ldflags="-L /usr/local/lib" --enable-libx264 --enable-libmp3lame --enable-libfaac --enable-gpl --enable-nonfree
b. build mp3lame
configure: error: cannot guess build type; you must specify one
解决办法:http://stackoverflow.com/questions/4810996/how-to-resolve-configure-guessing-build-type-failure
search for /usr/share/automake*/config.guess
check the latest version of automake
$ which automake
$ automake --version
find the appropriate automake folder in /usr/share/automake.1.11.1/config.guess
replace config.guess from your build tree with /usr/share/automake.1.11.1/config.guess
(The same may/is usually needed for config.sub.)
相关文章推荐
- 如何搭建一个属于自己的直播平台?
- 直播源码如何搭建一个属于自己的直播平台?
- 如何搭建一个属于自己的直播平台?
- 如何搭建一个数据库服务器平台
- [软件工程] 如何搭建和管理好一个完善的开发平台
- redhat下搭建交叉编译环境一个问题
- 如何快速构建一个美女主播网站(来自知乎一个关于 webRTC 是否适合直播问题的讨论)
- 如何使用免费餐饮收银管理系统搭建一个外卖订餐平台网站?
- redhat下搭建交叉编译环境一个问题
- 如何解决SUSE平台python编译问题“Failed to build these modules: _curses_panel”
- 在Linux平台下如何编译一个C++工程
- 如何搭建Flash P2P网络直播点播平台
- sublime搭建Java编译平台及编码问题
- 如何搭建一个数据库服务器平台
- 如何搭建一个互联网的赢利平台?
- Eclipse3.3+CDT4.0.3+MinGW5.1.4搭建C/C++开发平台问题总结
- 如何搭建一个数据库服务器平台
- 基于Linux搭建一个类似Qik手机录像直播平台(服务器端:feng streaming server + web server,客户端:Android手机应用)
- sublime搭建Java编译平台及编码问题
- 总结sublime c++编译环境搭建 | 中文乱码问题解决方案 |sidebar配置 |sublime最佳插件列表|最佳主题方案