How to disable video/audio downloading in web pages?
Asked Answered
T

3

3

I have a website that I put my videos/audios on it. I use HTML5 and tag to show videos. But videos/audios can be downloaded if client opens view source page and then copy the file address. How can I disable downloading these files, I just want client to see videos/hear audios in the web page.

Many online video/audio services like Youtube disabled downloading videos by this way. How they did that? What is a working way to disable, or at least make this progress much harder?

Taciturnity answered 2/5, 2016 at 16:57 Comment(1)
#1295001 see thisBlaubok
V
7

Youtube encodes their video into the MPEG-DASH format, which plays back through byte streams via the browser's implementation of the Media Source Extensions API. See See more on Wikipedia.

You can do the same by encoding your video into MPEG-DASH files, then playing it back in your code through a library like dash.js. Watch how the dash.js player works live by checking out the DASH Reference Client.

I've encoded MPEG-DASH video using Sorenson Squeeze, but there are other encoders you could use.

And just to clarify... this will make downloading more difficult... but will NOT provide a real DRM solution. For that you need to check out EME.

Vivi answered 5/5, 2016 at 22:5 Comment(1)
Are EME and things like Azure Media Services secure? Or can someone always download and distribute video/audio if they really want to?Douglassdougy
G
2

MPEG-DASH seems like a nice solution but is definitely not perfect. There are many ways to bypass this and still being able to download the video. On the other hand putting a lot of effort in protection might not be worth it since people can always make screen recordings etc.

But if you still want to go for a more secure option you can try using Encrypted Media Extensions i.e. with Amazon s3 cloud.

Goraud answered 7/4, 2018 at 15:7 Comment(0)
D
0

In my opinion best solution may use CORS and api for return the audio or videos, it allows only requests from your domain or specific domain or boyend with API speacfic countries or cities domains using IP ranges

Din answered 28/1, 2024 at 3:31 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.