RenderHeads / UnityPlugin-AVProVideo

AVPro Video is a multi-platform Unity plugin for advanced video playback
https://www.renderheads.com/products/avpro-video/
226 stars 28 forks source link

Caching (Android) - Define specific or max resolution option to download HLS in order to avoid big files and slow downloads #1236

Closed bgalerani94 closed 1 year ago

bgalerani94 commented 2 years ago

Is your feature request related to a problem? Please describe.

When downloading HLS files (m3u8) of about 60s length, it occupies more than 300mb in the device's storage. That's probably happening because it's downloading all of the resolutions at once.

When I use the MediaCachingOptions.minimumRequiredResolution and set it to the maximum available resolution (1920x1080), it goes down to about 60mb, but still too big for a 60s video.

Describe the solution you'd like

Is it possible to set a specific or a maximum resolution instead of the minimum? This would probably make the download faster and the file size way smaller.

Describe alternatives you've considered

Setting a specific resolution to be downloaded or even a maximum one would be a good alternative.

Your Setup

Chris-RH commented 1 year ago

Hi @bgalerani94, we've looked into it and it looks like something that we can possibly implement on android in a future version.

bgalerani94 commented 1 year ago

Hi @Chris-RH ! Thank you for the answer!

Do you have any idea if it may be available until August?

And again, thank you so much!

Ste-RH commented 1 year ago

I have implemented a first pass on this and we will release it with the next update (likely released tomorrow). NOTE: this will be Android only as it is unlikely to be something we can offer on iOS.

bgalerani94 commented 1 year ago

Thank you so much!

Chris-RH commented 1 year ago

Version 2.5.6 has been released, please let us know if this has solved your problem.

bgalerani94 commented 1 year ago

Hello,

It looks like it's working just fine.

Thank you for this update!

Chris-RH commented 1 year ago

Awesome, thank you so much for letting us know it works :)

If you've got time, we'd really appreciate it if you could leave a review in the asset store please :)