Search Unity

  1. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  2. Want more efficiency in your development work? Sign up to receive weekly tech and creative know-how from Unity experts.
    Dismiss Notice
  3. Participate with students all over the world and build projects to teach people. Join now!
    Dismiss Notice
  4. Build games and experiences that can load instantly and without install. Explore the Project Tiny Preview today!
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  6. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

How to integrate 360 video with Unity

Discussion in 'AR/VR (XR) Discussion' started by touloused, Jul 27, 2017.

  1. antics_unity


    Jul 4, 2018
    Hi touloused,

    thanks for the heads up on how to integrate video in a unity project and it's very cool; I have it working for android and was wondering to get it work for webgl do I need to do something special?

    I am trying to run it on my localhost, but the problem I have is that it is trying to load an sharedassets1.resource file instead of the video's that I provided. I am new in unity and have no clue how to tackle this. Does it have to do with buuildsettings compress mode or something?

  2. Consort


    Nov 16, 2017
    Hi Folks!

    Firstly, thank you Unity for this fantastic addition to Unity.

    My question is this:

    I'm building a simple little app for a client which needs to play 360 videos ( which they are providing to me ) in a youtube 360 format, as shown here. The top half of the video is the left/right panorama, and the bottom half is an up/down panorama. This, I am assuming, is so that the videos don't have stitching issues at the top and bottom of the sphere.

    If I watch the video on youtube ( where the temporary, not final, videos are located ) they look fantastic, and I can look around in 3D and don't see any stitching issues anywhere.

    However Unity's panoramic skybox shader doesn't seem to have support for this layout.

    Can anyone help or suggest how I could get this to work?



  3. JRW_WSP


    Jun 26, 2017
    I have the same question as zulaman! This shader is working great for me on the skybox but not when I apply it to an actual sphere. I can see it fine on the sphere in the scene view but when in the game view I don't see the sphere at all. Its not a normals issue either as its the same (in game) in or outside the sphere. Any ideas why this is happening? I'm hoping to combine 360 video with 3d sound so could really do with being able to teleport around to different "bubbles" rather than always being at the origin...
  4. unity_WLLuu-hXxoSJRA


    Jul 9, 2018
    We're using this to display stereo (upper/lower) panoramic images and are encountering a very visible seam. This doesn't happen when playing stereo video files.When playing, it looks great - the stereo effect is working perfectly, but there is a very visible seam.

    When I uncheck "Generate MipMaps",as digableMatt,my texture changes on error color.
    Texture MaxSize: 8192.
    Dragged the image (7680x7680)
    Oculus Go sdk.
    But when I change texture's max size on 4096 - it's all ok. There is not a very visible seam without.

    Attached Files:

  5. DaneyT


    Aug 24, 2017
    Hey Dave,

    I also faced this issue and found a solution. It seems that since the beginning of this year youtube has a new encode format for 360 video's.
    If you use the commands below you will get a normal 360 video from youtube as a "flat" video texture file.


    Example get video formats list from URL (with cmd windows)
    youtube-dl --user-agent "" eyn9Bvr4UQ4 -F

    Example: download fragments:
    youtube-dl --user-agent "" eyn9Bvr4UQ4 -f 305+140 --merge-output-format mp4
    Last edited: Oct 28, 2018
    Usmith likes this.
  6. DaneyT


    Aug 24, 2017
    I have a question and I hope someone has already solved it.
    In my quest to get better quality 360 video's I encountered this:

    John Carmack from Oculus seems to have created a way to playback 5k video's with 60frames per second for mobile and pc devices. At the moment (from what I can tell) it is only native supported and not by Unity.
    Has anyone managed to get this working in Unity? Any help is appreciated.

  7. Usmith


    Apr 7, 2013
    This works for me, thank you DaneyT
  8. AdrianG001


    Nov 21, 2018
    Unfortunately after an android update i have the same problem on my Mi mix2

    Adrian Gates
    Technical Consultant - Apps4Rent
    Last edited: Nov 22, 2018
  9. jhlink


    Jul 12, 2017
    Hi everyone!!

    I just wanted to share my solution for playing 360 video content in Unity in case anyone else is working on the same problem.

    I've created a dedicated thread so that future developers can reference the library easily.

    In any case, I hope everyone can benefit from this!! :)
    And if you liked it, please give a star on the Github repository!!
  10. cons_fx


    Sep 24, 2018
    Hello everyone!

    I'm new to unity VR and I am trying to create a scene in VR where a 360 video plays and then transitions to another one through a skybox transition.

    Basically what I wanted to do is:

    1. Start playing first 360 video with VideoPlayer in Skybox
    2. Transition to video 2 by fading in another Skybox with video 2 attached to it

    Is it possible to do this? Because from what I've found out you need a video player to play any 360 video regardless of the skybox. I've managed to change scenes with the SceneLoader() but that requires the scene to fade in and fade out.
    What I want to do is blend the frames of the first video to the second video and then have the 2nd video play.

    Any workaround this?

    Thanks in advance!
  11. souledgar


    Feb 15, 2013
    I assume you're using Unity's Panoramic Skybox technique. The problem is that in Unity, there is only ever one skybox. In order to fade-transition from one thing to another, you need two things to exist at the same time. If you want to continue using the panoramic skybox technique, here's a suggestion off the top of my head:

    1. Before you swap in video 2, render what is currently on the skybox into a texture. Render said texture onto a panoramic sphere or box around the camera, creating a fake skybox. Note that the texture is not a video, its a still.
    2. Swap in video 2. It needs a moment to load up.
    3. When video 2 is ready, fade out the fake skybox.

    Of course, this means that Video 1 freezes while Video 2 loads and transits, but IMO unless you're doing low res and bitrate, attempting to play 2 panoramic videos is risky business at best.