Search Unity

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:
    340
    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.
     
  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
  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