How to set up an in-game video stream

Overview

This guide starts with the template project and ends with having a running video feed in-game.

You could use this for playing an in-world video, screen sharing, webcam feed, etc.

The simplest way to achieve this is using our Millicast integration. Millicast is a 3rd party developer platform (acquired by Dolby) that provides ultra-low-latency video streaming capabilities that scale to massive audiences.

For more information, see the reference page on Millicast video streaming

Steps

  1. Open your Unreal project

  2. You can find the following via the Place Actors panel: (NOTE - Be careful not to place the M2_ prefixed equivalents of the Screen or Control assets)

  • BP_MillicastScreen

    • this is the actual screen displaying the video feed

      • you can have as many of these as you want

  • BPM_MillicastControl

    • this is used to configure your Millicast stream information

      • you only need one of these

  • M2 Millicast Channel

    • this is used as plumbing between the stream video/audio received from Millicast and the audio bus & video texture used in the client

      • you would add extra channels if you wanted different video stream feeds playing at the same time

  1. Name your BP_MillicastScreen asset(s) Select your screen asset(s) in the World Outliner and, in the Details panel, give each a unique Receiver Name

  2. Assign Video Texture and Sound Source Bus settings for your Millicast channel Select your channel asset(s) in the World Outliner and, in the Details panel, select a unique Video Texture + Sound Source Bus pair for each channel For example, your first channel should be set to have

    If you were to add a second channel, you should use T_Millicast2 and ASB_M2_Millicast_02 for the Video Texture and Sound Source Bus respectively

  3. Retrieve Millicast stream name and account ID to use If you donโ€™t have an account, you can quickly sign up for free (at the time of writing)

    1. Create an account using OAuth credentials (and click through the account creation dialogue)

    2. Click on the default stream that is created for you

    3. Identify your stream name and account ID, e.g. myStreamName and reQfTX respectively below

  4. Add your Millicast stream name and account ID for your Millicast control Select your control asset in the World Outliner and, in the Details panel, configure these settings, e.g.

  1. Give your the required in-game role to be able to change Millicast settings

    In the World Settings panel:

    1. search for โ€œrolesโ€

    2. expand the Default Role setting

    3. set the Row Name to Director

  2. Start a stream from your Millicast (Dolby streaming) account In practice, you might want to follow this guide to stream from OBS Initially, the easiest way to stream is via the web UI which uses a webcam feed

    1. Click on the BROADCAST button

    2. Open the Media Settings via the cog icon in the bottom-right of the stream

    3. Toggle the codec to VP8 or VP9

    4. Click Update

  3. Click the Play button in the unreal editor

  4. Once in-game, open the Millicast Control panel

    To do this, right-click to bring up your cursor, then left-click the Millicast Remote Control icon

  5. Your Millicast screen should now display the feed from your stream

For more information, see the reference page on Millicast video streaming

For desktop streaming, you can follow this guide to stream to Millicast from OBS

Last updated