RenderHeads / UnityPlugin-AVProVideo

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

8K 360 video on Quest 2 crashing #547

Closed RuudvanReenen closed 3 years ago

RuudvanReenen commented 3 years ago

Describe the bug When using AVPro player to play an 8K video (tried with H264 and H265, 7680x4320, 30fps) from local storage it does play but after a short while it will crash the app. This can also be triggered by mounting/unmounting the headset a few times. Tried with regular and Fast OES path. Video only shows when using Exo Player, with Media Player the image is black.

The same videos play without any issues when using Oculus TV. It's even capable of playing 7680x4320 @ 60fps.

Your Setup (please complete the following information):

To Reproduce

  1. Video player set to Equi rectangular 360 layout mapping, with Exo Player and System Direct Audio Mode.
  2. Apply to Mesh is used with a sphere using the OctahedronSphere mesh
  3. Sphere uses the AVProVideo/VR/InsideSphere Unlit (stereo+fog) shader, or when using OES: the AVProVideo/VR/InsideSphere Unlit Transparent(stereo+color+alpha) - Android OES ONLY shader.
  4. Build and run the app and play the video on Quest 2. After a while (mileage varies) the app crashes to Oculus Home without any warning/message.

Logs adb logcat: questlog.txt

Screenshots If applicable, add screenshots to help explain your problem.

Videos If applicable, add a copy of your video or the URL

Please DO NOT LINK / ATTACH YOUR PROJECT FILES HERE

Instead email the link to us unitysupport@renderheads.com

Ste-RH commented 3 years ago

The log you send appears to not show any AVPro Video logging at all. Are you sure your app is not crashing in another area? There looks to be plenty of memory issues (out of memory, failed allocations, etc)

Have you tested playback in version 2 of AVPro Video? We added a feature to the ExoPlayer API path that should favour memory limitations over buffering when playing back higher bitrate videos. You might find this helps with the memory issues you look to be facing. You can grab the trial here: https://github.com/RenderHeads/UnityPlugin-AVProVideo/releases

Ste-RH commented 3 years ago

What bitrate is the video you are playing back @RuudvanReenen ?

Ste-RH commented 3 years ago

We will be closing this issue soon due to lack of response

RuudvanReenen commented 3 years ago

Sorry for the late reply. The bitrate is approximately 130Mbps. To test if this is the issue I'll see if 50Mbps plays well, but this will probably look horrible for 8K 360 with some movement.

I hope I can add a new log file this week. The video (and the memory use of it) is definitely the cause of the crashing, with lower resolution 360 videos the app keeps running fine. Those videos don't hit 130Mbps though.

Ste-RH commented 3 years ago

Roger that,

As I said earlier, in version 2 of AVPro Video we utilise an ExoPlayer feature that lets the player favour lower ram usage over buffering ahead duration.

I know from another issue reported (and testing here) that 100MBit near 8k videos playback on a Quest 2 just fine in version 2. You could test your use-case out using the trial version maybe...if having very high bitrates is super important to your project, at least then you have an option to get things working as you require.

Ste-RH commented 3 years ago

If you want to send over one of your 130MBit videos to unitysupport@renderheads.com then I will happily test it in AVPro Video version 2 on a Quest 2.

RuudvanReenen commented 3 years ago

Thanks for looking into it, I've sent a link via email

Ste-RH commented 3 years ago

We have not received anything from you @RuudvanReenen. Can you confirm you have sent it to the correct address? You might need to use something like WeTransfer to send the video.

RuudvanReenen commented 3 years ago

I've emailed to unitysupport@renderheads.com on Wednesday around 13:00 CET, with a link to the files on Google Drive. Ended up in spam folder?

Ste-RH commented 3 years ago

There is no spam folder in our support ticket system. I have just checked everywhere it could be and have nothing for 3rd Feb. Could you send it through again?

RuudvanReenen commented 3 years ago

Ok, sent again, also from another account

Ste-RH commented 3 years ago

Received. Thanks

Ste-RH commented 3 years ago

I can confirm that both videos playback perfectly fine on Quest 2 using AVPro Video v2.

Ste-RH commented 3 years ago

There is no back-port possible to v1.x for the 'favour lower ram usage over buffering ahead duration' feature of v2. I am closing this issue now as three is a fix offered in v2 and we cannot offer one in v1.x.