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.).
- Python 3
- VLC (and cvlc) is required to ingest and restream
- Install VLC
- Install python 3
- Clone repository or download python script
- Create/Modify config.json to your preferences
- Run script using python3
- Voila!
- Install VLC
- Ensure cvlc binary is in your PATH variable
- Install python 3
- Ensure python3 binary is in your PATH variable
- See steps 3-6 in Unix-like section.
{
// 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
}
If you have any issues, please feel free to contact me.
- Handle the reverse case: Restreaming from YouTube to Twitch
- More error handling