Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

TheFriendlyHacker's avatar

Best way to stream video in Laravel

I am relatively new to the world of streaming videos from PHP. I am wondering what, in Laravel, is the best way to start a video stream. Obviously, I wouldn't want to just send an entire video all at once, since that would take an incredibly long time to load.

Could I get some tips/pointers to help me get stated?

0 likes
7 replies
topvillas's avatar

Don't. That's why YouTube and Vimeo exist. The bandwidth cost for streaming videos will be astronomical.

TheFriendlyHacker's avatar

@topvillas I understand. However, I would still like to learn how it works and build some implementations of my own.

2 likes
shohagmonzur's avatar
  1. Video trancoder for videos to make in ffmpeg for various resolution.
  2. Upload that videos to any kind of s3 storage server
  3. link that video files to your video player.
  4. Use CDN for the s3 files for seamless streaming.
fylzero's avatar

@shohagmonzur Why would you need s3 AND a CDN? Are you referring specifically to Cloudfront?

@thefriendlyhacker Also... when you say "streaming" are you referring to merely playing video? ...or what streaming actually means, which is live streaming video? For playing videos, you'll want a CDN... Vimeo is technically a CDN and a very good one for video. Laracasts uses Vimeo for its video player / video hosting. Many CDNs provider their own video player. Limelight is another one I've seen used.

26 likes
shohagmonzur's avatar

@fylzero Yes Cloudfront for edge location and regional caching and i provide the solution for independent & self-hosted streaming application.Not rely to any other third party players like vimeo.

Please or to participate in this conversation.