Had a breakthrough this evening.... I changed the nginx.conf to point to a folder within my web site's folders, and then I change the html for the page displaying the player to hls.loadSource('hls/.m3u8'); I deleted 'stream' from 'stream.m3u8'.
When I refreshed the browser, I see the stream.
Now the problem is the stream plays for about 30 seconds and then stops and displays a circular animation, like a buffering indicator. Inching closer, but hitting roadblocks at every turn..
I measured the time. Stream stops and begins buffering at precisely 30 seconds and is repeatable with each browser refresh. Watching closely, with the time slider visible, I see the duration is 31 seconds and the current time indicator is moving like it's playing a pre-recorded video, rather than a live stream.
This is my current nginx.conf:
Code:
worker_processes 1;
error_log logs/error.log debug;
events {
worker_connections 1024;
}
rtmp {
server {
listen 1935;
application live {
live on;
}
application hls {
live on;
hls on;
hls_path D:\inetpub\wwwroot\mwprovideo\hls;
hls_fragment 8s;
}
}
}
http {
server {
listen 8080;
location / {
root www;
}
location /stat {
rtmp_stat all;
rtmp_stat_stylesheet stat.xsl;
}
location /stat.xsl {
root www;
}
location /hls {
#server hls fragments
types{
application/vnd.apple.mpegurl m3u8;
video/mp2t ts;
}
alias temp/hls;
expires -1;
}
}
}
If the fragment size is 8 seconds, why is the chunk playing for 30 seconds and stopping?
I suspect it's the .m3u8 file is not dynamically loading and updating:
Here's what's in it at the particular instant in time:
Code:
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:187
#EXT-X-TARGETDURATION:10
#EXTINF:10.427,
-187.ts
#EXTINF:10.428,
-188.ts
#EXTINF:10.427,
-189.ts
It's loading three recently written transport streams. That probably totals 30 seconds. Once they play, the player has reached the end of that playlist and has to be manually refreshed.
Question is how to make this dynamicly refreshing?
Apparently, it's not really a "live" stream.. I changed the content of what I'm streaming from OBS and when I refresh the web browser, I'm seeing the same old video from 30 minutes ago. So it's playing an old transport stream, not the current stuff coming out of OBS.