Romain (aka Toots?),
Thanks for the support !
And for the code :)
Ok so if I do this, how are jingles handled? Because we still want to use
jingles.
Can the dynamic request still use all my fallback stuff? Basically s is the
Playlist ?
What about Meta Data? What about Live? What about Fallbacks? What will removing
the playlist do for our jingle transitions? Will there be any prebuffering like
with playlist.safe?
Here's our script, can you tell me how I can keep it pretty much exactly the
same, except without playlist functionality?
set("log.file.path", "nfm.log")
set("server.telnet",true)
def transition(j,a,b)
add(normalize=false,
[ fade.initial(b),
sequence(merge=true,
[blank(duration=1.),j,fallback([])]),
fade.final(a) ])
end
live = input.http(id="live", buffer=10.,
autostart=false, "http://localhost:8000/live")
live = insert_metadata(id="livemeta",clear_metadata(live))
live = strip_blank(length=10.,live)
# Playlist
playlist = mksafe(playlist(mode="normal", reload=100, reload_mode="seconds",
"/home/nocturnal/playlists/main.pls"))
playlist = rewrite_metadata(
[("artist",("[Nocturnal.FM Main] "^"$(artist)")),
("title",("$(title) "^"[The best trance &
progressive] "^"$(album) ")),
("album","")],playlist)
# Transitions & Jingle
jingle = normalize( single
("/home/nocturnal/tunes/JINGLE/NFM-Jingle-20090904.mp3") )
# Fallbacks
radio = fallback(track_sensitive = false, [request.queue(id="request"),
playlist, blank()])
# Transitions
def fade(jingles,s)
fade_in = 12.
fade_out = 10.
start_next = 3.
def fader(from,to)
from = fade.out(duration=fade_out,from)
to = fade.in(duration=fade_in,to)
add(normalize=false,
[ to,
sequence([ jingles, fallback([]) ]),
from ])
end
cross(duration=start_next,fader,s)
end
radio = fade(jingle,radio)
# Outputs
output.icecast.vorbis (
****,
radio)
-----Original Message-----
From: Romain Beauxis [mailto:[email protected]]
Sent: Wednesday, September 09, 2009 6:56 PM
To: Nathan Huebner
Cc: [email protected]
Subject: Re: [Savonet] #303: Large tracks take long to load
Hi !
Le mercredi 9 septembre 2009 17:48:58, vous avez écrit :
> What I was hoping to see:
>
> Start your liquidsoap with a playlist designed to fit x # of hours. Put in
> a variable assuming that the first track is the track I want to play next
> (obviously common sense in every situation of listing things in a fresh
> manner of speaking), when the playlist has reloaded (and detected as a NEW
> playlist ie: ANYTHING changed... Size, Shape, Order, whatever I don't
> think it matters) ie: changes made to the playlist, but while starting at
> the top of the playlist "after" the track that is playing has finished.
> This would allow us to create day long playlists, and then updating the
> new playlist in the evening, rather than do substring cutting, and
> searching through a playlist file to see what has been playing.
>
> Thanks!
>
> Sorry if I sound like I'm complaining, this stuff is kind of difficult if
> you just learned linux a week ago :)
No problem, you're much welcome ! However, please try to use the mail adress
dedicated to user's support, which is: [email protected]
About your issue, my guess is that your needs will not fit the playlist design.
The playlist in liquidsoap is really designed to be something flexible, where
you put a bunch of songs to be played.
If you need a more precise control over what you play, the best would be to
have liquidsoap call an external script. Such a source can be created using
the request.dynamic operator.
Using this operator, each time liquidsoap needs to queue a new song, it will
call any script that you provide it and use the returned value. That way, you
can work out all your constraints outside of liquidsoap, using your prefered
language etc.. All you need to do it to code a script that returns the new
song to queue.
A usage example would be:
# Request function
def request () =
request.create(audio=true,
list.hd(get_process_lines("/path/to/script"))
end
# The dynamic source:
s = request.dynamic(request)
The first part of the code is a function that calls the script
"/path/to/script" and creates a new request using the the first line of its
output.
The second part is a source that calls the function "request" in order to get
its new songs.
Please don't hesitate to ask for more details if you need !
Romain
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users