0

I have this liquidsoap script thath streaming an audio to icecast server

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)
)

On my development machine that have real soundcard that works fine: mount point appears in icecast administration panel and i can hear an audio that plays in that mount.

But production vds server (Windows Server 2013 Hyper-V virtualization) has no soundcard (even some virtually soundcard). That`s a sweety thing in Hyper-V. And when I execute this script mount point appears but there is no sound.

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

And I can not see nothing bad. Today I am streaming through Mixxx player with Asio4All. It works fine. But there no so powerfull functionality. So my question is can i use asio4all in liquidsoap? Or maybe i can use some virtual card (but after 15 minutes i don`t find any good solution)

k.makarov
  • 854
  • 1
  • 12
  • 28
  • Debugging this sort of problem with liquidsoap can be painful, although it seems to me that your script is well organized. I recommend you try outputting your intermediate streams one by one (individual playlist, then rotations, before the program switch) on a different icecast mount so to see where the problem origins. I see you have empty directories, and streams with the same id ("music", "jingles", "promo"); this might play. You can set a unique id to each list by adding 'id="new_id"' to playlist(), rotate(), switch(), and on. It will also help you track your problem. Good luck with this! – Bigue Nique Jul 01 '15 at 20:00
  • @BigueNique thx, i`ll try this – k.makarov Jul 02 '15 at 08:17

0 Answers0