Skip to content

Latest commit

 

History

History
47 lines (40 loc) · 1.5 KB

README.md

File metadata and controls

47 lines (40 loc) · 1.5 KB

Twitch to YouTube Restreamer

This is a small python script which uses VLC to ingest a Twitch stream, and restream it to YouTube. This can be useful if the internet connection you are using to stream from cannot handle streaming to multiple services at once. In such a case, this script would be ran on a device with a speedier or just separate internet connection (friend's computer, VPS, etc.).

Dependencies

  • Python 3
  • VLC (and cvlc) is required to ingest and restream

How to run

Unix-like
  1. Install VLC
  2. Install python 3
  3. Clone repository or download python script
  4. Create/Modify config.json to your preferences
  5. Run script using python3
  6. Voila!
Windows
  1. Install VLC
    1. Ensure cvlc binary is in your PATH variable
  2. Install python 3
    1. Ensure python3 binary is in your PATH variable
  3. See steps 3-6 in Unix-like section.

Configuration

config.json
{
    // Twitch API `client_id` (get from https://dev.twitch.tv/dashboard/apps)
    "twitch_api_client_id": "",
    // Twitch source channel name
    "twitch_channel_name": "",
    // Secret stream key from YouTube (get from https://www.youtube.com/live_dashboard)
    "youtube_stream_key": "",
    // Continuously retry if restreaming fails
    "continuous_retry": true,
    // How often to retry, if enabled
    "stream_check_interval": 5
}

Help

If you have any issues, please feel free to contact me.

Todo

  • Handle the reverse case: Restreaming from YouTube to Twitch
  • More error handling