#78: Bug when using the daemon (-d) mode
------------------------+---------------------------------------------------
 Reporter:  Gilou       |       Owner:  admin    
     Type:  Bugs        |      Status:  new      
 Priority:  1           |   Milestone:           
Component:  Liquidsoap  |     Version:  0.3.6+svn
 Keywords:              |  
------------------------+---------------------------------------------------
 Hi,

 I've experienced a problem while setting the daemon mode on a script...

 Here's the script:

 {{{
 #!/usr/local/bin/liquidsoap


 set("log.level",5)

 # Special track insensitive fallback that
 # always skip current song before switching.
 # @param s The input source
 # @param f The fallback source
 def fallback.skipt(s,f)
   def transition(a,b) =
     system("/home/streams/liquidsoap/alerte_blanc.sh #{source.id(a)}")

     source.skip(a)
     # This eats the last remaining frame from a
     sequence([a,b])
   end
 fallback(track_sensitive=false,transitions=[transition,transition],[s,f])
 end

 feed = input.http("http://tacru:8000/";, buffer=1., id="feed")
 #blah = on_blank(alerte, length=6., feed)


 onblank = single("backup_blanc.mp3", id="blank")
 backup = rewrite_metadata([('title', 'Frequence 3'), ('artist', 'Une
 rafale de tubes')], id="blank", onblank)

 source = fallback.skipt(strip_blank(feed, length=6.), backup)

 output.icecast.mp3(host="localhost", port=8000,user="tacru",
         password="tacru", mount="feed-ls2",bitrate=192,
         url="http://www.frequence3.fr";, genre="Top 40 Dance Pop Rock",
         description="FREQUENCE3 - www.frequence3.fr - No ads ! It's only
 HITS live from Paris France ! - French Webradio",
         name="FREQUENCE3 - www.frequence3.fr - No ads ! It's only HITS
 live from Paris France ! - French Webradio",
         restart=true, source)

 }}}

 If run this way, it goes smoothly, here's the log:

 {{{
 2008/01/15 21:05:38 >>> LOG START
 2008/01/15 21:05:38 [protocols.extproto:3] Didn't find "ufetch"
 2008/01/15 21:05:38 [protocols.extproto:3] Found "/usr/bin/wget"
 2008/01/15 21:05:38 [main:3] Liquidsoap 0.3.6+svn
 (trunk/[EMAIL PROTECTED])
 2008/01/15 21:05:38 [decoder:4] Trying WAV decoder for "backup_blanc.mp3"
 2008/01/15 21:05:38 [decoder:4] Trying VORBIS decoder for
 "backup_blanc.mp3"
 2008/01/15 21:05:38 [decoder:4] Trying MP3 decoder for "backup_blanc.mp3"
 2008/01/15 21:05:38 [format.mp3:4] open "backup_blanc.mp3"
 2008/01/15 21:05:38 [format.mp3:4] close "backup_blanc.mp3"
 2008/01/15 21:05:38 [single:3] "backup_blanc.mp3" is static, resolving
 once for all...
 2008/01/15 21:05:38 [threads:3] Created thread "light task scheduler" (1
 total)
 2008/01/15 21:05:38 [threads:3] Created thread "root" (2 total)
 2008/01/15 21:05:38 [root:3] Waking up active nodes...
 2008/01/15 21:05:38 [source:4] output(dot)shoutcast(dot)[EMAIL PROTECTED] gets 
up
 2008/01/15 21:05:38 [source:4] [EMAIL PROTECTED] gets up
 2008/01/15 21:05:38 [source:4] [EMAIL PROTECTED] gets up
 2008/01/15 21:05:38 [source:4] feed gets up
 2008/01/15 21:05:38 [threads:3] Created thread "http polling" (3 total)
 2008/01/15 21:05:38 [EMAIL PROTECTED]:4] Enabling caching mode (active
 source)
 2008/01/15 21:05:38 [source:4] blank gets up
 2008/01/15 21:05:38 [source:4] blank gets up
 2008/01/15 21:05:38 [format.mp3:4] open "backup_blanc.mp3"
 2008/01/15 21:05:38 [blank:3] Prepared "backup_blanc.mp3" -- rid 0
 2008/01/15 21:05:38 [feed-ls2:4] Enabling caching mode (active source)
 2008/01/15 21:05:38 [feed-ls2:3] Connecting mount feed-ls2 for
 [EMAIL PROTECTED]
 2008/01/15 21:05:38 [feed-ls2:3] Connection setup was successful.
 2008/01/15 21:05:38 [feed-ls2:3] Setting up an MP3 encoder...
 2008/01/15 21:05:38 [root:3] Broadcast starts up!
 2008/01/15 21:05:38 [feed:4] Connecting to <http://tacru:8000/>...
 2008/01/15 21:05:39 [feed:4] Trying playlist parser for mime audio/mpeg
 2008/01/15 21:05:39 [feed:4] Content-type "audio/mpeg".
 2008/01/15 21:05:39 [feed:3] Decoding...
 2008/01/15 21:05:39 [EMAIL PROTECTED]:3] switch to blank
 2008/01/15 21:05:39 [feed:3] New metadata chunk "? -- Kanye West -
 Stronger"
 2008/01/15 21:05:39 [EMAIL PROTECTED]:3] switch to [EMAIL PROTECTED] with
 transition
 2008/01/15 21:05:39 [lang:3] Performing source.skip on blank
 2008/01/15 21:05:39 [blank:3] Finished with "backup_blanc.mp3"
 2008/01/15 21:05:39 [format.mp3:4] close "backup_blanc.mp3"
 2008/01/15 21:05:39 [source:4] [EMAIL PROTECTED] gets up
 ...
 }}}

 If I add -d to the call:

 {{{
 2008/01/15 21:08:39 >>> LOG START
 2008/01/15 21:08:38 [protocols.extproto:3] Didn't find "ufetch"
 2008/01/15 21:08:38 [protocols.extproto:3] Found "/usr/bin/wget"
 2008/01/15 21:08:38 [main:3] Liquidsoap 0.3.6+svn
 (trunk/[EMAIL PROTECTED])
 2008/01/15 21:08:39 [decoder:4] Trying WAV decoder for "backup_blanc.mp3"
 2008/01/15 21:08:39 [decoder:4] Trying VORBIS decoder for
 "backup_blanc.mp3"
 2008/01/15 21:08:39 [decoder:4] Trying MP3 decoder for "backup_blanc.mp3"
 2008/01/15 21:08:39 [format.mp3:4] open "backup_blanc.mp3"
 2008/01/15 21:08:39 [format.mp3:4] close "backup_blanc.mp3"
 2008/01/15 21:08:39 [single:3] "backup_blanc.mp3" is static, resolving
 once for all...
 2008/01/15 21:08:39 [threads:3] Created thread "light task scheduler" (1
 total)
 2008/01/15 21:08:39 [threads:3] Created thread "root" (2 total)
 2008/01/15 21:08:39 [root:3] Waking up active nodes...
 2008/01/15 21:08:39 [source:4] output(dot)shoutcast(dot)[EMAIL PROTECTED] gets 
up
 2008/01/15 21:08:39 [source:4] [EMAIL PROTECTED] gets up
 2008/01/15 21:08:39 [source:4] [EMAIL PROTECTED] gets up
 2008/01/15 21:08:39 [source:4] feed gets up
 2008/01/15 21:08:39 [threads:3] Created thread "http polling" (3 total)
 2008/01/15 21:08:39 [EMAIL PROTECTED]:4] Enabling caching mode (active
 source)
 2008/01/15 21:08:39 [source:4] blank gets up
 2008/01/15 21:08:39 [source:4] blank gets up
 2008/01/15 21:08:39 [blank:1] Failed to prepare track: unresolved request
 2008/01/15 21:08:39 [feed-ls2:3] Waiting for "[EMAIL PROTECTED]" to be
 ready...
 2008/01/15 21:08:39 [feed:4] Connecting to <http://88.191.22.199:8000/>...
 2008/01/15 21:08:39 [feed:4] Trying playlist parser for mime audio/mpeg
 2008/01/15 21:08:39 [feed:4] Content-type "audio/mpeg".
 2008/01/15 21:08:39 [feed:3] Decoding...
 2008/01/15 21:08:39 [feed:3] New metadata chunk "? -- Jaydee - Plastic
 dreams"
 2008/01/15 21:08:40 [feed-ls2:3] Waiting for "[EMAIL PROTECTED]" to be
 ready...
 2008/01/15 21:08:41 [feed-ls2:3] Waiting for "[EMAIL PROTECTED]" to be
 ready...
 2008/01/15 21:08:42 [feed-ls2:3] Waiting for "[EMAIL PROTECTED]" to be
 ready...
 2008/01/15 21:08:43 [feed-ls2:3] Waiting for "[EMAIL PROTECTED]" to be
 ready...
 2008/01/15 21:08:44 [feed-ls2:3] Waiting for "[EMAIL PROTECTED]" to be
 ready...
 2008/01/15 21:08:45 [feed-ls2:3] Waiting for "[EMAIL PROTECTED]" to be
 ready...
 2008/01/15 21:08:46 [feed-ls2:3] Waiting for "[EMAIL PROTECTED]" to be
 ready...
 2008/01/15 21:08:47 [feed-ls2:3] Waiting for "[EMAIL PROTECTED]" to be
 ready...
 2008/01/15 21:08:48 [feed-ls2:3] Waiting for "[EMAIL PROTECTED]" to be
 ready...
 and so on like that...
 }}}

 It does not shout to the server, and loop like that.
 I'm running this on a 64 bits, not sure if it does matter, I haven't tried
 the script on another machine yet.

-- 
Ticket URL: <http://savonet.rastageeks.org/ticket/78>
Savonet <http://savonet.rastageeks.org/>
Let's program our stream !

Répondre à