I'm trying to figure out how I could possibly encrypt or protect video files from being downloaded. I am trying to offer videos that clients need to pay for before being able to view. Basically, I can restrict it through .htaccess but that prevents me from streaming the video file as well (unless I'm doing something wrong). I can link it to youtube which does a great job in preventing downloads because of RTMPe but people can still view the actual video without a subscription at that point. The page itself will be password protected, but if someone does a simple view source, they can see the link info and then just download the file directly.
I was wondering if it's possible to change the name of a file for example video.mp4 to aQnXgId.mp4 just for the streaming purpose. I don't know if it's possible to use some sort of encryption to make this happen - maybe a php/javascript that would be able to some how match a random/alternative name to a given file or when the source code info is viewed it would bring up some sort of jargon?
Thanks!
EDIT: not sure if something like this http://www.php.net/manual/en/function.mcrypt-encrypt.php would be feasible