Hi,

some minutes ago we had a hang up situation.
What we have changed in our setup:

  - adding metadata
  - register flow

during the outage liquidsoap did not send as much data as assumed (around 12 
kbit instead of 160kbit)

./net_traffic.pl
2011-08-31 20:05:24    wbox    eth0    in: 2 kBit    (0)    out: 12 kBit    (0)
2011-08-31 20:05:27    wbox    eth1    in: 0 kBit    (0)    out: 11 kBit    (0)

after a liquidsoap process restart everything worked fine again.

Do you have any idea?

log:
...
2011/08/31 19:03:46 [src_4935:2] Overrun!
2011/08/31 19:03:46 [src_4935:2] Trying to recover..
2011/08/31 20:00:00 [/archive/piradio/%Y-%m-%d/%Y-%m-%d-%H_%M_%S(dot)wav:3] 
Re-opening output file...
/archive/piradio/2011-08-31/2011-08-31-19_00_00.wav (634913036 bytes):
     riff: 'RIFF'
     riff length: -268435457
     wave: 'WAVE'
     fmt: 'fmt '
     fmt length: 16
     format: 1
     channels: 2
     sample rate: 44100
     bytes/second: 176400
     bytes/sample: 4
     bits/sample: 16
     data: 'data'
     data length: -268435493
new metadata !
2011/08/31 20:03:50 [src_4935:2] Overrun!
2011/08/31 20:03:50 [src_4935:2] Trying to recover..
2011/08/31 20:03:51 [src_4935:2] Overrun!
2011/08/31 20:03:51 [src_4935:2] Trying to recover..
2011/08/31 20:03:53 [src_4935:2] Overrun!
2011/08/31 20:03:53 [src_4935:2] Trying to recover..
2011/08/31 20:03:55 [src_4935:2] Overrun!
2011/08/31 20:03:55 [src_4935:2] Trying to recover..
2011/08/31 20:03:57 [src_4935:2] Overrun!
2011/08/31 20:03:57 [src_4935:2] Trying to recover..
2011/08/31 20:03:59 [src_4935:2] Overrun!
2011/08/31 20:03:59 [src_4935:2] Trying to recover..
2011/08/31 20:04:00 [src_4935:2] Overrun!
2011/08/31 20:04:00 [src_4935:2] Trying to recover..
2011/08/31 20:04:02 [src_4935:2] Overrun!
2011/08/31 20:04:02 [src_4935:2] Trying to recover..
2011/08/31 20:04:04 [src_4935:2] Overrun!
2011/08/31 20:04:04 [src_4935:2] Trying to recover..
2011/08/31 20:04:06 [src_4935:2] Overrun!
2011/08/31 20:04:06 [src_4935:2] Trying to recover..
2011/08/31 20:04:08 [src_4935:2] Overrun!
...
2011/08/31 20:06:15 [src_4935:2] Trying to recover..
2011/08/31 20:06:16 [src_4935:2] Overrun!
2011/08/31 20:06:16 [src_4935:2] Trying to recover..
2011/08/31 20:06:18 [src_4935:2] Overrun!
2011/08/31 20:06:18 [src_4935:2] Trying to recover..
2011/08/31 20:06:20 [src_4935:2] Overrun!
2011/08/31 20:06:20 [src_4935:2] Trying to recover..
2011/08/31 20:06:22 [src_4935:2] Overrun!
2011/08/31 20:06:22 [src_4935:2] Trying to recover..

here I manually restarted the process

2011/08/31 20:06:23 [main:3] Shutdown started!
2011/08/31 20:06:23 [main:3] Waiting for threads to terminate...
2011/08/31 20:06:24 [harbor:3] Removing HTTP handler for '/radio' on port xxx
2011/08/31 20:06:25 [/radio:3] Closing connection...
/archive/piradio/2011-08-31/2011-08-31-20_00_00.wav (42293708 bytes):
     riff: 'RIFF'
     riff length: -268435457
     wave: 'WAVE'
     fmt: 'fmt '
     fmt length: 16
     format: 1
     channels: 2
     sample rate: 44100
     bytes/second: 176400
     bytes/sample: 4
     bits/sample: 16
     data: 'data'
     data length: -268435493
2011/08/31 20:06:25 [single_4956:3] Finished with "/sound/silence.mp3".
2011/08/31 20:06:25 [threads:3] Thread "src_4935" terminated (1 remaining).
2011/08/31 20:06:25 [clock.wallclock_alsa:3] Streaming loop stopped.
2011/08/31 20:06:25 [threads:3] Thread "wallclock_alsa" terminated (0 
remaining).
2011/08/31 20:06:25 [main:3] Cleaning downloaded files...
2011/08/31 20:06:25 >>> LOG END
2011/08/31 20:06:30 >>> LOG START
2011/08/31 20:06:25 [protocols.external:3] Didn't find "ufetch".
2011/08/31 20:06:25 [protocols.external:3] Found "/usr/bin/wget".
2011/08/31 20:06:25 [main:3] Liquidsoap 1.0.0-beta3+svn 
(default@3f5892d6a90b:20110828:144312)
2011/08/31 20:06:25 [main:3] Using: graphics=[distributed with Ocaml] 
pcre=6.0.1 dtools=0.2.2 duppy=0.4.1 duppy.syntax=0.4.1 cry=0.2.1 mm=0.1.0 
xmlplaylist=0.1.3 ogg=0.4.2 vorbis=0.6.0 mad=0.4.3 flac=0.1.0 flac.ogg=0.1.0 
dynlink=[distributed with Ocaml] lame=0.3.0 alsa=0.2.1 samplerate=0.1.1 
taglib=0.2.0 magic=0.7.3 camomile=0.7.1 faad=0.3.0 soundtouch=0.1.5 
pulseaudio=0.1.2 ladspa=0.1.3
2011/08/31 20:06:25 [main:2]
2011/08/31 20:06:25 [main:2] DISCLAIMER: This version of Liquidsoap has been
2011/08/31 20:06:25 [main:2] compiled from a snapshot of the development code.
2011/08/31 20:06:25 [main:2] As such, it should not be used in production
2011/08/31 20:06:25 [main:2] unless you know what you are doing!
2011/08/31 20:06:25 [main:2]
2011/08/31 20:06:25 [main:2] We are, however, very interested in any feedback
2011/08/31 20:06:25 [main:2] about our development code and committed to fix
2011/08/31 20:06:25 [main:2] issues as soon as possible.
2011/08/31 20:06:25 [main:2]
2011/08/31 20:06:25 [main:2] If you are interested in collaborating to
2011/08/31 20:06:25 [main:2] the development of Liquidsoap, feel free to
2011/08/31 20:06:25 [main:2] drop us a mail at <[email protected]>
2011/08/31 20:06:25 [main:2] or to join the #savonet IRC channel on Freenode.
2011/08/31 20:06:25 [main:2]
2011/08/31 20:06:25 [main:2] Please send any bug report or feature request
2011/08/31 20:06:25 [main:2] at <http://dev.sourcefabric.org/browse/LS>.
2011/08/31 20:06:25 [main:2]
2011/08/31 20:06:25 [main:2] We hope you enjoy this snapshot build of 
Liquidsoap!
2011/08/31 20:06:25 [main:2]
2011/08/31 20:06:26 [frame:3] Using 44100Hz audio, 25Hz video, 44100Hz master.
2011/08/31 20:06:26 [frame:3] Frame size must be a multiple of 1764 ticks = 
1764 audio samples = 1 video samples.
2011/08/31 20:06:26 [frame:3] Targetting 'frame.duration': 0.04s = 1764 audio 
samples = 1764 ticks.
2011/08/31 20:06:26 [frame:3] Frames last 0.04s = 1764 audio samples = 1 video 
samples = 1764 ticks.
2011/08/31 20:06:26 [decoder:3] Method "MP3" accepted "/sound/testbetrieb.mp3".
2011/08/31 20:06:26 [single:3] "~/radio/sound/testbetrieb.mp3" is static, 
resolving once for all...
2011/08/31 20:06:26 [single:3] "say:Alsa failed!" is static, resolving once for 
all...
2011/08/31 20:06:26 [protocols.say:3] Synthetizing "Alsa failed!" to 
"/tmp/saydf63f9.wav"
2011/08/31 20:06:27 [decoder:3] Method "WAV" accepted "/tmp/saydf63f9.wav".
2011/08/31 20:06:27 [decoder:3] Method "MP3" accepted "/sound/silence.mp3".
2011/08/31 20:06:27 [single:3] "~/radio/sound/silence.mp3" is static, resolving 
once for all...
2011/08/31 20:06:30 [threads:3] Created thread "generic queue #1".
new metadata !
2011/08/31 20:06:30 [harbor:3] Adding HTTP handler for '/radio' on port xxx
2011/08/31 20:06:30 [/radio:3] Connecting mount /radio for 
liquidsoap@localhost...
2011/08/31 20:06:30 [/radio:3] Connection setup was successful.
2011/08/31 20:06:30 [threads:3] Created thread "src_4935" (1 total).
2011/08/31 20:06:30 [threads:3] Created thread "wallclock_alsa" (2 total).
2011/08/31 20:06:30 [src_4935:3] Using ALSA 1.0.22.
2011/08/31 20:06:30 [clock.wallclock_alsa:3] Streaming loop starts, 
synchronized by active sources.
2011/08/31 20:06:30 [mksafe:3] Switch to src_5010.
2011/08/31 20:06:30 [fallback_4959:3] Switch to src_4955.
2011/08/31 20:06:30 [fallback_4952:3] Switch to mksafe.
2011/08/31 20:06:30 [mksafe:3] Switch to src_4935.
2011/08/31 20:06:31 [src_4935:2] Overrun!
2011/08/31 20:06:31 [src_4935:2] Trying to recover..

this is our setup:

#!/usr/bin/liquidsoap

set("log.stdout", true)

radio    = mksafe(input.alsa(device="pcm.liq_test"))

fallback_mix    = mksafe(single("/sound/testbetrieb.mp3"))
fallback_alsa = smooth_add(
     normal=fallback_mix,
     special=switch([
         ( { 0s }, mksafe(single("say:Alsa failed")) )
     ])
)

radio = fallback(
         track_sensitive=false,
         [
             radio,
             fallback_alsa
         ]
)

radio= fallback(
     track_sensitive=false,
     [
         fail(),
         strip_blank( length=180. , radio ) ,
         mksafe(single("/sound/silence.mp3"))
     ]
)


x = insert_metadata(radio)
insert = fst(x)
radio = snd(x)

# A reference to the latest metadata
latest_meta = ref []

def update_meta() =
     data = http.get("http://localhost/rds/";)

     m = [("title", snd(data))]
     if m != !latest_meta then
             latest_meta := m
             insert(m)
             print("new metadata !")
     end

     # Restart in 5 minutes
     5.0*60.
end

# Start polling now
add_timeout(0., update_meta)

radio=limit(radio)

radio = register_flow(
     ...
     radio
)

output.file(
     %wav(stereo=true),
     "/archive/piradio/%Y-%m-%d/%Y-%m-%d-%H_%M_%S.wav",
     on_close=fun(s)->system("qwavheaderdump -F #{s}"),
     reopen_when={0m0s},
     mksafe(radio)
)

output.icecast(
     %vorbis.cbr(samplerate=44100, channels=2, bitrate=160),
     ...
     description="piradio",
     restart=true,
     radio
)

output.harbor(
     ...
     %vorbis.cbr(samplerate=44100, channels=2, bitrate=160),
     radio
)

BR, Peter

------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to