Join 1M+ other developers and:
- Get help and share knowledge in Q&A
- Subscribe to topics of interest
- Get courses & tools that help you grow as a developer or small business owner
Managing large video / audio file uploads and streaming (Laravel project)
maybe someone can point me in the right direction. I have developed a Laravel PHP project which allows people to upload and watch large video files (as well as audio files). Those files are confident and specific to a group of users, i.e. they shall not be publicly accessible. For now, the PHP code takes care of the permissions as to who can upload a video for which group and who can watch a video. It’s also important that those videos can be streamed in a speedy fashion for the users who are authorized to watch them.
If I think about the traditional way, managing such files requires me to e.g. offer a “resume upload” function, ideally converting the file to the best format (MP4 or such) to conserve storage space, then storing the file in a file directory under a unique name, and finally offering it for download or viewing in the authorized user’s browser. But I’m not sure if this will scale and it seems very old school to handle it all in PHP.
I heard about Azure Media Services which might help with handling such large video files but I would like to try something like this on DO first (sensing better documentation and community support since I’m new to all this).
Here are my specific questions:
- Which DO file storage can be recommended for storing and accessing large video files (several GB per file and easily quite a few TB overall)?
- How can end users upload new videos to that storage? I would assume that they log in to my PHP app, and then start uploading from there (do I need to build in upload resume functions in case of network interruptions?). In the background, the file gets a unique name and is being sent to storage or (ideally) gets processed first into a uniform video file format (such as MP4 or something)…?
- Is the server-side handling of uploads a potential issue due to network bottlenecks or other limitations? How can I make sure that several users can upload large videos at the same time?
- Accordingly, how do I deliver files for streaming through my app?
Ideally, I would like to use an endpoint which takes care of uploads (including resuming of uploads), compilation of the video files, naming them in a unique fashion, storing them, and streaming them. The only info I would require is the name of the file and a URL that can be given to the authorized user to watch the video.
Many thanks in advance!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×