user1086377
user1086377

Reputation: 356

Android: Play video from file buffer

Is there a way to play/load a video from a file buffer? I have video's that are encrypted and only get decrypted before being played. I currently have a load screen to indicate the movie is being loaded while it is being decrypted. This takes around 1 second per megabyte. I was wondering if I can take the bytes that are being decrypted and push them to the video player so it can play while the video is being decrypted. the videos are mp4's

Thanks

Upvotes: 2

Views: 1746

Answers (1)

libeasy
libeasy

Reputation: 381

Yes, you can. But you need to implement a streaming scheme. You need two main components: a streaming server such as a local http instance and javax.crypto.CipherInputStream. For example, it's the architecture used in LocalSingleHttpServer of libmedia.

Upvotes: 1

Related Questions