Page 1 of 1

Playing local M3U8/TS files with AES encryption and KEYs

Posted: 17 Jul 2014 04:34
by rocklade
Hi,

Lately I used an Android app on my phone to cache several in-app video lectures, and I had no problem watching them within the app offline. I wanted to copy the videos to my PC to enjoy them on a bigger screen, so I explored the app data folders and finally located those cached *.TS streams. However, my VLC player seams to be unable to handle these files. I got an error which I think means that VLC can't read encrypted streams:
No suitable decoder module:
VLC does not support the audio or video format "undf". Unfortunately there is no way for you to fix this.
:(
The files I retrieved are placed like this in the folder:
somefilename.mp4Frag1Num0.ts
somefilename.mp4Frag1Num1.ts
somefilename.mp4Frag2Num2.ts
somefilename.mp4Frag3Num3.ts
...
somefilename.mp4Frag10Num10.ts
somelistname.m3u8
key_.bin


The m3u8 list contains these info:
#EXTM3U
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-ALLOW-CACHE:NO
#EXT-X-VERSION:2
#EXT-X-KEY:METHOD=AES-128,URI="key_.bin",IV=blahblahblahblahblahblahblahblaaah
#EXT-X-TARGETDURATION:8
#EXTINF:8,
somefilename.mp4Frag1Num0.ts
#EXTINF:8,
somefilename.mp4Frag1Num1.ts
#EXTINF:8,
somefilename.mp4Frag2Num2.ts
...
#EXTINF:6,
somefilename.mp4Frag10Num10.ts
#EXT-X-ENDLIST


Since there is a ".mp4" in each file name, I think the original video is an MP4 file.
Now I have already got the KEY file, which apparently is the "key_.bin" binary.
So why VLC is not able to play the media with the key provided? The M3U8 list format is supported. Any way to solve this problem? Could I be able to decrypt those TS chunks into the original MP4 file?

Thanks for reading and any help is appreciated! :D

Cheers,
Roger