RenderHeads / UnityPlugin-AVProVideo

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

Android VR 180 Stereo video switching/flickering between each eye when looking around #884

Closed rescape-arron closed 2 years ago

rescape-arron commented 3 years ago

We are currently attempting to setup a 180 Stereo VR video player in our project and have it mostly working but are running into an issue where when built to the android VR device, while the video is playing and you look around, there are directions that when you look past them there is a visible flicker/change in the display that looks as though there is some sort of swapping occurring between the two eye cameras.

I'm not entirely sure what is causing this as I think it has been setup in accordance with the documentation for this, but I'm sure there is something I've missed.

Your Setup (please complete the following information):

Resolution: 5760 x 2880 Frame Rate: 29.97 Codec: H.264 MP4 File Size: 1.63GB & 53.6MB

To Reproduce

  1. AVPro Video - Core Android Edition - Version 2.1.8 into a new android project
  2. Duplicate Demo_360Stereo scene to make a 180 version
  3. In the 180 scene change the following:
  4. Remove Main Camera and add Pico SDK Rig (Found Here)
  5. MediaPlayer Source to Path
  6. MediaPlayer auto-open & auto-play to false
  7. MediaPlayer StereoPacking to Left Right
  8. MediaPlayer VideoMapping to Equirectangular 180
  9. MediaPlayer Android Specific Video API to Media Player
  10. Change UpdateMultipassStereo Camera to use Pico SDK Rig Head camera (also tested with BothEyes camera)
  11. Demo-360 material Stereo Mode to Left Right
  12. Demo-360 material Layout to EquiRect180
  13. Created simple script to get path to video file and call OpenMedia on the MediaPlayer with autoplay set to true.
[SerializeField] MediaPlayer _mediaPlayer;

private void Start()
{
    StartCoroutine(Setup());
}

public IEnumerator Setup()
{
    // ProjectController will just setup paths based on the device, and project names
    yield return ProjectController.Instance.Setup();

    // ProjectController.Instance.VideoFolderPath() returns our video directory on the device
    var path = Path.Combine(ProjectController.Instance.VideoFolderPath(), "180_video.mp4");
    _mediaPlayer.OpenMedia(new MediaPath(path, MediaPathType.AbsolutePathOrURL));
}

Videos https://user-images.githubusercontent.com/88445192/128214772-c5066401-622c-47c2-8bd7-52b7f057b6fc.mp4

kahnivore commented 3 years ago

Hi,

When you say that you also tested it on the Pico G2 4K but that you couldn't reproduce it - do you mean it plays smoothly without flickering on this device, and not on the Neo 3?

stale[bot] commented 3 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.

rescape-arron commented 3 years ago

Hi @kahnivore,

Apologies for the late reply, I didn't receive a notification! But yes that is correct, on the Pico G2 4K it seemed to work smoothly as expected.

stale[bot] commented 3 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 3 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.

kahnivore commented 3 years ago

We don't have a Pico to test this on but have reproduced this behaviour on Quest 2 via a cloud build as per #920

kahnivore commented 3 years ago

@rescape-arron is there any chance you are using a cloud build to test this?

rescape-arron commented 3 years ago

Hi @kahnivore thanks for your reply! Unfortunately no we are just doing a local build from Unity and deploying the apk onto the headset to test.

Ste-RH commented 2 years ago

@rescape-arron Did you resolve this issue or do you still require support?

rescape-arron commented 2 years ago

@RenderHeadsSte We have not been able to properly resolve this issue but are currently using a 360 player (with it being reflected on the back) but then hiding the back of the video sphere with a plane/hemisphere. It would be nice to get this properly resolved, but that was our workaround for now as it was a time-critical project.

Ste-RH commented 2 years ago

Can you share a bare bones example project with us so we can investigate? You can send this over to unitysupport@renderheads.com with the subject line #884

rescape-arron commented 2 years ago

I'd be happy to provide this in the new year if that is possible, have had to move to another issue for now.

rescape-arron commented 2 years ago

@RenderHeadsSte Hi again, my colleague @rescape-henry has been in touch via that email above (subject #884) and has sent over the bare bones project along with some extra information found from investigating further. Hope this helps to figure out where the issue lies.

kahnivore commented 2 years ago

Thanks, we will look at this and get back to you ASAP.

rescape-henry commented 2 years ago

Hi @kahnivore do you have any update on this issue for us?

aracid commented 2 years ago

Hi there Not sure if this helps but I ran into the same issue and it turned out to be the background type on the camera.

I found this to be the case with the Universal Render Pipeline Setting it to Skybox seems to fix it.

image

Cheers

Ste-RH commented 2 years ago

Thanks @aracid. Yeah, we found this recently as well whilst investigating a what looks like an identical issue #1165. Hoping to find a catch-all solution, but for now you can either set skybox as you suggest, or use the test shader reported as good that I posted in the linked issue.

Ste-RH commented 2 years ago

Closing this issue due to age and lack of response from the OP. As outlined in the linked issue above, we have made significant changes to the stereo eye selection in v2.5.2.