Skip to content

Latest commit

 

History

History
47 lines (39 loc) · 1.27 KB

README.md

File metadata and controls

47 lines (39 loc) · 1.27 KB

LiveStreamRadio

Lightweight 24/7 Twitch and YouTube Music Radio using FFMPEG.

Dependencies

Install the following software on your machine: git, screen, alsa, mpg123 and ffmpeg

sudo apt install git screen alsa mpg123 ffmpeg

Installation

  • Clone this repository
git clone https://github.com/NoniDOTio/LiveStreamRadio.git
  • Add ALSA loopback (on some systems, you will have to re-run this command after every reboot)
sudo modprobe snd-aloop pcm_substreams=1
  • Make loopback the default PCM device by adding it to .asoundrc
echo 'pcm.!default { type plug slave.pcm "hw:Loopback,0,0" }' >> ~/.asoundrc

How To Use

  • Open config.sh in an editor and add your RTMP urls to PLATFORMS, remove any lines you don't need
PLATFORMS=(
    "rtmp://a.rtmp.youtube.com/live2/1234-5678-90ab-cdef-ghij"
)
  • Specify a file path for MUSIC_DIR= and BACKGROUND=. Alternatively, you can move all your audio files to /media/music.
  • Start streaming by launching the script
./lsr.sh --start
  • Stop streaming by quitting the script
./lsr.sh --stop

Links