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

Black screen when playing video on Android #1802

Closed Hllib closed 2 months ago

Hllib commented 3 months ago

Description Videos with AVPro are not playing on Android devices with Snapdragon 680 CPU and 4GB RAM. The same videos are playing when using Unity standart videoplayer. At the same time, those videos work with AVPro on Samsung Galaxy A31, Redmi Note 9 Pro, Redmi Note 8 Pro

Setup

Additional Notes Problem stays when using H264 codec as well.

Logs Error Unity [AVProVideo] Error: Loading failed. File not found, codec not supported, video resolution too high or insufficient system resources.

Chris-RH commented 3 months ago

That's odd.

Is it repeatable using a new project and just AVPro mediaplayer demo scene? Can you provide a full logcat please?

Hllib commented 3 months ago

Here are the logs: logs.txt As for demo scene with just mediaplayer - we will check this in the meantime.

Also, we discovered that if we compress the video to 1424*1068 with H264 codec then it works

Hllib commented 3 months ago

We have checked videos(with specs that were initially mentioned in the issue) in a new project - it's the same for Redmi 11, they don't play

Chris-RH commented 3 months ago

It sounds like the device is just not capable of playing the original file.

Hllib commented 3 months ago

The video plays on the device iself, though it lags. It does not play at all in Unity build

Chris-RH commented 3 months ago

Does it work in editor? Have you tried software decoding? Have you tried Android Mediaplayer rather than exoplayer? Are you playing more than one video? Have you got anything else in the background? If the video doesn't play well on the device by itself, then the added overhead of Unity is perhaps putting too much strain on the system's resources.

Hllib commented 2 months ago
  1. Yes, it always works in editor
  2. We have not yet tried it
  3. We will check that
  4. No, we are playing only one video at a time
  5. We have several spine animations in the background
Chris-RH commented 2 months ago

It sounds like the added overhead of Unity and background animations means that your device is unable to play the video, since it struggles to play it on its own player alone.