Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I know this is quite a basic question, but whereas i had no problem preventing image files from hotlinking, i can't figure out how i can't protect mp4 video files…

i just tried to specify mp4 next to jpg, (that's the two filetypes i need to protect), but as it works for jpg, mp4 does nothing !

Any idea ?

location ~* \.(jpg|mp4)$ {
valid_referers none blocked www.mysite.com mysite.com;
if ($invalid_referer) { return 403; }
}
share|improve this question

1 Answer 1

up vote 1 down vote accepted

Unfortunately whatever method you use to "protect" the progressive download, it can still be thwarted.

This problem is, that videos are specified as streaming contents.

Actually, many video-downloader tools are so powerful, so it is very difficult to protect the video files from being downloaded.

Usually, there is a three step solution:

  1. GET /path/to/file - return an HTML form with a capcha or some other method to avoid automa
  2. POST /path/to/file - return an HTTP redirect using a secure hash
  3. GET /path/to/file?hash=xxx - check the hash

You can perfect this method by implementing the H264 Streaming Module for nginx.

share|improve this answer
    
thank you very much for your answer, i'll have a look at the streaming module. Anyway, i don't realy want to protect the videos from downloading, i just don't want another website to embed the video on its own pages. Another solution anyway, could be to program a system with dynamically generated URLs so that it's not possible to copy it for further usage… –  user1717735 Dec 14 '12 at 17:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.