RenderHeads / UnityPlugin-AVProVideo

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

Resource ID out of Range #1139

Closed BeardDevelop closed 2 years ago

BeardDevelop commented 2 years ago

Describe the issue We are using AVPro to project a 360 video on a spherical mesh in a VR enviroment. After running our build for a while the video goes black. It will always do this after a seemingly random while. The following errors show up in the log:

[AVProVideo] Opening C:/Users/User/Desktop/build29-03/VR_BalloonFlight_Prototype_Data/StreamingAssets\Videos/FloriadeVideos/01_VID_238_Noordoost_Polder.mp4 (offset 0) with API MediaFoundation
[AVProVideo] Using playback path: MF-MediaEngine-Hardware (7680x3840@60,00)
Resource ID out of range in GetResource: 1067545 (max is 1048575)
Resource ID out of range in SetResource: 1067545 (max is 1048575)
Resource ID out of range in GetResource: 1067545 (max is 1048575)
Resource ID out of range in SetResource: 1067545 (max is 1048575)
Resource ID out of range in GetResource: 1067545 (max is 1048575)
Resource ID out of range in GetResource: 1067545 (max is 1048575)
Resource ID out of range in GetResource: 1067545 (max is 1048575)
Resource ID out of range in GetResource: 1067545 (max is 1048575)
Resource ID out of range in GetResource: 1067545 (max is 1048575)
Resource ID out of range in GetResource: 1067545 (max is 1048575)
Resource ID out of range in GetResource: 1067545 (max is 1048575)
Resource ID out of range in GetResource: 1067545 (max is 1048575)
Resource ID out of range in GetResource: 1067545 (max is 1048575)
Resource ID out of range in GetResource: 1067545 (max is 1048575)
Resource ID out of range in GetResource: 1067545 (max is 1048575)
Resource ID out of range in GetResource: 1067545 (max is 1048575)
Resource ID out of range in GetResource: 1067545 (max is 1048575)
Resource ID out of range in GetResource: 1067545 (max is 1048575)
Resource ID out of range in GetResource: 1067545 (max is 1048575)
Resource ID out of range in GetResource: 1067545 (max is 1048575)
Resource ID out of range in GetResource: 1067545 (max is 1048575)
Resource ID out of range in GetResource: 1067545 (max is 1048575)
Resource ID out of range in GetResource: 1067545 (max is 1048575)
Resource ID out of range in GetResource: 1067545 (max is 1048575)

Your Setup (please complete the following information):

AndrewRH commented 2 years ago

Some people report a solution here:

https://answers.unity.com/questions/1543466/waht-does-it-mean-resource-id-out-of-range-in-getr.html

Not sure if this is really AVPro Video related? If you don't play the video do you still get this issue?

BeardDevelop commented 2 years ago

The errors pop up after trying to load a video with AVPro, so it seems to me that it's AVPro related. We are applying the texture through the Apply to Material component. Its also just the video going black, not the whole screen. We are also not creating render textures on our own.

AndrewRH commented 2 years ago

Hmm strange... nobody else has reported this.

I wonder if it's specific to the version of Unity you're using... Can you reproduce it using other versions (eg 2020.x)?

AndrewRH commented 2 years ago

@BeardDevelop We would like to help solve this issue, but we need to try to narrow things down as we haven't been able to reproduce it yet.

1) Could you give us a number for approximately how long it takes for this to happen generally? 2) Does it happen if you try using a different video (perhaps one of our sample videos that are lower resolution)? 3) Which version of URP are you using? 4) If you don't use URP does the issue still happen?

Thanks,

Chris-RH commented 2 years ago

@BeardDevelop Have you been able to try any of these?

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.

stale[bot] commented 2 years ago

This issue has been automatically closed because it has not had recent activity. If you wish to continue this issue, then please create a new issue as we do not monitor closed issues.

haiyaojing commented 1 year ago

maybe unity bugs! We recently reproduced the bug without video.

haiyaojing commented 1 year ago

maybe unity bugs! We recently reproduced the bug without video.

final we found create rt、release rt every frame cause this problem

Chris-RH commented 1 year ago

Ahh, very interesting, thank you :)