How to stream encrypted file using exoplayer (sample)? - android

I am trying to stream encrypted audio file (.mp3),but I do not know how to achieve this. I am requesting a sample, or some form of direction to do that?. There is an issue here https://github.com/google/ExoPlayer/issues/2467
but it is discussing play local encrypted file.
Thanks for help.

Related

How can I Encrypt and Decry-pt Video playing any Video Player?

I working on media application, On app user able to watch video on any video player. all media file is stored in Internal Storage which is .mp4 formate in particular folder called LearningVideo.
My question is I want to encrypt that video so a user won't able access that and also decrypt that video when app play that.
So how can I achieve this task, please help me.
I tried com.google.android.exoplayer:exoplayer:2.6.0
Use CipherOutputStream and CipherInputStream for encryption and decryption of file in android.
There are two ways through which you can achieve your goal
Download a file and encrypt it, when you want to play that file decrypt it in a temporary file and play it.
if you want to play the encrypted file on the fly (not decrypting it in a temp file) then you can use Libmedia library. It streams encrypted file on localhost and plays it from there
Try to write Files inside FilesDir may be this solved your issue
File rootpath = getApplicationContext().getFilesDir();
File path = new File(rootpath.getAbsolutePath() + "/LearningVideo");
You can store your files inside /data/user/0/<packageName>/files

Android App Dev: any example/suggestion on how to code audio stream of file from a remote ftp server?

Working on an android app to stream music from my ftp server, I was wondering if anyone can offer any code, advice, or tutorial on how to access the specific folder/directory containing the audio files, list the audio files, and stream them through my app, also if it is possible or not. Thanks
Would something like this be helpful? For accessing the data via FTP, the FTPClient class could become handy.

Android mp4 videos in raw do not work after widevine signing

My problem is that before the signing with widevine the video is displayed as it should.
The video is located in resources/raw
Errors I get are :
I/MediaPlayer(23023): path is null
D/MediaPlayer(23023): Couldn't open file on client side, trying server side
Does anyone have a idea of the root of this error or even a workaround ?
I tried to put the videos in assets but there was no difference
Thanks in advance and I hope there is someone out there that can help me
Assuming widewine is a drm, you need to decrypt before you can play. Either widewine will give you a player or a decrypting library which you must use to decrypt the content before you can play it.

Android simple way to record sound and stream that to a server?

Is there a simple way to record sound and stream it to a server in real time?
Thanks,
Leslie
No, there is no direct API that would do that..
What people usually do is read the media file as it is being saved, and upload it progressively to server.
See how some open-source projects do it:
http://code.google.com/p/sipdroid/
http://code.google.com/p/ipcamera-for-android/
http://code.google.com/p/camdroiduni/

How can I encrypt a file (video/audio/image), save to SDCard, then decrypt that same file and play it via VideoView?

I am trying to create an app that would download a file from a remote server and save it to the SD card. The file is quite confidential so I need an encryption for this. I would like it to be saved as encrypted. When I want to play the file, it should only be played on my media player which has the decrypt code. No other player can play that file. How is this possible? Thanks for any suggestions you may have.
If you don't want to be bothered with a delay by decrypting the entire file before to be able to start the playing, you should consider a streaming architecture. A typical design involves the javax.crypto.CipherInputStream class and a local http instance. For an example of that kind of design, look at something like LocalSingleHttpServer.

Categories

Resources