Skip to main content

Starting a Stream with OBS

Introduction

While Native Frame offers a robust SDK for integrating live streaming directly into your application, there are scenarios where using third-party broadcasting software can be advantageous. This guide focuses on using OBS (Open Broadcaster Software), a popular free and open-source software for video recording and live streaming.

Pros and Cons of Using Third-Party Software

Pros:

  1. Advanced Features: Software like OBS offers advanced features such as scene composition, multiple audio sources, and transitions.
  2. Flexibility: Can be used with various streaming platforms, not just Native Frame.
  3. Community Support: Large user base provides extensive tutorials and troubleshooting resources.
  4. Hardware Encoding: OBS can leverage hardware encoding capabilities for better performance.

Cons:

  1. Additional Setup: Requires separate software installation and configuration.
  2. Learning Curve: May take time to master all features and settings.
  3. Less Integration: Not as tightly integrated with your application as Native Frame's SDK.
  4. Potential Compatibility Issues: Updates to OBS or your operating system might cause temporary incompatibilities.

Setting Up OBS with Native Frame

Prerequisites

  • OBS Studio installed on your computer (download from obsproject.com)
  • A Native Frame account with streaming permissions
  • Your Native Frame RTMP URL and Stream Key

Step 1: Obtain Your Stream Details

  1. Log in to your Native Frame dashboard.
  2. Navigate to the Streams section.
  3. Create a new stream or select an existing one.
  4. Note down the RTMP URL and Stream Key provided.
Use the RTMP URL and Stream Key exactly as provided

The dashboard gives you the RTMP URL (the Server field in OBS) and a Stream Key that already includes the query string — paste both in unchanged. The full ingest URL has the shape:

rtmp://{host}/origin/{streamKey}?authKey={secret}&ns={projectId}

If you build the URL yourself, the ns query parameter is your Project ID — the same UUID shown on your project page — not an environment name (an older convention like ?NS=dev no longer works), and it must be lowercase ns. The Stream Key alone does not identify your project, so the URL must carry ns.

Step 2: Configure OBS

  1. Open OBS Studio on your computer.
  2. Click on "Settings" in the lower-right corner.
  1. Select the "Stream" tab on the left.
  2. For "Service", select "Custom".
  3. In the "Server" field, enter your Native Frame RTMP URL.
  4. In the "Stream Key" field, enter your Native Frame Stream Key.
  5. Click "Apply", then "OK" to save the settings.

Step 3: Set Up Your Scene

  1. In the main OBS window, under the "Scenes" box, click the "+" icon to create a new scene.
  2. Name your scene (e.g., "My Native Frame Stream").
  3. In the "Sources" box, click the "+" icon to add a source.
  4. Choose the type of source you want to stream (e.g., "Display Capture" for your screen, "Video Capture Device" for a camera).
  5. Configure the source as prompted by OBS.

Step 4: Audio Setup

  1. In the main OBS window, locate the "Audio Mixer" section.
  2. Ensure the correct audio inputs are enabled and levels are appropriate.
  3. Use the sliders to adjust volume levels as needed.

Step 5: Start Streaming

  1. Once your scene and audio are set up, click the "Start Streaming" button in the main OBS window.
  2. OBS will connect to Native Frame's servers and begin streaming your content.

Step 6: Monitor Your Stream

  1. Return to your Native Frame dashboard.
  2. Navigate to the Streams section and select your active stream.
  3. On the Stream Details page, nagivate to "Stream Playback" and click the "Play" button to view your stream.

Best Practices

  1. Test Before Going Live: Always do a test stream to check your setup before any important broadcasts.
  2. Monitor CPU Usage: Keep an eye on OBS's stats window to ensure your computer can handle the encoding load.
  3. Use Wired Internet: For the most stable stream, use a wired Ethernet connection instead of Wi-Fi.
  4. Optimize OBS Settings: Adjust video bitrate and encoding settings based on your internet upload speed and computer capabilities.
  5. Regular Updates: Keep OBS and your Native Frame integration up-to-date for the best performance and security.

Troubleshooting

  • Stream Not Connecting: Double-check your RTMP URL and Stream Key in OBS settings.
  • Poor Stream Quality: Lower your output resolution or bitrate in OBS settings.
  • High CPU Usage: Consider using hardware encoding if available or lowering your encoding quality.
  • Audio Sync Issues: Adjust the audio sync offset in OBS for each source as needed.

Conclusion

Using OBS with Native Frame combines the power of professional broadcasting software with Native Frame's robust streaming infrastructure. While it requires some additional setup compared to using Native Frame's SDK directly, it offers advanced features that can enhance your streaming capabilities.

For more detailed information on Native Frame's streaming capabilities or API integration, refer to our API documentation.