#297: metadata issue
---------------------------+------------------------------------------------
 Reporter:  romeodeepmind  |       Owner:  admin      
     Type:  Bugs           |      Status:  new        
 Priority:  1              |   Milestone:  NEAR FUTURE
Component:  Liquidsoap     |     Version:  0.9.1+svn  
 Keywords:                 |         Mac:  1          
    Linux:  1              |      Netbsd:  1          
    Other:  1              |     Freebsd:  1          
---------------------------+------------------------------------------------
 Hi Savonet Team!

 i have metadata update issue on my radio. when client connects live.ogg
 mount point all callbacks are triggered as it must be. metadata becomes
 the one that is set into client's app. but if a network failure occurs, or
 client disconnecs and connects again while there's some live data in the
 buffers, metadata becomes "Unknown" and is not updated anyway. but log
 says that callbacks are triggered properly.

 this log shows how events are triggered when client connects normally,
 after all live data buffers are emptied.
 {{{
 2009/07/03 03:35:32 [lang:3] [LIVE-END]: live source goes down! Switching
 to playlist...
 2009/07/03 03:35:32 [threads:3] Thread "harbor source feeding" exited (1
 remaining).
 2009/07/03 03:35:33 [live:4] End of track.
 2009/07/03 03:35:33 [live:4] Buffer emptied, starting buffering.
 2009/07/03 03:35:33 [mainFallback:3] Switch to src_4866 with forgetful
 transition.
 2009/07/03 03:35:33 [liveMeta:4] Activations changed: static=[],
 dynamic=[mainFallback:192mp3:192mp3].
 2009/07/03 03:35:33 [source:4] src_4918 gets up
 2009/07/03 03:35:33 [src_4866:4] Activations changed:
 static=[src_4918:mainFallback:192mp3:192mp3],
 dynamic=[mainFallback:192mp3:192mp3].
 2009/07/03 03:35:33 [src_4918:4] Activations changed:
 static=[mainFallback:192mp3:192mp3], dynamic=[].
 2009/07/03 03:38:15 [harbor:3] New client: 201.52.62.92.nienschanz.ru
 2009/07/03 03:38:15 [harbor:4] Header: USER-AGENT, value: Native
 Instruments IceCast Uplink.
 2009/07/03 03:38:15 [harbor:4] Header: HOST, value: deep-mind.no-
 ip.org:8090.
 2009/07/03 03:38:15 [harbor:4] Header: ACCEPT, value: */*.
 2009/07/03 03:38:15 [harbor:4] Header: CONNECTION, value: Close.
 2009/07/03 03:38:15 [harbor:4] Header: ACCEPT-ENCODING, value:
 identity;q=0.5, gzip;q=1.0.
 2009/07/03 03:38:15 [harbor:4] Header: CONTENT-TYPE, value:
 application/ogg.
 2009/07/03 03:38:15 [harbor:4] Header: ICE-NAME, value: Romeo DeepMind.
 2009/07/03 03:38:15 [harbor:4] Header: ICE-URL, value:  .
 2009/07/03 03:38:15 [harbor:4] Header: ICE-GENRE, value: Freestyle.
 2009/07/03 03:38:15 [harbor:4] Header: ICE-DESCRIPTION, value: Live
 Stream.
 2009/07/03 03:38:15 [harbor:4] Header: ICE-BITRATE, value: Quality 0.
 2009/07/03 03:38:15 [harbor:4] Header: ICE-PRIVATE, value: 0.
 2009/07/03 03:38:15 [harbor:4] Header: ICE-PUBLIC, value: 1.
 2009/07/03 03:38:15 [harbor:4] Header: ICE-AUDIO-INFO, value: ice-
 samplerate=44100;ice-bitrate=Quality 0;ice-channels=2.
 2009/07/03 03:38:15 [harbor:4] Client logged in.
 2009/07/03 03:38:15 [harbor:3] SOURCE request on /live.ogg.
 2009/07/03 03:38:15 [harbor:3] Adding source on mountpoint '/live.ogg'
 with type 'application/ogg'.
 2009/07/03 03:38:15 [lang:3] [LIVE-START]: live source goes up! Switching
 from playlist...
 2009/07/03 03:38:15 [lang:3] Live-meta: Romeo DeepMind | Live Stream |
 Freestyle
 2009/07/03 03:38:15 [threads:3] Created thread "harbor source feeding" (2
 total).
 2009/07/03 03:38:15 [live:3] Decoding...
 2009/07/03 03:38:15 [ogg.demuxer:4] Found a ogg logical stream, serial:
 76fb
 2009/07/03 03:38:15 [ogg.demuxer:4] Trying ogg/vorbis format
 2009/07/03 03:38:15 [live:3] New metadata chunk "? -- ?"
 2009/07/03 03:38:17 [mainFallback:3] Switch to liveMeta with transition.
 2009/07/03 03:38:17 [source:4] src_4918 gets down
 2009/07/03 03:38:17 [src_4866:4] Activations changed: static=[],
 dynamic=[mainFallback:192mp3:192mp3].
 2009/07/03 03:38:17 [src_4918:4] Activations changed: static=[],
 dynamic=[].
 2009/07/03 03:38:17 [liveMeta:4] Activations changed:
 static=[mainFallback:192mp3:192mp3], dynamic=[mainFallback:192mp3:192mp3].
 }}}

 here i quickly disconnect the client and connect it again. now i get
 "Unknown" in metadata. the log says this:
 {{{
 2009/07/03 03:51:04 [live:2] Feeding stopped: End_of_file
 2009/07/03 03:51:04 [lang:3] [LIVE-END]: live source goes down! Switching
 to playlist...
 2009/07/03 03:51:04 [threads:3] Thread "harbor source feeding" exited (1
 remaining).
 2009/07/03 03:51:05 [harbor:3] New client: 201.52.62.92.nienschanz.ru
 2009/07/03 03:51:05 [harbor:4] Header: USER-AGENT, value: Native
 Instruments IceCast Uplink.
 2009/07/03 03:51:05 [harbor:4] Header: HOST, value: deep-mind.no-
 ip.org:8090.
 2009/07/03 03:51:05 [harbor:4] Header: ACCEPT, value: */*.
 2009/07/03 03:51:05 [harbor:4] Header: CONNECTION, value: Close.
 2009/07/03 03:51:05 [harbor:4] Header: ACCEPT-ENCODING, value:
 identity;q=0.5, gzip;q=1.0.
 2009/07/03 03:51:05 [harbor:4] Header: CONTENT-TYPE, value:
 application/ogg.
 2009/07/03 03:51:05 [harbor:4] Header: ICE-NAME, value: Romeo DeepMind.
 2009/07/03 03:51:05 [harbor:4] Header: ICE-URL, value:  .
 2009/07/03 03:51:05 [harbor:4] Header: ICE-GENRE, value: Freestyle.
 2009/07/03 03:51:05 [harbor:4] Header: ICE-DESCRIPTION, value: Live
 Stream.
 2009/07/03 03:51:05 [harbor:4] Header: ICE-BITRATE, value: Quality 0.
 2009/07/03 03:51:05 [harbor:4] Header: ICE-PRIVATE, value: 0.
 2009/07/03 03:51:05 [harbor:4] Header: ICE-PUBLIC, value: 1.
 2009/07/03 03:51:05 [harbor:4] Header: ICE-AUDIO-INFO, value: ice-
 samplerate=44100;ice-bitrate=Quality 0;ice-channels=2.
 2009/07/03 03:51:05 [harbor:4] Client logged in.
 2009/07/03 03:51:05 [harbor:3] SOURCE request on /live.ogg.
 2009/07/03 03:51:05 [harbor:3] Adding source on mountpoint '/live.ogg'
 with type 'application/ogg'.
 2009/07/03 03:51:05 [lang:3] [LIVE-START]: live source goes up! Switching
 from playlist...
 2009/07/03 03:51:05 [lang:3] Live-meta: Romeo DeepMind | Live Stream |
 Freestyle
 2009/07/03 03:51:05 [live:3] Decoding...
 2009/07/03 03:51:05 [threads:3] Created thread "harbor source feeding" (2
 total).
 2009/07/03 03:51:05 [ogg.demuxer:4] Found a ogg logical stream, serial: cd
 2009/07/03 03:51:05 [ogg.demuxer:4] Trying ogg/vorbis format
 2009/07/03 03:51:05 [live:3] New metadata chunk "? -- ?"
 }}}

 this is my config script
 {{{
 #!/usr/bin/liquidsoap

 %include "/home/vko/misc/settings.liq"

 set("server.telnet",true)
 set("server.telnet.port",8091)

 set("harbor.bind_addr","0.0.0.0")
 set("harbor.port",8090)
 set("harbor.password", playlistPasswd)

 system("/home/vko/misc/live.sh")

 ################### [Callbacks] ###################

 def liveStart(headers)
     log("[LIVE-START]: live source goes up! Switching from playlist...")
     system("/home/vko/misc/live.sh " ^
             quote(headers["ice-name"]) ^ " " ^
             quote(headers["ice-description"]) ^ " " ^
             quote(headers["ice-genre"]) ^ " " ^
             quote(headers["ice-url"]) ^ " " ^
             quote(headers["ice-bitrate"]) ^ " " ^
             quote(headers["ice-audio-info"]) ^ " " ^
             quote(headers["content-type"]) ^ " " ^
             quote(headers["user-agent"]))

     title = headers["ice-name"] ^ " | " ^
             headers["ice-description"] ^ " | " ^
             headers["ice-genre"]

     log("Live-meta: " ^ title)

     ignore(server.execute("liveMeta.insert title=\"#{title}\""))
 end

 def liveEnd()
     log("[LIVE-END]: live source goes down! Switching to playlist...")
     system("/home/vko/misc/live.sh")
 end

 def playlistStart(headers)
     log("[PLAYLIST-START]: playlist source goes up! Switching from
 noise...")
 end

 def playlistEnd()
     log("[PLAYLIST-END]: playlist source goes down! Switching to
 noise...")
 end

 ################### [Live Sources] ###################

 #Live Sources
 liveInput = input.harbor(       id="live",
                                 "live.ogg",
                                 buffer=2.,
                                 password=livePasswd,
                                 on_connect=liveStart,
                                 on_disconnect=liveEnd)

 liveInput = insert_metadata(id="liveMeta", liveInput)

 ################### [Playlists] ###################

 PlaylistInput = input.harbor(id="playlist",
                                 "playlist.ogg",
                                 buffer=10.,
                                 password=playlistPasswd,
                                 on_connect=playlistStart,
                                 on_disconnect=playlistEnd)

 ################### [Noise] ###################

 noiseInput = noise(id="noise")
 noiseInput = amplify(id="noiseAmp", 0.05, noiseInput)
 noiseInput = rewrite_metadata([("title","no signal")], noiseInput)

 ################### [Master Input] ###################

 #Master Input
 input=fallback(                 id="mainFallback",
                                 track_sensitive=false,
                                 [liveInput, playlistInput, noiseInput])

 ################### [Mount Points] ###################

 out192 = output.icecast.mp3(    id="192mp3",
                                 bitrate=192,
                                 input,
                                 restart=true,
                                 password=omegaRelayPasswd,
                                 mount="rvk192",
                                 name=streamTitle,
                                 genre=streamGenre,
                                 url=streamUrl,
                                 description=streamDescr)
 }}}

-- 
Ticket URL: <http://savonet.rastageeks.org/ticket/297>
Savonet <http://savonet.rastageeks.org/>
Let's program our stream !
------------------------------------------------------------------------------
_______________________________________________
Savonet-trac mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-trac

Reply via email to