kylegilman / video-embed-thumbnail-generator

A WordPress plugin that generates thumbnails, HTML5-compliant videos, and embed codes for locally hosted videos. Requires FFMPEG or LIBAV for encoding.
http://wordpress.org/plugins/video-embed-thumbnail-generator/
GNU General Public License v2.0
48 stars 27 forks source link

Protecting video from downloading #369

Open sigaev-pro opened 7 years ago

sigaev-pro commented 7 years ago

Hi!

I'm building a video blog which can be accessed for registered users only, and I want something, what can prevent my videos from downloading by users. I understand, that anything, what user seen on him screen can be captured and it is no 100% solution, but is it a way to have some protection layer?

kylegilman commented 7 years ago

At the moment I don’t have any system for obscuring file URLs. I’m hoping to support token-based authentication for video URLs in the future, but I have a lot to learn about it before I can implement it. It’s also possible to keep the video files in a non-web-accessible folder and stream video playback through PHP, which I believe is what this plugin does. But that takes up a lot of system resources and I can’t figure out if it’s actually worth doing. Tokenization seems like a better, more scalable solution. But neither of these systems work with my plugin at the moment.

n0risc commented 7 years ago

Simply put htaccess rule to deny .mp4 or others in /uploads directory. But you obviously need to be delivering the videos from a outside media server symlinked. This prevents the videos being played in the attachment ediyor however.

n0risc commented 7 years ago

Kyle has added filter to inject your own playback url with the kgvid_single_code function. There is a plugin someplace that is voded to do this. Called vod-streaming.. look through the issue archives.

kylegilman commented 7 years ago

htaccess protection has been known to cause playback problems on mobile devices. Mostly on iPhones because the video player app doesn't get the authorization passed from the browser. I don't know if this is still a problem.

n0risc commented 7 years ago

Kyle: Im actually coding a plugin that will effectively incorp your plugin and be able to dynamically generate set manifests and deliver videos from AMS or Wowza. Then blocking /uploads folder with .htaccess will prevent progressive downloading.

n0risc commented 7 years ago

However it breaks ediior playback on admin side.

benhartwich commented 7 years ago

Hi, you can use this project, which has implemented wowza streaming with this plugin: https://develop.intelec.uni-passau.de/gitlab/medien/vod-streaming

n0risc commented 7 years ago

@benhartwich Yes, I've extensively added a ton of code to your plugin, or Thomas's.. It actually generates the .m3u8 or .smil manifests too on the fly for adaptive playback. Works well, will reveal it soon on WP & Github. Will do both AMS and Wowza.

benhartwich commented 7 years ago

OK, would be great, when you could commit your changes to our gitlab repository :)