Where in the scripts does Liquidsoap log the song?
  • I'm trying to make a small adjustment to the information stored in the log files.

    Where exactly is the place in the scripts where the name of the song being played is logged to the log file /var/log/airtime/pypo-liquidsoap/ls_script.log on the disk?

    I need to make a small adjustment to this instruction so that the current number of listeners is added to the logged information.
    Post edited by Krypton Radio at 2014-12-16 19:17:44
  • 13 Comments sorted by
  • One of the weirdest questions I heard.

    • In Linux You should never ever try to trouble the logs directly.Logs are the dump of what is the side effects of your "folly" or to be politically correct "shenanigans".So basically its your debugging or diagnostics tool.Like a Camera the doctor put through your mouth or *SS to tell what ships is happening

    Now to see if I can understand what you really need.

    Pay Attention I usually speak parables as I descend from the Mountain of  "he is a jolly good fellow" but this time I am on the level ,although everything  seems to move away from me as I approach or there seems to be a long small earthquake ,"I am unable  to stand steady". by the way you heard any Meteorological weather Alerts!" but

    Now there are ways to input additional columns in the database,sourcefabric used to have a tutorial on how to do that,but guess what "It Vanish,poof its gone to never never land." RIP.


    If you still thing I make no sense just go to the top path of the ls_script

    change this line

    set("log.file.path", log_file) to wherever you want to put your ls_log and manipulate to your pleasure and at your own risk 

    or have a look at this file /etc/airtime/liquidsoap.cfg

    it will tell you more

    But since those things in my stomach have something to tell me,I will now push them out through eithe my mouth or orfice,so I best go to the little boys room to look in that white mirror on the floor.

    Good Bye

    VOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOIsses



    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.
  • I guess I didn't make myself sufficiently clear.

    I need to be able to get a listener count of exactly how many people were online when a specific song plays.

    I need to create my own log file in a form tabulated such that I can create my own separate database and table. I need to trigger my logging utility each time a new song is played. To do this, I need to know the precise point in the Airtime or Liquidsoap code in which this event is handled, so that I can execute my external command via a system call.

    Airtime currently produces a history log of what songs where played and when, but it does not include the listener count in this report and there is no way to add it. Selling radio ads demands that I be able to tell my clients exactly how many people actually heard their ads, and I can't currently do this. This is my goal.

  • You need piwik

    http://sourcefabric.booktype.pro/airtime-25-for-broadcasters/icecast-statistics-with-piwik/


    Basically you want analytic tools so search for anyone you want ,I was looking at pushing the outputs to a customized version of piwik as i think its comphrensive.

    other ways is
    • creating scripts in ruby or perl  so that once a user hit your mountpoint information is log and once they exit it gives information on that user 
    • P0f is another tool
    • or some php script  or python to read the mount point connections and disconnections

    As i said pushing anything too complex to the core might result in an heavy processing so you want to create most of your scripts external to your Servers. and best use some form of Request.

    Ps. I do not think piwik is in the airtme repository as they suggest,so you might have to download and install it via the instructions.

    Try Piwik .I am working on it now so I might can give you a few pointers


    VOISSES

    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.
  • I have Piwik. It is incapable of giving me precise numbers for precise moments in time when a specific song is playing. The best it can do is give me how many total listeners there were within a given hour, and it cannot produce granularity below that so far as I can determine.

    I need to be able to detect how many listeners there are when a given cut plays, along with the exact time stamp. I have already written a utility which can record this to its own log file.

    Please do not rewrite my specification for me.  I know exactly what I need, and why I need it.

    How would I get liquidsoap to make a system call each time a new song is played?  That's all I'm asking, and that's all I need to know. The rest is solved.

    Is there no way to declare a callback function called by an event handler each time a new song plays? This seems like a fundamental architectural detail to me.

    Post edited by Krypton Radio at 2014-12-17 18:14:55
  • Why People think I am fool? Well I act like one but that's nice!

    I said take my  complete script dump it with any http request ,then use any thing you want.

    Here is a sample of the information which runs in mine

    [("liq_cue_out","160."), ("album","No Time To Loose"), ("kind","{audio=2;video=0;midi=0}"), ("artist","George Banton"), ("decoder","MAD"), ("title","Are You Ready"), ("liq_cue_in","5."), ("filename","/var/www/radio/music/gospel/George Banton2/George Banton -  Are You Ready.mp3"), ("temporary","false"), ("source","Gospel"), ("initial_uri","annotate:liq_cue_in=\"5.\",liq_cue_out=\"160.\":/var/www/radio/music/gospel/George Banton2/George Banton -  Are You Ready.mp3"), ("status","playing"), ("on_air","2014/12/17 18:22:24"), ("rid","47"), ("genre","Gospel")]

    The listener count comes from Icecast you can bring that in easy

    All the field I are you are there

    VOISSES

    Well let this fool retreat
    VOISSES
    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.
  • Icecast2 already logs your listener count on each metadata update without any funny stuff. Check it out.
  • I said that in line 16.

    As one of the Dev said  "Airtime is open source" and  so we all can poke it the  way we want.


    It said when I hear people who should know better  never say the best either silent or join the crowd.

    So I wish the dev team over come the pressure,I could not do it ,Cause I have "Anger Issues"

    So Good Luck Team

    VOISSES
    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.
  • It updates admin/status.xml, Roger, yes, but log? Not that I can find anywhere.  Perhaps you could point me in the right direction.

  • Gotta remove the comment in the icecast config file, it's off by default.
  • Find it? Notice the duplicates that are generated? I can't figure out if Airtime itself is messing something up or if it's Liquidsoap. My bet is on LS.
  • Aha, thank you, Roger, this is could solve the problem depending on the format of the log lines. Duplicates, huh? Now that I have this turned on I'll have a look for that. 

    If there are duplicates, I'm sure I can code a filter to strip them out. This should be a lot easier than the continuous polling solution I worked out.
    Post edited by Krypton Radio at 2015-02-17 14:15:02
  • Why not figure out the root cause and submit a patch? :)
  • I'm not seeing the duplicates.  What I am seeing is the listener count broken out by stream, which is very useful information.  This is perfect, and exactly the information I was looking for when I started this thread. The log point may exist in the Airtime code, but getting Icecast to do it by uncommenting a couple of lines of config code was even easier.

    Thank you, Roger. You just saved me a ton of work.