Trackname on fallback hack ..
  • i have my mp3 play list
    i never update my play list ....
    24/7  ... 300 mp3 file must be playing and loop and loop again ...
    i read and implemnt this quide ..
    http://forum.sourcefabric.org/discussion/15701/fallover-101-how-to-make-all-scripts-worked-easy-steps-to-build-your-scripts-fixed-silence


    add fallback to liquidsoap ...
    everything is okey
    but i have two problems.

    one :
    but i need to get current playing file name and position of music.
    i dont know how can i get this data from liquidsoap

    nothing matter how ! [log , shell , json , php , ...]

    just show me how can i query current playing item from liquidsoap


    two :
    i need push fille title to icecast
    but now just Artist  + offline message shown on icecast

    where need to modify?


    sorry for my bad english
  • 7 Comments sorted by
  • Vote Up0Vote Down hoerichhoerich
    Posts: 627Member, Airtime Moderator

    homax said:

    i have my mp3 play list
    i never update my play list ....
    24/7  ... 300 mp3 file must be playing and loop and loop again ...
    i read and implemnt this quide ..
    http://forum.sourcefabric.org/discussion/15701/fallover-101-how-to-make-all-scripts-worked-easy-steps-to-build-your-scripts-fixed-silence

    Just schedule one daily show from 00:00 to 24:00 and link the show. (max length of a show currently is 24hrs)
    Then create a playlist with the 300 files looped in it. And add this content to the show.
    ready-to-go, with correct Metadata.

    so why messing around in liquidsoap for that? or do you have any further reasons to do this by fallback?

    cheers
    Official Airtime Forum Manager
    --------------------------
    Most of the time an issue is located between keyboard and chair.
  • Let me Answer Question Two First

    The information  is in this post http://forum.sourcefabric.org/discussion/15949/icecast-current-song-unknown
    that I replied to.

    All you have to do is

    #default = rewrite_metadata([("title", !ref_off_air_meta)], default)

    default = rewrite_metadata([(!ref_off_air_meta,"artist" ),("-","title" )], default) 



    And Now for Question 1
    You can get the information from the logs for each song by tailing the liquidsoap logs

    sudo airtime-log -t liquidsoap

    A song is played out like this

    • 10 seconds before its start The song is decoded
    • Then its played Prepared
    • Then its finished
    Here is a synopsis of my log

    2013/10/04 19:31:10 [decoder:3] Method "MP3" accepted "/srv/backup/music/K.Rich - Wine Back .mp3".

    2013/10/04 19:31:20 [music:3] Prepared "/srv/backup/music/K.Rich - Wine Back .mp3" (RID 13).
    2013/10/04 19:35:38 [server:3] Client localhost disconnected.
    2013/10/04 19:35:48 [server:3] New client: localhost.
    2013/10/04 19:35:48 [server:3] Client localhost disconnected.
    2013/10/04 19:35:55 [decoder:3] Method "MP3" accepted "/srv/backup/music/Bunji We Ready For De Road.mp3".
    2013/10/04 19:35:55 [music:3] Loading playlist...
    2013/10/04 19:35:55 [music:3] Playlist is a directory.
    2013/10/04 19:35:55 [music:3] Successfully loaded a playlist of 54 tracks.
    2013/10/04 19:35:58 [server:3] New client: localhost.
    2013/10/04 19:35:58 [server:3] Client localhost disconnected.
    2013/10/04 19:36:06 [music:3] Finished with "/srv/backup/music/K.Rich - Wine Back .mp3".
    2013/10/04 19:36:06 [music:3] Prepared "/srv/backup/music/Bunji We Ready For De Road.mp3" (RID 18).

    Look at the ones I highlighted and notice the next one we ready

    You could use one of the many log viewer , but for security purpose use on localhost,behind a firewall or not at all.

    In old days I used to Use EBOX,I donot know if it still exist .and I do not know how compatible they are with airtime

    Json can also be used I will look at that code and hope you will too



    V.O.I.S.S.E.S.
    Can You Hear me Now


    Post edited by Voisses Tech at 2013-10-04 19:48:55
    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.
  • Dear hoerich thank you for your fast response
    main problem is i dont know where can i set loop
    after playing last file ...
    streaming is stop.

    and i dont know how can i set random playing on my play list
    i need to play random file every day

    it's  "HIT RADIO"


    Dear Voissess Thank you
    it's good
    but i get some thing like that

    2013/10/05 04:02:45 [stdout:3]
    2013/10/05 04:02:45 [stdout:3] #########################################
    2013/10/05 04:02:45 [stdout:3] #           *** pypo  ***               #
    2013/10/05 04:02:45 [stdout:3] #     pypo notification gateway         #
    2013/10/05 04:02:45 [stdout:3] #########################################
    2013/10/05 04:02:54 [server:3] New client: localhost.
    2013/10/05 04:02:54 [server:3] Client localhost disconnected.
    2013/10/05 04:03:04 [server:3] New client: localhost.
    2013/10/05 04:03:04 [server:3] Client localhost disconnected.
    2013/10/05 04:03:14 [server:3] New client: localhost.
    2013/10/05 04:03:14 [server:3] Client localhost disconnected.
    2013/10/05 04:03:24 [server:3] New client: localhost.
    2013/10/05 04:03:24 [server:3] Client localhost disconnected.
    2013/10/05 04:03:34 [server:3] New client: localhost.
    2013/10/05 04:03:34 [server:3] Client localhost disconnected.
    2013/10/05 04:03:44 [server:3] New client: localhost.
    2013/10/05 04:03:44 [server:3] Client localhost disconnected.
    2013/10/05 04:03:54 [server:3] New client: localhost.
    2013/10/05 04:03:54 [server:3] Client localhost disconnected.
    ...
    ...
    ...
    2013/10/05 04:06:20 [Files:3] Finished with "/home/Files//330.mp3".
    2013/10/05 04:06:20 [Files(dot)1:3] Prepared "/home/Files//917.mp3" (RID 3).
    2013/10/05 04:06:20 [fallback_5610:3] Switch to cross_5606 with forgetful transition.
    ....

    it's not enough :-s
    something wrong here
    what's "New client: localhost "?
  • Vote Up0Vote Down hoerichhoerich
    Posts: 627Member, Airtime Moderator
    homax said:

    Dear hoerich thank you for your fast response
    main problem is i dont know where can i set loop
    after playing last file ...
    streaming is stop.

    and i dont know how can i set random playing on my play list
    i need to play random file every day

    To achieve randomness you could use Smart Blocks.
    First create a few smartblocks containing your tracks.
    Then create a 24-hour-playlist and drag the smartblocks into this playlist.
    You could also combine different smartblocks in this playlist.
    Then add this Playlist to a 24hr-Show-Slot and don't forget to link this show.

    Then you should be fine.

    If you won't take advantage of Airtimes functions and want to hack ls_script.liq, you could also use Liquidsoap standalone.

    btw - this info should answer both of your questions ;-)
    Official Airtime Forum Manager
    --------------------------
    Most of the time an issue is located between keyboard and chair.

  • @homax queried;

    "i need to play random file every day it's  "HIT RADIO" "
    if you use the simple script but put your songs in different sub folders below your main music folder and set the reload paramaters to a lower value
    I also put more elaborate scripts to switch at different time of the day or day of the week (there are many others in this forum also)

    @homax queried also;
    "what's "New client: localhost "?"
    thats the connect between liquidsoap and the server,its the way they communicates,so thats perfectly ok


    @hoerich suggested;

    "If you won't take advantage of Airtimes functions and want to hack ls_script.liq,"

    on the contrary it does,but it does not take advantage of the interfaces
    The fallback is one way,if you also use the input script I wrote you can also make it interacts totally with s3 input for stream.That is why I say put it at the bottom cause it can be modify.

    @hoerich futher suggested;

    "you could also use Liquidsoap standalone."

    Why would you?,Airtime has done all the watchdog script and many other python scripts you can leverage on. With a standalone you would literally have to do all your error handling on your own.
    And how would a newbie do this and have it fall back to Airtime schedules etc?

    One other thing I am keen on,How would a newbie place a Standalone Liquidsoap on a Airtime Machine?.
    Most people who suggest that is saying put it between Airtime and Icecast.This total waste of time,If you have to do that Just Use butt or any other and then you could use Itunes etc as playout.

    Scripts Are An ever functional part of radio Automation,like Pal for Sams,Rml for rivendell,python and perl for many others and people should  use it to enhance what they want.

    Take for instance,the seek function [play and stop] is limited (t have to be specific) but customisable in Liquidsoap but you can script it and use it in the fallback

    My contention is that scripts should never be a substitute for the Software.

    Ps.
    by the way there is a way to use the fallback externally that should  Airtime  ls script change it does not smash the fallback {soon post it)


    V.O.I.S.S.E.S.
    Can You Hear Me Now
    712- 432- 8476
    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.
  • Vote Up0Vote Down hoerichhoerich
    Posts: 627Member, Airtime Moderator
    I think, homax could achieve his goal without messing around in ls_script.liq
    So I suggested to try it with Airtime's buitl-in-functions (linked Smart-Blocks)
    Or maybe use Liquidsoap alone, since he seems not to have a lot demands.
    I don't know about his skills. These were just advices he should think of...

    @hoerich futher suggested;

    "you could also use Liquidsoap standalone."

    Why
    would you?,Airtime has done all the watchdog script and many other
    python scripts you can leverage on. With a standalone you would
    literally have to do all your error handling on your own.
    And how would a newbie do this and have it fall back to Airtime schedules etc?

    btw - you can quote multiple comments, just click on their quote-button one after the other ;-)

    homax said:

    it's not enough :-s
    something wrong here
    what's "New client: localhost "?




    Post edited by hoerich at 2013-10-07 11:59:42
    Official Airtime Forum Manager
    --------------------------
    Most of the time an issue is located between keyboard and chair.
  • You Know I am always trying that multiple quotes thing.I need to try harder.
    :bz
    You know originally I thought about just putting a Standalone script,but I like Airtime and that is why I tried and integrate the scripts to fit it.
    I felt Airtime is constantly changing and it gives greater opportunities if I had an integrated approach
    Here is Where I am
    1. I now only put 4 lines in the Ls_script
    2. I can now change my fallback playlist and schedules on the fly ( I tested it 10062013)
    3. with my new found skills in python,I can shut down and restart the script without the listener hears the change
    4. I can seek,restart ,pause and rewind a song ,just need to test this more

    Developers at Airtime will make changes if Our expectation Gap meets the Reality Gap of the software.

    Airtime especially Lisa and the team listen a lot and that is why  Airtime  version Changes are so rapid.

    Many developers just ignore you.like RED5. I now use a different server but I would have like to use REd

    Thanks for your Suggestion and I hope @homax will enjoy Airtime

    V.O.I.S.S.E.S.
    Can You Hear Me Now
    Listen Now

    ***********************
    * V.O.I.S.S.E.S.      *
    * Can You Hear Me Now *
    ***********************

    ♬♬♬♬♬♬♬♬♬♬♬♩♪♫♩♪♫♪♩♫♪♩ ♬♬♬♬♬♬♬♬♬♬♬
    ######################################################
    [En][24/7][712- 432- 8476]############################
    http://tunein.com/radio/BIGLINK-RADIO-s190864/

    [Korean][24/7] [712- 432- 8464]#######################
    http://tunein.com/radio/Goaheadmissionorg-s190399/

    [En][Sundays 2300-Mondays 0600 EST][712- 432- 8437]###
    http://tunein.com/radio/Caribbean-Experience-s200915/
    ######################################################

    Post edited by Voisses Tech at 2013-10-07 13:42:30
    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.