2020-05-19 01:54:09

hello, so I know that some of you run radio stations in here. I assume that you set up an icecast server remotely and then broadcast from your pc?
If so, I think i have found interesting options. I know some people use programs such as radio boss for live programs, but other options would be welcome. But, For now, bandwidth constraints are a great limitation for me so I am wondering, since I do have music folders with many tracks on the same linode that I use for my icecast server if there is a way to get a program that plays those tracks in these folders randomly...
I have read that one can do this by using liquidsoap as a linux program, but I followed a guide I found on their official page but the stuff they explained was way beyond what I can understand, but that would be the best way, because streaming from my pc would be a bit pointless since my provider caps a limit and then gives you really low 512 kilobits speed which is not enough for that.
So, any ideas or ways of getting this to work?

A bus station is where a bus stops. A train station is where a train stops. On my desk, I have a work station…

2020-05-19 03:02:34

Take a look at AzuraCast. It offers a web interface to set up autoDj and other stuff. I think Station Playlist is still the standard for broadcasting. That, or Edcast if you want to do live shows.

2020-05-19 03:31:34

wow, had a play with this azuracast and as far as I read, its very interesting. However, I guess because my connection has got a double nat and stuff going on, apparently all of the pages on the web interface show up as blank, so this is ... puzzling. I also get a sql error that denies access to a user during set up, but apparently everything is set up alright. So sadly, its impossible for me to use and configure, at least for now.

A bus station is where a bus stops. A train station is where a train stops. On my desk, I have a work station…

2020-05-19 21:37:19

tried following a more thorough liquidsoap guide and was successful to almost every step of the way... until it tells me to run liquidsoap itself... I get the error that liquidssoap.service is not found. Googled for it, but nothing useful. I am susprised there are no more options for this.... but again, I guess that trying to do all of this from a mobile data connection is still too a bit ambitious.

A bus station is where a bus stops. A train station is where a train stops. On my desk, I have a work station…

2020-05-19 21:41:54

As the website recommends, you can use the docker installation for AzuraCast. That'll basically take care of all the setup for you. It's recommended you have enough space on a computer and that docker can run. Also, they can deploy everything for you quickly if you use DigitalOcean or Linode.

2020-05-19 23:23:48 (edited by UltraLeetJ 2020-05-22 04:07:46)

I used docker with azura cast, but I still suspect it is my connection. Still, I was finally successful with liquidsoap!
not the most elegant way to do things, but I followed that guide I posted above, and updated the syntax according to the official liquidsoap documentation I found out that the error was due to error in my .liq configuration script because I went to the folder where the .liq script was, using terminal, then typed
liquidsoap blahblah.liq
and got descriptive errors from the program, most of them were syntax errors. Stripping the file though, gave me clues as to what was working and what was not. I still believe liquidsoap really needs to improve their explanations of the stuff, but for me it was enough to make a folder called music in my home/name directory, upload some tracks to it, and then use the script like this:
beging content of file
# Music playlists
music1 = playlist.safe(reload=86400,"~/music")
#I will take care of a default file later and this one has less tahn 10, although very long tracks
#so I'm good forcing it as a safe fallible playlist for now
#the reload before the path refreshes the folder every 10 minutes so if
#I add something, it will be playing eventually.
# Start building the feed with music
radio = random([music1])
#this creates a variable named radio and plays the folder in random order
# Stream it out
output.icecast(%mp3,
host = "localhost", port = 8000,
password = "WhatEverItMightBe", mount = "jam",
name="the most boring radio ever", description="ultra blahblahblah", radio)

end of file content
When I did
liquidsoap blahblah.liq
it all worked. A bunch of messages were displayed with the status of each track and so on.
I went to my.host:8000/jam
using various players and it was playing, using the "the most boring radio ever" as the station name and unknown as the title.
You can tag your media files properly using whatever in windows, then uploading them to your server, so that artist and title are displayed correctly.

A bus station is where a bus stops. A train station is where a train stops. On my desk, I have a work station…

2020-05-20 11:50:09

i used to install icecast manually before and then config   the xml file and stream  using a software called AltaCast

And as anyone who's gone mountain climbing knows ,The serene snow-covered peaks that look so tranquil from a bdistance, Are the deadliest
sound is my vision
i rarely check my private messages on the forum, so if you want to contact me please use my email, or dm me  at oussama40121 on tw

2020-05-20 17:34:22

oh, I have heard of AltaCast before but wouldn't have thought it was accessible for windows.
Still, I plan to leave liquidsoap for 24/7 transmission and have it interrupt when live streams come in. I will give that one a try as well.

A bus station is where a bus stops. A train station is where a train stops. On my desk, I have a work station…

2020-05-20 18:09:03 (edited by Chris 2020-05-20 18:24:34)

If you're configuring AzuraCast and also want to run a website, my understanding is that you should dedicate a server to AzuraCast and use another server for websites and anything else you may want to do.

I messed with this for a little while and it's pretty cool. However, I'm not sure how secure this is or how to update it. I also didn't keep it up for very long as I didn't see the point. I don't really play music, and no one listened to me when I used to do Icecast streams. Still, this is a great way to stream content if all you want to do is use audio and have limited bandwidth. A 128 Kbps stereo stream shouldn't use too much data if you're using mp3 or ogg. I'd recommend mp3, as not all devices support ogg, while mp3 is ubiquitous.

As for streaming clients, I used to use Altacast. For some strange reason, I had to run it as administrator. I've heard Edcast works as well, but haven't tried that. If you're using macOS, Audio Hijack can stream to servers. For iOS users, you can use Backpack Studio.

Grab my Adventure at C: stages Right here.

2020-05-20 21:07:56

thanks for that.. I am not running any web server, but I still suspect my data connection plays into this as a git issue regarding what happened to me also showed up, blank pages loading for a azuracast, even with different browsers and that was the final coment on it, so I suppose it applies for me too. Still, I need to get more familiar with liquidsoap scripting language, but it works for what I need for now as a nice auto dj type thing

A bus station is where a bus stops. A train station is where a train stops. On my desk, I have a work station…

2020-05-21 03:07:24

Altacast is accessible. Very easy.

I don't speak as good as I write, and I don't listen as good as I speak.

2020-05-22 03:25:32

Can I play the files from the folder instead of a playlist? If I can, could anyone give me an example code?

2020-05-22 03:53:49 (edited by UltraLeetJ 2020-05-22 04:15:04)

Socheat wrote:

Can I play the files from the folder instead of a playlist? If I can, could anyone give me an example code?

hi, my code on post 6 plays files from a directory and all subfolders. I have changed the reload times because 600 seconds can get the thing to reload the folder every 10 minutes but it will repeat many things over and over, so its better to put something like 24 hours, or 86400 seconds.
I will change this code soon because I want a jingle or some sound to play just before I go live and also when I finish the live stream, and want to also do it without restarting the liquidsoap server, and will share my progress, but feel free to use the one I have in post 6. It assumes you have songs in the directory home/YourUser/music
if you need to change that then change the line like this:
music1 = playlist.safe(reload=86400,"path/to/songs/folder")

and that's it.
playlist.safe is a command that tells liquidsoap that the files will be there no matter what, and  music1 is sort of a variable we assign to the first pseudo playlist because we will need to use it later to tell liquidsoap that it is a feed called radio, that will  be going to an icecast output. Hope that last bit made sense!
also, the mount = can be changed to whatever (remember to respect quotation) and that will be the end of your URL
like, if your mount is snoring, then your stream URL will be
http://my.radio.net:8000/snoring

A bus station is where a bus stops. A train station is where a train stops. On my desk, I have a work station…

2020-05-22 16:13:13

Well, I got an error on line 5, char 3-17. I don't know what the problem is though. I also have a look in liquidsoap quickstart, and my code has written exactly that. Will debug it again tomorrow, now need sometimes to sleep.

2020-05-22 17:12:34

I normally use win scp to edit the file in one window, and then have the terminal open in another one.
The integrated win scp editor is good enough and you can use it normally, and NVDA object nav or a jaws cursor review can tell you which line you are on.
If anything, you could paste your code here. I also guess it depends on what version of liquidsoap you are using, i installed liquidsoap by using opam (about 4 days ago as of this writing) which has apparently the latest one with as many dependencies as possible, which in total was about half a gig if I remember correctly.

A bus station is where a bus stops. A train station is where a train stops. On my desk, I have a work station…

2020-05-23 05:31:53

Hi there,

My liquidsoap configuration starts below:

# music playlists
music1 = playlist.safe(reload=86400,"~/music)
radio = random([music1])
output.icecast(%mp3,
host = "localhost", port = 8000,
password = "MySourcePassword", mount = "test",
name="The radio test", description ="This is my radio test", radio)

# configuration end

Also, you don't need to use WinScp. You can use SFTP (secure transfer protocol) that are preinstalled on Mac, Linux, and recently windows 10.

2020-05-23 05:37:49

and, what error do you get when you do
liquidsoap yourFile.liq?

apparently its complaining on line 5 which has to do with the host setup, but as far as I can see its all correct there
thanks for the sftp thing on win 10, had no idea about it.

A bus station is where a bus stops. A train station is where a train stops. On my desk, I have a work station…

2020-05-23 14:06:21

It says error char 8-17, syntax error!

Yeah, the SFTP thing is pretty useful I don't install any third party software to manage file on my server.

2020-05-23 19:06:47 (edited by UltraLeetJ 2020-05-23 19:08:51)

well, I see that you have some extra white spaces after the line
output.icecast(%mp3,


Make sure that there are no extra spaces in the code at the end of lines (apparently liquidsoap does not need them anyway) and run it again, its the only difference I see from your code versus mine.
Or just literally copy and paste the whole thing leaving the comments in, then remove them little by little, they will do no harm anyway.

A bus station is where a bus stops. A train station is where a train stops. On my desk, I have a work station…

2020-05-24 04:01:55 (edited by UltraLeetJ 2020-05-24 05:24:53)

I am happy! finally figured out how to do what I wanted to do, although I know it can be done more gracefully

this will do the following:
1. Get all the files inside a folder named music and play them in random order, reloading them every 24 hours.
2. When you use anything to connect to your icecast using live.mp3 as the mountpoint, the main mountpoint, in this case mine is named jam,  will pause whatever it is playing, and switch to that immediately, abruptly, no transition sound, no warning. You are now live!
3. when you disconnect from your client, it will resume playing, or continue exactly where it left of. Of course, your listeners will never get dropped or anything, and they won't need or have to do anything, either.
start of main.liq file:

# Music playlists
music1 = playlist.safe(reload=86400,"~/music")
radio = random([music1])
#Add support for live streams.
full =
  fallback(track_sensitive=false,
           [input.http("http://localhost:8000/live.mp3"),
            radio])

# Stream it out
output.icecast(%mp3,
host = "localhost", port = 8000,
password = "YourIcecastSourcePassword", mount = "jam",
name="jams radio", description="experimental", full)

end of main.liq

so now, a few remarks:
This is really sad because there should be a different port probably for connection, and also it should be done using the propper harvor input feature so that you can use a different password, protect your radio from anyone  that knows your source icecast username and pass that you have configured there, from just interrupting your stream and whatever... but it gets the job done. For now, its what I need. Hope it helps someone as well.

A bus station is where a bus stops. A train station is where a train stops. On my desk, I have a work station…

2020-05-24 04:08:43

Oh boy, it's working! Thanks a lot.

2020-05-24 05:18:22

awesome that is working for you!
as noted, I think the documentation provides great examples and really shows off the impressive features of such a robust great software, but, the lack of a more detailed explanation of the code really is something that sets anyone back. Especially, the syntax of this and that, and why should you enclose things into braces and how you have to put a  variable inside of another (like radio inside full) to achieve the desired outcome... in this case, full is a source that also goes to the same output, shares the output of radio, so that is why they have to be nested. But that is not specified anywhere in docs and not all of us really are that familiar with that kind of programming language.

A bus station is where a bus stops. A train station is where a train stops. On my desk, I have a work station…

2020-06-13 00:21:18

hi. it is possible to use 2 or more playlist in liquidsoap? I want to do something like this. in my music folder, there are 2 playlist. named, slo, and fast. i want to play 3 songs in first playlist.  and after playing 3 songs, switch to second playlist. after, play three songs again, and after, the process repeat itself. it is posible? can you givve me code sample? sorry for my english.

2020-06-13 19:13:00 (edited by UltraLeetJ 2020-06-13 19:13:35)

I am unfortunately not very good with the code, but I can imagine you could do something like:

music1 = playlist.safe("~/music/slow")
music2 = playlist.safe("~/music/fast")
radio = random(weights = [3, 3][music1,music2])


and then set up the rest from there, but you have to experiment. Or you could probably ask on their mailing list too.

A bus station is where a bus stops. A train station is where a train stops. On my desk, I have a work station…