MPD MPC错误,停止后超时,清除播放列表,重新加载并播放

MPD MPC错误,停止后超时,清除播放列表,重新加载并播放

我对 MPD/MPC 越来越着迷。我正在尝试基本用途,播放网络播放列表。我的问题是当我试图停止它然后重新开始玩时。

加载中:

pi@raspberrypi:~ $ sudo mpd
pi@raspberrypi:~ $ cat /var/lib/mpd/state
sw_volume: 100
audio_device_state:1:My ALSA Device
state: stop
random: 0
repeat: 0
single: 0
consume: 0
crossfade: 0
mixrampdb: 0.000000
mixrampdelay: -1.000000
playlist_begin
playlist_end
pi@raspberrypi:~ $ mpc
volume:100%   repeat: off   random: off   single: off   consume: off
pi@raspberrypi:~ $ mpc load http://www.wefunkradio.com/play/radio.pls
loading: http://www.wefunkradio.com/play/radio.pls
pi@raspberrypi:~ $ mpc play
http://wefunkhub.com/radiodrops/introdrop-keithmurray2.mp3
[playing] #1/3   0:00/0:00 (0%)
volume:100%   repeat: off   random: off   single: off   consume: off

停止和清除:

pi@raspberrypi:~ $ mpc stop
volume:100%   repeat: off   random: off   single: off   consume: off
pi@raspberrypi:~ $ mpc clear
volume:100%   repeat: off   random: off   single: off   consume: off

我可以看到这不会立即改变。需要一些时间才能清除(并且仍然显示“state:play”):

pi@raspberrypi:~ $ cat /var/lib/mpd/state
sw_volume: 100
audio_device_state:1:My ALSA Device
state: play
current: 1
time: 103.685000
random: 0
repeat: 0
single: 0
consume: 0
crossfade: 0
mixrampdb: 0.000000
mixrampdelay: -1.000000
playlist_begin
song_begin: http://wefunkhub.com/radiodrops/introdrop-keithmurray2.mp3
mtime: 0
song_end
song_begin: http://s-05.wefunkradio.com:81/wefunk64.mp3
Title: WEFUNK Show 310 / next is Show 381
Name: ((( WEFUNK Radio ))) . raw uncut funk . classic & underground hip-hop
mtime: 0
song_end
song_begin: http://s-00.wefunkradio.com:81/wefunk64.mp3
mtime: 0
song_end
playlist_end

几分钟后,我的状态文件已清除,但我无法再次播放:

pi@raspberrypi:~ $ cat /var/lib/mpd/state
sw_volume: 100
audio_device_state:1:My ALSA Device
state: stop
random: 0
repeat: 0
single: 0
consume: 0
crossfade: 0
mixrampdb: 0.000000
mixrampdelay: -1.000000
playlist_begin
playlist_end
pi@raspberrypi:~ $ mpc load http://www.wefunkradio.com/play/radio.pls
loading: http://www.wefunkradio.com/play/radio.pls
error: Timeout

一切都开始失败:

pi@raspberrypi:~ $ mpc
error: Timeout
pi@raspberrypi:~ $ mpc stop
error: Timeout

我发现它可以杀死 -9 mpd 的唯一解决方案,并且有时仍然有效,而其他一些则无效。我试图找到一个能够重现错误的规则,但我不能。

有什么建议吗?范围是:

  • 加载网络播放列表
  • 播放
  • 停下来
  • 清除播放列表
  • 再次加载
  • 再播一次

提前致谢

更新 在杀死MPD、重新启动MPD、加载播放列表和播放之间等待了很长时间,现在可以了。与时间有关吗?

pi@raspberrypi:~ $ sudo mpd --kill
pi@raspberrypi:~ $ sudo killall mpd
pi@raspberrypi:~ $ pgrep mpd
4631
pi@raspberrypi:~ $ netstat -pln | grep mpd
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
pi@raspberrypi:~ $ sudo netstat -pln | grep mpd
tcp        0      0 127.0.0.1:6600          0.0.0.0:*               LISTEN      4631/mpd        
pi@raspberrypi:~ $ sudo kill -9 4631
pi@raspberrypi:~ $ sudo netstat -pln | grep mpd
pi@raspberrypi:~ $ mpc
error: Connection refused
pi@raspberrypi:~ $ sudo mpd
pi@raspberrypi:~ $ mpc
volume:100%   repeat: off   random: off   single: off   consume: off
pi@raspberrypi:~ $ cat /var/lib/mpd/state
sw_volume: 100
audio_device_state:1:My ALSA Device
state: stop
random: 0
repeat: 0
single: 0
consume: 0
crossfade: 0
mixrampdb: 0.000000
mixrampdelay: -1.000000
playlist_begin
playlist_end
pi@raspberrypi:~ $ mpc load http://www.wefunkradio.com/play/radio.pls
loading: http://www.wefunkradio.com/play/radio.pls
pi@raspberrypi:~ $ mpc play
http://wefunkhub.com/radiodrops/introdrop-keithmurray2.mp3
[playing] #1/3   0:00/0:00 (0%)
volume:100%   repeat: off   random: off   single: off   consume: off
pi@raspberrypi:~ $ 

相关内容