> For the complete documentation index, see [llms.txt](https://docs.msquared.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.msquared.io/creation/unreal-development/features-and-tutorials/video-players/millicast-video-streaming/how-to-set-up-an-in-game-video-stream.md).

# How to Setup an In-Game Video Stream

## Overview <a href="#overview" id="overview"></a>

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](/creation/unreal-development/features-and-tutorials/video-players/millicast-video-streaming.md)

## Steps <a href="#steps" id="steps"></a>

1. Open your Unreal project

   <figure><img src="https://1456550285-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoWTlPaoHd1McSakqMigu%2Fuploads%2Fgit-blob-7f8f4e29badb24b70cc8f560b1ac6d37ee9411a3%2Fa55343eb-ea69-4d6b-b7c8-cd7e0c35692d.png?alt=media" alt=""><figcaption></figcaption></figure>
2. Drag the 3 required Millicast assets into your level\
   \
   ![](https://1456550285-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoWTlPaoHd1McSakqMigu%2Fuploads%2Fgit-blob-a1ac2411cc93887cd79feb3380ef22f624ce7559%2F29b0be3f-7d4b-41cf-871f-f39a3eacecd0.png?alt=media)

   \
   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

3. 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`\\

   <figure><img src="https://1456550285-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoWTlPaoHd1McSakqMigu%2Fuploads%2Fgit-blob-3f27668fcfcb32e79684cbb8370acf9f9ebad7f9%2F1154f53c-e06c-4272-b47e-4384aea7f64a.png?alt=media" alt=""><figcaption></figcaption></figure>
4. 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\\

   <figure><img src="https://1456550285-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoWTlPaoHd1McSakqMigu%2Fuploads%2Fgit-blob-6557b5fb1c854001135f0da7f83f5ac345c14752%2F3ad5ab61-4ded-43e8-9eb9-5c20fbae31fd.png?alt=media" alt=""><figcaption></figcaption></figure>

   \
   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\
   \\
5. 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. Go to [![](https://dashboard.dolby.io/favicon-32x32.png?v=12e45178d36bc67112c2c623aa17f300)Sign In](https://dashboard.dolby.io/)
   2. Create an account using OAuth credentials (and click through the account creation dialogue)
   3. Click on the default stream that is created for you\\

      <figure><img src="https://1456550285-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoWTlPaoHd1McSakqMigu%2Fuploads%2Fgit-blob-f310c0d90a824e9003fb8ba78c3d16e4befa544f%2Fed277a26-ccbd-482e-8be6-ee313160f5af.png?alt=media" alt=""><figcaption></figcaption></figure>
   4. Identify your stream name and account ID, e.g. `myStreamName` and `reQfTX` respectively below

      <figure><img src="https://1456550285-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoWTlPaoHd1McSakqMigu%2Fuploads%2Fgit-blob-c4753d075440c65e7f032b854bccde8760551b2a%2F141428e5-3d3a-49ef-8f79-14e83001f1d4.png?alt=media" alt=""><figcaption></figcaption></figure>
6. 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.

<figure><img src="https://1456550285-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoWTlPaoHd1McSakqMigu%2Fuploads%2Fgit-blob-2ad0bf5c4ca28c8c1070aa53230b95beafb6889f%2Fbb5fe708-21cd-47e0-be3c-e10ee54ff428.png?alt=media" alt=""><figcaption></figcaption></figure>

7. 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`\\
8. Start a stream from your Millicast (Dolby streaming) account\
   \
   In practice, you might want to follow [this guide](https://docs.dolby.io/streaming-apis/docs/using-obs#webrtc-with-obs) to stream from OBS\
   \
   Initially, the easiest way to stream is via the web UI which uses a webcam feed\\
   1. From the [![](https://streaming.dolby.io/favicon.png)Dashboard](https://streaming.dolby.io/) page:
   2. Click on the BROADCAST button\\

      ![](https://1456550285-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoWTlPaoHd1McSakqMigu%2Fuploads%2Fgit-blob-565db83e4d6e73023fd28081a674e41c1762a15e%2Fc01a2434-3813-41af-946c-77d32a936a07.png?alt=media)\\
   3. Open the Media Settings via the cog icon in the bottom-right of the stream

      \
      ![](https://1456550285-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoWTlPaoHd1McSakqMigu%2Fuploads%2Fgit-blob-25000536eb6ec2b10e5cc4c40d1ea59eee0e74d7%2F3961b57e-bbf6-43be-b95b-9adfb384c00a.png?alt=media)\\
   4. Toggle the codec to VP8 or VP9

      \
      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\
      \
      ![](https://1456550285-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoWTlPaoHd1McSakqMigu%2Fuploads%2Fgit-blob-7416824a4d7e6cf384a572eb0358ca824aeea714%2Fee1f4d3e-f023-42b7-b681-913cc4746d0b.png?alt=media)
   5. Click **Update**\\
   6. Click the **Start** button\
      \
      ![](https://1456550285-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoWTlPaoHd1McSakqMigu%2Fuploads%2Fgit-blob-0bb118dda35385d78ba94a0a08990a2ed7e369b2%2F2b8dcf13-be75-4701-a410-783e95c0c852.png?alt=media)\\
9. Click the Play button in the unreal editor\\
10. 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\\

    <figure><img src="https://1456550285-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoWTlPaoHd1McSakqMigu%2Fuploads%2Fgit-blob-f063c9dd1bd6182a7aba1ae29215aae8829c8568%2F6bbae333-0190-469f-bfaf-84c138eb75ef.png?alt=media" alt=""><figcaption></figcaption></figure>
11. In the Millicast Control panel, ensure the `Enabled` and `Receivers` boxes are ticked, then click `Apply`\
    \
    ![](https://1456550285-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoWTlPaoHd1McSakqMigu%2Fuploads%2Fgit-blob-90cb7be0be9331667e03dadfd9430513b352c48e%2Fasevv.png?alt=media)
12. Your Millicast screen should now display the feed from your stream\\

    <figure><img src="https://1456550285-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoWTlPaoHd1McSakqMigu%2Fuploads%2Fgit-blob-984e855827aa9cab03a27ba4009bd4c310d61dfd%2F90ecce03-034f-4115-9cff-9f80f3b126fe.png?alt=media" alt=""><figcaption></figcaption></figure>

For more information, see the reference page on [Millicast video streaming](/creation/unreal-development/features-and-tutorials/video-players/millicast-video-streaming.md)

For desktop streaming, you can follow [this guide](https://docs.dolby.io/streaming-apis/docs/using-obs#webrtc-with-obs) to stream to Millicast from OBS
