Also here is a snippet of my log. In this example the "before" metadata was
the last used to trigger an update to icecast. The "after" metadata was
never used.

2011/07/13 19:29:39 [smart_crossfade:4] Before: ("album","Strength of
Steel")
2011/07/13 19:29:39 [smart_crossfade:4] Before: ("genre","Metal")
2011/07/13 19:29:39 [smart_crossfade:4] Before:
("filename","/home/brandon/projects/rails/radio_broadcaster/tmp/tracks/65faa646-a337-11e0-9c2a-080027936572.mp3")
2011/07/13 19:29:39 [smart_crossfade:4] Before: ("player_title","Wild Eyes -
Strength of Steel")
2011/07/13 19:29:39 [smart_crossfade:4] Before: ("status","playing")
2011/07/13 19:29:39 [smart_crossfade:4] Before: ("year","1987")
2011/07/13 19:29:39 [smart_crossfade:4] Before: ("source","local_playlist")
2011/07/13 19:29:39 [smart_crossfade:4] Before:
("initial_uri","annotate:player_title=\"Wild Eyes - Strength of
Steel\",crossfade=\"yes\":/home/brandon/projects/rails/radio_broadcaster/tmp/tracks/65faa646-a337-11e0-9c2a-080027936572.mp3")
2011/07/13 19:29:39 [smart_crossfade:4] Before: ("crossfade","yes")
2011/07/13 19:29:39 [smart_crossfade:4] Before: ("on_air","2011/07/13
19:26:13")
2011/07/13 19:29:39 [smart_crossfade:4] Before: ("rid","1")
2011/07/13 19:29:39 [smart_crossfade:4] Before:
("kind","{audio=2;video=0;midi=0}")
2011/07/13 19:29:39 [smart_crossfade:4] Before: ("artist","Anvil")
2011/07/13 19:29:39 [smart_crossfade:4] Before: ("track","9")
2011/07/13 19:29:39 [smart_crossfade:4] Before: ("decoder","MP3")
2011/07/13 19:29:39 [smart_crossfade:4] Before: ("temporary","false")
2011/07/13 19:29:39 [smart_crossfade:4] Before: ("title","Wild Eyes -
Strength of Steel")
2011/07/13 19:29:39 [smart_crossfade:4] After : ("album","Deth Red Sabaoth")
2011/07/13 19:29:39 [smart_crossfade:4] After : ("genre","Hard Rock &
Metal")
2011/07/13 19:29:39 [smart_crossfade:4] After : ("comment","Amazon.com Song
ID: 216917006")
2011/07/13 19:29:39 [smart_crossfade:4] After :
("filename","/home/brandon/projects/rails/radio_broadcaster/tmp/tracks/0a9f4382-a338-11e0-9c2a-080027936572.mp3")
2011/07/13 19:29:39 [smart_crossfade:4] After : ("player_title","Ju Ju Bone
- Deth Red Sabaoth")
2011/07/13 19:29:39 [smart_crossfade:4] After : ("status","playing")
2011/07/13 19:29:39 [smart_crossfade:4] After : ("year","2010")
2011/07/13 19:29:39 [smart_crossfade:4] After : ("source","local_playlist")
2011/07/13 19:29:39 [smart_crossfade:4] After :
("initial_uri","annotate:player_title=\"Ju Ju Bone - Deth Red
Sabaoth\",crossfade=\"yes\":/home/brandon/projects/rails/radio_broadcaster/tmp/tracks/0a9f4382-a338-11e0-9c2a-080027936572.mp3")
2011/07/13 19:29:39 [smart_crossfade:4] After : ("crossfade","yes")
2011/07/13 19:29:39 [smart_crossfade:4] After : ("on_air","2011/07/13
19:29:39")
2011/07/13 19:29:39 [smart_crossfade:4] After : ("rid","2")
2011/07/13 19:29:39 [smart_crossfade:4] After :
("kind","{audio=2;video=0;midi=0}")
2011/07/13 19:29:39 [smart_crossfade:4] After : ("artist","Danzig")
2011/07/13 19:29:39 [smart_crossfade:4] After : ("track","7")
2011/07/13 19:29:39 [smart_crossfade:4] After : ("decoder","MP3")
2011/07/13 19:29:39 [smart_crossfade:4] After : ("temporary","false")
2011/07/13 19:29:39 [smart_crossfade:4] After : ("title","Ju Ju Bone - Deth
Red Sabaoth")
2011/07/13 19:29:39 [source:4] Source src_5093 gets up.
2011/07/13 19:29:39 [src_5093:4] Content kind is {audio=2;video=0;midi=0}.
2011/07/13 19:29:39 [source:4] Source fade_out_5092 gets up.
2011/07/13 19:29:39 [fade_out_5092:4] Content kind is
{audio=2;video=0;midi=0}.
2011/07/13 19:29:39 [source:4] Source src_4860_before gets up.
2011/07/13 19:29:39 [src_4860_before:4] Content kind is
{audio=2;video=0;midi=0}.
2011/07/13 19:29:39 [src_4860_before:4] Activations changed:
static=[fade_out_5092:src_5093:src_4860], dynamic=[].
2011/07/13 19:29:39 [fade_out_5092:4] Activations changed:
static=[src_5093:src_4860], dynamic=[].
2011/07/13 19:29:39 [source:4] Source fade_in_5091 gets up.
2011/07/13 19:29:39 [fade_in_5091:4] Content kind is
{audio=2;video=0;midi=0}.
2011/07/13 19:29:39 [source:4] Source src_4860_after gets up.
2011/07/13 19:29:39 [source:4] Source buffer_5054 gets up.
2011/07/13 19:29:39 [buffer_5054:4] Content kind is
{audio=2;video=0;midi=0}.
2011/07/13 19:29:39 [buffer_5054:4] Activations changed:
static=[src_4860_after:fade_in_5091:src_5093:src_4860], dynamic=[].
2011/07/13 19:29:39 [src_4858:4] Activations changed:
static=[src_4860_after:fade_in_5091:src_5093:src_4860,
src_4860_after:sequence_5044:src_4860], dynamic=[src_4860].
2011/07/13 19:29:39 [src_4858:4] Enabling caching mode: two static
activations.
2011/07/13 19:29:39 [src_4860_after:4] Activations changed:
static=[fade_in_5091:src_5093:src_4860], dynamic=[].
2011/07/13 19:29:39 [fade_in_5091:4] Activations changed:
static=[src_5093:src_4860], dynamic=[].
2011/07/13 19:29:39 [src_5093:4] Activations changed: static=[src_4860],
dynamic=[].
2011/07/13 19:29:39 [sequence_5044:4] Activations changed: static=[],
dynamic=[].
2011/07/13 19:29:39 [source:4] Source sequence_5044 gets down.
2011/07/13 19:29:39 [src_4860_after:4] Activations changed: static=[],
dynamic=[].
2011/07/13 19:29:39 [source:4] Source src_4860_after gets down.
2011/07/13 19:29:39 [src_4858:4] Activations changed:
static=[src_4860_after:fade_in_5091:src_5093:src_4860], dynamic=[src_4860].
2011/07/13 19:29:39 [src_4858:4] Disabling caching mode.
2011/07/13 19:29:39 [live_broadcast_url:4] Could not get file: File Not
Found
2011/07/13 19:29:39 [live_broadcast_url:4] Connection failed: Internal http
error.
2011/07/13 19:29:41 [buffer_5054:4] End of track.
2011/07/13 19:29:41 [buffer_5054:4] Buffer emptied, buffering needed.
2011/07/13 19:29:41 [buffer_5054:4] Activations changed: static=[],
dynamic=[].
2011/07/13 19:29:41 [source:4] Source buffer_5054 gets down.


On Wed, Jul 13, 2011 at 7:09 PM, Brandon Casci <[email protected]>wrote:

> I've implemented a custom crossfade based from one of the examples. The
> crossfade works great, but metadata updates to icecast always stop after the
> second track is played. If I restart liquidsoap metadata updates will
> resume, but will stop after the second track is played. Metadata updates
> process as usual when I remove the crossfade code. I'm using a trunk version
> of liquidsoap that's about 2 or three weeks old. Any theories? Here is a
> snippet of the code:
>
>
> def my_crossfade (~start_next=5.,~fade_in=3.,~fade_out=3.,
>                     ~default=(fun (a,b) -> sequence([a, b])),
>                     ~high=-15., ~medium=-32., ~margin=4.,
>                     ~width=2.,~conservative=false,s)
>  fade.out = fade.out(type="sin",duration=fade_out)
>  fade.in  = fade.in(type="sin",duration=fade_in)
>  add = fun (a,b) -> add(normalize=false,[b, a])
>  log = log(label="smart_crossfade")
>
>  def transition(a,b,ma,mb,sa,sb)
>
>    list.iter(fun(x)-> log(level=4,"Before: #{x}"),ma)
>    list.iter(fun(x)-> log(level=4,"After : #{x}"),mb)
>    if ma["crossfade"] == "yes" and mb["crossfade"] == "yes" then
>      add(fade.initial(type="sin", sb),fade.final(type="sin", sa))
>    else
>      log("No transition defined: using default.")
>      default(sa, sb)
>    end
>  end
>
>  smart_cross(width=width, duration=start_next,
> conservative=conservative,transition,s)
> end
>
> live_broadcast = input.http(id="live_broadcast_url", buffer = 5.0, "http://
> #{live_server}:#{live_port}#{live_mount}")
> live_broadcast = nrj(live_broadcast)
> local_playlist = playlist(id = "local_playlist", mode = "normal",
> "content.m3u")
> local_playlist =
> request.dynamic(id="local_playlist",{request.create(get_process_output("#{track_script}
> #{channel_id}"))})
> local_playlist = rewrite_metadata(
>     [
>       ("title", '$(if $(player_title),"$(player_title)","$(title)")'),
>     ],
>     local_playlist)
>
> local_broadcast = my_crossfade(conservative=true, local_playlist)
>
> radio = fallback(
>           id="live_fallback",
>           track_sensitive=false,
>           transitions = [fade_to_live_source, fade_to_local_source],
>           [
>             strip_blank(id="live_strip_blank",length=30., live_broadcast),
>         local_broadcast]
>   )
>
>


-- 
=========================================
Brandon Casci
Loudcaster
http://loudcaster.com
=========================================
------------------------------------------------------------------------------
AppSumo Presents a FREE Video for the SourceForge Community by Eric 
Ries, the creator of the Lean Startup Methodology on "Lean Startup 
Secrets Revealed." This video shows you how to validate your ideas, 
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to