Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Question 360 Video / Panorama in URP keeps crashing

Discussion in '2019.3 Beta' started by ayruos, Jan 7, 2020.

  1. ayruos

    ayruos

    Joined:
    Nov 7, 2018
    Posts:
    14
    Trying to implement a 360 3D video as a skybox in 2019.3.0f1 URP project. Keeps crashing or hanging. Below more details.

    1. Trying to import the video hangs Unity indefinitely (or at least for 30+ mins, at which point I've force quit). It shows transcoding and is stuck there, clicking on 'stop transcoding' makes Unity unresponsive.

    2. Playing the same video via URL plays back the file but the frames are totally garbled.

    The setup of the scene is simple, video player rendering to a render texture which is used in the Skybox/Panoramic shader and configured through the Lighting tab to be the skybox - nothing else in the scene at the moment. I'm using a fairly powerful Windows Desktop (Ryzen 3700X) with an RTX 2080 Super graphics card and an Oculus Rift headset.

    The exact same setup in a 2019.2.12f1 project has no issues whatsoever. Not sure if I've uncovered a bug (couldn't find anything at first glance in the Issue Tracker) or whether something has changed in this version and I'm doing something wrong. Any help would be appreciated, till then I'll work on 2019.2.
     
  2. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    Could you please check if this still reproduces in 2019.3.0f4? Several video related fixes have been included since f1. If it still reproduces, please submit a bug report with a reproduction project or the video file in question attached to it.
     
  3. ayruos

    ayruos

    Joined:
    Nov 7, 2018
    Posts:
    14

    Hi, thanks, will check first thing tomorrow, away from my system/workspace for the day today.
     
  4. ayruos

    ayruos

    Joined:
    Nov 7, 2018
    Posts:
    14
    Yes, same problem in 0f4. I'll look into how to submit a bug report and a project later in my work day (I see the links in your signature, thanks!)
     
    LeonhardP likes this.
  5. DominiqueLrx

    DominiqueLrx

    Unity Technologies

    Joined:
    Dec 14, 2016
    Posts:
    260
    Thanks for this! As you may have seen elsewhere, the Windows video player is now using hardware acceleration when possible (which explains why you see some gotchas showing up). We should be able to fix this quickly so your video works correctly with 2019.3 as well. Please post the bug id over here when you're done if possible so I can pick it up as soon as possible and help speed-up the bug triage.

    Have a nice day,

    Dominique Leroux
    A/V developer at Unity
     
  6. ayruos

    ayruos

    Joined:
    Nov 7, 2018
    Posts:
    14
    Hi! I've submitted a bug report (Case 1210523) and attached a small edit of the video file in question. Also attached are screenshots of expected results (from Unity 2019.2) and what I'm getting in 2019.3.

    I did not attach a project as it's a standard URP project made from Hub without any additional extras (apart from switching on VR support).

    My system specs, in case it matters, is a Ryzen 3700X, 32 GB RAM and RTX 2080 Super, using a Oculus Rift headset.
     
    LeonhardP likes this.
  7. DominiqueLrx

    DominiqueLrx

    Unity Technologies

    Joined:
    Dec 14, 2016
    Posts:
    260
    Hi!

    I've been working with your footage and it turns out that the processing done by Microsoft Media Foundation, in the context of the new hardware acceleration I described above, is doing some unwanted processing on stereo movies.

    It detects that the movie has stereo and - intrusively - concludes that only one of the two eyes is wanted, resulting in a buffer smaller than expected being produced, leading to the crash you describe.

    I'll try to find a way to disable this unwanted processing but in the mean time, a workaround would be to remove this stereo information from the files. Using Google's tools for injecting spatial media metadata into media files (which are also the tools that were used to set up your media's stereo info), you can do this with:

    python spatialmedia -i --stereo=none original.mp4 original_without_stereo_info.mp4

    Hope this is useful while I'm looking for a solution that won't involve modifying your media... Note however that this only edits the metadata and does not touch the actual video content.

    Dominique
     
    Last edited: Jan 13, 2020
    ayruos likes this.