How to download Widevine encrypted m3u8 stream

164 Views Asked by At

I have an m3u8 stream with the following tags.
The difficulty is that when I try to decrypt segments using mp4decrypt/ffmpeg, nothing comes out.

#EXTM3U
#EXT-X-VERSION:7
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-TARGETDURATION:1
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-INDEPENDENT-SEGMENTS
#EXT-X-MAP:URI="init.mp4?s=1704718295"
#EXT-X-KEY:METHOD=SAMPLE-AES,URI="skd://2d6d3657417964634934576c5233513d",KEYFORMAT="com.apple.streamingkeydelivery",KEYFORMATVERSIONS="1"
#EXT-X-KEY:METHOD=SAMPLE-AES,URI="data:text/plain;base64,AAAAOHBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAABgSEC1tNldBeWRjSTRXbFIzUT1I88aJmwY=",KEYID=0x2d6d3657417964634934576c5233513d,IV=0x79364e6d4e706154485552376243553d,KEYFORMATVERSIONS="1",KEYFORMAT="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"

For mp4decrypt I have no effect - it just creates an empty output file
For ffmpeg I have an error - Error opening input: Invalid data found when processing input

Perhaps I need to use the initial segment from EXT-X-MAP tag, but I don't know how.

0

There are 0 best solutions below