直播如今是一个老生常谈的问题,怎么用于直播,大多数人只晓得,大佬某平台直播软件,点击开始即可直播。那么如何来搭建一个简易的直播平台呢?仅仅是有直播功能,没有涉及转码以及播放软件。
安装nginx以及rtmp模块root@cby:~# apt install nginxroot@cby:~# apt install libnginx-mod-rtmp修改配置以支持rtmproot@cby:~# vim /etc/nginx/nginx.confrtmp {server {listen 1935;chunk_size 4096;application live {live on;}}}检查是否有报错root@cby:~# nginx -tnginx: the configuration file /etc/nginx/nginx.conf syntax is oknginx: configuration file /etc/nginx/nginx.conf test is successfulroot@cby:~# 重启nginxroot@cby:~# systemctl restart nginx
使用obs直播工具进行推流操作
rtmp://<你的域名或者IP>:1935/live
使用vlc拉流播放
查看效果
/
/
https://cby-chen.github.io/
/u/5982474121
/qq_33921750
/u/3981543
/people/chen-bu-yun-2
/u/hppyvyv6/articles
/user/331578280248
/352476552/article
/developer/column/93230
/u/0f894314ae2c
/c/user/token/MS4wLjABAAAAeqOrhjsoRZSj7iBJbjLJyMwYT5D0mLOgCoo4pEmpr4A/
CSDN、GitHub、知乎、开源中国、思否、掘金、简书、腾讯云、哔哩哔哩、今日头条、新浪微博、个人博客、全网可搜《小陈运维》