Matt,
Thanks for the thorough explanation of this process.
I have been streaming video to my students for years, and until last year, I used a Moodle plugin called Poodl. This plugin is very good at what it does in Moodle. Basically, it is a frontend interface for managing the difficult task of which players ought to be used for playing back and recording video and audio. It makes all those tasks kind of invisible so you can get to the main task.
Anyway, I was storing all my videos in moodledata, so the streaming was coming from there. It was true streaming, but it put a high load on the server doing what Matt showed us above.
I investigated other ways, and finally decided to put my videos on Google Drive. I then got the embed code from Google (that's a different story, but once you know how its simple) and put that code in the html portion of the web page resource I created for each student lesson.
The reason I decided on Google drive was because it is a true streaming server for video. I briefly thought about Microsoft OneDrive, but it turns out it doesn't really stream, it progressively downloads. There might be other good streaming servers, but Google operates a great server farm, so downtime is minimal.
Speaking of progressive downloads...Matt, do you know what happens to the data that gets progressively downloaded locally? Is it saved on the hard drive or into RAM memory? If hard drive, how does it get purged? I have always wondered about that.
Anyway, Google Drive allows different ways for those requesting the videos to view them. One way makes the video public, so anyone can discover them. Another way is that the videos can be watched by anyone with the link. That's what I chose. A third option would be anyone with a password can view them, but I didn't choose that because I figured that since those with the link are already authenticated as my students, there didn't need to be another layer of security. On that note, Moodle doesn't allow someone to right click on the link and download a private copy, so I am protected there also.