Secure streaming link

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • arena18
    Confirmed User
    • Jan 2013
    • 246

    #1

    Secure streaming link

    How to secure and protect video link from direct downloads...
    I am try to make something like this link

    Code:
    server1.site.com/videos/123/456/789.mp4?key=0457043013fbd9ebae8ae3
    Where is key= I can add user session ID, or something else, and in that way protect direct download without the proper key...

    Code:
    server1.site.com/videos/123/456/789.mp4
    But do I make this work with .htaccess? I am on apache web server and I don't know other way to make this!


    edit: good example is here this is stream link from vimeo and can be downloaded
    Code:
    pdl.vimeocdn.com/42891/829/162390948.mp4?aktimeoffset=0&aksessionid=3b9dcceb7a14b3436e0a7bfa0b40126b&token=1369110913_9c3017a9a1bbb77b1ca36c7b7c1eb7
    but this you cant download
    Code:
    pdl.vimeocdn.com/42891/829/162390948.mp4
    Also KVS script and pornhub use same techniques to protect videos i think..
    Wordpress Tube Theme - wpXtube Theme - TubeAce Theme
  • evil0x
    Registered User
    • May 2013
    • 31

    #2
    you can use flowplayer.

    Comment

    • Tent Pitcher
      Confirmed User
      • Nov 2012
      • 213

      #3
      What you are asking does not have a simple answer...if you want to add a session key to the query string like your examples, you will need to employ a bit of Perl or PHP scripting. First, you would probably want to generate a session Id and store it as a cookie on the user's machine, then you will need to access that cookie and append it to the query string when a video is requested. This would require some sort of account management script.

      Your best bet is to enlist the help of a PHP or Perl programmer to code something up for you. It isn't difficult if you know what you're doing with that kind of thing.
      Tent Pitcher - Adult Search Engine

      Comment

      • arena18
        Confirmed User
        • Jan 2013
        • 246

        #4
        Yes i can make it with php, its not a problem, but example above hmm ...im not sure its a php, i think this can be done via htaccess
        Wordpress Tube Theme - wpXtube Theme - TubeAce Theme

        Comment

        • Tent Pitcher
          Confirmed User
          • Nov 2012
          • 213

          #5
          Sure, you could do it with .htaccess, the problem is that you only have a couple of options:

          1. Allow any "key" matching a specific pattern to access the content

          2. Store all of the "keys" in your .htaccess and iterate through them every time a URL is accessed

          The Vimeo example you posted is using a unique session Id to track a user around the web site. That user's credentials are tied to that session Id so when that user tries to access a video, all the server needs to do is cross-reference the session Id with the user's permissions to see if they have access to the requested URL or not. This is common practice among larger sites.

          I promise you that Vimeo is using cookies and scripting to manage that level of access to their assets. .htaccess is bad ass, just not for that kind of work .

          If you know PHP, you can code something up like that in a few lines...let me know if you need a starting point.
          Tent Pitcher - Adult Search Engine

          Comment

          • arena18
            Confirmed User
            • Jan 2013
            • 246

            #6
            Im make it with php, and video URL looks like
            Code:
            site.com/playback?key=98w73987354234&id=54564651
            key is encoded(user IP + sessionID)

            in php im compare if userIP+sessionid = &_GET['key ']{

            Also im limit streem speed to 350kb/s ...

            So php is maybe good option , but maybe little slow when you seek video...
            Wordpress Tube Theme - wpXtube Theme - TubeAce Theme

            Comment

            • Babaganoosh
              ♥♥♥ Likes Hugs ♥♥♥
              • Nov 2001
              • 15841

              #7
              I use mod_auth_token - https://code.google.com/p/mod-auth-token/
              I like pie.

              Comment

              • Tent Pitcher
                Confirmed User
                • Nov 2012
                • 213

                #8
                Originally posted by arena18
                Im make it with php, and video URL looks like
                Code:
                site.com/playback?key=98w73987354234&id=54564651
                key is encoded(user IP + sessionID)

                in php im compare if userIP+sessionid = &_GET['key ']{

                Also im limit streem speed to 350kb/s ...

                So php is maybe good option , but maybe little slow when you seek video...
                That looks like the correct approach...I am curious to know what you are doing after the authentication though as PHP shouldn't be limiting your streaming speed at all.

                The best way to do it is to do your authentication before you print any HTTP headers, then use the "location" directive to redirect the HTTP request to the appropriate video file. This will all be seamless to the user and the only bandwidth limitation will be your server/ISP.

                PHP is just the middle-man in the request - it authenticates and redirects accordingly.
                Tent Pitcher - Adult Search Engine

                Comment

                • nixem
                  Registered User
                  • Feb 2013
                  • 38

                  #9
                  There are a few WP plugins that do this for videos and digital downloads. WPEC is one for digital downloads... id look at that plugin and see what makes it tick... ill do a lil research for ya tonight.

                  Comment

                  • AHarper
                    Confirmed User
                    • Jul 2010
                    • 846

                    #10
                    Originally posted by nixem
                    There are a few WP plugins that do this for videos and digital downloads. WPEC is one for digital downloads... id look at that plugin and see what makes it tick... ill do a lil research for ya tonight.
                    Did you find anything?
                    Bitcoin Webcams | Send your EU traffic here | Cheap Shared & Reseller Adult Hosting

                    Comment

                    • CPA-Rush
                      small trip to underworld
                      • Mar 2012
                      • 4927

                      #11
                      late answer but chaturbate has similar thing http://aws.amazon.com .. they use it to block unauthorized users from viewing media on models profiles

                      any verified model is allowed to upload files directly to amzn cloud and put price for the content

                      automatic exchange - paxum , bitcoin,pm, payza

                      . daizzzy signbucks caution will black-hat black-hat your traffic

                      ignored forever :zuzana designs

                      Comment

                      • CPA-Rush
                        small trip to underworld
                        • Mar 2012
                        • 4927

                        #12
                        for example i can access this thumbnail link for 10 minutes

                        https://cbphotovideo.s3.amazonaws.co...5I24YED36F5HNQ

                        but i will never be able to access big picture if i'm not authorized... something like

                        https://cbphotovideo.s3.amazonaws.co...5I24YED36F5HNQ

                        automatic exchange - paxum , bitcoin,pm, payza

                        . daizzzy signbucks caution will black-hat black-hat your traffic

                        ignored forever :zuzana designs

                        Comment

                        Working...