24/7 non-stop mp3 play
  • Hello everyone,

    I am trying to setup Airtime on our ubuntu 14.04 box, airtime itself is working and connected to our icecast 2 server, so that works :)
    However, I need in some way to be able to simply just play a random shuffle of mp3 files that i have on a mounted drive on the Airtime server.
    Basically i need it to play all files randomly from a directory /nfs/music   (this map is a mount on a synology and is open and available,  plus browseable).

    Any idea how i can simply let it play 24/7 our mp3 files without using add media or adding a show?

    Thanks.

    But that doesnt seem to work with latest airtime, plus i get then:








    Restarting Liquidsoap Playout Engine: ('Error loading config file: %s', error(111, 'Connection refused'))

    For some strange reason, is there no simpler way to just randomly play mp3 files from my directory on the server"?

  • 6 Comments sorted by
  • This is the simplest way
    https://forum.sourcefabric.org/discussion/16092/one-lineyes-one-line-modification-no-skills-neededbut-silence-defeated/p1

    and if you followed the links I outlined below your reference you will find the basic

    http://forum.sourcefabric.org/discussion/15701/fallover-101-how-to-make-all-scripts-worked-easy-steps-to-build-your-scripts-fixed-silence

    when you see a 111 connection refused .it means that your liquidsoap had a delay with icecast

    you could just
    use a stop instead of restart  and it will come back up.

    Also it could be an error in what you wrote follow my link above on how to check the syntax

    Lastly.I never had success with nfs.
    Use samba or sshfs
    for samba your playlist is smb=.....................
    for sshfs
    it cache locally

    VOISSES

    Ps. It works on all version of ubuntu from 12.04.I uses 14.04 also
    Post edited by Voisses Tech at 2014-10-31 15:33:36
    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.
  • Your first link seems to work fine for me (even with an nfs mount, i just root squash on there and it works) :)

    Thank you very much, btw, what if you want to randomly shuffle more then one directory?
    - Also to bad this cannot be done in the web interface.

    Also it would be very handy if you could make it have a fade in and out for example 5 seconds when a song ends it will move into the new song instead of waiting till its completely done.
    Post edited by Michiel at 2014-11-01 06:28:19
  • Maybe the Airtime team can explain why you cannot set things like this up in the interface? Just a playlist that runs 24/7 if nothing else is available? Also fade in/out would be very handy when a playlist is shuffling.
  • I am not a member or affiliated to Airtime team in anyway and my answer here is speculative but I will give you some of my thoughts.

    I simple do not know,I post these suggestion a long time for the community and its up to you to pick whatever ones I suggested.

    One of the things I found out that you do not even have to comment out the silence,but could just use it and then make your own playlist and Bam ,you are on the way. which I covered in this post


    https://forum.sourcefabric.org/discussion/16909/autodj-sweetest-seen-fake-or-real-for-a-good-deal-free-free-no-unexpected-autoplay

    But why?

    1. One person suggested you do not have a log list for legal reason,which is not necessarily true In fact that's simple create  the listing from the end before the output,I covered that in the tunein apps add-on
    2. Some people would more go for a total rewrite,than solve the problem (Break down  and built up your way for your own prize and praise) [I have no proof of this]
    3. In open source,the approach is " You get the GUI,You  style it the way you like"  so do not expect all will be done for you in Linux,like windows,you have to do a lot for yourself
    4. Using the Airtime directory can be tricky,if you put things like jingles and station beds all in Airtime Import directory (If I were the Airtime team, I would rewrite the airtime import to categorise the imports as a first step to success)

    Here is a simple one I got last week.

    I could not get the Airtime API to parse.I just went back  and push the Json from the tunein app and the mobile app I was working on is "sweet".

    So as Long as some people see the problem with liquidsoap, expect different changes

    VOISSES

    Please I do not  Know the thoughts of the Airtime team




    Post edited by Voisses Tech at 2014-11-05 09:44:38
    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.

  • Michiel said:

    Maybe the Airtime team can explain why you cannot set things like this up in the interface? Just a playlist that runs 24/7 if nothing else is available? Also fade in/out would be very handy when a playlist is shuffling.




    Cross fade is simple there are three of them to play with
    1. built in simple crossfade
    2. built in smart crossfade
    3. Airtime crossfade function

    The only one I like is the simple crossfade

    so something like this should work (I have not tested it and cannot so anyone who use it have let me know the feedback ) but you should just

    • define the playlist
    • crossfade the playlist
    • play the list

    so

    myplaylist =playlist(mode="normal","/srv/airtime/stor/imported/")

    myplaylist= crossfade(start_next=8.,fade_in=5.,fade_out=5.,conservative=true ,myplaylist )

    default = fallback(track_sensitive = false,[myplaylist])


    Notes

    • I used conservative is true to ensure the song is queue the songs before played
    • You can set your own parameters for start,fade in and fade out
    • There is a nice cue in function found here http://savonet.sourceforge.net/doc-svn/seek.html,you could add that make additional functionality
    • Smart crossfade only worked for me when I could use an external application to calculate the lenght and update the metadata. If you have wake songs that was imported in airtime it have to be updated with metadata unless smart cross fade will not seem to work
    • never tested the Airtime crossfade function



    Post edited by Voisses Tech at 2014-11-05 09:36:58
    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.
  • For others looking for the solution, this basically is what im using now, it randomly plays from 5 directories and a jingles dir, and fades in and out next songs:








    jingles = playlist("/nfs/music/jingles/radio")
    music1 = playlist("/nfs/music/clubhouse")
    music1 = crossfade(start_next=8.,fade_in=5.,fade_out=5.,conservative=true,music1)
    music2 = playlist("/nfs/music/clubbing")
    music2 = crossfade(start_next=8.,fade_in=5.,fade_out=5.,conservative=true,music2)
    music3 = playlist("/nfs/music/2011")
    music3 = crossfade(start_next=8.,fade_in=5.,fade_out=5.,conservative=true,music3)
    music4 = playlist("/nfs/music/2012")
    music4 = crossfade(start_next=8.,fade_in=5.,fade_out=5.,conservative=true,music4)
    music5 = playlist("/nfs/music/2014")
    music5 = crossfade(start_next=8.,fade_in=5.,fade_out=5.,conservative=true,music5)
    j = jingles
    m1 = music1
    m2 = music2
    m3 = music3
    m4 = music4
    m5 = music5
     v = random(weights = [1,6,6,6,6,6],[j,m1,m2,m3,m4,m5])
    default = fallback(track_sensitive = false,[v])
    ref_off_air_meta = ref off_air_meta
    if !ref_off_air_meta == "" then
        ref_off_air_meta := "Airtime - offline"
    end
    default = rewrite_metadata([(!ref_off_air_meta,"artist" ),("-","title" )], default).

    Post edited by Michiel at 2014-11-06 06:01:31