I am developing an online video sharing site. I am using tomcat 5.5.17 for my project. I am having my application folder in webapps of tomcat. In my application folder there is another folder where i have my .flv video files. Now, user can watch the video by accessing videodisplay.jsp where i have a open source flv player embedded. I will supply the url of the video file to the player in that page. Problem is if the user right clicks and views the source of videodisplay.jsp, he can get the url of my video file. He can simply copy paste the url and download the file. Is there a way to prevent this from happening???. My tomcat is present on a windows 2003 server machine.
One way would be to store your video files in the Amazon cloud and have your app serve a page with a URL having a restricted lifespan. Here is my example page.
This would have the advantage of unloading a huge bandwidth hog from your server. But in any case, once you have handed out a video stream you have no control over what the user does with it.
Joined: May 08, 2007
Thanks for the suggestion, but can't we do this without using amazon s3.
I was googling about this and found that saving the video files as blob in database may solve the problem. How far this is a feasible solution?
Author and all-around good cowpoke
Joined: Mar 22, 2000
I dont see what you gain from a blob.
Basically you want your video file to NOT be accessible with a normal URL. This can just be a directory that the server cant address directly. Therefore you will have to write a servlet which will get the request, figure out where the file is, and start streaming it to the response.
A google search for "java streaming video" finds lots of interesting options.