Skip to content

Instantly share code, notes, and snippets.

@KhaosT
Last active June 29, 2024 15:29
Show Gist options
  • Save KhaosT/e9b60fc0fb99b9f4512759b953cbf38c to your computer and use it in GitHub Desktop.
Save KhaosT/e9b60fc0fb99b9f4512759b953cbf38c to your computer and use it in GitHub Desktop.
Guide for using Apple Vision Pro as HDMI display

Displaying HDMI sources on Apple Vision Pro

While it's possible to stream most content to Apple Vision Pro directly over the internet, having the ability to use Apple Vision Pro as an HDMI display can still be useful.

Since Apple Vision Pro does not support connecting to an HDMI input directly or using an HDMI capture card, we have to be a little creative to make this work. NDI provides the ability to stream HDMI content over a local network with really low latency, and it works great with Apple Vision Pro.

This page shows the setup I’m using.

What’s needed

  • HDMI NDI Encoder
    • Personally, I recommend the Kiloview N40, as it supports streaming up to 4K60 while being fan-less, and can use USB-C as a power input.
    • Kiloview N60 comes with more features, but it’s larger and has a fan.
  • Vxio app
    • I made this one, you can also use other NDI monitor apps as well.
    • Separately, Finn made Castaway that makes it possible to use a USB Capture Card + Mac/iPad instead of an NDI encoder. It's a more cost effective option for most people I imagine.

Things to consider

  • To ensure high video quality, an NDI stream typically consumes significantly more bandwidth than a typical H.264/H.265 stream. Before purchasing the encoder, make sure your network can support data transfers at that speed.
    • For 4K60 stream, the bandwidth required is typically around 250~300mbps. If you're having issue to stream smoothly, try go to the encoder's settings page and reduce the streaming quality.
    • You can test this with some free software NDI encoders.
  • Since this setup requires encode and decode the video content, it is not latency free. From my experience, I typically see 3~4 frames (~50ms, same as moonlight based on my measurement) of delay from the content source.

Setup

Setting up an NDI encoder is pretty straightforward. Just connect the device to your local network via Ethernet, supply power, and connect the HDMI input to the encoder.

If the visionOS shows the Local Network permission dialog, and after granting the permission the app still shows searching, you may need to force close the app, and reopen it.

After that, you should be able to see the encoder show up as a source in the Vxio app. Select the source, and you'll get your HDMI display 🎉

Screenshot

Misc

Adjusting audio queue size

Depending on the NDI encoder, the default audio queue size might be too small for some devices. In that situation, try increasing the audio queue size so that the audio no longer experiences abrupt stops between samples.

Disable Multi-TCP

If your Wi-Fi channel is congested, you can try force N40 to use UDP instead of Multi-TCP. In my experience, UDP performs a lot better in those network condition. You can do so from the N40's configuration UI, select NDI Connection -> Multi-TCP Disallowed.

UDP

Portable setup

I was able to make this setup portable by getting one of those mini router (GL.iNet Beryl AX) with a LAN port.

IMG_3978 IMG_3979

#AppleVisionPro #visionOS

@KhaosT
Copy link
Author

KhaosT commented Mar 30, 2024

Unfortunately NDI’s SDK license agreement prevents me from redistributing their SDK so I won’t be able to upload that. What are the issues you ran into when trying to update LC_BUILD_VERSION’s platform information?

@IceNum
Copy link

IceNum commented Mar 30, 2024

image

I regenerated the visionos arm64 files. After integration, an error message about missing files appeared.

@KhaosT
Copy link
Author

KhaosT commented Mar 30, 2024

Do I only need to modify the platform information in these places?

Swapping platform should be sufficient.

I regenerated the visionos arm64 files. After integration, an error message about missing files appeared.

I didn't see this one in my conversion. When you repackage all the .o files, are you sure you included all of them?

@IceNum
Copy link

IceNum commented Apr 3, 2024

我只需要修改这些地方的平台信息就可以了吗?

交换平台应该足够了。

我重新生成了visionos arm64 文件。集成后,出现有关丢失文件的错误消息。

我在转换中没有看到这一点。当您重新打包所有 .o 文件时,您确定已包含所有这些文件吗?

Thank you

@Yamhao
Copy link

Yamhao commented Apr 6, 2024

Vxio app support NDI 6? N60 will support it with HDR feature. Thanks

@KhaosT
Copy link
Author

KhaosT commented Apr 6, 2024

@Yamhao yeah I plan to update it to support NDI 6. I’m waiting for N60 firmware update so I can test the support with a real thing before releasing the update.

@Yamhao
Copy link

Yamhao commented Apr 7, 2024

@Yamhao yeah I plan to update it to support NDI 6. I’m waiting for N60 firmware update so I can test the support with a real thing before releasing the update.

Wow!
I just bought N40 yesterday, and suddenly found N60 will support NDI6:(

@lightsailvr
Copy link

This is very cool - I'd be interested in collaborating on how to use NDI to display the video feed on a sphere for immersive video capture. This gives us immersive filmmakers a live preview on set. Would be similar to the app I made called VR.NDI (https://docs.google.com/document/d/1vFI9pNKhtdONcOa6RQ1Aa9w2iIXYvvgoHLlu42WtMyk/edit?usp=sharing) but for Apple Vision Pro. The current implementation of NDI I am using in Unity doesn't translate to Vision Pro sadly, plus I think a native approach would offer better performance.

@KhaosT
Copy link
Author

KhaosT commented Apr 7, 2024

@lightsailvr displaying NDI stream on a sphere is actually relatively straightforward, the app has all the necessary stuff integrated with RealityKit to make it work (right now it's only used to project it on a 3D model, you can check it out by long pressing on the NDI source and select Retro to see that). The challenge in this case is actually Vision Pro's terrible Wi-Fi performance... It can barely stream NDI|HB 4K right now, and I'm not sure it can do 8K+ over NDI for 360 videos without lagging all the times 😅

@jordainfg
Copy link

jordainfg commented Apr 16, 2024

Hi @KhaosT also left you a email. But maybe here’s easier to exchange thoughts.

  • A bit nitpicky, but adding rounded corners like Moonlight would be a very nice attention to detail.
  • 4K upscaling similar to Casteaway (with a toggle for non-4K inputs), making it possible to use more affordable NDI's like the Zowietek. And using less bandwidth by upscaling a 1080p 60fps input instead. I saw that Finn made the upscaler open-source. https://github.com/finnvoor/fx-upscale

@matte-schwartz
Copy link

looking forward to the upcoming NDI 6 update, would be happy to contribute to an NDI 6.0 SDK fund to get HDR encoding if necessary.

@gjc9620
Copy link

gjc9620 commented May 18, 2024

N40 selling price is 9800 cny in china,This is an expensive solution😲

@Yamhao
Copy link

Yamhao commented May 18, 2024

N40 selling price is 9800 cny in china,This is an expensive solution😲

CNY 5500 from TB

@KhaosT
Copy link
Author

KhaosT commented Jun 1, 2024

NDI 6 and HDR support is added in the latest update. Now we just need the actual hardware to support that 😅

@matte-schwartz
Copy link

matte-schwartz commented Jun 1, 2024

NDI 6 and HDR support is added in the latest update. Now we just need the actual hardware to support that 😅

I was told a few weeks ago that they were targeting June/July for the firmware update for the Kiloview N60

@Yamhao
Copy link

Yamhao commented Jun 2, 2024

NDI 6 and HDR support is added in the latest update. Now we just need the actual hardware to support that 😅

I was told a few weeks ago that they were targeting June/July for the firmware update for the Kiloview N60

Only for N60? Any chance for N40? Thanks

@gjc9620
Copy link

gjc9620 commented Jun 3, 2024

@Yamhao Is there a cheaper option? 1080p is acceptable

@lightsailvr
Copy link

Trying to feed this an HDR signal from NDI 6 (Using Nobe Omniscope) but it doesn't seem to be decoding it properly. Is there some sort of setting for HDR?

@Jefe533
Copy link

Jefe533 commented Jun 20, 2024

Sending a PQ image (looks low contrast, desaturated) from DaVinci Resolve to Vxio via NDI 6. I think there needs to be some way to let Vxio know the image is PQ and to “trigger” Vxio to go into “HDR Mode” and invert the PQ curve, displaying properly super bright and saturated HDR imagery.

@KhaosT
Copy link
Author

KhaosT commented Jun 20, 2024

Are you sure the tools you’re using encodes HDR information correctly in NDI frame? The app consumes the metadata from the NDI frame to determine whether the source is streaming HDR and what transfer function it should use.

@Jefe533
Copy link

Jefe533 commented Jun 20, 2024

The tool I'm using to encode my PQ signal to NDI may not be storing the HDR information correctly in the NDI frame. I'll follow up with that developer. It could still be helpful in your app if there was a setting to "force" a transfer function for a case like mine.

@KhaosT
Copy link
Author

KhaosT commented Jun 20, 2024

I’m not sure that would work if the developer didn’t encode the stuff correctly since the underlying video data might be wrong in that case.

You can learn more about the metadata needed in at https://docs.ndi.video/docs/sdk/hdr

and use the test pattern app on Windows to verify HDR is working correctly.

@zixzaxlad
Copy link

I was wondering if it's possible to input a 3D HDMI signal and view it in Vision Pro as a stereo window?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment