Go Back   Winamp Forums > SHOUTcast > SHOUTcast Technical Support

Reply
Thread Tools Search this Thread Display Modes
Old 7th August 2012, 00:39   #1
doobiedoobiedo
Junior Member
 
Join Date: Dec 2011
Posts: 19
Calendar file just doesn't work

Does the calendar file even work in the newest public release?

We are using a main playlist and want to insert a jingle between tracks. We set the calendar.xml file and sc_trans config according to the docs but it just won't work. Its like the calendar.xml file is being completely ignored.

Any suggestions?
doobiedoobiedo is offline   Reply With Quote
Old 7th August 2012, 01:09   #2
DrO
-
 
DrO's Avatar
 
Join Date: Sep 2003
Location: UK
Posts: 22,204
the calendar file does work, unless you're hitting one of the bugs as was described in my final reply in your previous thread.

have you made sure that it's not showing any loading errors in the sc_trans log?

is the file still containing what you actually specified in it and hasn't been cleared out / re-written?

you aren't expecting the jingle to happen at the exact time specified? (as that is not how things currently work)

can you provide a copy of your calendar.xml please so it can be verified / determined what is or isn't going on.

-daz
DrO is offline   Reply With Quote
Old 7th August 2012, 01:27   #3
doobiedoobiedo
Junior Member
 
Join Date: Dec 2011
Posts: 19
I did what you suggested and entered a start time in the calendar file. I suspect the problem is in the sc_trans config settings.

I understand that the calendar inserts things into a que and that the Jingle won't play until the next gap in the playlist. I read the docs on everything related to calendars a million times!

Is my problem perhaps that calendars will only work when you are using a relay or DJ stream as your main source? I'm just using a playlist that endlessly loops as the main source in sc_trans.

Here's the current calendar.xml file. Please note that I have tried changing the starttime to a something like 01:12:23 or whatever is a couple minutes after sc_serv.exe is loaded on the system and that doesn't work either.

<?xml version="1.0" encoding="UTF-8" ?>
<eventlist>

<event type="playlist">
<playlist loopatend="0" shuffle="0" priority="2" >pr</playlist>
<calendar starttime="00:00:00" timeoffset="00:30:00" repeat="128" />
</event>
</eventlist>

I've tried many different settings in sc_trans and the documentation could have been clearer about how and where (i.e. sc_trans config or sc_serv config) you need to define your additional playlists. Here is part of the sc_trans frile from my most recent test, which is not working. I don't want to include the entire file publicly.

encoder_1=mp3
bitrate_1=56000
samplerate_1=44100
channels_1=2
outprotocol_1=3

streamid_1=1

endpointname_1=/

calendarfile=c:\SHOUTcast\calendar.xml
calendarrewrite=1

playlistfile=c:\SHOUTcast\playlists\main.lst

playlistfilename_2=pr
playlistfilepath_2=c:\SHOUTcast\playlists\pr.lst

playlistfilename_3=commercials
playlistfilepath_3=c:\SHOUTcast\playlists\commercials.lst

---------------------

I do not see anything in the sc_trans log that resembles a calendar load error. I'm not sure what the syntax might look like though.
doobiedoobiedo is offline   Reply With Quote
Old 7th August 2012, 01:35   #4
DrO
-
 
DrO's Avatar
 
Join Date: Sep 2003
Location: UK
Posts: 22,204
i'll try to check through it tomorrow though i'll quickly answer a few things raised in your reply (as it's gone 2:30am and i need some sleep).

Quote:
Originally Posted by doobiedoobiedo View Post
I understand that the calendar inserts things into a que and that the Jingle won't play until the next gap in the playlist. I read the docs on everything related to calendars a million times!
i wasn't sure so i had to make sure to re-iterate the point (as lots of people don't read the docs).

Quote:
Originally Posted by doobiedoobiedo View Post
Is my problem perhaps that calendars will only work when you are using a relay or DJ stream as your main source? I'm just using a playlist that endlessly loops as the main source in sc_trans.
running with a main playlist is what should allow events to work. it's when doing it for DJ or Relay only setups where the issues arise with the current (and i think all prior sc_trans v2 builds).

Quote:
Originally Posted by doobiedoobiedo View Post
I've tried many different settings in sc_trans and the documentation could have been clearer about how and where (i.e. sc_trans config or sc_serv config) you need to define your additional playlists.
er ok, never expected to see that come up. all of the docs for the calendar events only refer to sc_trans e.g. The purpose of the calendar.xml file is to allow for the scheduling of events in your sc_trans instance so i'm not sure how you've been lead to think it relates to the DNAS (as there's no mention of DNAS or sc_serv on that wiki page).

Quote:
Originally Posted by doobiedoobiedo View Post
I do not see anything in the sc_trans log that resembles a calendar load error. I'm not sure what the syntax might look like though.
it's usually pre-fixed with calender or mentions events (as there's a number of different sub-parts of sc_trans which deal with events and i cannot remember all of them and their log prefixes at this silly time of night).

-daz
DrO is offline   Reply With Quote
Old 7th August 2012, 04:34   #5
doobiedoobiedo
Junior Member
 
Join Date: Dec 2011
Posts: 19
After turning on debugging I see these lines:

msg:[CALENDARMGR] id=1 is not active. running activation check.
msg:[CALENDARMGR] calendarMgr::timeSlice
msg:[CALENDARMGR] id=1 is not active. running activation check.
msg:[CALENDARMGR] id=1 start date range is ok
msg:[CALENDARMGR] id=1 end date range is ok
msg:[CALENDARMGR] id=1 is a time periodic event
msg:[CALENDARMGR] id=1 time periodic event day of week matches
msg:[CALENDARMGR] id=1 is not active. Checking for removal
doobiedoobiedo is offline   Reply With Quote
Old 7th August 2012, 04:38   #6
doobiedoobiedo
Junior Member
 
Join Date: Dec 2011
Posts: 19
Also in the docs and calendar.xml comments would be good to note that for adding multiple playlists one needs to include in the sc_trans config file a playlistfilename and playlistfilepath for each playlist and that the naming convention for the first one is playlistfilename_1 and playlistfilepath_1 and the second would be playlistfilename_2 and playlistfilepath_2 and that unlike earlier releases using playlistfilename_0 is broken.

At least that is my understanding and a bit of specificity that is missing from the tutorials/docs.
doobiedoobiedo is offline   Reply With Quote
Old 7th August 2012, 04:50   #7
jaromanda
Major Dude
 
jaromanda's Avatar
 
Join Date: Jun 2007
Location: NSW Australia
Posts: 1,655
Quote:
Originally Posted by doobiedoobiedo View Post
I read the docs on everything related to calendars a million times!
Try one more
Quote:
Originally Posted by doobiedoobiedo View Post
<calendar starttime="00:00:00" timeoffset="00:30:00" repeat="128" />
my understanding of the docs you read 1 million times is that, in the case of a "Time Periodic Event" is the following:
  • The 'starttime' attribute is used to indicate the interval between this type of event and the next time it will occur.
  • The 'timeoffset' atribute is used to indicate an offset from midnight at which the periodic event will be applied relative to the 'starttime' value.

so ... what you've configured is a Time Periodic Event, that has a zero interval ...

if, what you want, is an event that triggers every half hour on the hour and half hour (x:00 and x:30) ... try using
code:

<calendar starttime="00:30:00" timeoffset="00:00:00" repeat="128" />


At least ... that's what I gather from reading the documentation ONCE ... perhaps my perception would change if I read it a million times as well

General Shoutcast troubleshooting guide
  1. Ask a teenager
That should do it
jaromanda is offline   Reply With Quote
Old 7th August 2012, 05:57   #8
doobiedoobiedo
Junior Member
 
Join Date: Dec 2011
Posts: 19
Setting a starttime and timeoffset differently doesn't change a thing. The logs still report:
msg:[CALENDARMGR] id=1 is not active. running activation check.
msg:[CALENDARMGR] calendarMgr::timeSlice
msg:[CALENDARMGR] id=1 is not active. running activation check.
msg:[CALENDARMGR] id=1 start date range is ok
msg:[CALENDARMGR] id=1 end date range is ok
msg:[CALENDARMGR] id=1 is a time periodic event
msg:[CALENDARMGR] id=1 time periodic event day of week matches
msg:[CALENDARMGR] id=1 is not active. Checking for removal

The real question is why is id=1 not active?

The comments in the example calendar.xml files included with the install seem to conflict with what the wiki docs state. Look at this from the pl_calendar.xml file which seems to indicate that the starttime attribute is the actual time of day that the event should activate:

<!-- this should activate the specified playlist at 18:00:00 (based on
the time of the machine sc_trans is running on) and keep playing
until 06:00:00 (as specified by the duration field from 18:00:00
and is applied only to weekdays

remember: playlist events are queued up so the transition is not
likely to happen until the currently playing file ends -->
<event type="playlist">
<playlist loopatend="1" shuffle="0" priority="1" >alternate</playlist>
<calendar starttime="18:00:00" duration="12:00:00" repeat="62" />
</event>

In any case our calendar.xml file now reads:

<?xml version="1.0" encoding="UTF-8" ?>
<eventlist>

<event type="playlist">
<playlist loopatend="0" shuffle="0" priority="2" >pr</playlist>
<calendar startdate="2012/01/01" starttime="00:20:00" duration="00:00:00" timeoffset="00:00:00" repeat="128" />
</event>
</eventlist>
doobiedoobiedo is offline   Reply With Quote
Old 7th August 2012, 06:31   #9
jaromanda
Major Dude
 
jaromanda's Avatar
 
Join Date: Jun 2007
Location: NSW Australia
Posts: 1,655
I dunno

possibly you've hit one of the bugs DrO was talking about

All I know is, originally, according to the docs I read, your starttime/timeoffset were wrong

if it doesn't work with them the proper way around, then something else is amiss

logic dictates that duration=00:00:00 means the event has zero length so will have no effect

but that's just logic speaking, as there's nothing in the documents about duration with time periodic events

If I were trying get time periodic events to work, I'd try putting in a NON zero value for duration

But, that's just me, logical

General Shoutcast troubleshooting guide
  1. Ask a teenager
That should do it
jaromanda is offline   Reply With Quote
Old 7th August 2012, 07:04   #10
doobiedoobiedo
Junior Member
 
Join Date: Dec 2011
Posts: 19
Yep I caught the 00 duration and reset it and retested.

I really have to compliment you on your use of irony. Its breathtaking. Thank you.
doobiedoobiedo is offline   Reply With Quote
Old 7th August 2012, 07:54   #11
jaromanda
Major Dude
 
jaromanda's Avatar
 
Join Date: Jun 2007
Location: NSW Australia
Posts: 1,655
nono, I'm immensely funny

I'd call it sarcasm rather than irony

General Shoutcast troubleshooting guide
  1. Ask a teenager
That should do it
jaromanda is offline   Reply With Quote
Old 9th August 2012, 08:47   #12
doobiedoobiedo
Junior Member
 
Join Date: Dec 2011
Posts: 19
Ok. Got the calendar working, pretty much.

One snag I'm running into is that my main playlist consists of mp3's that are usually between 34 and 41 minutes long. Since its just looping the clock isn't consistent so scheduling based on a 60 minute clock isn't feasible.

Looking at the logs it seems like the when the event is activated it keeps pinging the server every 1 second. And then when there's a gap the event plays. It also seems like the duration function is how long those pings will occur from the time that the event is activated. So if the event starts up at 5 minutes past the hour and the event duration is 4 minutes, then if the current song ends before 9 minutes past the hour the event will actually play. If the song doesn't end until 10 minutes past the hour, then you've missed your playback window and the event deactivates.

Is that basically correct?

I was hoping to set up an event that would get inserted after the currently playing track, and that after the event triggered the next track would play. But it seems like I need to standardize my content to run on a precise 60 minute clock in order to automate with the event system.

Can you offer any advice for setting up events to insert themselves between the main playlist tracks when NOT using a 60 minute clock and NOT using a consistent clock?

Thanks.
doobiedoobiedo is offline   Reply With Quote
Old 10th August 2012, 09:55   #13
DrO
-
 
DrO's Avatar
 
Join Date: Sep 2003
Location: UK
Posts: 22,204
as i've said a few times now, sc_trans and certain aspects of it are very beta-like and the event system handling is one of those as it's not as flexible as it should and is more tuned for small files compared to long mixes (as you and others are clearly hitting).

the handling of events needs to be re-evaluated and overhauled but that is not going to be happening soon (maybe in a few months, but not in days or weeks) along with changing it to allow for things like hard-inserts of events which is already possible with DJ and Relay events, just not Playlist events.

so everything you are hitting is sc_trans working correctly as per how it has been coded. and yes the docs can be somewhat confusing but seeing as i was confused when i made the updated docs as what went before didn't make much sense or sc_trans doesn't quite work as expected, then of course it's a pain to setup (as sc_trans can be in general). as long as i'm still able to work on the tools, i am trying to make them easier to setup (or at least that is my aim).

-daz
DrO is offline   Reply With Quote
Old 10th August 2012, 17:33   #14
doobiedoobiedo
Junior Member
 
Join Date: Dec 2011
Posts: 19
Hey Daz.

Overall I think the tools and docs are great. Let me be clear on that.

I'll search around these forums some more as I'm sure others have come up with some creative workflows for scheduling.

Also at some point I'll be setting up remote and in studio DJ feeds so I'm sure I'll run into more snags down the road. Thanks for helping in the mean time.
doobiedoobiedo is offline   Reply With Quote
Old 10th August 2012, 18:00   #15
DrO
-
 
DrO's Avatar
 
Join Date: Sep 2003
Location: UK
Posts: 22,204
really there shouldn't have to be the need for 'creative workflows for scheduling', it should just work in a manner which is expected to work... so much to do, so little time *shrugs*

-daz
DrO is offline   Reply With Quote
Old 10th August 2012, 23:33   #16
doobiedoobiedo
Junior Member
 
Join Date: Dec 2011
Posts: 19
Name me a software that works perfectly and fits every user's needs? So far I'm really happy with how stable it is and fine with getting creative.

In its current form, if I overwrite the calendar file in a text editor while sc_trans is running will those changes get updated into the service? I saw something about that being the behavior if using an ajax tool, but haven't investigated that. Also with using such long files its difficult to test, so I'm hoping you have an answer.
doobiedoobiedo is offline   Reply With Quote
Old 11th August 2012, 10:20   #17
DrO
-
 
DrO's Avatar
 
Join Date: Sep 2003
Location: UK
Posts: 22,204
unless the update is done via the api whilst sc_trans is running, manually editing the file on has an effect on restarting.

-daz
DrO is offline   Reply With Quote
Reply
Go Back   Winamp Forums > SHOUTcast > SHOUTcast Technical Support

Tags
2.0 calendar config

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump