8 Replies Latest reply on Jun 5, 2008 9:46 AM by Oliver Goldman

    Please help , Protect flv movie

      Dear everybody , I have a problem , I develop desktop AIR application use to play flv files , I want protect the flv file and only my application can play it , others flv player cannot play this movie file , how can I do that . Please anybody have solutions .
      Thanks !
        • 1. Re: Please help , Protect flv movie
          TerjeAB Level 1
          Simple, you can't. You would have to come up with your own video codec, patent it and implement it in Actionscript. As long as a movie is in a standard format, flv, mpg, avc, etc, any player can play that movie.
          • 2. Re: Please help , Protect flv movie
            Just to come up with an idea and perhaps may help you....
            You could use your application to connect with a local database, like SQLite that would be password protected, inside that DDBB you would have your video and therefore only playable with your app.
            • 3. Re: Please help , Protect flv movie
              TerjeAB Level 1
              The question is simply what he wants to achieve. If he wants to prevent a user from playing his FLV movies, that can't really be done. Using a DB work-around with a password protected DB will make it a little harder to play his FLV, but it won't prevent it. The password has to be known to the user of his application or it will have to be stored somewhere, and voila, anyone access the DB with any DB tool they want and grab the FLV from there.
              • 4. Re: Please help , Protect flv movie
                Ieratuca Level 1
                I just started to play around with SQLite,
                but I think you could store the password inside the swf, so when the app starts up a connection to the DB, makes a login/pwd request. This way it would only be known by the app.

                Anyways, as you have pointed out, this would be a workaround and may be quite a big change in the architecture of the app.
                • 5. Re: Please help , Protect flv movie
                  A common way to "discourage" usage of media is to "scramble" some data in the media (any bit *may* do, but if you know anything about the header, that may be a good location). For example, you might modify the first 100 bytes by XOR-ing with some "passphrase" data. Then to play the media, change the data back (in my example, by re-XOR-ing), then open the file and play it.

                  This doesn't *guarantee* that no one will be able to play it because you ultimately have to write the file out to a temp location and someone could capture the results in the temp location. Also, if the end user has access to the code, they might be able to debug it to determine your "scramble" scheme.

                  There are ways to address these concerns too, but I don't know AIR well enough to know if they are possible. For example, some frameworks make it possible to write to memory mapped files so that no file is actually written to disk making it even less likely someone could locate the "unscrambled" media.

                  For a totally separate approach, doesn't AIR support DRM? You might consider that too.
                  • 6. Please help , Protect flv movie
                    TerjeAB Level 1
                    Just to the "store the password in the swf", please remember that this is not at all secure. Getting the password out of an SWF file is trivial, so you must never rely on it as a security item. In fact, once you store the password anywhere in a way that can be decrypted (required if you want to use it to log into SQLite) then the password is easy to get to.

                    As to the scrambling of the media, this is possibly the easiest way to achieve what the user wants, but as jeffabruce points out, it is a work-around and it is ultimately easy to circumvent.

                    As long as you are playing videos in a standard format, any attempt at forcing the user to play them in only your player is doomed to fail in the face of a determined user.

                    The need to build such applications is usually based on misguided ideas, I'd just recommend against doing it. If you want to let the user play FLVs, let him play FLVs. If you don't want him to access them with other players try to find a way to make your player so compelling that he won't want to watch them with another player.
                    • 7. Re: Please help , Protect flv movie
                      jeffabruce Level 1
                      I wouldn't necessarily say that it is "easy to circumvent". There are plenty of ways to obfuscate what you are doing. Ultimately you are trying to make it difficult enough such that someone isn't motivated to spend the time. Clearly, if someone is extremely motivated, they will be able to break it. But, it may be enough to discourage anyone from trying.

                      It certainly is no security guarantee and I wouldn't use it to protect highly sensitive data. But, knowing the risks, you should be able to make an informed decision.

                      I hate to say whether it is a good idea or bad idea. There are various reasons why it may be desirable. I have used this concept at various times myself.
                      • 8. Re: Please help , Protect flv movie
                        Oliver Goldman Adobe Employee
                        You can protect video playback in AIR using the Flash Media Rights Server. See http://www.adobe.com/products/flashmediarightsmanagement/ for more information.

                        Oliver Goldman | Adobe AIR Engineering