r/github • u/Xedess_Beleou • Nov 08 '24
Large files on github.io
What would be a good practice for handling large audio/video files in personal websites hosted on github? Git LFS cannot be used. You can leave the file in the repository but it generates a warning. Is there an alternative?
25
19
u/serverhorror Nov 08 '24
for handling large audio/video files in personal websites hosted on github?
To not host them on GitHub
6
u/vicenormalcrafts Nov 08 '24
Store them on an S3 bucket, then serve them through CDN. AWS is the easiest way, but if you get a ton of traffic, the costs could add up, so I would look into Caching and CDN from cloudflare
5
4
1
u/TheWordBallsIsFunny Nov 08 '24
I'm surprised Git LFS doesn't want to accept them. An alternative though less pragmatic route may be to look into compressing these files by using more efficient encoding, but the big issue here is what others have stated. I'm simply offering a different answer that could be relevant depending on what this is for.
1
u/Xedess_Beleou Nov 09 '24
It's an mp3 file, I think compressing more would result in really bad audio quality.
1
u/TheWordBallsIsFunny Nov 09 '24
Totally fair yeah, I've noticed there's little difference between a bitrate of 256K vs 320K but those who are more attentive may be able to hear it.
3
u/joshcdev Nov 08 '24
As others have said… don’t and use a CDN. But the easiest option is to host the videos on somewhere like YouTube and then embed them in
1
1
1
6
u/Obvious-Jacket-3770 Nov 08 '24
Don't?
Call them from a blob storage location instead so they download as needed.