Darkice:当前无部分

Darkice:当前无部分

我试图按照说明这里设置本地音频流,但当我尝试启动 Darkice 时,它​​出现错误DarkIce: DarkIceConfig.cpp:137: no current section [0]并退出。这是什么意思?

更新:...我没有正确复制配置文件。我修复了它,现在可以正常工作了。

答案1

Darkice 需要一个配置文件才能流式传输到 Icecast 服务器。可以在 中找到示例配置文件,/usr/share/doc/darkice/examples但配置需要根据我们的设置进行调整。

可能的配置如下:

[general]
duration        = 0      # duration in s, 0 forever
bufferSecs      = 1      # buffer, in seconds
reconnect       = yes    # reconnect if disconnected

[input]
device          = default # `pulse' for Pulseaudio
sampleRate      = 44100   # sample rate 11025, 22050 or 44100
bitsPerSample   = 16      # bits
channel         = 2       # 2 = stereo

[icecast2-0]
bitrateMode     = vbr       # variable bit rate (`cbr' constant, `abr' average)
quality         = 1.0       # 1.0 is best quality
format          = mp3       # format. Choose `vorbis' for OGG Vorbis
bitrate         = 256       # bitrate
server          = localhost # or IP
port            = 8000      # port for IceCast2 access
password        = hackme    # source password to the IceCast2 server
mountPoint      = mystream.mp3  # mount point on the IceCast2 server .mp3 or .ogg
name            = mystream

将此文件保存到任意位置(Darkice 默认寻找/etc/darkice.cfg),然后使用以下命令启动 Darkice

darkice -c /path/to/darkice.cfg

相关内容