How to stream from OBS to Icecast
Live streaming used to be reserved for audio only. Now that internet speeds are much faster, people are clamouring for video services. One of the best tools to live stream audio is OBS.
Video isn’t always the best format though. It’s unlikely that people will sit down to watch an entire two hour mix. You might want to give them an audio-only way to listen as well. Video and audio are both great formats but they shine in different situations.
A lot of radio stations nowadays are opting to give listeners choice by providing both audio and video formats. They might stream video to Mixcloud Live or Twitch and audio through Radio Cult.
Since audio and video are two different formats, you would think you would need two different tools. Live video is based around RTMP. Live audio is normally running on Icecast.
We normally recommend the use of clients like BUTT or Audio Hijack for connecting to Icecast and OBS for pushing to live video services.
But what if you want to stream only through OBS? That is, push your stream from OBS into a video streaming provider like Twitch or Youtube and into an audio streaming provider like Radio Cult - without the need for an additional tool. Well, it turns out you can!
Configuring OBS
Now what we are about to do isn’t technically considered "streaming" by OBS. What we are actually going to rely on is OBS' recording functionality. OBS recording allows us to use FFmpeg
which supports saving to a file or to a URL and since FFmpeg
supports Icecast we can point it directly at an Icecast URL.
Sounds like magic? It kind’ve seems like it is. We weren’t initially expecting this to work. Talk about not using a tool for its intended purpose.
Now what you want to do is:
- Open OBS
- Go to settings
- Click on "Output"
- Toggle "Output Mode" to
Advanced
- Go to the "Recording" tab
- Open the "Type" dropdown and choose
Custom Output (FFmpeg)
- Open the "FFmpeg output Type" dropdown and choose
Output to URL
- For file path you are going to want to set it to a URL in this format:
icecast://<username>:<password>@<host>:<port>/<mountpoint>
- If you’re using Radio Cult then open your dashboard and copy your live stream connection values
- You’ll end up with something like
icecast://jill@radio-one.com:b4Y7Amr7d0@radio-one.radiocult.fm:9000/live
- Open the "Container Format" dropdown and choose
ogg
- Set "Muxer Settings" to
content_type=video/ogg
- Open the "Video Encoder" dropdown and choose
libtheora
(or any other ogg compatible encoder available to you) - Set "Audio Bitrate" to the bitrate your Icecast is configured to
- Click "Apply"
- Click "OK"
Example OBS config
That’s it! You’re all set up. All that’s left to do is click "Start Recording" and your audio stream will be pushed through from OBS to Icecast.
With one tool, you’re now streaming both video and audio.