2

I want to protect my instructional video with a password. There is a use case.

When a user wants to play an encrypted file (update: file located on user's android device), the encrypted file will pop up a dialog box to request the user to enter a Playback Password. This dialog box will display the machine ID of the user's android device. The user can send his/her own machine ID to you, and you can create a Playback Password based on the user's machine ID. After that the user can use this Playback Password to play your file on his/her device. Since the Playback Password is created based on the user's machine ID, the user will not be able to share the Playback Password with other users. Since the Playback Password is bond to the user's device, the user will not be able to re-distribute your files.

Is there some software that helps me to obtain this purpose?


I seem to have secured the streaming video from the web site well enough, but a lot of the members want video files on their devices because they don't want to have to deal with wi-fi to play the video while they conduct the class. (update: I'm not good in English. I meant file need to be located on user's android device. No streaming)


There is no doubt someone can just shoot the video from the screen, but I want to slow down the proliferation of my video.

  • The video is hosted on a website right? Did you make this website? This doesn't look like an Android problem, but rather a development problem with regards to security. – geffchang Mar 19 '14 at 13:03
  • Actually, I need video on users' android devices, because users don't want to have to deal with wi-fi to play the video while they conduct the class. – Loom Mar 19 '14 at 13:29
  • 2
    It sounds like you want to implement your own DRM (digital rights/restrictions management) solution. It sounds like this is way above the purpose of this site, as it's really Android independent. Good luck trying to re-invent the flat tire though :) – Chahk Mar 25 '14 at 14:17
  • There is a tool for Windows. I'd like to have the same for android devices – Loom Mar 25 '14 at 14:31
  • You would need to encrypt the video with a key that is the function of the machine ID, assuming this is hard to fake to your app (which it probably isn't). Note that sometimes implementing your own DRM makes it MORE likely your info will be leaked, as it becomes an attractive challenge to break and once it's broken spreading the content as far and wide as the Internet allows is often the next goal. – deed02392 Mar 27 '14 at 8:58
2
+50

What about an app like Android Video Protector? It is advertised as being exactly what you're looking for:

How to protect video files on Android Platform?

Android Video Protector Solution contains two software, there are Android Video Protector and PPVM Video Player. Android Video Protector is a video encryption software running on Microsoft Windows Operating System, it uses a password to encrypt the video you hope to protect, and supports 4 types encryption modes:

  1. Device Binding, One Device, One Password
  2. Non Device Binding, All Device, One Device ID, One Password
  3. Non Device Binding, All Device, One Password
  4. Encrypt video only

How to playback the encryption video on Android Platform?

Because the video is encrypted, the general video player can't playback this video, PPVM Video Player is the player running on Android Platform and supports playback the encryption video. it firstly check the playback password, which can be generate using Android Video Protector, after complete the password authentication, it will playback the encryption video.

I have no idea if these programs are reputable or if they work. The Android app is a direct download from their website (not the Google Play store) - proceed with caution at your own risk.

1

Encrypting a video, this sounds fascinating. I would like to share an approach that I think can be used here:

  1. Get the byte-array of the video in your test project.
  2. Copy this(byte-array) into your target-project as a variable
  3. Now your target-project has the video, in form of a byte-array.
  4. To add password, convert the password-string to a byte array.
  5. Now to save the password in the video, add step-4 byte array to the top of step-3 byte array.
  6. Now your video is encrypted! Any other player trying to play this file will throw an error. However we are not concerned with the file thing. Actually we have no video file, we just have a static variable that was created in step-3 and modified in step-5
  7. To play this byte-array variable, first we will need to extract the password from it.
  8. We always use a buffer to read such type of files. A buffer is basically a byte array of any required size. Let we want to choose a buffer[128]. This makes our step-5 varible look like a set of 128-sized byte arrays, like:[0100101011010....],[01010100010110..],[001010101010110....].....
  9. So the first buffer created while reading step-5 variable. Contains the password!. but where?.its some thing like :[XXXXXX]+[010101011.....128] where [XXXXXX] is the password we set in step-5 and the other part is actually the part of the video. We now have to filter our password from this buffer, not an easy task!
  10. So we will go for another approach here! We will make our password (Step-5) take the entire size of the buffer(here 128). Which means, the first 128 positions of the step 5 variable will entirely be used to recognize the password! So now the first buffer will look like:[XXXXXXXXXXXXX....XXX] (only password)
  11. To do this, the step-5 will convert the password string into byte array and if it is less than buffer size(128 here), the it will append dummy values to it so that its size becomes equal to 128.
  12. In step-11 we have created an encrypted password!
  13. So finally, when the video is to be played, we will get step-5 variable that was modified as per step-11.
  14. Ask for the user password.
  15. Convert this password to a byte-arr and append values to it to make it 128 in size(similar to what we did in step 11)
  16. Now we will compare the first buffer-sized(128) part of step-13 variable, compare it to step-15 input-Password-byte array.
  17. If they do not match, show a dialog box with the appropriate message.
  18. Or if it matches, remove the first buffer sized part. Rest contains the video that is to be played.

Wow! Cheers!

  • I think this algorithm is cool, Please provide me your thoughts. Anyone... – Parth Kapoor Mar 28 '14 at 8:31
  • You should have provided some sort of pseudo code.... – Rupsingh Oct 27 '17 at 4:50
0

You can create an encrypted zip file of that video and set it to automatically unzip and play the video upon entering the correct password. Zip4j is an open-source Java library that supports encrypting/decrypting zip files, since default Android Java libraries don't have it.

This is more of a workaround because it will not directly encrypt the video, but create an encrypted folder from which the video may be extracted.

0

Password protected videos can be recorded on Android with Secure Video Recorder

  • Welcome to Android Enthusiasts! Please confirm what relationship (if any) you have with this app: it's OK to recommend your own app on this site, provided you're honest about it. – bmdixon Aug 30 '16 at 14:40
  • We are the developers. – Rus Tero Sep 1 '16 at 13:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.