Hey Ashworth,

Thanks for the hint with `add()`! I replaced it with `sequence()` and I got the 
right metadata from the live source \o/
Also I can skip the current track after going back to idle_radio!

But one thing is bothering me... I had to remove my security, because after the 
live streams ended I heared the security-single 2 or 3 times before the 
playlist restarted... However, if my playlist breaks I thing I have another 
problem then inform the user, so it really doesn't matter to have a fallback 8-)

So for the archive, here is my current functional config:

  2 myplaylist = playlist(mode="random", reload=3600, 
"/var/lib/mpd/music/8bitpeoples")
  3
  4 idle_radio = myplaylist
  7
  8 live = input.http("http://localhost:8000/live.mp3";)
  9
 10 def to_live(idle_radio, live)
 11     idle_radio = fade.final(duration=5.,idle_radio)
 12     live = fade.initial(duration=10.,live)
 13     sequence([idle_radio, live])
 14 end
 15
 16 def to_idle_radio(live, idle_radio)
 17     source.skip(idle_radio)
 18     idle_radio = fade.in(duration=10., idle_radio)
 19     sequence([live, idle_radio])
 20 end
 21
 22 # Add the ability to relay live shows
 23 radio = fallback(track_sensitive=false,
 24     transitions = [to_live, to_idle_radio], [live, skip_blank(idle_radio)])
 25
 26 # Stream it out
 27 output.icecast(
 28   %mp3(bitrate=128),
 29   fallible = true,
 30   mount = "/mp3_high.mp3",
 31   host = "localhost", port = 8000, password = "***",
 32   name = "mp3 high quality", description = "", genre = "experimental", 
public = false,
 33   url = "***:8000/mp3_high.mp3",
 34   radio)

Have a good night,
Bernd

On 11.08.2013, at 16:41, Ashworth Payne wrote:

> 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 
> <[email protected]> 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";)
>  12
>  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
>  18
>  19 def to_idle_radio(live, idle_radio)
>  22     idle_radio = fade.initial(idle_radio)
>  23     add([live, idle_radio])
>  24 end
>  25
>  27 radio = fallback(track_sensitive=false,
>  28     transitions = [to_live, to_idle_radio], [live, 
> skip_blank(idle_radio), security])
>  29
>  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!
> Bernd

------------------------------------------------------------------------------
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. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to