Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/meyerlasse/twitch-audio-restreamer
Restream a Twitch.tv livestream as audio-only.
https://github.com/meyerlasse/twitch-audio-restreamer
audio restream stream streaming-audio twitch
Last synced: 26 days ago
JSON representation
Restream a Twitch.tv livestream as audio-only.
- Host: GitHub
- URL: https://github.com/meyerlasse/twitch-audio-restreamer
- Owner: meyerlasse
- License: mit
- Created: 2018-08-02T13:58:10.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-08-02T19:13:47.000Z (over 6 years ago)
- Last Synced: 2024-08-03T13:02:02.652Z (4 months ago)
- Topics: audio, restream, stream, streaming-audio, twitch
- Language: Shell
- Homepage:
- Size: 5.86 KB
- Stars: 15
- Watchers: 4
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-twitch-dev - meyerlasse/twitch-audio-restreamer - Restream a Twitch.tv livestream as audio-only. (Libraries / Shell)
README
# Twitch Audio-Only Restreamer
This script takes a Twitch.tv username and restreams the audio on a local Icecast2 server, while the stream is online.
Every 60 seconds, the availability of the Twitch stream is checked and the audio stream started accordingly.
The mountpoint of the audio stream on Icecast is the Twitch username.Example:
Twitch username: restreamer --> URL: localhost:8000/restreamerCan be easily modified to be usable for other streaming sites as well.
## Dependencies
- [youtube-dl](https://rg3.github.io/youtube-dl/): Downloading the stream
- [ffmpeg](https://ffmpeg.org/): Converting the stream to MP3 and provide a source for the Icecast2 server
- [icecast2](http://icecast.org/): Making the audio stream available on the network## Setup
1. Install the required packages:
```bash
sudo apt-get install youtube-dl ffmpeg icecast2
````2. Configure Icecast2
3. (Optional) Configure systemd service file `twitch-audio-restream.service`
- Add Twitch username
- Add Icecast source password4. (Optional) Install systemd service file
```
sudo cp twitch-audio-restream.service /etc/systemd/system
sudo systemctl enable twitch-audio-restream.service
```5. (Optional) Copy script to location where systemd service file expects it
```
sudo mkdir -p /opt/twitch-audio-restream
sudo cp twitch-audio-restream.sh /opt/twitch-audio-restream/
```6. Start either script directly or systemd service
`./twitch-audio-restream.sh [Twitch username] [icecast source password]`
or
`sudo service twitch-audio-restream start`