IceCast服务器退回文件

时间:2011-04-06 21:50:27

标签: file fallback icecast

如何为IceCast服务器设置后备文件?

2 个答案:

答案 0 :(得分:3)

如果您正在使用一个名为 liquidsoap 的非常有用的工具集,那么您应该对以下示例感到兴奋,这将播放声音文件目录,或者如果有是直播广播然后它会淡出播放列表,播放“叮当”声音文件,然后淡出直播。除了愚蠢的网址,这是从工作环境中拉出来的。

安装liquidsoap与apt-get install一样无痛。如果你想使用mp3然后apt-get install lame然后切换到output.icecast.lame()。创建一个扩展名为.liq的文件(example.liq),然后创建chmod + x example.liq,然后转到./races

Cheerz!

#!/usr/bin/liquidsoap 
# use the -d flag for daemon mode

set("log.file",false)
set("log.stdout",true)
set("log.level",3)
set("harbor.icy",true)

default =  single("say:How are you gentlemen!! 
             all your base are belong to us. 
             You are on the way to destruction.                      
             What you say!!                      
             You have no chance to survive make your time! 
             HA! HA! HA! HA! HA!")

jingles = playlist("/home/edward/micronemez-jinglez") 

audio = playlist("/home/edward/micronemez-ogg")

#liveset = mksafe(input.http("http://audio.micronemez.com")) 
liveset = strip_blank(input.http("http://f-dt.com"))
liveset = rewrite_metadata([("artist", "FUTURE__DEATH__TOLL"),("title", "LIVE FROM YELLOW_HOUSE")], liveset) 

radio = fallback(track_sensitive=false,
         [skip_blank(liveset), audio, default])

radio = random(weights=[1,5],[ jingles, radio ]) 

output.icecast.vorbis( 
  host="futuredeathtoll.com",port=8000,password="hackme", 
  genre="Easy Listening",url="http://f-dt.com", 
  description="pirate radio",mount="micronemez-radio.ogg", 
  name="FUTURE__DEATH__TOLL ((YELLOW_HOUSE))",radio)

一些非常有用的链接:

http://savonet.sourceforge.net/doc-svn/cookbook.html

http://oshyn.com/_blog/General/post/Audio_and_Video_Streaming_with_Liquidsoap_and_Icecast/

http://wiki.sourcefabric.org/display/LS/WikiStart

答案 1 :(得分:2)

来自doc:

fallback-mount>/example2.ogg</fallback-mount>
<fallback-override>1</fallback-override>
<fallback-when-full>1</fallback-when-full>`

请参阅icecast2_config_file以获取更多解释,滚动至后备挂载说明。