Skip to content
Advertisement

Laravel Media Storage Best Practice

Sorry if duplicate but I couldn’t find much on web. I am working on website platform for streaming and education. The website needs to handle big files ( mostly videos) and thumbnails. The website is hosted on Azure.

Would it be better to store the media files on azure blob storage or within the public folder inside web app?

I tried both and when I store them inside azure blob storage the videos are taking half a minute to load + you can’t seek the video.

Advertisement

Answer

At present, your big video resource has not been processed and directly let Html play it, so during the loading process, you feel that it is very slow, it feels like it is downloading, but it is not. This is the loading of network transmission. You can check it with F12->Network, or use Fiddler to check.

I have two suggestions.

One is to use Azure Media Services

Using new Services, so that under the same region or resourcegroup, the loading speed should be significantly improved. Because AMS processed all the video uploads.

Advantages (compared with your existing method and the second method below):

  1. It can be played by adapting various stream.
  2. No need to process the video by yourself.

Disadvantages: You need to use new Services, you may need to learn (you only need to understand the video upload process, use the official player, and embed Html code in your php page, so the learning cycle will be very short, half a day. ), new services will be charged extra.

Another one is to process the video in the background encoding.

Two concepts are introduced: block and chunk

Large files() can be processed as needed. And you also can load chunks into html5 video.

It has nothing to do with where the files are stored. For large files, the loading speed is slow and there is little difference.

Related Articles or Posts

1. How to stream large .mp4 files?

2. Video.js download chunk instead of the whole video

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement