3
votes

I have created an Android application which is capable of playing movies, which are protected with DRM (Widevine Modular). Video are in MPEG-DASH standard. In case, that device is online, everything works fine.

Now I need to add feature for playing video in offline mode. The problem is that I do not know how can I download some file(s) for offline playback. Everything what I have is .mpd file, which contains structured data.

How can I get some file(s) for download from this manifest .mpd file? There are no direct links to some video. I see some chunk, which looks like this:

media="chunk_ctvideo_cfm4s_rid$RepresentationID$_cs$Time$_w1003607280_qaWQ9QVBsSUxIMUpaRnVfdfdfkstMDImYXdsgdreaW9pbmRleD0w_mpd.m4s

I do not know if it is useful for me, but there is nothing more "noticeable" in the manifest file.

1
You need to post more information such as your mpd for detailed advice as there are a number of variants. You can most definitely get the chunks based on the manifest. A good starting place is the DASH specAndrew

1 Answers

1
votes

For an example of code that processes a manifest and downloads the media chunks have a look here: https://github.com/axiomatic-systems/Bento4/blob/master/Source/Python/utils/mp4-dash-clone.py

Of particular interest you may find the ProcessUrlTemplate which shows how to pass the media elements to get a URL for a chunk