Announcement

Collapse
No announcement yet.

sc_w3c.log after a lot of tests, i need some informations and tips

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • sc_w3c.log after a lot of tests, i need some informations and tips

    Hello,

    I'm currently using SHOUTcast Server v2.0.0.29/posix(linux x64) and all is working really fine with my stream.
    Now, I want to use sc_w3c.log to get some stats about my listeners.

    So, i installed Piwik and i wrote a script in order to convert the original sc_w3c.log format to a format parseable by Piwik.
    All is fine with it too.

    On Piwik, i have a lot of entries with the following page : /stream?title=Unknown

    After searches and test, i found that i must have one line in my log for each song listened by each user.
    So, 2 lines if a person listened 2 titles (with 2 different pages : the title metadata of each song).

    This system works for VLC, Itunes and Winamp BUT, as soon as you use a webplayer with the new audio html5 tag or flash player (including shoutcast website player), the system is broken.
    So with these players, you have only one log line at user disconnection with title metadata : Unknown

    The problem is : a lot of my users are listening directly my radio on the website (using jplayer).
    My stats are now really broken because of this.


    My question is : How shoutcast server is writing w3c_log? Is the server waiting for a callback given by the player (and maybe we can reproduce this call with webplayer) ? Or is it a completely different system?
    Is it possible to have "normal" logs with web-player and how (i can code it if needed but can you give me some tips) ?


    Thanks a lot,

  • #2
    it just logs the connection, that is it. there is no magic voodoo for doing different things based on different client connection types. and to my knowledge, bar the lack of the header, it should be the same as what a v1 DNAS provided (so if that's wrong then it's been wrong for a decade).
    WACUP Project <‖> "Winamp Ramblings" - Indie Winamp Dev Blog

    Comment


    • #3
      Thanks for this answer.
      According to IIS 6 Documentation

      it seems that UserAgent in sc_w3c.log is escaping html characters.
      I think, ONLY spaces have to be replaced with +
      So today the UserAgent log is : Mozilla%20Firefox
      and should be : Mozilla+Firefox

      Some Log Parser needs fields date and time first, it seems to be not required by IIS specifications but it would be good for a better compatibility.

      Here is an extract of the new log after my script :
      #Fields: date time c-ip c-dns cs-uri-stem sc-status cs(User-Agent) sc-bytes x-duration avgbandwidth cs-method
      2013-04-08 11:48:06 x.x.x.x x.x.x.x /stream?title=TheArtist%20-%20theTitle 200 WinampMPEG/5.50 5390336 224 192512 GET

      and this is 100% compatible with all tools

      I think, the problem of "stream?title=Unknown" is that flash player and html 5 players are downloading the file like classic http requests because i have the same problem in the log when i try to download manually the stream in a file.
      Is there a way to avoid this behavior?

      Comment


      • #4
        the user-agent and songname are url encoded as that's how the w3c log from the DNAS has always been done. as for the comment about the order of things, i'm not going to change that as it's likely to break normal reporting tools (there was enough grief from the header being missed out).

        maybe it is a bug in the DNAS though i'm not sure since flash and html5 connect as a v1 based client and the "working" entry is also a v1-based client so will have gone through the same code path.

        'unknown' is shown if the DNAS is unable to determine a title from the current stream at the time when the client connects, maybe something is wrong with that but i just do not know (or have the time allocated to look into the issue other than to log it as something to checkout at a later date if possible).

        as such i don't have any viable solution for you or any eta if there will be one (if there is a bug).
        WACUP Project <‖> "Winamp Ramblings" - Indie Winamp Dev Blog

        Comment

        Working...
        X