I guess I'll take a stab at your questions.
1. YouTube uses the .flv format, so how did they get this to work with Roku?
YouTube also has the videos in mp4 format. I assume the YouTube channel is using that format.
2. After looking through the examples, I can see how to hardcode each file individually, but what if I want it to just read a directory and create the links automatically?
The usual way to do this is to create an xml file on your server from the directory and request that from the Roku.
3. Does anybody have an example of my #2 question so I can see it in action?
The examples from the SDK have examples of xml usage.
4. How can I create a link for an upcoming event that would be streaming live and can that be automated as well or would that need to be hardcoded?
Again, an xml file with the information that your app on the Roku requests when it starts, or periodically, would accomplish this. You can request any kind of file from your server, so you don't have to use xml, but since there is a nice interface to parse xml as part of the SDK, it's just convenient to use xml. If you're planning on using HTTP Live Streaming for this, then just having a link to the m3u8 file that you can pass to the video player should be enough.
-JT
Roku Community Streaming Expert
Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.
I am not a Roku employee.