Search Unity

Video Everytime I change a video clip in a video player the "game" dosen't work anymore

Discussion in 'Audio & Video' started by Marshmaline, May 23, 2020.

  1. Marshmaline

    Marshmaline

    Joined:
    Oct 3, 2019
    Posts:
    2
    Hi, I'm new to Unity and recently build my first 'interactive-movie-game'. When I finished my project I realized that the size of it was too large to export it for WebGL, therefore I compressed all my videos.
    Now I have this weird problem that everytime I just change the video clip in the video player component to the compressed ones, the game doesn't word anymore.
    That means I created some UI elements which should show up at a specific time of a video, to let the player make decisions and so on.
    But they won't show up anymore when I change the video clip to the compressed version of that video and I don't know why.
     
  2. DominiqueLrx

    DominiqueLrx

    Unity Technologies

    Joined:
    Dec 14, 2016
    Posts:
    260
    Hi!

    The WebGL version of the VideoPlayer only works with URLs. So the workflow in this platform would be to serve the video files separately (e.g.: via StreamingAssets, which are then streamed separately at play time). This way, the movie payload is not part of the final build size and you should cause any limit to be reached.

    But just to make sure I understand what you are doing: what do you mean by "I compressed all my videos"?

    Dominique
    A/V developer at Unity
     
    jaimelugo likes this.
  3. jaimelugo

    jaimelugo

    Joined:
    Nov 8, 2019
    Posts:
    27
    Thanks for this reply Dominique, just to confirm, will this work as well with 360 Videos?
     
  4. DominiqueLrx

    DominiqueLrx

    Unity Technologies

    Joined:
    Dec 14, 2016
    Posts:
    260
    There is no special handling in the VideoPlayer for 360 videos. It's up to you to feed the VideoPlayer's output into a texture that has a shader dealing with the projection that your video may have (we currently do not lift this information from the movie file).

    Here's some info about how to leverage our panoramic shader with the VideoPlayer in order to have a 360 video play into the skybox: https://docs.unity3d.com/Manual/VideoPanoramic.html

    Dominique