How does youtube prevent video from being downloaded from their HTML5 player?

html, html5-video, javascript, video, youtube

Solution

As I found on Quora:

The videos posted on YouTube are first encrypted with 128- bit SSL encryption, which is very tough to crack. Also, for longer clips the software breaks up each file into many URLs with unique addresses, which makes it impossible to download the video in one go.This also helps the software to better detect when the video is being downloaded and the identity of the person downloading the video since each URL is uniquely generated.

Also to get to know more about how to break the video into parts check for adaptive streaming formats such as `HLS` and `DASH`. Also recommend you to check for `HLS Streaming` with the file extension of `.m3u8`.

Also there are companies has services that known as Video on Demand(VoD) that would help you.

If you need a player for your videos I recommend VideoJs which is open source and in my opinion very powerful.

Problem

I'm writing a video player in HTML5. I tried to see what Youtube was doing to prevent somebody from just grabbing the source (ie: the `.src` URL) and then downloading the video file, but it does not seem to be visible. So how do they do it? Have people found a way around it? Is it some complicated DRM implementation?

Original source

Related problems