Hi List,
I have a problem with liquidsoap. After about 2 or 3 days of streaming (only
local mp3 files from playlist) liquidsoap stops sending data to Shoutcast and
Icecast Servers. I recently compild liquidsoap from source. Here are the last
log lines before liquidsoap "crashes":
2015/11/13 16:02:40 [my_fade:4] After :
("initial_uri","annotate:type=\"radio\":/home/xmas/mp3-128/Freiheit - Keeping
The Dream Alive.mp3")
2015/11/13 16:02:40 [my_fade:4] After : ("replay_gain","0.010000 dB")
2015/11/13 16:02:40 [my_fade:4] After : ("status","playing")
2015/11/13 16:02:40 [my_fade:4] After : ("on_air","2015/11/13 16:02:40")
2015/11/13 16:02:40 [my_fade:4] After : ("rid","1")
2015/11/13 16:02:40 [my_fade:3] Transition: crossed, fade-in, fade-out.
2015/11/13 16:02:40 [source:4] Source add_61768 gets up.
2015/11/13 16:02:40 [add_61768:4] Content kind is {audio=2;video=0;midi=0}.
2015/11/13 16:02:40 [source:4] Source fade_in_61767 gets up.
2015/11/13 16:02:40 [fade_in_61767:4] Content kind is {audio=2;video=0;midi=0}.
2015/11/13 16:02:40 [source:4] Source smart_cross_5382_after gets up.
2015/11/13 16:02:40 [source:4] Source buffer_61733 gets up.
2015/11/13 16:02:40 [buffer_61733:4] Content kind is {audio=2;video=0;midi=0}.
2015/11/13 16:02:40 [buffer_61733:4] Activations changed:
static=[smart_cross_5382_after:fade_in_61767:add_61768:smart_cross_5382],
dynamic=[].
2015/11/13 16:02:40 [on_metadata_5380:4] Activations changed:
static=[smart_cross_5382_after:fade_in_61767:add_61768:smart_cross_5382,
smart_cross_5382_after:fade_in_61719:add_61720:smart_cross_5382],
dynamic=[smart_cross_5382].
2015/11/13 16:02:40 [on_metadata_5380:4] Enabling caching mode: two static
activations.
2015/11/13 16:02:40 [smart_cross_5382_after:4] Activations changed:
static=[fade_in_61767:add_61768:smart_cross_5382], dynamic=[].
2015/11/13 16:02:40 [fade_in_61767:4] Activations changed:
static=[add_61768:smart_cross_5382], dynamic=[].
2015/11/13 16:02:40 [source:4] Source fade_out_61766 gets up.
2015/11/13 16:02:40 [fade_out_61766:4] Content kind is {audio=2;video=0;midi=0}.
2015/11/13 16:02:40 [source:4] Source smart_cross_5382_before gets up.
2015/11/13 16:02:40 [smart_cross_5382_before:4] Content kind is
{audio=2;video=0;midi=0}.
2015/11/13 16:02:40 [smart_cross_5382_before:4] Activations changed:
static=[fade_out_61766:add_61768:smart_cross_5382], dynamic=[].
2015/11/13 16:02:40 [fade_out_61766:4] Activations changed:
static=[add_61768:smart_cross_5382], dynamic=[].
2015/11/13 16:02:40 [add_61768:4] Activations changed:
static=[smart_cross_5382], dynamic=[].
2015/11/13 16:02:40 [add_61720:4] Activations changed: static=[], dynamic=[].
2015/11/13 16:02:40 [source:4] Source add_61720 gets down.
2015/11/13 16:02:40 [fade_in_61719:4] Activations changed: static=[],
dynamic=[].
2015/11/13 16:02:40 [source:4] Source fade_in_61719 gets down.
2015/11/13 16:02:40 [smart_cross_5382_after:4] Activations changed: static=[],
dynamic=[].
2015/11/13 16:02:40 [source:4] Source smart_cross_5382_after gets down.
2015/11/13 16:02:40 [on_metadata_5380:4] Activations changed:
static=[smart_cross_5382_after:fade_in_61767:add_61768:smart_cross_5382],
dynamic=[smart_cross_5382].
2015/11/13 16:02:40 [on_metadata_5380:4] Disabling caching mode.
2015/11/13 16:02:40 [fade_out_61718:4] Activations changed: static=[],
dynamic=[].
2015/11/13 16:02:40 [source:4] Source fade_out_61718 gets down.
2015/11/13 16:02:40 [smart_cross_5382_before:4] Activations changed: static=[],
dynamic=[].
2015/11/13 16:02:40 [source:4] Source smart_cross_5382_before gets down.
2015/11/13 16:02:42 [buffer_61733:4] End of track.
2015/11/13 16:02:42 [buffer_61733:4] Buffer emptied, buffering needed.
2015/11/13 16:02:42 [buffer_61733:4] Activations changed: static=[], dynamic=[].
2015/11/13 16:02:42 [source:4] Source buffer_61733 gets down.
The process itself is still alive consuming 15-20% CPU. The (virtual) server
runs Ubuntu 14.04 LTS. I'm not using the binary version provided by Ubuntu
because smart_crossfade only works once in this version.
Main Script:
#!/usr/bin/liquidsoap
%include "/home/xmas/shoutcast2/functions.liq"
set("log.file.path","/var/log/liquidsoap/xmas.log")
set("server.telnet",true)
set("log.stdout",true)
set("log.level",4)
enable_replaygain_metadata()
# Music
radio = request.dynamic(next)
jingles_day = request.queue(id="jingles_day")
radio = fallback(track_sensitive = true,[jingles_day,radio])
radio = amplify(1.,override="replay_gain",radio)
radio = on_metadata(apply_metadata,radio)
radio = my_fade(radio)
# Stream it out
output.shoutcast(%mp3(bitrate=128,samplerate=44100,stereo=true,stereo_mode="joint_stereo",internal_quality=0),fallible=true,name="Radio
X-MAS",genre="Christmas",url="http://www.radio-xmas.at",host="127.0.0.1",port
= 443,password = "XXX",public=true,radio)
output.icecast(%mp3(bitrate=128,samplerate=44100,stereo=true,stereo_mode="joint_stereo",internal_quality=0),fallible=true,name="Radio
X-MAS",genre="Christmas",description="Radio
X-MAS",url="http://www.radio-xmas.at",mount="/radio-xmas.at-128.mp3",host="localhost",port=8000,password="XXX",public=true,radio)
Functions Script:
#!/usr/bin/liquidsoap
def apply_metadata(m) =
title = m["title"]
artist = m["artist"]
type = m["type"]
log("Now playing: #{artist} - #{title} (type #{type})")
end
requests = ref []
def next() =
if list.length(!requests) == 0 then
log("Reloading playlist, executing /home/xmas/merge_playlists_to_stdout.py")
requests := get_process_lines("/home/xmas/merge_playlists_to_stdout.py")
end
result = request.create(list.hd(!requests))
requests := list.tl(!requests)
result
end
def my_fade (~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="my_fade")
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 mb["type"] == "jingles" then
log("New file is a jingle: sequenced transition.")
sequence([sa, sb])
elsif
# Do not fade if it's already very low.
b >= a + margin and a <= medium and b <= high
then
log("new >= old + margin, old <= medium and new <= high.")
log("Do not fade if it's already very low.")
log("Transition: crossed, no fade.")
add(sa,sb)
else
log("Transition: crossed, fade-in, fade-out.")
add(fade.out(sa),fade.in(sb))
end
end
smart_cross(width=width, duration=start_next, conservative=conservative,
transition,s)
end
Are there any known problems?
Thanks.
--
Michael Holzer
Geschäftsführung
SysUP OG
T: +43 59 222 1010
F: +43 (0) 59 222 900
E: [email protected]
Firmenbuch: 284246i (LG für ZRS Graz)
Firmensitz: Herrgottwiesgasse 149, A-8055 Graz
------------------------------------------------------------------------------
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users