Giter Club home page Giter Club logo

roon-flac-restreamer's Introduction

Roon-FLAC-restreamer

DISCLAIMER

This is a proof of concept, mostly because I'm a podcast junkie and that is the one feature I miss in Roon compared to my old Daphile/Squeezebox setup.

It assumes you know what you're doing.
It comes "as-is", i.e. I might answer questions on the Roon forum but assume it comes with no support.
My environment is a Roon Core running on Ubuntu 18.04.2 LTS (GNU/Linux 4.15.0-46-generic x86_64). I have no idea if it works on any other platform.

If you're afraid to break your Roon server, do not install it.

I did my best to document dependencies, commands, etc. mostly because it was such a pain to setup. If you find a typo, have an idea on how to make it better, please create a Pull Request.

A- Software pre-requisites

I installed everything on my Roon Core, but it can be installed on a different host. If you install it on a different host, replace 'localhost' with your host name/ip address in your FLACReStreamer Roon radio station URL in step B-2 and edit the .py and .liq files accordingly.

# I'm using Ubuntu 18.04.2 LTS (GNU/Linux 4.15.0-46-generic x86_64)
pip3 install /Users/.../Downloads/six-1.12.0.tar.gz # had to manually download it
pip3 install /Users/.../Downloads/websocket_client-0.54.0.tar.gz # had to manually download it
pip3 install roonapi
pip3 install requests
sudo apt install icecast2 # use 'roon' as default password or use your own but edit the .liq files
sudo apt install liquidsoap

B- Roon setup

1. At the command-line:

chmod +x setup_token.py
chmod +x restream.py
chmod +x setup.liq
chmod +x play.liq
./setup.liq

You should see a bunch of output. Using VLC, you can verify that http://localhost:8000/stream.flac is producing 16/44.1 FLAC-encoded music.

2. In Roon:

create an Internet Radio station with URL http://localhost:8000/stream.flac named FLACReStreamer.

3. At the command-line:

Kill the setup.liq session (ctrl-D).

Setup the ROON API wrapper

4. At the command-line:

laurent@nexus7:~$ ./setup_token.py
2019-03-24 15:24:25,064 INFO   roonapi -- Connecting to Roon server x.x.x.x:9100
2019-03-24 15:24:25,071 INFO   roonapi -- Connection with roon websockets (re)created.
2019-03-24 15:24:25,072 INFO   roonapi -- The application should be approved within Roon's settings.

5. In Roon again:

Settings > Extensions > Python API for Roon > Enable The console should show:

2019-03-24 15:24:38,175 INFO   roonapi -- Registered to Roon server xxx

4. At the command-line:

The script should complete and print the API token.

Now we can finally re-stream

./restream.py https://sample-videos.com/audio/mp3/crowd-cheering.mp3

You're welcome!

roon-flac-restreamer's People

Contributors

lfontanel avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.