Streaming Into Goldcast with FFmpeg or OBS Studio

This article outlines how to stream video and audio to an RTMP (Real-Time Messaging Protocol) server using FFmpeg or OBS Studio.

Prerequisites

Before beginning:

  • Obtain the RTMP stream URL and stream key from the Studio interface.
  • Two sets of keys are available:
    • Live Streaming Key: Default key for primary streaming.
    • Fallback Key: Use only if the live streaming key does not work.

To locate RTMP channel details:

 


Streaming with FFmpeg

FFmpeg is a command-line tool that allows you to stream directly to an RTMP server using CLI.

Example Command

Use the following command to start a stream:

bash
ffmpeg \\
 -re \\
 -i input.mp4 \\                 
 -c:v libx264 -preset veryfast -maxrate 3000k -bufsize 6000k \\
 -c:a aac -b:a 128k \\
 -f flv <rtmp_stream_url>/<stream_key>

or in single line as

ffmpeg -re -i input.mp4 -c:v libx264 -preset veryfast -maxrate 3000k -bufsize 6000k -c:a aac -b:a 128k -f flv <rtmp_stream_url>/<stream_key>

Replace input.mp4 with the name of your input file.

Replace <your-stream-url> and <stream-key> with your specific RTMP values.

The streaming from ffmpeg looks like:

 

Note: Ensure you use the correct stream URL and key to avoid broadcast issues.

Viewing the Stream

Once FFmpeg is streaming, open the Broadcast section within the Events App to monitor the live feed.

Visual Reference:


Streaming with OBS Studio

OBS Studio provides a graphical interface for setting up and managing live streams.

Step-by-Step Setup

1. Initial Setup & Performance

  1. Run the Auto-Configuration Wizard (Tools → Auto Configuration Wizard)

This wizard will analyse your system hardware and internet speed to suggest optimal settings for your specific setup and streaming goals.

  1. Sufficient Upload Bandwidth:

It should be at least 1.5x to 2x of target bitrate. If encoding bitrate is 10Mbps, upload bandwidth should be at least 15Mbps to 20Mbps. Incase of not having enough bandwidth, Downscale resolution to 720p from 1080p.

  1. Close unnecessary programs:

Close all unused applications, browser tabs to free up CPU/GPU for OBS.

2. Output Setting (Streaming Tab)

  1. Select Advance output mode to unlock crucial configurations
  2. Based on Auto configuration wizard, select appropriate encoder (h/w encoder is recommended)
  3. Select CBR rate control. (Constant bitrate)
  4. Bitrate selection
    1. 1920 x 1080 @ 30FPS: 5000 - 8000 Kbps
    2. 1280 x 720 @ 30FPS: 3000 - 6000 Kbps
  5. Keyframe interval (GoP Size): set it to 2 seconds
  6. Encoder Preset/Quality:
    1. If option is available for H/W encoder, choose Quality or Max Quality
    2. Choose veryfast for S/W encoder
  7. Profile: Set High
  8. Select primary GPU if multiple GPUs are available.

3. Video Settings

  1. Base canvas resolution: Set it to monitor’s native resolution
  2. Output (Scaled) resolution: This is the resolution, stream will be broadcasted at.
    1. Based on #2.d set appropriate resolution

4. Audio Settings

  1. Sampling Rate: Ensure all audio capturing devices has same sampling rate, preferable is 48KHz. (Uniform sampling rate avoids resampling issues)
  2. Set channels to stereo
  3. Select appropriate Audio devices - Desktop Microphone, external mic etc.
  4. Audio Filters: Use appropriate filters -
    1. Noise suppressions: It reduces static background noise. Experiment with various method - RNNoise & Speex
    2. Noise Gate: Mutes mic below a certain volume to avoid ambient noise when user is not speaking.
    3. Compressor: Evens out loud and quite part of audio to give better user experience.
    4. Gain: Adjust mic volume in such a way that audio meter remains yellow range. It should not hit in red otherwise it clips audio gain.
    5. Limiter: Set appropriate value to avoid going to red in audio meter.

5. Optimisation Tips

  1. If it’s allowed to set priority of OBS process, set it above normal (for Windows).
  2. Enable network buffering. Set it to 2000ms to avoid any small network fluctuations. Larger value introduces delay.
  3. OBS(28+) provides automatically adjust (down) bitrate if congestion is detected. It helps to avoid dropping frames with reduced quality temporarily.

6. Observe Stats in OBS


Viewing the Stream

After initiating the stream, navigate to the Event Stage to view and monitor the live stream.

Troubleshooting and Additional Resources

If you encounter issues:

Verify the RTMP URL and stream key are correctly configured.

Confirm network stability to avoid interruptions.

Refer to the Streaming into Goldcast from Other Sources guide for additional assistance.

For further support, contact the Goldcast support team at Support@Goldcast.io.

Quick Reference Table

Tool Setup Summary
FFmpeg CLI tool; configure RTMP URL and key, stream input file, monitor via Broadcast
OBS Studio GUI tool; configure Custom stream settings, add sources, start streaming

 

© 2025 Copyright Goldcast, Inc. All rights reserved.


Knowledge Base Software powered by Helpjuice