Question

I am working on a video streaming application.On a server I have secured m3u8 files.Which contains encrypted ts files (AES-128 encryption).I am parsing the secure m3u8 file then I download the ts files & decrypt them.

I store all the decrypted files in device's external storage location.Then I create a new m3u8 file which points to all decrypted ts files.

I am using NanoHTTPD class to create my custom server on device itself & this points to a directory where I have put all my decrypted ts files & new m3u8 file.

Then I use a VideoView & I pass it a url of m3u8 file on my custom server.

When I start playing VideoView it starts video well but after sometime it shows an error message "Can't play this video"

In Log I get this message

01-15 18:53:52.072: W/AudioSystem(16009): AudioFlinger server died!
01-15 18:53:52.072: W/IMediaDeathNotifier(16009): media server died
01-15 18:53:52.072: E/MediaPlayer(16009): error (100, 0)
01-15 18:53:52.072: E/MediaPlayer(16009): Error (100,0)
01-15 18:53:52.072: D/VideoView(16009): Error: 100,0

I am not getting where is the problem. In my Server or in VideoView.

I have checked all the encrypted ts files have been decrypted properly. & I have played my custom server's m3u8 url to an Android player and it works perfectly.

I have also tried sample m3u8 url from apple,here I just download the ts files & create my own m3u8 file dynamically.It works fine.

Please guide me where & what am I doing wrong.

Was it helpful?

Solution

I solved my issue.The problem was with the decryption.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top