Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question VideoPlayer works in editor, but crashing in build?

Discussion in 'Audio & Video' started by gsm84, Sep 8, 2021.

  1. gsm84

    gsm84

    Joined:
    Aug 10, 2018
    Posts:
    16
    Hi everyone!

    I have a problem with playing a video in my project (at least I'm guessing that this is what's wrong).
    First of all, in the editor everything works fine, I can play the video and audio too (Audio output mode is set to Audio Source, because when I set it to Direct, I can hear no sound at all).
    Sometimes I'm getting a "double" error in the editor (I have only one file), saying:

    WindowsVideoMedia error 0xc00d36b2 while reading [F:/VideoLocation/FileName.mp4]
    WindowsVideoMedia error 0xc00d36b3 while reading [F:/VideoLocation/FileName.mp4]

    These error messages are occurring completely randomly as I see, because sometimes they do not appear. And as I've said, I can still see the video playing in the editor.

    However today I've tried to build my game, and after reaching the "game" scene after the main menu, it crashes, throwing a "c0000005" exception.

    I've tried to research why did it happen, and I've found some topics that it could be because one of the UI elements' Default UI shader is missing, but I've checked at least 5 times all of them, and I can't see a mistake.
    Also, before this I've successfully built 5 of my games with Unity and I've never experienced anything before. So I started to think what could be different now, and the only thing that came into my mind that I've never had a video player before.
    So I've removed it from my scene, and it seems that the build version doesn't crashing anymore.

    Any ideas how to fix this? I must include this intro video in my game, so it's not really an option to remove it permanently.
    By the way my Unity version is 2018.1.5f1, I'm not sure if it's related to it or not. However I'm afraid to update it, cause I'm in the middle of 3 projects and I don't want anything to be damaged because of the changes.
    Thanks in advance, if anyone can help me out with this!
     
  2. gsm84

    gsm84

    Joined:
    Aug 10, 2018
    Posts:
    16
    I've replaced the 1080p video with a 720p version, and it works now.
    I'll leave it here, maybe it'll help someone in the future.