RenderHeads / UnityPlugin-AVProVideo

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

[Android] Game is crushed, when i open it. Quest 2 / 3 #1902

Closed AlexDeKarlo closed 1 week ago

AlexDeKarlo commented 1 week ago

Please DO NOT LINK / ATTACH YOUR PROJECT FILES HERE

Describe the issue When i open game, game is crushed.

Your Setup (please complete the following information):

To Reproduce

  1. Create project
  2. Install AVPro
  3. Set path: video.mp4 and use Relative To Persistent Data Folder
  4. In editor work great
  5. in quest 3/2 game crash

Logs Quest 3 com.DefaultCompany.AVProTest-logcat.txt

Screenshots Editor test

Videos Quest 3 https://youtu.be/3-BcbP3Mn00

Chris-RH commented 1 week ago

We no longer support AVPro Video version 1 as it was depreciated in favour of AVPro Video version 2 in Q1 2021.

  1. Are you testing on an actual device or an emulator?
  2. Can you reproduce it in a new project running only AVPro Video demo scenes?

From looking at the information provided it looks like the bitrate of your video is exceptionally high. Recommendations are a maximum of 100Mb/s. You should look into encoding it properly to reduce this.

You can also reduce the maximum buffer in the Android options of the mediaplayer component, so it will require less memory.

Make sure your video is encoded with faststart: ffmpeg -i input.mp4 -acodec copy -vcodec copy -movflags faststart output.mp4

Additionally:

"Alloc concurrent copying GC freed 15(560B) AllocSpace objects, 0(0B) LOS objects, 0% free, 255MB/256MB, paused 11us,18us total 19.207ms" From your log, it seems the system is only allowing your app to allocate 256MB of memory, which isn't very much. You could try enabling largeheap.

"Error LoadTask java.lang.OutOfMemoryError: Failed to allocate a 65552 byte allocation with 64704 free bytes and 63KB until OOM, target footprint 268435456, growth limit 268435456" It looks like your app was using all its allowed memory and ExoPlayer was denied allocating 65552 byte.

MorrisRH commented 1 week ago

I see you're using the Mono runtime on Android, I would recommend switching to IL2CPP for builds as you can target 64bit architectures (Mono is 32bit only).

Closing this as we no longer provide support for AVPro Video 1.x.