[Cannot Reproduce] After initiating the stream, HLS cannot be played in VLC or SRS-Play.
Closed this issue · 4 comments
ptsx0607 commented
Configuration:
listen 1935;
max_connections 1000;
daemon off;
srs_log_tank console;
http_server {
enabled on;
listen 8080;
dir ./objs/nginx/html;
}
http_api {
enabled on;
listen 1985;
}
stats {
network 0;
}
vhost __defaultVhost__ {
hls {
enabled on;
hls_path ./objs/nginx/html;
hls_fragment 3;
hls_window 10;
}
}
Streaming:
ffmpeg -rtsp_transport tcp -i "rtsp://xxx/ch1/main/av_stream" -vcodec h264 -acodec aac -f flv "rtmp://xxxx:1935/live/BF0009"
Outcome:
- After entering http://xxxxx:8080/live/BF0009.m3u8 in the browser, the file can be downloaded, but it cannot be played by VLC or SRS Player.
- The file content is as follows:
#EXTM3U #EXT-X-STREAM-INF:BANDWIDTH=1,AVERAGE-BANDWIDTH=1 /live/BF0009.m3u8?hls_ctx=0011vle4
TRANS_BY_GPT4
suzp1984 commented
Post the srs logs here.
whytolearn commented
hi, the fail reson is 1. "vhost defaultVhost" should be __defaultVhost__ . 2. please in vhost add http_remux { enabled on; mount [vhost]/[app]/[stream].flv; }
can work conf is
listen 1935;
max_connections 1000;
daemon off;
srs_log_tank console;
http_server {
enabled on;
listen 8080;
dir ./objs/nginx/html;
}
http_api {
enabled on;
listen 1985;
}
stats {
network 0;
}
vhost __defaultVhost__ {
hls {
enabled on;
hls_path ./objs/nginx/html;
hls_fragment 3;
hls_window 10;
}
http_remux {
enabled on;
mount [vhost]/[app]/[stream].flv;
}
}
and in conf flod have some example, may be help
winlinvip commented
I tested with:
- SRS 7.0.102 running with HLS enabled and hls_ctx on (default)
- FFmpeg publishing a test stream to rtmp://localhost/live/test
- VLC player opening http://localhost:8080/live/test.m3u8
Result: VLC works perfectly.
winlinvip commented
I cannot reproduce it over a month, so I need to close it. Please let me know if you know exactly how to reproduce it.