Anyone who is working with video (like Laracasts) is using a third party like Vimeo; and even then preventing users from stealing the content is not bulletproof.
How can i encode my videos to make it difficult to steal.
Hi, first of all, I know that it is impossible to 100% block a user from downloading videos that are actually sent to them. But my question is how can I encode my videos in laravel in order to make it a bit difficult to steal?
@iftekhs This has very little to do with Laravel to be honest. The techniques and steps you will use will be the same no matter what back-end language and framework you use.
I’ve ran a video streaming website since 2014. For optimum playback you’re going to want to create what’s called an HLS encoding. This is where the video file is chopped into multiple segments, and usually at different bitrates, so the video can with the least change of buffering. If you’ve ever watched a YouTube video and Netflix video and seen the video pixelate temporarily, that’s because the stream’s switched to a lower bitrate temporarily because of network congestion. It does this so the video can carry on playing—albeit at a lower resolution—rather than stop and buffer.
For protecting the video, you can encrypt these segments. That way, the video will only play if a key can be retrieved from your server. Because your server returns these encryption keys, you can use authentication and authorisation to determine if the user should be allowed to play the video or not (i.e. if it’s behind a subscription paywall).
I’ve worked a lot with video streaming on the web the past 8 years or so now and it’s an area I’m really passionate about. It just so happens that I’m literally in the process of creating a course on building a video streaming website using Laravel! So if it’s something you’re interested in then you can subscribe to a mailing list I’ve created where I’m sending updates on the course: https://www.getrevue.co/profile/martinbean.
If the course is something you’d be interested in, DM me on Twitter and I can send you a discount code for when the course launches (mid-May/early-June). It’ll cover essentially building a Laracasts or Netflix clone where videos can only be watched with an active subscription.
Please or to participate in this conversation.