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

Fragged / Offset Video Playback for users with AMD GPUs when generate mipmaps is enabled #1023

Open TheRustyFist opened 2 years ago

TheRustyFist commented 2 years ago

Describe the issue We just put AV Video Pro into our project, video playback on a GUI element, Windows PCVR game, nothing fancy, and playback is offset/fragged for some (but not all) users of AMD video cards. How the video appears is included in the files for this report, as well as a matrix of CPU/GPU from first user reports.

Any idea what we should do here?

Your Setup (please complete the following information):

To Reproduce

Logs If applicable, add error logs to help explain your problem.

Screenshots 20211122143954_1 matrix

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

TheRustyFist commented 2 years ago

Video that didn't seem to attach first time: https://user-images.githubusercontent.com/65753133/142935556-b05498ee-aefb-4537-b6c0-35be2a4ddeae.mp4

TheRustyFist commented 2 years ago

Also, in case this is useful, for some users the video is offset and block-garbled, whereas for other users, the video is simply offset but still 'legible'. 20211122154538_1

20211122170337_1

AndrewRH commented 2 years ago

@TheRustyFist

1) Are you able to reproduce this with our sample videos? I'm just wondering whether it's some sort of encoding issue that just happens to not play well with the AMD decoder....

2) Do you know what GPU driver version is installed on those machines with these issues - perhaps they could try upgrading them?

3) Also, are you using the default settings on the MediaPlayer component, or have you tweaked any (eg Low Latency)? Perhaps you could post a screenshot of your MediaPlayer settings, especially the Platform Specific > Window section?

4) Could you test using a newer version of Unity?

Thanks, Thanks,

TheRustyFist commented 2 years ago
  1. I did not test with your sample videos, but will do so today. The videos I use are super vanilla constant bitrate default premiere settings mp4s, so I'd be surprised if this was the issue.

  2. I tested 6 different AMD driver versions with two of the users having the issue, both the very latest, and rolling back in a several month increments back until their GPUs were released. No change in behavior.

  3. Default settings on mediaplayer. I am in the process of adding exposed toggle buttons for hardware encoding and video api to see if changing those changes behavior, will report back here.

  4. Newer Version of Unity is non-starter. This game is locked on this exact version of Unity for a host of internal and user content reasons.

Will post here again with more info later today. Thanks!

TheRustyFist commented 2 years ago

So after trying every thing listed and getting the exact same results, I disabled "Generate MipMaps" and set the filtering back to Bilinear (from Trilinear), and that seems to have fixed the problem with the users who were having issues.

For completeness: Tried changing apis, had no effect. Tried changing hardware decoding on/off, no effect. Occurred even with your test video. Tried multiple driver versions, no effect. The only thing that removed this glitch was disabling Mip Map Generation. Might be worth grabbing a modern AMD GPUs (as this doesn't seem to effect -anything- from the RX570/580 generation), and seeing if you can reproduce and find the root of this issue. (or not because who would buy an AMD gpu... gross).

Anywho, thanks for the help! Everything else is running/working swimmingly with the product. It's a life saver.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

AndrewRH commented 2 years ago

Interesting that it's the mipmap generation option that is causing this problem.... At least at gives us something to look at. Thanks, @TheRustyFist perhaps we could give you a debug build with some extra logging - would you be willing to test for us?