原文链接:https://blog.csdn.net/qq_26775359/article/details/92784642
1下载obs+nginx
https://download.csdn.net/download/qq_26775359/11246777
下载后解压这两个文件夹
2obs设置直播源
3obs设置nginx服务器推流地址
4.配置nginx.conf
worker_processes 1; error_log logs/error.log info; events { worker_connections 1024; } rtmp { server { listen 1935; application live { live on; } application hls { live on; hls on; hls_path temp/hls; hls_fragment 8s; } } } http { server { listen 8080; location / { root html; } location /stat { rtmp_stat all; rtmp_stat_stylesheet stat.xsl; } location /stat.xsl { root html; } location /hls { #server hls fragments types{ application/vnd.apple.mpegurl m3u8; video/mp2t ts; } alias temp/hls; expires -1; } } }
5.启动RTMP推流服务
—>启动nginx服务:点击nginx.exe启动即可
—>启动推流
6.完成
使用vlc播放器播放obs配置的rtmp://127.0.0.1/live/流名称即可
桌面捕获成功
7.说明
不是所有的nginx版本都可以推拉流,必须是nginx-rtmp版本的.