kravemir
kravemir

Reputation: 11026

How to implement custom intermediate processor to play DRM protected video stream?

I'm trying to play video stream with specific DRM implementation. I've got specific parameters for video segments in HLS playlist.

So I need to write a class(es) that gets information from HLS playlist, decrypts and decompresses the video segments and passes them further to video decoding. That wouldn't be a big problem.

The problem is that I can't find any way to tell Android component how to handle this file. Both VideoView and MediaPlayer take only URI of media/video and no further information about processing playlist.

I appreciate any kind of help. It's the biggest problem in application I'm programming and I'm wondering if it is even possible to solve.

Upvotes: 0

Views: 437

Answers (1)

Wil Macaulay
Wil Macaulay

Reputation: 517

HLS doesn't have direct support for DRM, but it does have support for AES-128 CBC encrypted media. I don't know which DRM type you are looking at, but one approach taken by some DRM vendors is to independently access the decryption keys for the encrypted media segments, then use either a custom URL scheme registered by your app or a localhost https proxy to serve the keys. This might require rewriting the HLS variant playlists to point to the appropriate place.

Upvotes: 1

Related Questions