UnityPlugin-AVProVideo icon indicating copy to clipboard operation
UnityPlugin-AVProVideo copied to clipboard

Dual MediaPlayer Video Overlap

Open PulsarCA opened this issue 1 year ago • 9 comments

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

  1. 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

PulsarCA avatar Jan 22 '24 02:01 PulsarCA

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?

Chris-RH avatar Jan 23 '24 14:01 Chris-RH

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.

PulsarCA avatar Jan 24 '24 02:01 PulsarCA

Are you using the Update MultiPass Stereo component? https://renderheads.com/content/docs/AVProVideo/articles/component-update-multipass-stereo.html

Chris-RH avatar Jan 24 '24 14:01 Chris-RH

Yep, and all the other 3d videos play fine. The issue only crops up when doing two media players at the same time.

PulsarCA avatar Jan 24 '24 17:01 PulsarCA

We got a build going with all the videos stored locally, but we are still having the overlap issue.

PulsarCA avatar Jan 27 '24 22:01 PulsarCA

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.

PulsarCA avatar Feb 05 '24 02:02 PulsarCA

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?

Chris-RH avatar Feb 05 '24 08:02 Chris-RH

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.

PulsarCA avatar Feb 17 '24 01:02 PulsarCA

So it must be something that you are adding that is getting stripped/altered in the build process. Are you using custom shaders?

Chris-RH avatar Feb 19 '24 14:02 Chris-RH

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.

PulsarCA avatar Mar 09 '24 19:03 PulsarCA