UnityPlugin-AVProVideo
UnityPlugin-AVProVideo copied to clipboard
Dual MediaPlayer Video Overlap
Describe the issue When using two media players concurrently, both media players attempt to play both videos at the same time, causing a stuttering overlap effect. This only happens when compiled and not in runtime. This effect continues until either of the videos ends. The problem is sporadic and only occurs on about 80% of builds. We are using ExoPlayer and Android OES shaders on the Apply to Material component. Stereo Packing is set to Left Right and our rendering mode is set to multi-pass.
Your Setup (please complete the following information):
- Unity version: 2021.3.16
- AVPro Video version: 2.9.1, happens in 2.8.0 as well.
- Operating system version: Android
- Device model: Meta Quest 2.
- Video specs: Streaming via HLS or mp4. Neither work.
To Reproduce
- Build and run two media player objects with two streaming 3d video playing concurrently.
Logs No errors reported
Screenshots https://vimeo.com/905032258
Videos https://vimeo.com/893873360 https://vimeo.com/893873360
I can't access the videos linked. What are the specs of the videos? Does this occur if the media is stored locally?
You say that this does not occur on all builds. What is different about the builds where it works as it should? Different resolutions? Different codecs? What?
Hello Chris, thanks for looking into this.
New links: https://vimeo.com/893872742 https://vimeo.com/893873360
The videos are 810x1440 in L/R 3D. H.264 codec, and I have tried both mp4 and HLS containers. I have not gotten the project to successfully compile using local storage on the Quest 2. Also the project will contain about 20gb of video so we would prefer a streaming solution anyways.
I haven't been able to pin down anything that causes the overlap problem in the build. I will change something in a completely different scene and then build and sometimes the overlap problem will be gone.
Are you using the Update MultiPass Stereo component? https://renderheads.com/content/docs/AVProVideo/articles/component-update-multipass-stereo.html
Yep, and all the other 3d videos play fine. The issue only crops up when doing two media players at the same time.
We got a build going with all the videos stored locally, but we are still having the overlap issue.
Okay, we seem to have narrowed it down to whether or not it is a development build. Development builds work fine with no video overlap. The problem comes back any time we try a standard build, without the "development build" box checked.
oh wow, that's odd. I wonder if there is some sort of code stripping going on? Can you reproduce this in a new project using just AVPro Video?
Couldn't get it to reproduce with just AVPro. We migrated our whole project to Unity 2022.3.19f and installed a fresh version of AVPro. Still having the issue.
So it must be something that you are adding that is getting stripped/altered in the build process. Are you using custom shaders?
I think we figured out the issue. It seems to be related to "Low Overhead Mode (GLES)" in XR Plugin Management - Oculus. It occasionally gets auto-enabled by the Meta XR Recommended Items process. Not always though, and I'm not sure what triggers it, but it seems to be the cause of the problem.