简体   繁体   中英

how to play nginx & rtmp based hls live stream on a remote machine

I have installed nginx, rtmp and ffmpeg based hls live streaming working on ubuntu machine. I use this command to stream hls

sudo ffmpeg -re -i sample.mp4 -vcodec libx264 -vprofile high -g 30 -acodec aac -strict -2 -f flv rtmp://localhost/show/stream2

when I try to play this stream using VLC using following commands on the same machine it works well.

http://myIp:8080/hls/stream2.m3u8

or

http://localhost:8080/hls/stream2.m3u8

However when I try to access from remote computer connected to same WIFI, not able to play. VLC gives an error that unable to play the file.

Solution to this problem has to be in two places 1. open ports in ufw 2. enable pings in home router

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM