Search Unity

VideoPlayer Error with 2017.3

Discussion in 'Editor & General Support' started by JumpWire, Dec 28, 2017.

  1. JumpWire

    JumpWire

    Joined:
    Dec 11, 2015
    Posts:
    18
    I have two different projects that load local videos via URL into the VideoPlayer and they are now both broken. I am getting this error:
    WindowsVideoMedia error 0x8007007b while reading file://F:/Unity-Source-Dev/MyUnityAppName/Assets/StreamingAssets/Flight.mp4

    Context: MFCreateFile
    Error details: The filename, directory name, or volume label syntax is incorrect.

    The videos are H264 videos that have worked great until now. I tried taking them out of the StreamingMedia folder and re-importing them but no luck.

    Here is my code that loads the video. Usually it works great and I love the new VideoPlayer.

    public UnityEngine.Video.VideoPlayer videoPlayer;
    public void loadVideo(){
    GameObject camera = GameObject.Find("Main Camera");
    currentVideo = "Flight.mp4";
    videoPlayer.renderMode = UnityEngine.Video.VideoRenderMode.CameraFarPlane;
    videoPlayer.url = "file://" + Application.streamingAssetsPath + "/" + currentVideo;
    videoPlayer.loopPointReached += EndReached;
    videoPlayer.targetCameraAlpha = 1F;
    videoEnabled = 1;
    videoPlayer.isLooping = true;
    videoPlayer.Play();
    }

    This code was working last week in two different projects (before I updated unity) and suddenly nothing. Any ideas that don't involve the video codec would be much appreciated.
     
    brian_mcgee_nb and cgormlie like this.
  2. cgormlie

    cgormlie

    Joined:
    Dec 28, 2017
    Posts:
    1
    I'm experiencing the exact same issue
     
    JumpWire likes this.
  3. Bitfabrikken

    Bitfabrikken

    Joined:
    Mar 24, 2013
    Posts:
    34
    Same issue here. Looks like I have to downgrade to 2017.1
     
  4. Deleted User

    Deleted User

    Guest

    Same here. Has anyone reported a bug?
     
  5. tracetronic

    tracetronic

    Joined:
    Mar 6, 2014
    Posts:
    1
    I'll second that!
    Video playback is working for me when the file is located in a "regular" asset path but as soon as it is moved to StreamingAssets playback wont work anymore. As our project relies on videos which have to be located in StreamingAssets this is very annoying!
     
  6. brian_mcgee_nb

    brian_mcgee_nb

    Joined:
    Mar 4, 2016
    Posts:
    1
    My solution: leave out the "file://" portion of the url.

    I will test that on the device but for now it helps in the editor for testing.
     
  7. Jamy4000_Absolute

    Jamy4000_Absolute

    Joined:
    Oct 18, 2017
    Posts:
    5
    Last edited: Jan 10, 2018
    Garrettec and JumpWire like this.
  8. jocyf

    jocyf

    Joined:
    Jan 30, 2007
    Posts:
    288
    This error is still active in 2017.4.1