I am using the ffmpeg
library to play videos in Android. Video plays well from the SDCard but I would prefer it to play from the assets
folder as it is more secure.
Could anyone point me in the right direction?
I am using the ffmpeg
library to play videos in Android. Video plays well from the SDCard but I would prefer it to play from the assets
folder as it is more secure.
Could anyone point me in the right direction?
Assets are read-only parts of your APK, and there is no way another APK can access these assets. You can use the native Android classes to play the video(s) you embed in your APK (use mp4 format).
If you insist on ffmpeg-assisted playback, you can unpack the asset to private file, or you should write your io handlers for ffmpeg that will use AAsset_read().
As I feel that you want to keep your videos inside application, so to keep things simple, keep your videos in raw folder and play it from there.