stream-sprout/README.md
2024-07-22 14:33:28 +01:00

5.2 KiB

Stream Sprout

Stream Sprout

Restream a video source to multiple destinations such as Twitch, YouTube, and Owncast.

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 Stream Sprout
  • Configure Stream Sprout
  • Configure OBS Studio
  • Start stream-sprout
  • Click the Start Streaming button in OBS Studio

Installation

Debian

yq is available in bullseye-backports, bookworm, trixie and newer.

  • Download the Stream Sprout .deb package from the releases page
  • Install it with apt-get install ./stream-sprout_0.1.0-1_all.deb.

NixOS

FlakeHub

Stable releases of Stream Sprout are published to FlakeHub for Nix users. See the flake on FlakeHub for more details:

Ubuntu 24.04 and newer

yq is available in Ubuntu 24.04 and newer.

  • Download the Stream Sprout .deb package from the releases page
  • Install it with apt-get install ./stream-sprout_0.1.0-1_all.deb.

For Ubuntu versions earlier than 24.04 you can install Stream Sprout from source.

From source

You need to have FFmpeg and yq installed on your system.

git clone https://github.com/wimpysworld/stream-sprout.git
cd stream-sprout

Configure Stream Sprout

Copy the example Stream Sprout configuration 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.

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.

services:
  trovo:
    enabled: false
    rtmp_server: "rtmp://livepush.trovo.live/live/"
    key: "<your_stream_key>"

Twitch

Here's are example configurations for Twitch.

services:
  twitch:
    enabled: true
    rtmp_server: "rtmp://live.twitch.tv/app/"
    key: "<your_stream_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.

You can find a complete list of Twitch ingest servers from https://twitchstatus.com/.

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 https://inspector.twitch.tv/, and the stream will not go live on your channel.

YouTube

Here's are example configurations for YouTube.

services:
  youtube:
    enabled: true
    rtmp_server: "rtmp://a.rtmp.youtube.com/live2/"
    key: "<your_stream_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: