From: Kevin M. <mcq...@me...> - 2013-03-23 11:19:18
|
Hi There: I have the same requirement, and found that the "merge_tracks" function works in general, but that there are some problems when using it within a "switch" construct. I have asked on the list why it doesn't seem to be working inside a "switch", so I suggest you too watch for any replies to my question. Good luck from another newbie, I will watch for replies to your question too. Kevin Sent from my iPad On 2013-03-23, at 6:36, Pad Anius <pad...@gm...> wrote: > Hi There, > > I would like to have a way to use a "sequence" of MP3 files that include: a > playlist, dynamically generated audio file, and from single(..) to play at a > certain time using switch. Liquidsoap examples that I am able to see around use > sequence only with a maximum of 2 files. > > I have tried using timed_promotions with a sequence of more than 2 files, but > the first time the switch is hit at 59m49s it runs OK and plays all files in > sequence, but on the next hour files contained in "sequence" below are skipped > with no logic that I can understand, even looking at the log. Something must be > terribly wrong :-( > > It seems that "sequence" is not the right way, is there any other way to put > together more files inside a script and play them at a certain time (some files > can be dynamically generated, see below)? > > Here is an excerpt of my (simplified) script showing the problem: > > #!/usr/local/bin/liquidsoap > set("log.level",4) > MYSTATION="timed_promotion with sequence does not work OK!" > print(MYSTATION) > > # picks the latest news file updated every hour > def new_news() > url = list.hd(get_process_lines("/bin/ls -1 /NEWS/news.mp3*")) > request.create(url) > end > > def get_00min() > # generates an MP3 file withe current time, i.e. "It's now 9 hours CET" > url = list.hd(get_process_lines("/scripts/get-tophour-mp3.sh")) > request.create(url) > end > > ac = playlist(mode="random", reload=86500, "/MUSIC/FREE/AC/") > newsitem = audio_to_stereo(request.dynamic(conservative=true, new_news)) > _00min=audio_to_stereo(request.dynamic(conservative=true,get_00min)) > rel30 = audio_to_stereo(playlist(mode="random",reload=14401,"/REL/30min")) > mksafe(rel30) > pips=audio_to_stereo(single("/NEWS/pips.mp3")) > > _00newsweekly=sequence(merge=true,[ > pips, > _00min, > newsitem, > rel30 > ]) > > timed_promotions = switch([ > ({(1w or 2w or 3w or 4w or 5w) and 59m49s} , _00newsweekly), > ]) > > radio = ac > radio = smooth_add(delay=0.8,p=0.0,normal=radio,special=timed_promotions) > radio = smart_crossfade(fade_out=1.8,fade_in=1.8,radio) > > output.icecast( %aacplus(channels=1,bitrate=32), host = "10.0.1.101", port = > 8000, password = "xxxx", mount = "rel.aac", name="#{quote(MYSTATION)}", > genre="Christian", url="http://www.XXXX.XXX", description="My station", radio) > > ---------------------------------------- > > Thanks for any help! > > > Pad > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_mar > _______________________________________________ > Savonet-users mailing list > Sav...@li... > https://lists.sourceforge.net/lists/listinfo/savonet-users |