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

How to Livestream HoloLens Video in Unity Application may be iOS like Holostream?

Hi Guys,
One functionality of my Unity iOS app is that I want to Livestream HoloLens Video in my app.

I'm registering HoloLens device to my app (using ip address and credentials ) to make this rest API work:

/api/holographic/stream/live_high.mp4 (GET)
Initiates a chunked download of a fragmented mp4
Parameters

  • holo : capture holograms: true or false
  • pv : capture PV camera: true or false
  • mic : capture microphone: true or false
  • loopback : capture app audio: true or false

http://username:password@127.0.0.1:10080/api/holographic/stream/live_high.mp4
?holo=true&pv=true&mic=false&loopback=true

This is working on my PC browser but How do I make work it in Unity editor and my application?

I'm using Unity 5.6 and its https://docs.unity3d.com/ScriptReference/Video.VideoPlayer.html
class to play video feed from HoloLens when it is connected to my System over WIFI or USB but it is not enable to play it.
here is the code:
// Examples of VideoPlayer function

using UnityEngine;

public class Example : MonoBehaviour
{
void Start()
{
// Will attach a VideoPlayer to the main camera.
GameObject camera = GameObject.Find("Main Camera");

    // VideoPlayer automatically targets the camera backplane when it is added
    // to a camera object, no need to change videoPlayer.targetCamera.
    var videoPlayer = camera.AddComponent<UnityEngine.Video.VideoPlayer>();

    // By default, VideoPlayers added to a camera will use the far plane.
    // Let's target the near plane instead.
    videoPlayer.renderMode = UnityEngine.Video.VideoRenderMode.CameraNearPlane;

    // This will cause our scene to be visible through the video being played.
    videoPlayer.targetCameraAlpha = 0.5F;

    // Set the video to play. URL supports local absolute or relative paths.
    // Here, using absolute.
    videoPlayer.url = "http://username:password@127.0.0.1:10080/api/holographic/stream/live_high.mp4

?holo=true&pv=true&mic=false&loopback=true";

//or
//videoPlayer.url = "http://username:password@127.0.0.1:10080/api/holographic/stream/live_high.mp4";

    // Skip the first 100 frames.
    videoPlayer.frame = 100;

    // Restart from beginning when done.
    videoPlayer.isLooping = true;

    // Each time we reach the end, we slow down the playback by a factor of 10.
    videoPlayer.loopPointReached += EndReached;

    // Start playback. This means the VideoPlayer may have to prepare (reserve
    // resources, pre-load a few frames, etc.). To better control the delays
    // associated with this preparation one can use videoPlayer.Prepare() along with
    // its prepareCompleted event.
    videoPlayer.Play();
}

void EndReached(UnityEngine.Video.VideoPlayer vp)
{
    vp.playbackSpeed = vp.playbackSpeed / 10.0F;
}

}

It is working with locally stored video and video from this link http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4 but not from http://username:password@127.0.0.1:10080/api/holographic/stream/live_high.mp4 though it is working fine in browser.

Can anyone help me achieving this? Any alternative way? please note that from unity 5.6 Movie Texture is deprecated.

Best Answer

  • Options
    ReeleyReeley ✭✭✭
    Answer ✓

    i just stumbled upon this

    maybe you can not do that right now

Answers

  • Options
    ReeleyReeley ✭✭✭
    Answer ✓

    i just stumbled upon this

    maybe you can not do that right now

  • Options

    @Reeley said:
    i just stumbled upon this

    maybe you can not do that right now

    Yeah this seems the case I also saw it later, but it is 6 months old I thought it might have been updated. Anyways any alternative way you would like to suggest?

Sign In or Register to comment.