Icecast2 и darkice stream играют слишком медленно

Я пытаюсь получить доступ к своему USB-радио-ключу InstantFM, используя icecast2 и darkice.

Я настроил его достаточно хорошо, чтобы при доступе к потоку (192.168.2.108:8000/instantfm) звучал звук, но он воспроизводится очень медленно. Может кто-нибудь сказать мне, что я делаю не так? Я довольно опытный в Linux, не так много в аудио Linux.

С помощью arecord я могу захватить с устройства следующее

sudo arecord -q -d 60 -c 2 -D hw:1,0 -r 96000 -f s16_LE radio.wav

Если я устанавливаю [input]sampleRate выше 48000, при запуске darkice я получаю следующее:

[email protected]:/var/log$ sudo darkice
DarkIce 1.0 live audio streamer, http://code.google.com/p/darkice/
Copyright (c) 2000-2007, Tyrell Hungary, http://tyrell.hu/
Copyright (c) 2008-2010, Akos Maroy and Rafael Diniz
This is free software, and you are welcome to redistribute it
under the terms of The GNU General Public License version 3 or
any later version.

Using config file: /etc/darkice.cfg
Using ALSA DSP input device: hw:1,0
Using POSIX real-time scheduling, priority 98
Home directory /home/joey not ours.
DarkIce: LameLibEncoder.cpp:261: lame lib initializing params error [0]
[email protected]:/var/log$

мой darkice.cfg:

# sample DarkIce configuration file, edit for your needs before using
# see the darkice.cfg man page for details

# this section describes general aspects of the live streaming session
[general]
duration        = 0        # duration of encoding, in seconds. 0 means forever
bufferSecs      = 5         # size of internal slip buffer, in seconds
reconnect       = yes       # reconnect to the server(s) if disconnected

# this section describes the audio input that will be streamed
[input]
device          = hw:1,0
sampleRate      = 48000 #22050
bitsPerSample   = 16
channel         = 2

# this section describes a streaming connection to an IceCast2 server
# there may be up to 8 of these sections, named [icecast2-0] ... [icecast2-7]
# these can be mixed with [icecast-x] and [shoutcast-x] sections
[icecast2-0]
bitrateMode     = cbr       # average bit rate
quality         = 0.5
format          = mp3 #vorbis    # format of the stream: ogg vorbis
bitrate         = 96        # bitrate of the stream sent to the server
server          = q6600.home.lan
                            # host name of the server
port            = 8000      # port of the IceCast2 server, usually 8000
password        = ########   # source password to the IceCast2 server
mountPoint      = instantfm  # mount point of this stream on the IceCast2 server
name            = DarkIce trial
                            # name of the stream
description     = This is only a trial
                            # description of the stream
url             = http://www.home.lan
                            # URL related to the stream
genre           = my own    # genre of the stream
public          = yes       # advertise this stream?
localDumpFile   = dump.ogg  # local dump file

ОС: Ubuntu 12.04.3 LTS Icecast версия: 2.3.2 Darkice версия: 1.0

Заранее спасибо.

После установки и запуска жидкого мыла, как указано ниже, он продолжает играть медленно.

Выход из жидкого мыла:

[email protected]:/var/log$ liquidsoap   'output.icecast(%vorbis,host = "q6600.home.lan", port = 8000,password="********",mount = "liq.ogg", mksafe(input.alsa(device="hw:1,0")))'
2014/05/24 19:55:12 >>> LOG START
2014/05/24 19:55:12 [protocols.external:3] Didn't find "ufetch".
2014/05/24 19:55:12 [protocols.external:3] Found "/usr/bin/wget".
2014/05/24 19:55:12 [main:3] Liquidsoap 1.0.0
2014/05/24 19:55:12 [main:3] Using: graphics=[distributed with Ocaml] pcre=6.2.2 dtools=0.2.2 duppy=0.4.2 duppy.syntax=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.0 flac.ogg=0.1.0 dynlink=[distributed with Ocaml] lame=0.3.1 gstreamer=0.1.0 voaacenc=0.1.0 theora=0.3.0 schroedinger=0.1.0 gavl=0.1.4 bjack=0.1.3 alsa=0.2.1 ao=0.2.0 samplerate=0.1.1 taglib=0.2.0 magic=0.7.3 camomile=0.8.3 faad=0.3.0 soundtouch=0.1.7 portaudio=0.2.0 pulseaudio=0.1.2 ladspa=0.1.4 dssi=0.1.0 sdl=0.8.0 camlimages=4.0.0 lo=0.1.0 yojson=1.0.2 gd=1.0a5
2014/05/24 19:55:12 [dynamic.loader:3] Could not find dynamic module for aacplus encoder.
2014/05/24 19:55:12 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.0.0/plugins/cry.cmxs.
2014/05/24 19:55:12 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.0.0/plugins/flac.cmxs.
2014/05/24 19:55:12 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.0.0/plugins/pulseaudio.cmxs.
2014/05/24 19:55:12 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.0.0/plugins/taglib.cmxs.
2014/05/24 19:55:12 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.0.0/plugins/ogg.cmxs.
2014/05/24 19:55:12 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.0.0/plugins/alsa.cmxs.
2014/05/24 19:55:12 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.0.0/plugins/mad.cmxs.
2014/05/24 19:55:12 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.0.0/plugins/voaacenc.cmxs.
2014/05/24 19:55:12 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.0.0/plugins/lame.cmxs.
2014/05/24 19:55:12 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.0.0/plugins/faad.cmxs.
2014/05/24 19:55:12 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.0.0/plugins/flac_ogg.cmxs.
2014/05/24 19:55:12 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.0.0/plugins/vorbis.cmxs.
2014/05/24 19:55:12 [frame:3] Using 44100Hz audio, 25Hz video, 44100Hz master.
2014/05/24 19:55:12 [frame:3] Frame size must be a multiple of 1764 ticks = 1764 audio samples = 1 video samples.
2014/05/24 19:55:12 [frame:3] Targetting 'frame.duration': 0.04s = 1764 audio samples = 1764 ticks.
2014/05/24 19:55:12 [frame:3] Frames last 0.04s = 1764 audio samples = 1 video samples = 1764 ticks.
2014/05/24 19:55:12 [threads:3] Created thread "generic queue #1".
2014/05/24 19:55:12 [threads:3] Created thread "generic queue #2".
2014/05/24 19:55:12 [threads:3] Created thread "src_4684" (1 total).
2014/05/24 19:55:12 [src_4684:3] Using ALSA 1.0.25.
2014/05/24 19:55:12 [liq(dot)ogg:3] Connecting mount liq.ogg for [email protected]
2014/05/24 19:55:12 [src_4684:2] Falling back on interleaved S16LE
2014/05/24 19:55:13 [liq(dot)ogg:3] Connection setup was successful.
2014/05/24 19:55:13 [threads:3] Created thread "wallclock_alsa" (2 total).
2014/05/24 19:55:13 [clock.wallclock_alsa:3] Streaming loop starts, synchronized by active sources.
2014/05/24 19:55:13 [mksafe:3] Switch to src_4684.

1 ответ

Так как Darkice не нравится частота дискретизации 96 кГц, создаваемая устройством USB,
Вы можете попробовать на Liquidsoap, другое потоковое программное обеспечение:

Способность sudo установить жидкое мыло
sudo aptitude устанавливает liquidsoap-plugin-alsa

Затем запустите Liquidsoap, заменив ip и пароль сервера, с помощью следующей команды:

liquidsoap   'output.icecast(%vorbis,host = "q6600.home.lan", port = 8000,password="your_password",mount = "liq.ogg", mksafe(input.alsa(device="hw:1,0")))'  

Это создаст поток в

 http://q6600.home.lan:8000/liq.ogg

Сайт Liquidsoap http://savonet.sourceforge.net/

Другие вопросы по тегам