linux - 已解决 - 调试 Darkice 以了解为什么没有连接到直播
问题描述
我正在尝试使用 Ubuntu从Darkice客户端连接到直播服务器。这是我的配置:
#this section describes general aspects of the live streaming session
[general]
duration = 0 # duration of encoding, in seconds. 0 means forever
bufferSecs = 10 # size of internal slip buffer, in seconds
reconnect = yes # reconnect to the server(s) if disconnected
realtime = no # run the encoder with POSIX realtime priority
rtprio = 3 # scheduling priority for the realtime threads
# this section describes the audio input that will be streamed
[input]
device = hw:CARD=PCH,DEV=0
sampleRate = 44100 # sample rate in Hz. try 11025, 22050 or 44100
bitsPerSample = 16 # bits per sample. try 16
channel = 2 # channels. 1 = mono, 2 = stereo
# 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
[shoutcast-0]
bitrateMode = cbr
format = mp3
bitrate = 96
quality = 1.0
server = xxxxxxxxxxxxxxx
port = 8020
password = xxxxxxxxxxxxxxx
name = Radio website
url = https://www.mywebsite.it
genre = live
public = no
但是当我跑步时
darkice -v 10 -c /etc/darkice-shoutcast.cfg
它只显示这一点,没有错误或类似情况,但 url 上没有流式传输。使用BUTT就可以了。我还测试了 8021 而不是 8020 端口(8020 是提供商提供的端口号),但没有运气。
DarkIce 1.4 live audio streamer, http://code.google.com/p/darkice/
Copyright (c) 2000-2007, Tyrell Hungary, http://tyrell.hu/
Copyright (c) 2008-2013, 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-shoutcast.cfg
18-May-2021 12:02:28 Using ALSA DSP input device: hw:CARD=PCH,DEV=0
18-May-2021 12:02:28 buffer size: 1764000
18-May-2021 12:02:28 encoding
18-May-2021 12:02:28 MultiThreadedConnector :: transfer, bytes 0
18-May-2021 12:02:28 MultiThreadedConnector :: ThreadData :: threadFunction, was (thread, priority, type): 0x5568a502c010 0 SCHED_OTHER
18-May-2021 12:02:28 MultiThreadedConnector :: ThreadData :: threadFunction, now is (thread, priority, type): 0x5568a502c010 0 SCHED_OTHER
附录 我使用 tcpdump 来了解可能是什么,我只看到类似于“无效密码”的内容
: Flags [P.], cksum 0xc379 (correct), seq 1:19, ack 3090, win 294, options [nop,nop,TS val 3348978428 ecr 531576376], length 18
E..F1O@.1.3'.}.......T.Jq.k.D......&.y.....
..Z...68Invalid Passwor
有关如何更好地调试或修复此问题的建议?
已解决 看来这个错误与密码和配置文件解析错误有关,所以我写的没有空格
[shoutcast-0]
bitrateMode = cbr
format = mp3
bitrate = 96
quality = 1.0
server = xxxxxxxxxxxxxxx
port = 8020
password=xxxxxxxxxxxxxxx
name = Radio website
url = https://www.mywebsite.it
genre = live
public = no
解决方案
推荐阅读
- python - NER 概率的 spaCy 3 波束解析
- java - Java 无法使用 JDBC 创建表
- html - 当左浮动滑块标签显示两位数值时,防止右浮动滑块进一步向右移动
- apache-spark - 为 Spark 准备 lzo 或 lz4 文件
- r - r中神经网络分类器中的未定义列
- c++ - 遍历抽象类的向量时出错
- javascript - 如何禁用 Material UI Link API 组件
- reactjs - 在空时重新初始化数据值时反应formik多选问题
- c# - 按对象属性之一的值对对象列表进行排序,其中只有一个值是感兴趣的
- matlab - 我可以插入我的大型 (X,Y,Z) 数据集以获取与我收集的温度不同的数据吗?