[英]how to play nginx & rtmp based hls live stream on a remote machine
我已经在 ubuntu 机器上安装了 nginx、rtmp 和基于 ffmpeg 的 hls 直播。 我用这个命令来 stream hls
sudo ffmpeg -re -i sample.mp4 -vcodec libx264 -vprofile high -g 30 -acodec aac -strict -2 -f flv rtmp://localhost/show/stream2
当我尝试在同一台机器上使用以下命令使用 VLC 播放此 stream 时,效果很好。
http://myIp:8080/hls/stream2.m3u8
要么
http://localhost:8080/hls/stream2.m3u8
但是,当我尝试从连接到同一 WIFI 的远程计算机访问时,无法播放。 VLC 给出无法播放文件的错误。
这个问题的解决方案必须在两个地方 1. 在 ufw 中打开端口 2. 在家庭路由器中启用 ping
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.