# Video streaming

## Overview

Breakroom gives you the tools you need to stream live video to your guests. This can be achieved either by using the [presentation controls](https://docs.breakroom.tech/running-your-event/moderator-tools/presentation-controls) located within the [moderator tools](https://docs.breakroom.tech/running-your-event/moderator-tools), or by entering an RTMP or HLS streaming address into a [Breakroom Video Player](https://docs.breakroom.tech/creating-custom-experiences/exploring-the-breakroom-toolkit/breakroom-video-player) object.

{% hint style="warning" %}
HLS streaming is the preferred method of streaming live video, as it is "lighter-weight" and offers increased compatibility with client video players.
{% endhint %}

## Broadcast provider (streaming server)

To stream live video content to your guests, you will need to source an RTMP/HLS broadcast provider. There are many providers to choose from, and you can easily search for them online. Your broadcast provider will supply you with a **stream address** and **login key**, which you will need to enter into your streaming software of choice.

<figure><img src="https://1679086873-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5gOE0ivmDtuXfHroTVSx%2Fuploads%2FGIn6uXCfNweA10iYVUwq%2FVideo_001.png?alt=media&#x26;token=3df00363-e3c2-4b29-856c-38c9d2717147" alt=""><figcaption><p>Pictured: An example of an RTMP streaming address and streaming key, taken from the broadcast provider Castr.</p></figcaption></figure>

{% hint style="warning" %}
Broadcast providers charge an upfront fee for their services. It is possible to set up a broadcast server on your own hardware, but this is generally inadvisable unless you have an extremely robust Internet connection.
{% endhint %}

{% hint style="warning" %}
HLS streams sometimes need to be requested prior to use, and can take 24-48 hours to set up depending on your provider.
{% endhint %}

## OBS Studio (streaming software)

<figure><img src="https://1679086873-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5gOE0ivmDtuXfHroTVSx%2Fuploads%2FRIJGUWZks52mOUnT7UTX%2FVideo_002.png?alt=media&#x26;token=504dcf07-7694-4b4d-bc15-8eaf35acbf53" alt=""><figcaption><p>Pictured: The OBS Studio main window.</p></figcaption></figure>

OBS Studio is a free open-source video recording/streaming software suite available for both Windows and macOS. It contains the toolset you will need to capture your webcam, film your desktop, or collect images, all of which can then be streamed to your clients.

### OBS Studio settings

Settings for OBS Studio can be found by clicking the **Settings button** in the right control panel.

<figure><img src="https://1679086873-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5gOE0ivmDtuXfHroTVSx%2Fuploads%2FP4H4g1wNs2z6382D26CC%2FVideo_003.png?alt=media&#x26;token=c660417e-d0bb-4d27-a362-49a5cc647752" alt=""><figcaption></figcaption></figure>

In the settings panel, you will need to adjust or customize several streaming factors using the instructions provided below.

### Entering the stream address and key

<figure><img src="https://1679086873-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5gOE0ivmDtuXfHroTVSx%2Fuploads%2FZmkPcP0U6jPIhMeM5NEB%2FVideo_004.png?alt=media&#x26;token=27ef84f9-84f5-4e42-9b03-17be219b49eb" alt="" width="563"><figcaption><p>Highlighted: The location of the Settings > Stream tab.</p></figcaption></figure>

In the settings panel, you will need to enter the stream address and key generated by your [broadcast provider](#broadcast-provider-streaming-server). To do so, follow these steps.

1. Click on the **Stream tab** in the left-hand panel.
2. Select *Custom* from the **Service drop-down menu** that appears in the center of the screen.
3. Enter the stream address and key into the relevant fields.
4. Click **Apply** to save your changes.

### Managing video quality

<figure><img src="https://1679086873-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5gOE0ivmDtuXfHroTVSx%2Fuploads%2FE4dU3G5kt31NqTAHbU1v%2FVideo_005.png?alt=media&#x26;token=f0359707-9172-4557-949d-a07902122258" alt="" width="563"><figcaption><p>Pictured: The Settings > Output tab.</p></figcaption></figure>

The quality of your streaming video will vary depending on your use case. For a high-quality HD stream, we would recommend using the x264 encoder with a constant bit rate set at 3500 to 5000 Kbps and a key frame of 2. To manage these settings in OBS Studio, follow these steps.

1. Click on the **Output tab** in the settings panel.
2. Select *Advanced* in the **Output Mode drop-down menu.**
3. Enter the settings depicted in the image above.
4. Click **Apply** to save your changes.

### Managing audio quality

<figure><img src="https://1679086873-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5gOE0ivmDtuXfHroTVSx%2Fuploads%2FyAqm53JSahGeh8BlGRXR%2FVideo_006.png?alt=media&#x26;token=8864276c-0c88-40f0-9dd6-856a84659cc4" alt="" width="563"><figcaption><p>Highlighted: The location of the Settings > Output tab > Audio tab.</p></figcaption></figure>

Audio settings can also be found under the **Output tab**, by clicking the **Audio tab** in the center window. We recommend using an audio bitrate of 128 Kbps. To change this setting, follow the steps below.

1. Click on the **Output tab** in the settings panel.
2. Click the **Audio tab** in the center window.
3. Select *Advanced* in the **Output Mode drop-down menu.**
4. Set the audio tracks you will be using to 128 kbps.
5. Click **Apply** to save your changes.

### Managing video resolution

<figure><img src="https://1679086873-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5gOE0ivmDtuXfHroTVSx%2Fuploads%2FeYaGXSPsaKPpBu1Z0ayp%2FVideo_007.png?alt=media&#x26;token=cd05c51b-3f8d-4eb1-95f6-de3dd5fdb85c" alt="" width="563"><figcaption><p>Pictured: The location of the Settings > Video tab.</p></figcaption></figure>

Video resolution will depend on your use case. For a high-quality HD stream, we would recommend using 1920x1080 at 30 frames per second. You can adjust these details by following the steps below.

1. Click on the **Video tab** in the settings panel.
2. Enter the settings depicted in the image above.
3. Click **Apply** to save your changes.

Now that you have OBS Studio configured, you can use the **Start Streaming button** in the right control panel to stream your live video.

<figure><img src="https://1679086873-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5gOE0ivmDtuXfHroTVSx%2Fuploads%2FMMW4ljjQCljIMEYdUHpn%2FVideo_008.png?alt=media&#x26;token=1bfbee8e-8eee-43f2-86b8-223a417a997c" alt=""><figcaption><p>Highlighted: The location of the Start Streaming button.</p></figcaption></figure>

## Streaming video in-world

Your broadcast provider will supply you with an external viewing address. This address can be entered into either the [Breakroom Video Player](https://docs.breakroom.tech/creating-custom-experiences/exploring-the-breakroom-toolkit/breakroom-video-player) or the [presentation controls](https://docs.breakroom.tech/running-your-event/moderator-tools/presentation-controls) built into the conference system. Please consult the linked documentation for step-by-step instructions.

<figure><img src="https://1679086873-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5gOE0ivmDtuXfHroTVSx%2Fuploads%2FZ04nf5SmKWIPXTe3qvCe%2FVideo_009.png?alt=media&#x26;token=e85856fa-ce46-41cc-9b26-5d710513f8cb" alt="" width="320"><figcaption><p>Highlighted: An example of RTMP and HLS external addresses taken from Castr.</p></figcaption></figure>
