RenderHeads / UnityPlugin-AVProVideo

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

[Android] Playback fails on NVIDIA Shield Pro #1953

Closed MarsKK closed 5 hours ago

MarsKK commented 1 month ago

Describe the issue A clear and concise description of what the issue is. androidx.media3.exoplayer.ExoPlaybackException: Unexpected runtime error

Your Setup (please complete the following information):

Logs 111 222

Videos [If applicable, add a copy of your video or the URL]()

Chris-RH commented 1 month ago

1) Are you able to reproduce this in a new project running only the AVPro Video demo scenes? 2) That's very difficult to read. Can you post the full unfiltered logcat in txt format please. 3) What device did you test it on? 4) Have you tested it on other devices?

pete-edwards commented 1 month ago

I also seem to get this error after updating. I also ran it on the demo scene and it still happens

Unity Version: 2022.3.39f1 AVPro Version: 3.08 Demo scene: Demo_MediaPlayer Android Version: 11 Device: NVidia Shield Pro av_issue_logs.txt

Chris-RH commented 1 month ago

Hi @pete-edwards

  1. Can you confirm which model of Nvidia shield this is please (2015, 2017 or 2019)
  2. Is it reproducible when switching from Vulkan to OpenGLES?
  3. Is it reproducible when switching from Exoplayer to Android mediaplayer?
  4. Can you reproduce this on any other devices?
pete-edwards commented 1 month ago

Hi @pete-edwards

  1. Can you confirm which model of Nvidia shield this is please (2015, 2017 or 2019)
  2. Is it reproducible when switching from Vulkan to OpenGLES?
  3. Is it reproducible when switching from Exoplayer to Android mediaplayer?
  4. Can you reproduce this on any other devices?

Thanks for the suggestions @Chris-RH. On the demo project, turning off Vulcan and using OpenGLES instead had the same crash. Switching to android media player from exo player no longer had the crash in the logs, but still was not rendering anything. However, building with both changes (ie Android media player AND OpenGLES) it now seems to run the demo video on the device.

I've attached logs of the first 2 cases where it was not working. We are using the 2019 version of the Shield. I've not tried on other Android devices yet (we only target the Nvidia Shield so really it needs to work on that).

Also this has just started happening when trying to update to version 3. We've been running on v2 succesfully for a couple of years now (2.93 I believe is the current version we have live) Thanks.

av_issue_android_media_player_logs.txt av_issue_opengles_logs.txt

Chris-RH commented 1 month ago

OK, thank you very much, that's interesting. There were quite a few changes made in the upgrade to version 3. One of which was migrating from Exoplayer 2.19.1 to Media3 1.1.0. Out of interest, are you able to test Exoplayer (media3)'s demo app? I think that we might look into purchasing one of these devices for testing, however the dev team is on holiday, so it won't happen until the end of August at the earliest.

pete-edwards commented 1 month ago

Ah right ok. I'll try that demo when I get the chance. I think for now we'll hold off upgrading then until this is fixed as I'd rather stick with exoplayer. Thanks.

Chris-RH commented 1 week ago

Quick update. We are looking to purchase an Nvidia Shield Pro (2019) so that we can get a better idea of what is going on.

MorrisRH commented 1 week ago

The Tegra hardware is proving to be a bit problematic. I've fixed the issue that generates the unexpected runtime error. However the following issues are now present:

  1. Vulkan rendering does not work - we're investigating but currently have no clues as to why it's not working
  2. OpenGL ES3 with the texture format set to YCbCr420 OES flickers badly - again we're investigating but have no idea why the Tegra is behaving differently to other hardware

For now you will be able to playback using the OpenGL ES3 renderer with the media player's texture format set to BGRA.

This will make it into the next release and we'll keep this issue open whilst we figure out what's going on with the other problems.

MorrisRH commented 1 week ago

OpenGL ES3 OES texture issues have been fixed and will make it into the next release

MorrisRH commented 1 week ago

I've opened a new issue for Vulkan not working: #1990

pete-edwards commented 1 week ago

OpenGL ES3 OES texture issues have been fixed and will make it into the next release

That's great thankyou. We'll keep an eye out for the next release

Ste-RH commented 1 week ago

AVPro Video v3.0.10 has now been released. Do let us know if this fixes the issue for you.

pete-edwards commented 3 hours ago

@Ste-RH This did fix the issue for us. Thanks!