Just a guess, but if you used a directory or songs instead of a playlist, source.skip will behave as expected.  I believe it skips the entire source, and when reading from a directory, the current song is considered the whole of the source.  whereas a playlist is considered the whole of the source and therefore skipped.  Clear as mud?

I believe (dangerous thought!) the first source in an add() becomes the source for meta. If true, this might explain why you saw meta at some point. I wish I could help, but I'm not sure how to switch meta to a new source either.  I do it manually.

On Sun, Aug 11, 2013 at 9:55 AM, Bernd Naumann <bernd.naumann.we@googlemail.com> wrote:
Hallo again,
I have two questions and after two days of googleing I thing I'm going nuts ;_;

Question #1: How can I achieve that the current track from a playlist is skiped when I 'switch'/fallback to a live stream?
Here is my current LS config:

  2 myplaylist = playlist(mode="random", reload=3600, "/var/lib/mpd/playlists/8bitpeoples.m3u")
  6 idle_radio = myplaylist
 11 live = input.http("http://localhost:8000/live.mp3")
 13 def to_live(idle_radio, live)
 14     idle_radio = fade.final(idle_radio)
 15     live = fade.initial(live)
 16     add([idle_radio, live])
 17 end
 19 def to_idle_radio(live, idle_radio)
 22     idle_radio = fade.initial(idle_radio)
 23     add([live, idle_radio])
 24 end
 27 radio = fallback(track_sensitive=false,
 28     transitions = [to_live, to_idle_radio], [live, skip_blank(idle_radio), security])
 32 output.icecast(
 33   %mp3(bitrate=128),
 34   fallible = true,
 35   mount = "/mp3_high.mp3",
 36   host = "localhost", port = 8000, password = "***",
 37   name = "mp3 high quality", description = "", genre = "experimental", public = false,
 38   url = "***:8000/mp3_high.mp3",
 39   radio)

The smooth fadeout of the current track and fadein to the live source works pretty well, but when the live source goes off, I start in the middle of the old playlist track, which is a normal like I've read. I found the fallback.skip operator but I don't understand how to implement it in my current config. If I add `source.skip(ilde_radio)` to `def to_idle_radio` LS skips ALL tracks after going from 'live' back to 'idle_radio' :/

Ok, Question #2 - How to failsafe passing metadata from 'live' source to `output()`?

/* I can't reproduce this behavior so don't blame me ;) */
I was wondering when I switch to the 'live' source icecast still shows the metadata from the last 'idle_radio' track.
The log file says that LS got the new metadata chunk, but it's not showing up in the stream. In one situation while testing it worked, but how I said, I can't reproduce it. So I want to ask, is there a failsafe workaround to 'update' the metadata on the `output.icecast()` function and how do I do that?

Thanks for your help!

Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
Savonet-users mailing list