1
I have a server, and inside it I store videos that are displayed through. However, if people get the video link from Inspect Element they can download the video. Is there any way I block downloading files? Just viewing the video.
1
I have a server, and inside it I store videos that are displayed through. However, if people get the video link from Inspect Element they can download the video. Is there any way I block downloading files? Just viewing the video.
5
Yes, it is possible.
One of the most efficient ways is to use DRM
for the protection of videos.
As there is no precise description of what is the DRM (Digital Rights Management)
, some people separate it into 4 elements.
Manageable digital rights allow extensive negotiation of your content, this includes purchases, rentals etc. Be via streamming or even downloads (As is the case with platforms that already offer videos offline). With them you can determine who has authorization to access certain content.
This is where the technology of DRM
do to protect your content. This encryption may occur before or during the streamming. And, of course, before the download.
This way only those who have the access key will be able to view the content.
In this area the DRM
are in charge of verifying the user’s access keys and devices.
In this element, the player is responsible for communicating with the server responsible for managing the keys.
Some browsers use the API Javascript Media Source Extensions MSE and the extension Encrypted Media Extensions EME
This API is responsible for managing the flow for segment transmission¹.
To MSE
will support you for a adaptive transmission², Splicing Adaptive, Time Change, Performance Control and Download Size.
The operation is very simple:
audio
or video
of HTML5.To EME is an extension recommended by W3C, Her proposal, roughly speaking, is to extend the Htmlmediaelement to provide some Apis to control the reproduction of encrypted content.
For technical information I recommend gives a read on the proposal Encrypted Media Extensions
The operation can be summarized in the steps below (for protection before the streaming):
Abridged:
Detailed:
Usually people use the HTTP Live Streaming of Apple or MPEG-DASH. In this option you can use the Bento4 for that function.
It depends on your content. If you really want it, it’s worth it.
As I was writing this reply, a user commented on the user filming the content. Is this really going to happen? The answer is simple, it will happen.
However, in a post about Video Technologies, Wesley William cited the fact that the people were there until he could record. But will the people really be willing to record and play on the net? In the case of School Of Net, I believe that the pinch has greatly diminished.
One comment refers to this. The user informed that before the protection could download, after it, it was no longer possible.
An alternative is to use watermark in videos (example, can be generated automatically with ffmpeg, but there is a data processing cost to do this.
Links that were not cited from the answer and that I find interesting to read
Note 1: These segments are multiple "pieces" of the video. This improves loading performance. Technical information can be found in that article.
Note 2: Adaptive transmission is the way the player will adapt depending on the device or network. That is, if the connection is bad, the video quality is affected.
There is another way to do this too, for free. You can inform the server to allow access to a particular file only if the useragent
is the same as "Playerdrm" or you can check if the request has ended header
. This will only work for those who do not understand how the web works, depending on your target audience, can test. If necessary I can add another answer.
+1. I think like this: If the content is relevant to being stored or distributed, no matter the protection, the user will find a way. Otherwise, if the interest is minimal in saving the video and the user can’t, he won’t even waste time trying to record, then in theory it would be effective, but if his interest is so low, I see no reason to waste a lot of time doing all this implementation.
@Raizant as I do not know the content of it I will take some platforms I know. Alura, for example, put 15 videos-classes 12 mins/ each. Very few people would be willing to record content just to play online. They have dozens of courses. That would be very tiring. The content may be interesting, but soon, the guy will get tired of doing it. Now he has to ask himself about the costs, if it really goes down to the content of it. Even, he can choose to use services such as https://safestream.com/#video that adds a watermark c/ Infos in the video.
Browser other questions tagged php
You are not signed in. Login or sign up in order to post.
In the end no matter what method you use, if the user really wants to save the video, he just shoots the screen. That’s all time thrown away.
– Raizant