Hello everyone.

The Mixed Reality Forums here are no longer being used or maintained.

There are a few other places we would like to direct you to for support, both from Microsoft and from the community.

The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.

For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.

If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.

And always feel free to hit us up on Twitter @MxdRealityDev.
Options

Video Loading and Playback Unity

Unity 5.5.1f1
Hey guys I'm trying to load and play captured HoloLens videos and videos in general in my Unity app. The point is to be able to place a related video next to a event that's happening.

IEnumerator LoadMovieTextureFromFile(string fileName)
{
Debug.Log(videoFolderPath + "\" + fileName);
WWW www = new WWW(videoFolderPath + "\" + fileName);

    while (!www.isDone)
    {
        Debug.Log("Loading...");
        yield return null;
    }

    Debug.Log(www.movie.duration + " <--- wwww");

    if (www.error != null)
    {
        Debug.Log("Error: Can't laod movie! - " + www.error);
        yield break;
    }

    MovieTexture video = www.movie as MovieTexture;
    Debug.Log("Movie loaded");
    Debug.Log(www.movie);

    renderMat.material.mainTexture = video;
    video.Play();
}

Here is a sample of my code. Also a note HoloLens does capture in .mp4 which I've heard has issues with Unity, but I've also seen posts where it seems like people are loading them fine and just experiencing lag. ( https://forums.hololens.com/discussion/423/movietexture-on-hololens )

Tagged:

Best Answer

Answers

Sign In or Register to comment.