The best open source alternative to Twitch is Glimesh. If that doesn't suit you, our users have ranked more than 50 alternatives to Twitch and four of them is open source so hopefully you can find a suitable replacement. Other interesting open source alternatives to Twitch are Owncast (Free, Open Source), Open Streaming Platform (Free, Open Source) and Hypercast (Free, Open Source).
Owncast is a self-hosted live video and web chat server for use with existing popular broadcasting software. Point your live stream at a server you personally control and regain ownership over your content.
Open Streaming Platform (OSP) is an open-source, RTMP streamer software front-end for Arut's Nginx-RTMP Module. OSP was designed as a self-hosted alternative to services such as Twitch.tv, Ustream.tv, Mixer, and Youtube Live.