Would it be possible to allow video to stream from the website directly, but prevent it from being downloaded using .htaccess and sending the request to a php file as such?
RewriteEngine On
RewriteCond %{REQUEST_URI} \.(mp4|flv|avi)$ [NC]
RewriteRule ^(.*)$ /stream-file.php?filename=$1 [L]
But for this I assume I'll need to write a script that would stream via php and I wouldn't be able to pass it through to a media player such as jwplayer.
Alternatively, I was curious of how doing something like this website here would be possible: http://www.statsdoesntsuck.com/york/2320.html
if you view the source, you'll find a part in the html that refers to the video on the main page
<div style="background-color:#404040; border-radius:5px;">
<div style="width:98%; height:auto; margin-right:auto; margin-left:auto; padding-top:6px">
<script type="text/javascript" src="http://content.bitsontherun.com/players/EwneWxTl-8JZHlp0n.js">
</script>
</div>
</div>
and the contents of EwneWxTl-8JZHlp0n.js can be found here http://content.bitsontherun.com/players/EwneWxTl-8JZHlp0n.js (script is too long to paste here).
Basically, I'm looking for a way to just make it a bit difficult to find the file name or location, but still be able to stream it. It doesn't have to be 100% secure (which I know isn't possible anyway) but at least it shouldn't be as easy as viewsource ---> url.com/file.mp4
Any ideas would be greatly appreciated. I am using joomla as well so if there are any modules/plugins that would be able to do this for me that'd be great too - though I don't mind writing it from scratch.
So to rephrase - What is the best way to protect files from being downloaded (without compromising streaming) and being able to be a DIY project rather than a paid service project.
EDIT: 1. looking for a solution via apache 2. I have found the following Flowplayer Secure Streaming with Apache
the problem with it is that the htaccess wont allow me to stream the file, and when i remove it it'll stream just fine. If someone could help me figure out what I can do to change it that'd be great
my .htaccess is as follows:
RewriteEngine on
RewriteRule ^(.*)/(.*)/(.*)$ http://localhost/joomla2/video/video.php?h=$1&t=$2&v=$3
RewriteRule ^$ - [F]
RewriteRule ^[^/]+\.(mov|mp4)$ - [F]
currently it comes up as "file not found".