6 Replies Latest reply on Apr 25, 2009 11:45 AM by mschutze

    FLV files protection

    mschutze Level 1

      Hello,

      I'm working on an AIR app wich is going to have some FLV files deployed with it...

      I would like to protect these files somehow against users who may get them from the installation folder and use them without my app.

      I thought of diferent ways to do that but I would like to know if you have a better solution:

      1) Configure AIR installer to put the FLV files in a hidden folder (not very effective since hidden folders can be seen easily - don't even know if I can do this in AIR).

      2) Embed the FLV files in a SWF configured to play only if it is opened from within the app (I've done this before and it worked, but it's a lot of work and the SWF has problems with the audio synchronization).

      3) Change the extension of the FLV files to something else (like .f00) and somehow tweak the player to play them anyway (have't been able to do this).

      4) Copy the FLVs to some folder in 'Aplication data' where the regular user won't look fo them (can the AIR installer do this?).

      Any other idea?

      I would very much appreciate any help!

      Best regards,

      Manuel

        • 1. Re: FLV files protection
          Joe ... Ward Level 4

          Adobe does have a DRM solution that can protect FLV files, but it is not free. If you think you will make a lot of money and will face a lot of piracy the ROI might be there, though. AFAIK, this would be the hardest DRM to break.

           

          If you just need to keep most people from breaking the protection and do it cheaply, then you could roll your own.

           

          As to your questions:

          1) No.

          3) This should be possible. I don't think the file extension is interpreted (but I could be wrong).

          4) The installer can't do it, but your app could the first time it is run.

           

          You could encrypt the files and decrypt them either in memory or to a temporary file when played.

          • 2. Re: FLV files protection
            mschutze Level 1

            Thanks Joe!

             

            Could you tell me where I could get more information about encrypting the FLV files and decrypting them either in memory or to a temporary file when played?

             

            Thanks!

            • 3. Re: FLV files protection
              Joe ... Ward Level 4

              You can certainly do it using a temporary file. How you encrypt/decrypt the file is up to you. It could be a simple as leaving out key parts of the file that you insert before playback or you could use some cryptography method (for which there are plenty of docs on the web). The DRM challenge is that the code and possibly the decryption key are present on the client -- so it is difficult to prevent a determined attacker from determining your decryption method and keys.

               

              I'm not sure it is possible to do it entirely in memory -- you can load a SWF file into a byte array and then inject those bytes into a Loader to play it, but I don't know whether you can do the same somehow with an FLV.

              1 person found this helpful
              • 4. Re: FLV files protection
                mschutze Level 1

                Well, I searched for encryption/decryption in actionscript or javascript and I found only information regarding strings, and not files. Anyway, I came to the conclusion that if the user is determined enough, no simple method will be able to prevent him from getting to the videos, so I think I'll just make my life easy and add a watermark to all the vids and try not to use any obvious names for them. So at least the user has to look through a lot of files until he finds the one he whant's and if he does and use it in his power points or wathever, people will see my watermark and information at the end.

                 

                Now that this problem is solved, I come back to my other question. Reading the AIR help files I noticed that I'm actualy not able to delete/write to my app folder, right?

                 

                Since my program is going to be delivered by CD, I was thinking on putting all the videos in the air file and then in the app folder during installation and then move them to the app-storage folder on first run, deleting them from the app folder after that.

                 

                Additional videos would be downloaded by the application from the server upon avaliabitlity and also saved on the app-storage folder. Without any videos on the app folder, updates to the application will be easy.

                 

                So is there a way I can move the videos to app-storage and delete them from the app folder after that?

                 

                Just for you to know, I'm working on an educational program with teaching videos to be delivered with a book (as a CD-ROM) and also to be available for download.

                 

                Thanks for the help!

                • 5. Re: FLV files protection
                  Joe ... Ward Level 4

                  You shouldn't delete files in the application directory -- and on some OSes such as Vista, you won't be able to in many cases -- so this isn't a reliable solution.

                   

                  Your options are:

                  1. live with the duplicated data

                  2. copy the data from the CD the first time the program is run

                  3. create a custom installer (using some non-Adobe installer solution) that copies the data from the CD during installation

                  1 person found this helpful
                  • 6. Re: FLV files protection
                    mschutze Level 1

                    Thanks for the input Joe!

                     

                    I also have another ideia: when the program is run for the first time, it copies all the videos to the app-storage folder. While doing that, it displays a message like "Optimizing program, please wait a few minutes". After finishing, it displays a message like "To finish the optimization process, please update to version 1.1". This new version will be identical to the installed one, but without the videos. So when the user installs it, the videos will be deleted from the app folder. From there on, if new videos are available, the program itself will download them from the server directly to the app-storage folder.

                     

                    Thanks again for the help.