I don't know what best practices are for hosting a video. A YT alternative would work, but I'd prefer not embedding the video on another platform, if possible.

The problem is I don't know how to set it up if it's not on a platform like YT, Vimeo or something similar. I mean, I can host the entire video myself and load it on the homepage, but (I think) that means loading the entire video everytime someone visits?

Sorry if this vague. Not a developor, I make drawing for a living ;)

Reply to this note

Please Login to reply.

Discussion

Yeah this is exactly the problem!

You need a backend that can stream the resources instead of just loading it in one single file.

In my eyes you are having two options:

1. You can use a hosting service that can do this for you pike you are already doing with youtube

Maybe nostr.build is an option (or other). You can upload it there and the add a standalone player to your website which plays the stream after loading the site.

2. You can code your own server which streams the video. You can build such a thing with node.js with like 50 lines of code. You can find plenty of examples on how to do this online.

The down side here is that after coding you have to host this small server code somewhere.

After that you can add a player to your website like in option 1.

If you are not into coding servers I would recommend you option 1. It’s much easier to achieve your goal.

If you watch a YT or Vimeo video, the also that data is loaded to the visitors device (often not entirely at once, but in chunks).

You could have a look at https://stackoverflow.com/questions/36407051/how-to-cache-the-video-on-the-browser-and-used-the-cached-version-every-time-the where the same question is asked :)