How to protect a video from being downloaded in html?

If someone adds a video to a webpage using the video tag you can find its link in the source code of the webpage very easily and download it. But websites like netflix, lynda, hulo, youtube, vimeo, dailymotion etc somehow manage to prevent you from being able to do it. How do they do it? How can I do it? I tried googling but didn’t find anything useful. Can anyone help?

P.S I would like a client-side solution so if possible no php, perl, ruby etc

If you want to do it on the client side only you only can make it harder but never impossible because file is always downloaded to hard drive. You would need to use streaming server for the real protection. Of course it still could be stolen via stream capturing software.

1 Like

streaming server? what is that?

It is basically an application running on the server. I’m not an expert on that I just know the general idea. The server sends a stream of data to the client. The client needs an app with a codec to decode the stream of data and output audio or video. It never stores the files on your computer and that’s why it’s harder to steal. Also you mentioned Youtube as an example of a service that particularly protect their content. They actually don’t. There are plenty of apps that let you download their vids. They probably encrypt their videos so it would not be that easy to download and watch but to be honest I never checked if this is true. I think that legal consequences may be more discouraging than technical obstacles. If you decide to steal from Youtube and get caught their lawyers wil eat you alive :yum: