> ## Documentation Index
> Fetch the complete documentation index at: https://liv-creators.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# How to connect LIV Hub to OBS on PC

> Connect to OBS on PC

**LIV Hub and OBS cannot connect directly**. A local RTMP server acts as a bridge between LIV and OBS.

This process would work for similar capture software, like Streamlabs and Stream Elements.

# Find Your PC's Local IP Address

* Press Windows + R, type `cmd`, press Enter
* Type `ipconfig` and press Enter
* Look for "IPv4 Address" under your active network adapter (usually something like 192.168.1.x). For the purposes of this guide, I'll use `101.10.0.110`

<img src="https://mintcdn.com/liv-creators/Vn2op45y2zR6WFRd/images/livhub/livhub_localip.png?fit=max&auto=format&n=Vn2op45y2zR6WFRd&q=85&s=c5550ee0eb2ec0721db08974e1b7639b" alt="Livhub Localip" width="724" height="621" data-path="images/livhub/livhub_localip.png" />

# Set Up RTMP Server on your PC

You can use any RTMP server, some common ones are [nginx](https://github.com/illuspas/nginx-rtmp-win32/releases) and xiu. You'll need to start the server per the instructions of your chosen solution. For this guide, we'll use nginx.

## Set up nginx-rtmp

* Download nginx with RTMP module for Windows. [https://github.com/illuspas/nginx-rtmp-win32/releases](https://github.com/illuspas/nginx-rtmp-win32/releases) 
* Extract the zip.
  * \*\*Optional Step \*\*In below examples, I've renamed the folder to \nginx and moved it to my C drive. \
    `C:\Program Files\nginx\`
* Configure nginx to accept RTMP streams on port 1935 in \nginx\conf\
  As an example, you can use this file.

```
worker_processes  1;

error_log  logs/error.log debug;

events {
    worker_connections  1024;
}

rtmp {
    server {
        listen 1935;

        application live {
            live on;
        }
		
        application hls {
            live on;
            hls on;  
            hls_path temp/hls;  
            hls_fragment 8s;  
        }
    }
}

http {
    server {
        listen      8080;
		
        location / {
            root html;
        }
		
        location /stat {
            rtmp_stat all;
            rtmp_stat_stylesheet stat.xsl;
        }

        location /stat.xsl {
            root html;
        }
		
        location /hls {  
            #server hls fragments  
            types{  
                application/vnd.apple.mpegurl m3u8;  
                video/mp2t ts;  
            }  
            alias temp/hls;  
            expires -1;  
        }  
    }
}
```

# Start nginx

Option 1: File Explorer

1. Open your File Explorer
2. Navigate to your nginx folder. C:\Program Files\nginx\ in our example but go to where you have extracted
3. Launch `nginx.exe`. There is no output window that starts, nginx runs in the background. You can verify it's running by opening the Task Manager, going to Details, and looking for nginx.exe.

Option 2: Command prompt

1. Press Windows + R, type cmd, press Enter
2. Navigate to your nginx folder. C:\Program Files\nginx\ in our example but go to where you have extracted
3. Enter command `nginx.exe`. There is no output window that starts, nginx runs in the background. You can verify it's running by opening the Task Manager, going to Details, and looking for nginx.exe.

<img src="https://mintcdn.com/liv-creators/Vn2op45y2zR6WFRd/images/livhub/livhub_nginx_path.png?fit=max&auto=format&n=Vn2op45y2zR6WFRd&q=85&s=522f27d4ea8a257ef70eca9bd48dff39" alt="Livhub Nginx Path" title="Livhub Nginx Path" style={{ width:"69%" }} width="427" height="121" data-path="images/livhub/livhub_nginx_path.png" />

<img src="https://mintcdn.com/liv-creators/Vn2op45y2zR6WFRd/images/livhub/livhub_nginx_process.png?fit=max&auto=format&n=Vn2op45y2zR6WFRd&q=85&s=af44c171eed34af5a44d4bbbfd16dc06" alt="Livhub Nginx Process" width="804" height="373" data-path="images/livhub/livhub_nginx_process.png" />

# Set up OBS for a new stream

* Open OBS
* Add a new "Media Source"
* Check "Local File" unchecked
* Input: `rtmp://127.0.0.1:1935/live/stream` \
  OBS uses 127.0.0.1. If you're using a different streaming software, you may need a different local IP address.\
  ⚠️**Do not use 127.0.0.1 in LIV Hub**
* Input Format: leave blank
* Click OK

<img src="https://mintcdn.com/liv-creators/Vn2op45y2zR6WFRd/images/livhub/livhub_obs_source.png?fit=max&auto=format&n=Vn2op45y2zR6WFRd&q=85&s=3af316a78644a3724d4f81fd7ac1f445" alt="Livhub Obs Source" width="927" height="950" data-path="images/livhub/livhub_obs_source.png" />

# Add a manual connection in LIV Hub

* [Manual RTMP connection guide](/liv-hub-and-liv-camera/guides/liv-hub/how-to-add-rtmp-and-stream-key-to-liv-hub)
* Set RTMP URL to: `rtmp://YOUR_PC_IP:1935/live/stream`
  * Example: rtmp\://101.10.0.110:1935/live/stream

# Start streaming

Start streaming with LIV Camera or Headset streaming. You should see OBS have the capture shortly

* [How to stream with LIV Camera](/liv-hub-and-liv-camera/guides/liv-hub/how-to-stream-using-the-in-game-liv-camera-example-gorilla-tag)
* [How to stream using Headset streaming](/liv-hub-and-liv-camera/guides/liv-hub/headset-streaming-guide)

# Stop nginx

Since nginx runs in the background (no window open), don't forget to stop the service.

* Open command prompt
* Navigate to your nginx path
* Use command nginx.exe -s stop

**For next time, you just need to start the local RTMP server and you're good to start streaming!**

1. Press Windows + R, type cmd, press Enter
2. Navigate to your nginx folder. C:\Program Files\nginx\ in our example
3. Enter command `nginx.exe`. There is no output window that starts, nginx runs in the background. You can verify it's running by opening the Task Manager, going to Details, and looking for nginx.exe.
4.

# Troubleshooting

**OBS shows black screen** -> check nginx is running\
**Stream doesn’t connect**-> verify IP and port 1935 \
**No video**->ensure OBS video media source ”Local File” is unchecked
