我有这个Liquidsoap脚本,它将音频流式传输到icecast服务器
out = output.icecast(
host = "127.0.0.1",
port = 8000,
user = "dj",
password = "test",
name = "Test name",
encoding = "UTF-8"
)
wd = "C:/Users/Administrator/Desktop"
pl = "#{wd}/dreamsoundstation"
tech = "#{pl}/technical"
set("log.file.path","#{tech}/liquidsoap.log")
set("log.level", 3)
promo_dir = "#{pl}/promo"
ef = "#{pl}/efir"
ni = "#{ef}/night"
mo = "#{ef}/morning"
da = "#{ef}/daytime"
ev = "#{ef}/evening"
mus_ni_dir = "#{ni}/music"
mus_mo_dir = "#{mo}/music"
mus_da_dir = "#{da}/music"
mus_ev_dir = "#{ev}/music"
jin_ni_dir = "#{ni}/jingles"
jin_mo_dir = "#{mo}/jingles"
jin_da_dir = "#{da}/jingles"
jin_ev_dir = "#{ev}/jingles"
mus_ni = playlist (reload = 360, "#{mus_ni_dir}")
mus_mo = playlist (reload = 360, "#{mus_mo_dir}")
mus_da = playlist (reload = 360, "#{mus_da_dir}")
mus_ev = playlist (reload = 360, "#{mus_ev_dir}")
jin_ni = playlist (reload = 360, "#{jin_ni_dir}")
jin_mo = playlist (reload = 360, "#{jin_mo_dir}")
jin_da = playlist (reload = 360, "#{jin_da_dir}")
jin_ev = playlist (reload = 360, "#{jin_ev_dir}")
promo = playlist (reload = 360, "#{promo_dir}")
ins_ni = rotate (weights = [2, 1], [jin_ni, promo])
ins_mo = rotate (weights = [2, 1], [jin_mo, promo])
ins_da = rotate (weights = [2, 1], [jin_da, promo])
ins_ev = rotate (weights = [2, 1], [jin_ev, promo])
ni = rotate (weights = [3, 1], [mus_ni, ins_ni])
mo = rotate (weights = [3, 1], [mus_mo, ins_mo])
da = rotate (weights = [3, 1], [mus_da, ins_da])
ev = rotate (weights = [3, 1], [mus_ev, ins_ev])
radio = switch (track_sensitive = true,
[
({ 0h - 6h }, ni),
({ 6h - 12h }, mo),
({ 12h - 18h }, da),
({ 18h - 0h }, ev)
])
radio = crossfade(start_next=1., fade_out=1., fade_in=1., radio)
out(
%mp3(bitrate = 320, id3v2 = true),
description = "MP3 320 Kbps",
mount = "main",
mksafe(radio)
)
在我的开发机器上有真正的声卡工作正常:挂载点出现在icecast管理面板中,我可以听到在该挂载中播放的音频。
但是生产vds服务器(Windows Server 2013 Hyper-V虚拟化)没有声卡(甚至是一些虚拟声卡)。这在Hyper-V中是一个可爱的东西。当我执行此脚本时,会出现挂载点,但没有声音。
Liquidsoap generate this logs
2015/06/20 00:47:07 >>> LOG START
2015/06/20 00:47:07 [protocols.external:3] Didn't find "ufetch".
2015/06/20 00:47:07 [protocols.external:3] Didn't find "wget".
2015/06/20 00:47:07 [main:3] Liquidsoap 1.0.1-win32
2015/06/20 00:47:07 [main:3] Using: graphics=[distributed with Ocaml] pcre=0.1.0 dtools=0.3.0 duppy=0.4.2 cry=0.2.2 mm=0.2.0 xmlplaylist=0.1.3 lastfm=0.3.0 ogg=0.4.3 vorbis=0.6.1 speex=0.2.0 mad=0.4.4 flac=0.1.1 flac.ogg=0.1.1 dynlink=[distributed with Ocaml] lame=0.3.1 aacplus=0.2.0 theora=0.3.0 schroedinger=0.1.0 gavl=0.1.4 ao=0.2.0 taglib=0.2.0 camomile=0.8.1 faad=0.3.0 yojson=1.0.2
2015/06/20 00:47:07 [frame:3] Using 44100Hz audio, 25Hz video, 44100Hz master.
2015/06/20 00:47:07 [frame:3] Frame size must be a multiple of 1764 ticks = 1764 audio samples = 1 video samples.
2015/06/20 00:47:07 [frame:3] Targetting 'frame.duration': 0.04s = 1764 audio samples = 1764 ticks.
2015/06/20 00:47:07 [frame:3] Frames last 0.04s = 1764 audio samples = 1 video samples = 1764 ticks.
2015/06/20 00:47:07 [threads:3] Created thread "generic queue #1".
2015/06/20 00:47:07 [threads:3] Created thread "generic queue #2".
2015/06/20 00:47:07 [music:3] Loading playlist...
2015/06/20 00:47:07 [music:3] Playlist is a directory.
2015/06/20 00:47:07 [music:3] Successfully loaded a playlist of 31 tracks.
2015/06/20 00:47:07 [jingles:3] Loading playlist...
2015/06/20 00:47:07 [jingles:3] Playlist is a directory.
2015/06/20 00:47:07 [jingles:3] Got an empty list: keeping the old one.
2015/06/20 00:47:07 [promo:3] Loading playlist...
2015/06/20 00:47:07 [promo:3] Playlist is a directory.
2015/06/20 00:47:07 [promo:3] Got an empty list: keeping the old one.
2015/06/20 00:47:07 [music:3] Loading playlist...
2015/06/20 00:47:07 [music:3] Playlist is a directory.
2015/06/20 00:47:07 [music:3] Successfully loaded a playlist of 20 tracks.
2015/06/20 00:47:07 [jingles:3] Loading playlist...
2015/06/20 00:47:07 [jingles:3] Playlist is a directory.
2015/06/20 00:47:07 [jingles:3] Got an empty list: keeping the old one.
2015/06/20 00:47:07 [music:3] Loading playlist...
2015/06/20 00:47:07 [music:3] Playlist is a directory.
2015/06/20 00:47:07 [music:3] Successfully loaded a playlist of 41 tracks.
2015/06/20 00:47:07 [jingles:3] Loading playlist...
2015/06/20 00:47:07 [jingles:3] Playlist is a directory.
2015/06/20 00:47:07 [jingles:3] Got an empty list: keeping the old one.
2015/06/20 00:47:07 [music:3] Loading playlist...
2015/06/20 00:47:07 [music:3] Playlist is a directory.
2015/06/20 00:47:07 [music:3] Successfully loaded a playlist of 42 tracks.
2015/06/20 00:47:07 [jingles:3] Loading playlist...
2015/06/20 00:47:07 [jingles:3] Playlist is a directory.
2015/06/20 00:47:07 [jingles:3] Got an empty list: keeping the old one.
2015/06/20 00:47:07 [main:3] Connecting mount main for dj@127.0.0.1...
2015/06/20 00:47:07 [decoder:3] Method "MAD" accepted "C:/Users/Administrator/Desktop/dreamsoundstation/efir/evening/music/08 Never Strangers.mp3".
2015/06/20 00:47:07 [decoder:3] Method "MAD" accepted "C:/Users/Administrator/Desktop/dreamsoundstation/efir/daytime/music/07 - Smile when you smile.mp3".
2015/06/20 00:47:07 [decoder:3] Method "MAD" accepted "C:/Users/Administrator/Desktop/dreamsoundstation/efir/morning/music/05 - Pooma - January.mp3".
2015/06/20 00:47:07 [decoder:3] Method "MAD" accepted "C:/Users/Administrator/Desktop/dreamsoundstation/efir/night/music/01 Machine.mp3".
2015/06/20 00:47:07 [main:3] Connection setup was successful.
2015/06/20 00:47:07 [threads:3] Created thread "wallclock_main" (1 total).
2015/06/20 00:47:07 [clock.wallclock_main:3] Streaming loop starts, synchronized with wallclock.
2015/06/20 00:47:07 [mksafe:3] Switch to safe_blank.
2015/06/20 00:55:27 [main:3] Shutdown started!
2015/06/20 00:55:27 [main:3] Waiting for threads to terminate...
2015/06/20 00:55:27 [main:3] Closing connection...
2015/06/20 00:55:27 [clock.wallclock_main:3] Streaming loop stopped.
2015/06/20 00:55:27 [threads:3] Thread "wallclock_main" terminated (0 remaining).
2015/06/20 00:55:27 [main:3] Cleaning downloaded files...
2015/06/20 00:55:27 >>> LOG END
我看不出任何坏事。今天我通过Mixxx播放器与Asio4All进行流媒体播放。它工作正常。但是没有那么强大的功能。所以我的问题是我可以在liquidsoap中使用asio4all吗?或者也许我可以使用一些虚拟卡(但15分钟后我找不到任何好的解决方案)