Samples/tutorial for DRM framework in Android

杀马特。学长 韩版系。学妹 提交于 2019-11-30 14:34:59

问题


Android 4.0 brings drm framework to smartphones. I'm interested to write a code that plays video protected by the DRM, but can't find enough information.

  1. Are there any tutorials on using the DRM framework? Sample code?
  2. How to set up an environment - the server side that creates the content and licenses?
  3. Are there any DRM protected videos in the Internet that I can use for testing?
  4. The plugin framework claims extensibility, but I can't find neither plugin AI definitions, nor description how to create/add a custom plugin

回答1:


EDIT: An example pass-through DRM plugin is now available in AOSP under frameworks/base/drm/libdrmframework/plugins/passthru/


Are there any tutorials on using the DRM framework? Sample code?

Not yet, unfortunately. The only public documentation on this is at the android.drm package summary docs.

How to set up an environment - the server side that creates the content and licenses?

This is specific to the DRM provider.

Are there any DRM protected videos in the Internet that I can use for testing?

This too is specific to the DRM provider.

The plugin framework claims extensibility, but I can't find neither plugin AI definitions, nor description how to create/add a custom plugin

I think this will become more clear once the source code is released, but for now there isn't any further info on this unfortunately.




回答2:


A good explanation on concepts of DRM and DRM on android is available here: http://developer.samsung.com/android/technical-docs/DRM-in-Android




回答3:


Android can be a complex environment for DRM playback, there are multiple aspects to consider, here it is my best attempt to provide the best tutorials on implementing DRM in an Android app. Also it’s hard to provide global answer on DRM, it depends on use cases, content requirements, device support. Here I am just suggesting one approach but there are also others. The default Android player is Exoplayer which needs to be configured to support DRM, where as the Bitmovin player has this functionality out of the box. I have experience with professional DRM implementations, working config in the real world at Bitmovin, so this answer is based on that experience.

  1. You can find a tutorial to implement Widevine DRM in an app (code for a sample Android app also linked inside the post), basically in both cases you need to load an external module for DRM when instantiating the video player inside an app. The external module will need to be configured with the MPD and DRM License server locations, so that the player knows which content to play and how to decrypt it for playback, some resources for implementing Widevine DRM in Android:

    • How to setup Bitmovin Android SDK with DRM Today content: https://bitmovin.com/docs/player/tutorials/how-to-setup-bitmovin-android-sdk-with-drm-today-content
    • Android SDK using ExpressPlay (Java, Widevine DRM): https://bitmovin.com/docs/player/tutorials/how-to-setup-bitmovin-android-sdk-with-expressplay-content
  2. You can use a DRM test proxy server to protect and decrypt content with DRM:

    • Tutorial provided by Bitmovin on creating multi DRM content, here is the link: https://bitmovin.com/docs/encoding/tutorials/how-to-create-multi-drm-protected-content-with-intertrust-expressplay
    • Check playback on a player to test a stream. To test with DRM protected sample DASH content (Tears of Steel) and Widevine Test Proxy you can use this player: https://bitmovin.com/demos/drm
    • Tears of Steel content for the Manifest URL, use this value: https://storage.googleapis.com/wvmedia/cenc/h264/tears/tears_hd.mpd
    • The test Widevine Proxy service, use this value: https://widevine-proxy.appspot.com/proxy
    • You can then playback Widevine DRM protected content!
    • If you encounter difficulties use Chrome Web Inspector and in the Network tab check the request from the player to the DRM License server and the key exchange.
  3. Since its hard to create streams from scratch, to test that your config is working properly you can use a number of different datasets available here: https://bitmovin.com/mpeg-dash-hls-examples-sample-streams/

  4. Can you clarify the question?


来源:https://stackoverflow.com/questions/7915763/samples-tutorial-for-drm-framework-in-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!