Created
July 20, 2017 03:23
-
-
Save tomhiggins/b43535daf5976c3de6123754df07a86b to your computer and use it in GitHub Desktop.
Streaming Audio Station Fast and Easy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find /directory/where/your/music/is/ -name "*mp3">playlist.m3u | ip="$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/')" | cvlc --no-auto-preparse -I http --http-password CHANGEME --http-host $ip --http-port 8088 --sout-keep --sout='#duplicate{dst=gather:std{access=http,mux=mpeg1,dst=:8085},dst=display,select="novideo"}' -LZ --no-auto-preparse --album-art=0 -q playlist.m3u |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Do you have a ton of directories of music/spokenword/podcasts/noise that you want to stream out to your local network?
Requires
How To Use
You should run this in a directory where you have rights to read and write files
NB For those with large collections of music the playlists may take a moment or three to load on the Control web page. Give it time, it is working hard for your pleasure.
How can I control what is being played?
You should now see a web page with controls that will allows you to pick what you want to be streamed and in which order. You can also use an app on your phone/device such as RemoteForVLC (https://f-droid.org/packages/org.peterbaldwin.client.android.vlcremote/)
How do I change the deafult password
Before you hit enter and run the code
This will now be the password you will use to log into the controls for the Audio Stream.
NB If you want to run this so that anyone can control the Audio Stream, give out the password to anyone and everyone
you want to be able to control it. Sometimes Temporary Autonomous Zones (TAZ) are just what the doctor ordered. It is up to you.
How do I use an APP to listen to the stream?
My goto app is VLC (PlayStore or Fdroid). Your mileage will vary. So long as the app has the option to stream audio you are good to go. Point your app to http://servingmachineip:8085
How do I find out the IP of the machine I am running the AudioServer on?
There are many ways to find this out depending on the type of machine you are using to run this.
On Linux, go to the machine that is running the audio server and cut and paste this into a Terminal/Command Line...
echo "$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/')"
The result will be a number like 192.168.1.23 This is the IP number of that machine. So in this example to listen to the stream from anywhere on that network just point your Audio app to http://192.168.1.23:8085