'Protect media content from copy or redistribution in Android

I want to
i)stream media content to android device
ii)read media content from sdcard of the android device.

But the media content should be secured.No other user should be able to access the media file on any other device.

I thought of some solutions: 1)DRM as in Digital Rights management (I could not come to any better conclusion with this) 2)Encryption decryption (This seems very costly in terms of performance)

Can any one suggest some ideas on how to proceed with the problem statement or some open source samples regarding the same.

Thanks and regards



Solution 1:[1]

I just can give you a hint as I haven't worked with encrypted media:

Maybe it is an interesting way to explore.

Escenario #1. Stream media content to android device: you just need a HTTP server on the streamer side that serves the encrypted media and serves it to the client. For example, both Nginx and Apache support HTTP live streaming.

Escenario #2. Read media content from sdcard of the android device. You need to implement the HTTP server inside your app.

In both cases the media is stored encrypted. The only problem would be the user capturing the screen.

Solution 2:[2]

I am aware of two DRM technologies that are usable on Android - Microsoft PlayReady and Google Widevine.

DRM technologies include a client-side component (the DRM engine) that is designed to protect the content from being freely accessed by the user of the device - the DRM engine only allows playback on the local device and does not provide any other access to the media data.

I do not have information on whether Android DRM engines can protect against screen capture. PlayReady probably cannot because it is an app plugin but Widevine might be able to accomplish that since it is built into the OS.

Now, you need to understand that DRM does not control who can play back the media. However, it does provide the ability to determine this in your own server-side logic. This assumes that you have some way to differentiate the users - to know who is allowed to play and who is not.

How this works is that in order to play back a DRM-protected video, the DRM engine must acquire a license from a license server. The license server can decide whether to give a license or not, based on custom business logic, e.g. the logged in user session.

Files protected with DRM are encrypted and only readable by the DRM engine when it has a license for it.

Obviously, there is also the question of cost - these abilities do not come for free. Using DRM technologies generally requires various subscription fees, with a rough range in the hundreds or thousands of euros/dollars per month. If this is in your budget, DRM might be a valid option for you.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Community
Solution 2 Sander