Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Starts dropping packets after 1-2 mins of playback, and never recovers #201

Closed
elsurudo opened this issue Jan 12, 2016 · 2 comments
Closed

Comments

@elsurudo
Copy link

Hello,

Still trying to get shairport-sync running on my RPi Model B Rev 1 on Raspbian GNU/Linux 7.

I can now connect to the server and start playing music. However, after 1-4 mins of playback (without fail), it starts dropping packets, and never seems to recover. I've tested both with iTunes, and with system-wide sound control (playing from Spotify).

Output:

pi@ernspi ~ $ shairport-sync -vvv
Looking for the configuration file "/etc/shairport-sync.conf".
Looking for configuration file at full path "/etc/shairport-sync.conf"
Output device name is "hw:0".
startup
statistics_requester status is 0.
daemon status is 0.
rtsp listening port is 5000.
udp base port is 6001.
udp port range is 100.
Shairport Sync player name is "ernspi".
Audio Output name is "alsa".
on-start action is "(null)".
on-stop action is "(null)".
wait-cmd status is 0.
mdns backend "avahi".
userSuppliedLatency is 0.
AirPlayLatency is -1.
iTunesLatency is -1.
forkedDaapdLatency is -1.
stuffing option is "1".
resync time is 2205.
allow a session to be interrupted: 0.
busy timeout time is 120.
tolerance is 88 frames.
password is "(null)".
ignore_volume_control is 0.
audio backend desired buffer length is 6615.
audio backend latency offset is 0.
volume range in dB (zero means use the range specified by the mixer): 0.
configuration file name "/etc/shairport-sync.conf" resolves to "/etc/shairport-sync.conf".
metdata enabled is 0.
metadata pipename is "(null)".
get-coverart is 0.
avahi: avahi_register.
avahi: register_service.
Avahi without metadata
culling threads.
new RTSP connection.
    CSeq: 1.
    User-Agent: iTunes/12.3.2 (Macintosh; OS X 10.10.5).
    Client-Instance: 2C81279EFA65080C.
    DACP-ID: 2C81279EFA65080C.
    Active-Remote: 125949526.
    Apple-Challenge: xr/gWe6M1STNFQGPjp88dA.
    Apple-Response: YftMiCXFmYYkyC13/R8Ce3+MPyQpi8HgNBDR3h/Qcoxth8/xInfRpGhL4Ik0AT71ed09JbeRJcHYQT/MuSmIPL7kwDRkTn3i6/aRMr7visTRUAxNR7V3tOHYusWqqqTvxa+TdZPtaLG1pvVHNxViqDioDxRWBRk/oYffBB6m9VeHrZvs59w5bIeOrtHZ0M8AIq019sPqgWNjZ9F/URzdQHaviQva0IEyRU219ggbvOosmIs37xhapScQr51pfClvbatm0fxeuAImpCYdQJenFstaoteMZDUeBVGnWr9htCEk9ssR8kJSiLyTA5JGd2WP0D7Mq1/wv+vi1JhdPnQxVA.
    CSeq: 1.
    Audio-Jack-Status: connected; type=analog.
    Public: ANNOUNCE, SETUP, RECORD, PAUSE, FLUSH, TEARDOWN, OPTIONS, GET_PARAMETER, SET_PARAMETER.
RTSP connection closed.
closing RTSP connection.
terminating RTSP thread.
culling threads.
one joined...
new RTSP connection.
    CSeq: 1.
    Content-Type: application/sdp.
    Content-Length: 572.
    User-Agent: iTunes/12.3.2 (Macintosh; OS X 10.10.5).
    Client-Instance: 2C81279EFA65080C.
    DACP-ID: 2C81279EFA65080C.
    Active-Remote: 125949526.
Play connection from user agent "iTunes/12.3.2 (Macintosh; OS X 10.10.5)".
    CSeq: 1.
    Audio-Jack-Status: connected; type=analog.
    CSeq: 2.
    Transport: RTP/AVP/UDP;unicast;interleaved=0-1;mode=record;control_port=6001;timing_port=6002.
    User-Agent: iTunes/12.3.2 (Macintosh; OS X 10.10.5).
    Client-Instance: 2C81279EFA65080C.
    DACP-ID: 2C81279EFA65080C.
    Active-Remote: 125949526.
Active-Remote string seen: "125949526".
DACP-ID string seen: "2C81279EFA65080C".
User-Agent is iTunes 10 or better, (actual version is 12); selecting the iTunes latency of -1 frames.
rtp_setup: cport=6001 tport=6002.
Connection from IPv4: 192.168.0.100:54085
listening for audio, control and timing on ports 6001, 6002, 6003.
    CSeq: 2.
    Audio-Jack-Status: connected; type=analog.
    Transport: RTP/AVP/UDP;unicast;interleaved=0-1;mode=record;control_port=6002;timing_port=6003;server_port=6001.
    Session: 1.
    CSeq: 3.
    Session: 1.
    Range: npt=0-.
    RTP-Info: seq=46035;rtptime=3192964997.
    User-Agent: iTunes/12.3.2 (Macintosh; OS X 10.10.5).
    Client-Instance: 2C81279EFA65080C.
    DACP-ID: 2C81279EFA65080C.
    Active-Remote: 125949526.
    CSeq: 3.
    Audio-Jack-Status: connected; type=analog.
    Audio-Latency: 11025.
    CSeq: 4.
    Session: 1.
    Content-Type: text/parameters.
    Content-Length: 19.
    User-Agent: iTunes/12.3.2 (Macintosh; OS X 10.10.5).
    Client-Instance: 2C81279EFA65080C.
    DACP-ID: 2C81279EFA65080C.
    Active-Remote: 125949526.
SET_PARAMETER Content-Type:"text/parameters".
received parameters in SET_PARAMETER request.
volume: -8.557630

    CSeq: 4.
    Audio-Jack-Status: connected; type=analog.
    CSeq: 5.
    Session: 1.
    Content-Type: text/parameters.
    Content-Length: 19.
    User-Agent: iTunes/12.3.2 (Macintosh; OS X 10.10.5).
    Client-Instance: 2C81279EFA65080C.
    DACP-ID: 2C81279EFA65080C.
    Active-Remote: 125949526.
SET_PARAMETER Content-Type:"text/parameters".
received parameters in SET_PARAMETER request.
volume: -8.557630

    CSeq: 5.
    Audio-Jack-Status: connected; type=analog.
syncing to seqno 46035.
    CSeq: 6.
    User-Agent: iTunes/12.3.2 (Macintosh; OS X 10.10.5).
    Client-Instance: 2C81279EFA65080C.
    DACP-ID: 2C81279EFA65080C.
    Active-Remote: 125949526.
    CSeq: 6.
    Audio-Jack-Status: connected; type=analog.
    Public: ANNOUNCE, SETUP, RECORD, PAUSE, FLUSH, TEARDOWN, OPTIONS, GET_PARAMETER, SET_PARAMETER.
    CSeq: 7.
    User-Agent: iTunes/12.3.2 (Macintosh; OS X 10.10.5).
    Client-Instance: 2C81279EFA65080C.
    DACP-ID: 2C81279EFA65080C.
    Active-Remote: 125949526.
    CSeq: 7.
    Audio-Jack-Status: connected; type=analog.
    Public: ANNOUNCE, SETUP, RECORD, PAUSE, FLUSH, TEARDOWN, OPTIONS, GET_PARAMETER, SET_PARAMETER.
RTP: Packets out of sequence: expected: 55948, got 55949.
requesting resend on 1 packets starting at 55948.
RTP: Packets out of sequence: expected: 55971, got 55975.
RTP: Packets out of sequence: expected: 55980, got 56002.
RTP: Packets out of sequence: expected: 56007, got 55971.
RTP: Packets out of sequence: expected: 55974, got 56007.
RTP: Packets out of sequence: expected: 56008, got 55974.
RTP: Packets out of sequence: expected: 55975, got 56008.
RTP: Packets out of sequence: expected: 56009, got 55980.
RTP: Packets out of sequence: expected: 55986, got 56009.
RTP: Packets out of sequence: expected: 56010, got 55986.
RTP: Packets out of sequence: expected: 55992, got 56010.
RTP: Packets out of sequence: expected: 56011, got 55992.
RTP: Packets out of sequence: expected: 55994, got 55997.
RTP: Packets out of sequence: expected: 55998, got 56011.
RTP: Packets out of sequence: expected: 56012, got 56013.
RTP: Packets out of sequence: expected: 56020, got 56012.
RTP: Packets out of sequence: expected: 56013, got 56020.
RTP: Packets out of sequence: expected: 56088, got 55948.
RTP: Packets out of sequence: expected: 55949, got 56088.
RTP: Packets out of sequence: expected: 56134, got 55994.
RTP: Packets out of sequence: expected: 55995, got 56134.
RTP: Packets out of sequence: expected: 56136, got 55995.
RTP: Packets out of sequence: expected: 55996, got 56136.
RTP: Packets out of sequence: expected: 56138, got 55996.
RTP: Packets out of sequence: expected: 55997, got 56138.
RTP: Packets out of sequence: expected: 56141, got 55998.
RTP: Packets out of sequence: expected: 55999, got 56141.
RTP: Packets out of sequence: expected: 56142, got 55999.
RTP: Packets out of sequence: expected: 56000, got 56142.
RTP: Packets out of sequence: expected: 56143, got 56000.
RTP: Packets out of sequence: expected: 56001, got 56143.
RTP: Packets out of sequence: expected: 56144, got 56001.
RTP: Packets out of sequence: expected: 56002, got 56144.
    CSeq: 8.
    User-Agent: iTunes/12.3.2 (Macintosh; OS X 10.10.5).
    Client-Instance: 2C81279EFA65080C.
    DACP-ID: 2C81279EFA65080C.
    Active-Remote: 125949526.
    CSeq: 8.
    Audio-Jack-Status: connected; type=analog.
    Public: ANNOUNCE, SETUP, RECORD, PAUSE, FLUSH, TEARDOWN, OPTIONS, GET_PARAMETER, SET_PARAMETER.
    CSeq: 9.
    User-Agent: iTunes/12.3.2 (Macintosh; OS X 10.10.5).
    Client-Instance: 2C81279EFA65080C.
    DACP-ID: 2C81279EFA65080C.
    Active-Remote: 125949526.
    CSeq: 9.
    Audio-Jack-Status: connected; type=analog.
    Public: ANNOUNCE, SETUP, RECORD, PAUSE, FLUSH, TEARDOWN, OPTIONS, GET_PARAMETER, SET_PARAMETER.
    CSeq: 10.
    User-Agent: iTunes/12.3.2 (Macintosh; OS X 10.10.5).
    Client-Instance: 2C81279EFA65080C.
    DACP-ID: 2C81279EFA65080C.
    Active-Remote: 125949526.
    CSeq: 10.
    Audio-Jack-Status: connected; type=analog.
    Public: ANNOUNCE, SETUP, RECORD, PAUSE, FLUSH, TEARDOWN, OPTIONS, GET_PARAMETER, SET_PARAMETER.
Lost sync with source for 4 consecutive packets -- flushing and resyncing. Error: 3126.
syncing to seqno 64785.
First packet is late! It should have played before now. Flushing 0.1 seconds
Dropping flushed packet in player_put_packet, seqno 64786, timestamp 3199565349, flushing to timestamp: 3199569407.
Dropping flushed packet in player_put_packet, seqno 64787, timestamp 3199565701, flushing to timestamp: 3199569407.
Dropping flushed packet in player_put_packet, seqno 64788, timestamp 3199566053, flushing to timestamp: 3199569407.
Dropping flushed packet in player_put_packet, seqno 64789, timestamp 3199566405, flushing to timestamp: 3199569407.
Dropping flushed packet in player_put_packet, seqno 64790, timestamp 3199566757, flushing to timestamp: 3199569407.
Dropping flushed packet in player_put_packet, seqno 64791, timestamp 3199567109, flushing to timestamp: 3199569407.
Dropping flushed packet in player_put_packet, seqno 64792, timestamp 3199567461, flushing to timestamp: 3199569407.
Dropping flushed packet in player_put_packet, seqno 64793, timestamp 3199567813, flushing to timestamp: 3199569407.
Dropping flushed packet in player_put_packet, seqno 64794, timestamp 3199568165, flushing to timestamp: 3199569407.
Dropping flushed packet in player_put_packet, seqno 64795, timestamp 3199568517, flushing to timestamp: 3199569407.
... (this just continues forever)

My only config changes from the default (as advised by other issues) are:

output_device = "hw:0";
interpolation = "soxr";

Note I've also tried the default interpolation, but it seemed to play for even less time before failure.

Currently, I'm just using the basic audio jack on the RPi (no USB sound card).

What could the issue be? Is it possible that my old RPi is simply too slow? I've checked CPU and memory usage, and it's not topping out, so I'm not sure.

Thanks in advance for any help!

@mikebrady
Copy link
Owner

Just a guess that if the Pi is on WiFi, it might be caused by the WiFi dongle going into a low power mode – see #197.

@elsurudo
Copy link
Author

Well, I'll be damned – that seemed to have done it! Been listening for about 20 mins now, and still going strong.

Thanks for the help and quick response!

For anyone else having this issue, I did the following to disable power management: http://www.modmypi.com/blog/disable-wifi-power-management (basically just adding wireless-power off to /etc/network/interfaces file)

The linked issue's instructions didn't work for me, since I have an Entrelogic WiFi dongle. The solution I used seems more generic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants