I wanted to have my own live stream, where I didn't have to worry about being banned for 183 days just because some copyrighted material appeared on a TV in the background.
So I researched it and found Doug Johnson's video on how to set up your own RTMP streaming server with nginx.
My setup was complicated because my web sites are served by IIS 10. Most of my sites are SSL with HTTPS.
It took a couple years to get streaming working at all. In the beginning, there were numerous technical issues. The stream would stop playing after a short time. Then I fixed that.
Then for the longest time, I wanted to get the stream to be served HTTPS like my main page. Too many people were getting turned away by their browsers "back to safety" buttons. I could not figure out how to secure nginx. But I kept revisiting having nginx write stream .ts files to a directory under the IIS domains. It wrote files, but the viewer wouldn't play them.
Then the other day I had a customer over who had IT expertise and I mentioned it to him. He raised the idea of MIME types. Sure enough, I needed to add .m3u8 MIME type to IIS so it would know how to handle the file. And that made the stream play.
But then the next problem was that the stream got stale. It would play the same 8 seconds over and over again. That turned out to be a browser caching issue. So I disabled caching for the web site at the IIS console and that fixed the issue.
The stream is now embedded in an inline frame on my main homepage. This is how I wanted it for the past 5-1/2 years. Took me a while to solve it, but here it is!

So I researched it and found Doug Johnson's video on how to set up your own RTMP streaming server with nginx.
My setup was complicated because my web sites are served by IIS 10. Most of my sites are SSL with HTTPS.
It took a couple years to get streaming working at all. In the beginning, there were numerous technical issues. The stream would stop playing after a short time. Then I fixed that.
Then for the longest time, I wanted to get the stream to be served HTTPS like my main page. Too many people were getting turned away by their browsers "back to safety" buttons. I could not figure out how to secure nginx. But I kept revisiting having nginx write stream .ts files to a directory under the IIS domains. It wrote files, but the viewer wouldn't play them.
Then the other day I had a customer over who had IT expertise and I mentioned it to him. He raised the idea of MIME types. Sure enough, I needed to add .m3u8 MIME type to IIS so it would know how to handle the file. And that made the stream play.
But then the next problem was that the stream got stale. It would play the same 8 seconds over and over again. That turned out to be a browser caching issue. So I disabled caching for the web site at the IIS console and that fixed the issue.
The stream is now embedded in an inline frame on my main homepage. This is how I wanted it for the past 5-1/2 years. Took me a while to solve it, but here it is!
