Share via

Running Python Scripts

Jason G 1 Reputation point
2022-07-15T22:10:01.513+00:00

We have been looking into trying to run a python script on the Microsoft Hololens 2, and we were unsure of the best way to go about it, or if it is even possible? Unity is able to run python scripts with third party software, but would that work once the app/program is deployed inside of the Hololens itself? We are trying to get a stream of images from the device, with relatively low latency. The Hololens app that allows wireless connection to the computer has a live feed, but there seems to be a dumping issue, and all of the data from the live feed is stored in the cache, and if the app isn't reloaded, it becomes very delayed and is no longer the live feed that we need. Research mode allows for more data to be collected from different sensors, but we are unsure about the best way to get a stream of images from it. Using Python would be ideal, but most tutorials and other people who have tried, used C++ or C#, and we are hoping there is an easy solution to this!

HoloLens | Development
HoloLens | Development

The process of creating immersive mixed reality applications for Microsoft HoloLens,

{count} votes

2 answers

Sort by: Most helpful
  1. Seth DU - MSFT 541 Reputation points
    2022-07-28T05:21:36.87+00:00

    Hello, welcome to Microsoft Q&A,

    According to the description, I believe you want to access the camera frames and stream them to external devices. it is difficult to debug a published app and you may need to implement your own streaming app. I don't think using Python script or research mode is the only proper direction to fulfill your requirement. A general solution is to implement Mixed reality capture overview to stream your app. Otherwise, you can also get video frames from Unity WebCamTexture() then implement your own streaming procedure in Unity.

    ---
    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  2. David Broggy 6,796 Reputation points MVP Volunteer Moderator
    2022-07-16T05:01:25.25+00:00

    Hi JasonG,
    Straight up, I’m not aware of any python support for Hololens.
    Reference:
    choosing-an-engine

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.