[英]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.