# MyLiveVideo **Repository Path**: GodD6366/MyLiveVideo ## Basic Information - **Project Name**: MyLiveVideo - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2018-01-03 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # MyLiveVideo >各种直播协议介绍 http://blog.csdn.net/tttyd/article/details/12032357/ ### 服务器搭建 1. 下载nginx-rtmp-module ```bash git clone https://github.com/arut/nginx-rtmp-module.git ``` 2. 下载nginx ```bash wget http://nginx.org/download/nginx-1.9.15.tar.gz tar -zxvf nginx-1.9.15.tar.gz cd nginx-1.9.15 ./configure --prefix=/usr/local/nginx --add-module=../nginx-rtmp-module --with-http_ssl_module make && make install ``` 3.安装时候可能会报错没有安装openssl或者'checking for C compiler ... not found' ```bash #安装c yum install gcc gcc-c++ kernel-devel #安装 yum -y install openssl openssl-devel ``` 4.修改nginx配置 ```bash #vi /usr/local/nginx/conf/nginx.conf #添加推流服务器 rtmp { server { listen 1935; #监听端口 chunk_size 4000; application hls { #rtmp推流路径 live on; hls on; hls_path /usr/share/nginx/html/hls; #需要读写权限 chmod 777 hls_fragment 5s; } } } #在http模块中添加关看服务器 server { listen 81; server_name localhost; #charset koi8-r; #access_log logs/host.access.log main; location / { root /usr/share/nginx/html; index index.html index.htm; } #error_page 404 /404.html; # redirect server error pages to the static page /50x.html #error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } } ```