Subscribe to
Posts
Comments
NSLog(); Header Image

Preventing Downloading of Source Video in Rails

Question for the Rails developers out there…

Suppose you have a video file (a .mov or .mp4 or .m4v or whatever) and you're going to use JWPlayer or another flash-based application to "play" the video on a user's browser, but you want to obfuscate and hide the actual location of the video so that the user cannot download the source video.

How would you go about doing this in a simple way that's relatively safe?

In PHP, I'd create a "middle man" script that first verifies that the movie is being used in a proper web page (perhaps with an encrypted password if you wanted to keep things simple) and then would pass through the data from the movie file to the flash application. The movie filename and path would never be revealed and attempts to access the "middle man" script directly wouldn't work as the secret password wouldn't within the variable namespace.

If you could, please speak in very general terms as I'm not a Rails developer. Thanks.

3 Responses to "Preventing Downloading of Source Video in Rails"

  1. You could do something similar with Rails by having the player request a URL say:

    http://www.mycoolvideosite.com/video?refid=123123123123

    or whatever and "video" could be mapped to a Rails controller. That controller can then perform the logic you described for your PHP page.

    Shouldn't be too hard I wouldn't think. I did something similar to stream out PDFs.

  2. No.
    If you can watch it, you can download it, period.

  3. I wouldn't handle this in Rails, I'd handle it in your Flash player using something like Wowza.


Trackback URI | Comments RSS

Leave a Reply to Adam Jacob Muller

Please abide by the comment policy. Valid HTML includes: <blockquote><p>, <em>, <strong>, <ul>, <ol>, and <a href>. Please use the "Quote Me" functionality to quote comments.