Stream Sprout # Stream Sprout **Restream OBS Studio to multiple destinations with ease** **Made with 💝 for Tux (Linux) & Apple (macOS)**

 Discord   Mastodon   Twitter   LinkedIn 

# Introduction Stream Sprout uses FFmpeg to re-stream a video source to multiple destinations such as Twitch, YouTube, and Owncast. ## Get Started - [Install](#installation) Stream Sprout - [Configure](#configuration) Stream Sprout - [Configure](#configure-obs-studio) OBS Studio - Start `stream-sprout` - Click the *Start Streaming* button in OBS Studio ## Installation ### Debian / Ubuntu - tbc ### NixOS - tbc ### From source You need to have [FFmpeg](https://ffmpeg.org/) and [yq](https://github.com/mikefarah/yq) installed on your system. ```bash git clone https://github.com/wimpysworld/stream-sprout.git cd stream-sprout ``` ## Configure Stream Sprout Copy the [example Stream Sprout configuration](https://github.com/wimpysworld/stream-sprout/blob/main/stream-sprout.yaml.example) file and edit it to suit your needs. `services:` are arbitrarily named. Just create an entry for each RTMP destination you want to stream to. ```yaml services: my-rtmp-destination: enabled: true rtmp_server: "rtmp://rtmp.example.com/live/" key: "my_super_secret_stream_key" ``` ### Trovo Here's are example configurations for Trovo. ```yaml services: trovo: enabled: false rtmp_server: "rtmp://livepush.trovo.live/live/" key: "" ``` ### Twitch Here's are example configurations for Twitch. ```yaml services: twitch: enabled: true rtmp_server: "rtmp://live.twitch.tv/app/" key: "" ``` #### Ingest servers The example configuration uses the primary Twitch ingest server, which is `rtmp://live.twitch.tv/app/`. If you want to optimise your stream quality, you can use a server closer to your location. A short list of recommended servers based on your location is available from [Recommended Ingest Endpoints For You](https://help.twitch.tv/s/twitch-ingest-recommendation). You can find a complete list of Twitch ingest servers from . #### Testing If you want to test streaming to Twitch without going live, you can use the `?bandwidthtest=true` query parameter. Add `?bandwidthtest=true` to the end of your Twitch stream key, this will enable bandwidth testing, which you can monitor at , and the stream will not go live on your channel. ### YouTube Here's are example configurations for YouTube. ```yaml services: youtube: enabled: true rtmp_server: "rtmp://a.rtmp.youtube.com/live2/" key: "" ``` ## Configure OBS Studio - Open OBS Studio - Go to `Settings` > `Stream` - Select `Custom` from the `Service` dropdown - Copy the server `url:` from your Stream Sprout configuration to the `Server` field: - `rtmp://127.0.0.1:1935` ## References These are some of the references used to create this project: - https://trac.ffmpeg.org/wiki/EncodingForStreamingSites - https://ffmpeg.org/ffmpeg-protocols.html#rtmp - https://ffmpeg.org/ffmpeg-formats.html#flv - https://ffmpeg.org/ffmpeg-formats.html#tee-1 - https://obsproject.com/forum/resources/obs-studio-stream-to-multiple-platforms-or-channels-at-once.932/ - https://stackoverflow.com/questions/16658873/how-to-minimize-the-delay-in-a-live-streaming-with-ffmpeg