Android Question How to play a MP4 video with out saving a file on memory?

BerlinCoder

Member
Licensed User
Hi guys,

I was wondering if anybody tells me how can I play a video file, for instance, a MP4 file in b4a just through a byte array?

I mean, I do not want to save the video file on memory.

Best,
 

BerlinCoder

Member
Licensed User
Hi Erel,
It's possible to open a mp4 file as a byte array ..So, I think maybe there is a way to play the mp4 file only through the array.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
What about answering erels questions first?

Additionally he wrote that he think that it is not possible.

It's possible to open a mp4 file as a byte array
and then? Asuming your video has 2GB of lengths... Do you want to load 2GB into memory to create a big bytearray?
The hole video must be hold into memory in this case
 
Upvote 0

BerlinCoder

Member
Licensed User
What about answering erels questions first?

Additionally he wrote that he think that it is not possible.


and then? Asuming your video has 2GB of lengths... Do you want to load 2GB into memory to create a big bytearray?
The hole video must be hold into memory in this case
I want to open mp4 files which are under 100 megabyte.

Data here can be a set of mp4 files which can come from gallery folder in a phone device.
I should say I have a number of mp4 files from a resource folder [ you can consider as an external-temporary momery], then I want to load them in my app and play them without saving on the memory.
 
Last edited:
Upvote 0

moster67

Expert
Licensed User
Longtime User
I don't get it o_O :confused:

If you already have the video-files on the device, why do you need to (try) play them through a byte-array??
Play them and then physically delete the video-files when you're done..(if you're not interested to keep them)
 
Upvote 0

BerlinCoder

Member
Licensed User
I don't get it o_O :confused:

If you already have the video-files on the device, why do you need to (try) play them through a byte-array??
Play them and then physically delete the video-files when you're done..(if you're not interested to keep them)
I 've said before.... I have a number of mp4 files from a resource folde which is not on mobile phone... [ you can consider as an external-temporary momery], then I want to load them in my app and play them without saving on the memory.I have before investigated this, but I want to do some operation on bytes..something like encryption . so I need to decrypt bytes and then play movie and that's all !
 
Upvote 0

udg

Expert
Licensed User
Longtime User
Hi,
if I understand it correctly, you have a collection of "protected" files on a "server". What you need is to read any of those files on a mobile device, decrypt it and then play it.
If yes, you could:
1. download a file from its repository and store it as temp.mp4
2. decrypt temp.mp4
3. play temp.mp4
4. delete temp.mp4

udg
 
Upvote 0
Top