Streaming In to 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. Install OBS Studio

Download and install OBS Studio from https://obsproject.com/.

2. Configure Streaming Settings

Launch OBS Studio.

Go to Settings > Stream.

Configure the following:

Service: Select Custom...

Server: Enter your RTMP server URL (This will be provided to you by Goldcast once you have set up your RTMP session in Studio)

Stream Key: Enter the stream key provided by Studio.

Heads Up! Make sure to confirm the stream key and server URL match exactly to prevent connection errors.

 

3. Add Sources

Under the Sources panel, click the + button.

Add the following:

Video Capture Device: To stream webcam input.

Audio Input Capture: To stream microphone input.

(Optional) Add a Text Field if webcam video is not required.

 


4. Start Streaming

Click Start Streaming from the bottom right corner of the OBS interface.

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

 

© 2024 Copyright Goldcast, Inc. All rights reserved.


Knowledge Base Software powered by Helpjuice