UnityPlugin-AVProVideo icon indicating copy to clipboard operation
UnityPlugin-AVProVideo copied to clipboard

Is it possible to play videos through a byte array instead of a file? (MediaPlayer)

Open Gurwar opened this issue 3 years ago • 4 comments

Problem description:

I am working on a project that requires encryption and decryption of videos. The current solution is to save copies of a decrypted file when they are needed for playback. This approach is very slow and obviously unsafe. I would appreciate a function in AVPro where I can pass the raw data of the decrypted video to the player instead of having to save it as a file before playback. I looked around and saw that there is infact a function of PlayVideoFromBuffer in AVPro but its Windows only. Does this function still work? Is there any chances of getting it for Android and play videos the same as we play videos by path or by reference?

Device (which devices are you having the issue with - model, OS version number):

Quest 2

Media (tell us about your videos - number of videos, resolution, codec, frame-rate, example URLs):

I am running this application on Android for the Quest 2.

System Information:

AVPro Video: v2.5.0 (plugin v2.5.0f1-ultra) Target Platform: Android Unity: v2021.3.8f1 WindowsEditor OS: Desktop - B550M DS3H AC (Gigabyte Technology Co., Ltd.) - Windows 11 (10.0.22621) 64bit - English CPU: AMD Ryzen 5 5600X 6-Core Processor - 12 threads - 32691KB GPU: NVIDIA GeForce RTX 3080 - NVIDIA - Direct3D 11.0 [level 11.1] - 10067KB - 16384

Gurwar avatar Nov 11 '22 17:11 Gurwar

Hi @Gurwar,

Its not currently possible, but is something that we could look into supporting in the future.
In the meantime, our other supported encryption methods are here: https://www.renderheads.com/content/docs/AVProVideo/articles/feature-content-protection-ultra.html

Chris-RH avatar Nov 14 '22 11:11 Chris-RH

Thanks for the reply @Chris-RH,

Do you know of any other libraries that could be used to support such a feature?

Gurwar avatar Nov 18 '22 23:11 Gurwar

I am afraid we do not.

This is something we will look to add in the near future.

Ste-RH avatar Dec 09 '22 17:12 Ste-RH

My team ended up using the caching feature of AV Pro to download videos locally. If your application requires internet authentication it's a good alternative to playing videos directly from the video file.

Gurwar avatar Dec 09 '22 18:12 Gurwar