在Linux上搭建RTMP服务器,可以采用以下两种方法:
sudo apt-get install nginx libnginx-mod-rtmp
sudo yum install epel-release
sudo yum install nginx nginx-mod-rtmp
/etc/nginx/nginx.conf
或/usr/local/nginx/conf/nginx.conf
。rtmp {
server {
listen 1935;
chunk_size 4096;
application live {
live on;
record off;
}
}
}
sudo service nginx start
sudo service nginx-rtmp-module start
sudo systemctl start nginx
sudo systemctl start nginx-rtmp-module
sudo apt-get install OBS Studio
rtmp://your_server_ip/live
。以上就是在Linux上搭建RTMP服务器的两种方法。可以根据实际需求选择适合的方法进行操作。
亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>
推荐阅读:用PHP搭建RTMP服务器的方法