3

I have an app which stream videos, now my new feature is to save that videos for offline view. I saw offline feature of hotstar, when we save offline video hotstar save video spit as some chunk.ts format, it will be saved on corresponding andriod folder of hotstar, how can i achive this I search web but did not get any proper info how to implment this. when I search for chunk.ts I got some github data https://github.com/AndyA/ts-split

which is in pearl, so when I saw I had doubt like this should done on serverside and when we download the files will downloaded from server. can any one give an expert suggetion regarding this.

Thank you

szatmary
  • 29,969
  • 8
  • 44
  • 57
  • why can't you just download the video (file) to the device directly? – user1 Apr 24 '18 at 08:06
  • i dont wanna others to copy or open video by there app or player – Samwinishere Here Apr 24 '18 at 09:41
  • could you do something similar to what youtube does? they download the file as exo but encrypt it, so it won't be played by other media players, so i suggest you find a suitable encryption mechanism to your need, and download the video, then decrypt the file to play it, this [answer](https://android.stackexchange.com/a/114173) provides good insight that i suspect would help you get started – user1 Apr 24 '18 at 09:49
  • but how any clue to make it? – Samwinishere Here Apr 25 '18 at 05:32
  • @SamwinishereHere hav you got the solution or created it??? i am looking for solution for offline video download, i am trying exoplayer .. but not able to create offline download feature. – Raikumar Khangembam Apr 14 '20 at 12:36
  • there was a github repo of a user but he removed that one – Samwinishere Here Apr 22 '20 at 07:29

1 Answers1

0

one way to achieve this would be to use a CipherOutputStream and encrypt the files as they are downloaded check CipherOutputStream

also refer to this questions, and this question on how to encrypt and decrypt. and for rendering the videos, you would have to decrypt the files as you play them

user1
  • 254
  • 1
  • 15