Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Unity 2020 LTS & Unity 2021.1 have been released.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Video VideoPlayer class does not play in build

Discussion in 'Audio & Video' started by ViralArcade, Apr 12, 2017.

  1. ViralArcade

    ViralArcade

    Joined:
    Feb 21, 2017
    Posts:
    4
    I attached a video clip ogv format to the VideoPlayer component and uses material override mode to display it. in the editor, the video plays fine and the isPlaying variable returns true. However when I build the project, the video does not play and the isPlaying variable returns false.

    *Note this is done on the HTC vive if that makes any difference


    Image of the built game and the log viewer to show that it is not working
    videofailing.PNG

    Image of the game in the editor and the video working
    videoplaying.PNG
     
  2. daisySa

    daisySa

    Joined:
    Dec 29, 2011
    Posts:
    341
    I have the same issue in the Windows 10 build: isPlaying is false, and the video is not rendered.

    The same code is working perfectly in the Windows 10 editor, and also in macOS (both editor and build).

    In my case, it's very simple: just a .mov file being rendered to the camera's far plane.
     
    jgillen likes this.
  3. ventureaaron

    ventureaaron

    Joined:
    Jan 31, 2017
    Posts:
    2
    I'm having this issue as well. Unity 5.6.0f3, using VideoPlayer component in Canvas with a linked ogv file (not streamassets/URL). Have tried many different settings on the video and all work fine in the editor but blank when in standalone build (x86). Also can't seem to find file anywhere in data folder. Any ideas on what my next step should be?
     

    Attached Files:

  4. ViralArcade

    ViralArcade

    Joined:
    Feb 21, 2017
    Posts:
    4
    I fixed this issue by using a mp4 file instead of a ogv.
     
  5. ventureaaron

    ventureaaron

    Joined:
    Jan 31, 2017
    Posts:
    2
    Thanks for the update. I also tried this, and messing around with transcode options. I'm convinced that my code is the culprit. It bums me out that it works fine in editor mode though.

    have a good one.
     
  6. ssshake

    ssshake

    Joined:
    Jun 29, 2013
    Posts:
    18
    I'm having the same issue in 5.6.0f3. Works in editor not in stand alone.
     
  7. ssshake

    ssshake

    Joined:
    Jun 29, 2013
    Posts:
    18
    I converted from ogv to MP4 and it works. Which is stupid because i started using ogv for compatibility reasons in a prior build. Unity needs to get better at protecting against regression in production releases.
     
    lmbarns likes this.
  8. Rob-Davis

    Rob-Davis

    Joined:
    Jan 10, 2012
    Posts:
    21
    shelkeanmol likes this.
  9. Rob-Davis

    Rob-Davis

    Joined:
    Jan 10, 2012
    Posts:
    21
    Last edited: May 17, 2017
  10. MartinGebske

    MartinGebske

    Joined:
    Jun 18, 2013
    Posts:
    13
    This VideoPlayer is really so-so. I'm using it on mobile. So it works in one Project perfectly fine. When I switch (same Unity Version 5.6.1f1) projects and use the SAME video... it doesn't work. Encountered the same issues like you: a) black screen b) only first frame. Don't know what's going on.
    Using a 360 Video in the same project... works perfectly fine.
    I'm trying using Transcode, but all I see is "Not all platforms transcoded". But I checked "Transcode" on all Platforms. Weird.
     
  11. shura0123

    shura0123

    Joined:
    Jun 26, 2017
    Posts:
    8
    I have same issue for IOS 11, I tried setting transcode but no luck!!! I am using mp4 as well and no luck too!! What to do??? Not to mention this is in Unity 2018.1.6f1
     
  12. shelkeanmol

    shelkeanmol

    Joined:
    Jul 2, 2019
    Posts:
    4
    I just build a game, which has 2 scene one with game and other with my intro video, in intro i created one canvas and attached game object to it ,PROBLEM is when i build and run game the game only shows splash screen i.e. made with unity and crashes.... And when i build only with game scene it works perfectly fine .....any solution over this
     
  13. nrajacic74

    nrajacic74

    Joined:
    Oct 9, 2019
    Posts:
    1
    upload_2020-7-14_16-44-30.png

    Turning Transcode on in Import settings fixed it for me.
     
    GreedyVox likes this.
  14. JustinTheSwift

    JustinTheSwift

    Joined:
    Feb 4, 2017
    Posts:
    5
    How can I see that dialog in the inspector? When I click the video it shows me nothing.
     
  15. GreedyVox

    GreedyVox

    Joined:
    Nov 18, 2015
    Posts:
    23
    For the win!
     
unityunity