How to live-stream chroma-keyed video from OBS Studio to Unreal Engine

Live-stream chroma-keyed video both zero-latency (Spout) and over-the-network (NDI) from Unreal Engine to OBS Studio:
Written by OWL
Updated 1 year ago

You can now live-stream chroma-keyed video from OBS Studio to Unreal Engine meaning you can take advantage of the easy keyer in OBS for your Unreal Projects.

This works both in-Editor and at-Runtime and in packaged games!

You need three different plugins to use the full range of possibilities:

  1. The Spout plugin for OBS Studio (for zero-latency streaming on a single machine). Installation guide here.
  2. The NDI plugin for OBS Studio (for streaming between different machines). Installation guide here.
  3. The Live-Streaming Toolkit for Unreal Engine (for streaming Spout and NDI into and out of Unreal). Installation guide here.

  1. In Unreal, go to Edit>Project Settings, search 'Alpha' and select the 'Allow through Tonemapper' option: 
  2. Now in OBS, select the Source that you want to chromakey and click 'Filters':
  3. In the pop-up window, click the '+' at the bottom left corner to add Filters to the Source. Add a Chromakey filter to remove the background and a Spout or NDI filter to create a sender for the Source to Unreal Engine:
  4. Adjust any settings required in your Chromakey filter:
  5. Name your Spout or NDI filter so that you can find it in Unreal Engine:
  6. Now follow the steps here to set up your input feed in Unreal Engine.
  7. Once you have followed those steps to set up your Material from your Render Target in Unreal, double click on it and in it's Details panel change the 'Blend Mode' to 'AlphaComposite'.
  8. In the main canvas of your Material connect the 'Alpha' node to 'Opacity':
  9. Now you can apply your Material from your Render Target onto a Plane or anywhere else in your Unreal level and it will automatically be chromakeyed:
  10. The Unreal anti-aliasing settings can interfere with video feeds. If this is an issue you can try changing to FXAA in Project Settings, using DLSS (which takes the place of Anti-Aliasing) or using Composure (which avoids anti-aliasing):
Did this answer your question?