How to Setup an In-Game Video Stream
Last updated
Last updated
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
Open your Unreal project
Drag the 3 required Millicast assets into your level
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
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
Select your MillicastChannel asset(s) 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
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)
Create an account using OAuth credentials (and click through the account creation dialogue)
Click on the default stream that is created for you
Identify your stream name and account ID, e.g. myStreamName
and reQfTX
respectively below
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.
Give your the required in-game role to be able to change Millicast settings
In the World Settings panel:
search for “roles”
expand the Default Role
setting
set the Row Name
to Director
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
Click on the BROADCAST button
Open the Media Settings via the cog icon in the bottom-right of the stream
Toggle the codec to VP8 or VP9
Click Update
Click the Play button in the unreal editor
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
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
Go to Sign In
From the Dashboard page:
NOTE - If it's already set to VP8 or VP9 by default, change it once to the other one - this is to work around a known bug in Dolby's system
Click the Start button
In the Millicast Control panel, ensure the Enabled
and Receivers
boxes are ticked, then click Apply