Hi,

I've finally got a script that works, and plays everything in order with  
smart_crossfades.

One problem has surfaced: OGGs without an ID3 Tag.

The title for each of the OGGs is essentially its filename. So, while  
searching for a way
to have something in the player's info box rather than 'Unknown', I came  
upon David Baelde's
solution of 'def fill_in(s)'.

It has worked once or twice in some earlier attempts at getting my  
'liquidsoap.liq' to work.
In this working liq, it doesn't seem to function. At this point I don't  
know exactly where I
should put this function. Obviously, where I have it is not the right  
spot. :)

Checking the log, the function isn't mentioned, so, I suppose that's good.  
It's
not broken, but perhaps it isn't even activated because of an error on my  
part.


Here's the liquidsoap.liq:


****

#!/usr/local/bin/liquidsoap


# === SETTINGS ===

set("log.file.path","/usr/local/var/log/liquidsoap/liquidsoap.log")
set("init.daemon.pidfile.path", "/var/run/liquidsoap/liquidsoap.pid")




# === Load OGG Section ===


#           security = single("usr/local/www/rcr/ogg/fallback/Welcome.ogg")



         # === ID TO APPLY to SWITCH SCHEDULE ===


                 a = single("/usr/local/www/rcr/ogg/announce/SOD.ogg")

                 b =  
single("/usr/local/www/rcr/ogg/announce/opener/opener-sstol.ogg")

                 c = playlist.safe(mode="normal",  
"/usr/local/www/rcr/radio/current/ogg/today-sstol-ogg-32.pls")

                 d = playlist.safe(mode="normal",  
"/usr/local/www/rcr/radio/current/ogg/sstol-ogg-end-32.pls")

                 e = single("/usr/local/www/rcr/ogg/announce/CLOSER.ogg")



         #       a = audio_to_stereo(a) [doesn't seem to be needed now]


            sstol = sequence([a,b,c,d,e])



                # Fill-in Title for ID3 Tag

                    def fill_in(s)
                      # the function f takes a list of pairs m representing the 
metadata
                      # and it maps an anonymous function on each pair
                      # replacing empty title definitions by title=filename
                      def f(m)
                        list.map(fun (key_value) ->
                          if key_value==("title","") then 
("title",m["filename"]) else
                    key_value end,
                          m)
                      end
                      map_metadata(f,s)
                    end

                # Then just wrap your source at an appropriate spot:
                # source = fill_in(source)


                icogg = fill_in(sstol)



          icogg = smart_crossfade(start_next=0.4, fade_in=0.2, fade_out=0.2,  
conservative=true, a)





       # == ICECAST OGG OUTPUT ==



output.icecast.vorbis(quality=0.8,samplerate=22050,stereo=false,
               host="xxx.xxx.xxx.xxx",
               port=8000,
               password="******",
               mount="icogg.ogg",
               name="",
               description="",
               genre="",
               url="",
             icogg)

****

Thanks,
Andre




-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

------------------------------------------------------------------------------
What happens now with your Lotus Notes apps - do you make another costly 
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus 
Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to