Skip to content

Instantly share code, notes, and snippets.

@KhaosT
Last active September 13, 2024 02:31
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 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?

@kda186
Copy link

kda186 commented Jul 11, 2024

Thanks KhaosT for the great tip!!!

I have also completed the ndi process for avp, I am adding ffmpeg and other features, if you have any good ideas please let me know and I will implement it.

At present, I have added various modes of 3D display. Yes, it is possible to use NID for 3D transmission, and it is also very good to play back at 4K 60 in VP.

For now, I have a few minor issues that need to be addressed:

  1. In ImmersionStyle, my expected decoding picture texture scaling does not seem to be successful, and the picture is always rendered at a fixed size.

  2. When I compare the decoded playback picture with the MAC full-screen picture after USB connection, the brightness will be one level lower. I plan to use shader graph in reality composer pro to solve the problem, but I can't always achieve good results.

I am new to apple development. You can say this is my first mac application development. If anyone can give me some advice, I will be happy to buy him coffee.

@woncheol-kim
Copy link

Is it possible to use the Vxio app as a client and the OBS-NDI app on a desktop computer as a server? I’ve tried this setup, and while the connection seems to work, the screen remains empty. The same issue occurs with the Castaway apps: the connection is established, but the screen is empty. However, the HDMI capture board works fine with OBS Studio.

@KhaosT
Copy link
Author

KhaosT commented Jul 19, 2024

Re kda186: you might want to try UnlitMaterial. PBR material reacts to light, and depending on the environment light it might behave differently.

Re woncheol-kim: Are you trying to display Vision Pro content in OBS, or displaying OBS content in Vxio? For Vision Pro -> OBS, the app does not act as a NDI source. For OBS -> Vision Pro, it should work as long as the NDI output is configured correctly on the OBS side.

@woncheol-kim
Copy link

Re woncheol-kim: Are you trying to display Vision Pro content in OBS, or displaying OBS content in Vxio? For Vision Pro -> OBS, the app does not act as a NDI source. For OBS -> Vision Pro, it should work as long as the NDI output is configured correctly on the OBS side.

Thank you. What I want to set up is OBS-to-VP, and since you have confirmed that it’s possible, I’ll check my OBS settings.

@woncheol-kim
Copy link

Now it works fine. However, I have a request: it seems that the Vxio app requires UPnP to be enabled in the router settings. I wish I could disable UPnP and manually input a server IP address in the Vxio app instead.

@haseebrabbani
Copy link

haseebrabbani commented Jul 19, 2024

hey @KhaosT loving your work on this app! been playing my PS5 on a super huge screen. I got the Kiloview N60 in the hopes of enabling HDR, but after tweaking its settings (on latest firmware which im not even sure has added support yet) im just not sure if the Vxio app is detecting HDR video. is there an indicator in the Vxio app that would tell me whether HDR is detected or not? if not, might be helpful to others as well 🙏

@KhaosT
Copy link
Author

KhaosT commented Jul 19, 2024

@haseebrabbani I don’t think the current firmware supports NDI 6, which is required for HDR. I can look into adding indicator support for this.

@BMJ9
Copy link

BMJ9 commented Jul 26, 2024

I’ve been loving your app on my AVP and iPad! On the iOS app, is it possible to have an option to remove the status bar at the top of the screen? Sometimes that gets in the way when I use your app on an external monitor.

@KhaosT
Copy link
Author

KhaosT commented Jul 26, 2024

@BMJ9 going to add it in the next update 👍

@KhaosT
Copy link
Author

KhaosT commented Jul 29, 2024

@lightsailvr Just a FYI, the latest app update (v1.1.2) added support for displaying NDI stream in 180/360 sphere in immersive mode. You can access it by long pressing on the NDI source and select Immersive -> 180/360 to do that.

@haseebrabbani
Copy link

small feature request: allow enabling AVP environments while streaming in the app

@FireHelmet
Copy link

FireHelmet commented Aug 9, 2024

Hello @KhaosT ,

Thanks for your post, it's useful :). I would like to know if you have tested to stream the content over the WAN ?
If yes, does NDI FULL is possible through Internet (between site connected with fiber) or only NDI HX can be used ? and if you used NDI HX, have you tried HX3 over internet ? What's the latency ? is it playable with a console ?

Last thing, I'm not able to find your Vxio in 1.1.2 on the appstore.

Thank you !

@alexanderzuckerman
Copy link

Hi @KhaosT , thanks for sharing this solution! I have a quick question regarding audio: With this method, would I be able to use the audio from my home theater system, such as a Sonos with HDMI ARC?

@KhaosT
Copy link
Author

KhaosT commented Aug 12, 2024

@FireHelmet It won't work over WAN due to the use of Bonjour for device discovery

@KhaosT
Copy link
Author

KhaosT commented Aug 12, 2024

@alexanderzuckerman that depends on how you connected the thing to NDI device. If you hooked up the media device to something that has HDMI ARC support, and a HDMI out, and connect the HDMI out to the NDI device' HDMI in, it should work.

@alexanderzuckerman
Copy link

Thank you for your prompt response @KhaosT. So to draw it out.

This method would work:

media device to HDMI ARC sound system. HDMI arc sound system to NDI’s HDMI in source.

This method will not work:

media device to NDI’s HDMI IN. NDI’s HDMI out to HDMI ARC sound system

@KhaosT
Copy link
Author

KhaosT commented Aug 12, 2024

The first one is guaranteed to work. The second one is a question mark since what the NDI device do to the HDMI out is heavily depend on the device, some may work, some might not 😅

@alexanderzuckerman
Copy link

Fascinating! This is all new to me so I appreciate you answering my questions here!

So I guess the next best thing to get with the NDI device is a HD Fury’s 4K Arcana. Connect your media device to it (let’s say Apple TV) and have the HDMI output to the Arc and the NDI device. Right?

Is Dolby Vision supported via NDI 6 or just HDR 10?

@KhaosT
Copy link
Author

KhaosT commented Aug 12, 2024

@alexanderzuckerman yeah that should work. NDI 6 itself only does HDR 10 but so far there is no NDI hardware actually supports encoding HDR content yet.

@alexanderzuckerman
Copy link

I thought the N60 is supposed to have the NDI 6 update. That hasn’t happened yet?

@KhaosT
Copy link
Author

KhaosT commented Aug 12, 2024

@alexanderzuckerman Nope. They said they are going to support that but the firmware is not released yet. If you're buying it for the sole purpose of NDI 6's HDMI support, I'd recommend you wait as no one knows when that firmware will be released (if ever) 😂

@FireHelmet
Copy link

@KhaosT @alexanderzuckerman ,

Hey 👋🏻,

I contacted the support of Kiloview and they told me :

  1. N50 and N60 will be the first to get the support of HDR
  2. The firmware should be released this month or early next month
  3. HDR will be supported in NDI HX, not FULL NDI
  4. The NDI HX3 adds 200ms latency

@KhaosT
Copy link
Author

KhaosT commented Aug 12, 2024

Good to know, hope they follow through. They released something earlier this month for 10-bit color space support (basically HDR) but it's in some vendor specific format that isn't NDI 6 🫠

@alexanderzuckerman
Copy link

Thank you @FireHelmet for the update! Disappointing FULL NDI will not support HDR in this case.

@KhaosT thank you for taking the time for answering all my questions here. Guess the best thing to do in this case would be to wait until there’s a NDI 6 device that will support HDR in FULL.

@Jefe533
Copy link

Jefe533 commented Sep 13, 2024

Is it possible to add a button to "force" VXIO to use the PQ transfer function? I am still trying to use VXIO to monitor HDR video for the purposes of color grading. I was using Nobe OmniScope, which does now have NDI 6, to take a PQ image from DaVinci Resolve. But the image still looks flat / log in VXIO. The OmniScope dev said that the ability to send HDR metadata requires a license, so it probably won't be coming. Assimilate Scratch / Live FX is another player in the NDI space, but they are still on NDI 5 with no timeline for going to 6. In short, we (colorists) are out of options. But if you were to add a manual override, we wouldn't be relying on metadata, right? At my studio, for instance, I have a Flanders HDR reference monitor. Instead of relying on Metadata, I just walk up to it and press "PQ ST2084 P3 D65" and, boom, the image changes from log to very bright HDR. If I were relying on the TV to change itself into PQ based on metadata coming over the SDI cable, I would probably be out of luck

@KhaosT
Copy link
Author

KhaosT commented Sep 13, 2024

@Jefe533 I can try to add that but I don't think it will display correctly since the underlying video content won't be encoded with all the extra bits for HDR...

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