mikebrady / shairport-sync

AirPlay and AirPlay 2 audio player
Other
7.3k stars 574 forks source link

YouTube tvOS sound stop after about 1s #1092

Closed bertrand-lupart closed 2 years ago

bertrand-lupart commented 4 years ago

Hello,

I'm using shairport-sync on a Raspberry Pi plugged into a stereo with the jack port, and it works great ! iPhone, MacBook, Apple TV… can play sound to the stereo via shairport-sync. Thank you for that !

Everything's working perfectly, except for the YouTube app on the Apple TV : the first second on each stream comes to the stereo, then silence. First second of each ad, each video, or each time the video is time warped using the seek bar.

Everything's up to date :

Interestingly, no sound issue streaming from the YouTube iOS app : YouTube iOS -> Airplay 2 -> Apple TV -> Airplay -> shairport-sync

Can't find any error in the shairport-sync logs below (video launched at 21:41:00)

My guess something's wrong with YouTube tvOS app, since other people are reporting issues with Airplay speakers :

But I'd be happy to help troubleshoot if needed.

Nov  1 21:40:59 raspberrypi shairport-sync:          0.623353572 "rtsp.c:475" msg_init message 211
Nov  1 21:40:59 raspberrypi shairport-sync:          0.000099739 "rtsp.c:580" RTSP Message Received: "OPTIONS * RTSP/1.0".
Nov  1 21:40:59 raspberrypi shairport-sync:          0.000073385 "rtsp.c:610"     CSeq: 33.
Nov  1 21:40:59 raspberrypi shairport-sync:          0.000057187 "rtsp.c:610"     DACP-ID: 905F04226850EA15.
Nov  1 21:40:59 raspberrypi shairport-sync:          0.000087031 "rtsp.c:610"     Active-Remote: 831094973.
Nov  1 21:40:59 raspberrypi shairport-sync:          0.000025676 "rtsp.c:610"     User-Agent: AirPlay/525.38.42.
Nov  1 21:40:59 raspberrypi shairport-sync:          0.000028386 "rtsp.c:475" msg_init message 212
Nov  1 21:40:59 raspberrypi shairport-sync:          0.000064322 "rtsp.c:2653" Connection 4: Received an RTSP Packet of type "OPTIONS":
Nov  1 21:40:59 raspberrypi shairport-sync:          0.000024167 "rtsp.c:507"   Type: "CSeq", content: "33"
Nov  1 21:40:59 raspberrypi shairport-sync:          0.000022291 "rtsp.c:507"   Type: "DACP-ID", content: "905F04226850EA15"
Nov  1 21:40:59 raspberrypi shairport-sync:          0.000057239 "rtsp.c:507"   Type: "Active-Remote", content: "831094973"
Nov  1 21:40:59 raspberrypi shairport-sync:          0.000025104 "rtsp.c:507"   Type: "User-Agent", content: "AirPlay/525.38.42"
Nov  1 21:40:59 raspberrypi shairport-sync:          0.000027708 "rtsp.c:901" Connection 4: OPTIONS
Nov  1 21:40:59 raspberrypi shairport-sync:          0.000094166 "rtsp.c:2696" Connection 4: RTSP Response:
Nov  1 21:40:59 raspberrypi shairport-sync:          0.000024011 "rtsp.c:507"   Type: "CSeq", content: "33"
Nov  1 21:40:59 raspberrypi shairport-sync:          0.000022708 "rtsp.c:507"   Type: "Server", content: "AirTunes/105.1"
Nov  1 21:40:59 raspberrypi shairport-sync:          0.000058176 "rtsp.c:507"   Type: "Public", content: "ANNOUNCE, SETUP, RECORD, PAUSE, FLUSH, TEARDOWN, OPTIONS, GET_PARAMETER, SET_PARAMETER"
Nov  1 21:40:59 raspberrypi shairport-sync:          0.000124947 "rtsp.c:556" msg_free freed message 212
Nov  1 21:40:59 raspberrypi shairport-sync:          0.000030990 "rtsp.c:556" msg_free freed message 211
Nov  1 21:41:00 raspberrypi shairport-sync:          1.513211529 "rtp.c:138" Packet reception interval stats: mean, standard deviation and max for the last 2,500 packets in microseconds:     7978.5,    10226.4,    25443.0.
Nov  1 21:41:00 raspberrypi shairport-sync:          0.404005192 "rtsp.c:475" msg_init message 213
Nov  1 21:41:00 raspberrypi shairport-sync:          0.000143906 "rtsp.c:580" RTSP Message Received: "OPTIONS * RTSP/1.0".
Nov  1 21:41:00 raspberrypi shairport-sync:          0.000038906 "rtsp.c:610"     CSeq: 34.
Nov  1 21:41:00 raspberrypi shairport-sync:          0.000027083 "rtsp.c:610"     DACP-ID: 905F04226850EA15.
Nov  1 21:41:00 raspberrypi shairport-sync:          0.000025364 "rtsp.c:610"     Active-Remote: 831094973.
Nov  1 21:41:00 raspberrypi shairport-sync:          0.000026875 "rtsp.c:610"     User-Agent: AirPlay/525.38.42.
Nov  1 21:41:00 raspberrypi shairport-sync:          0.000027395 "rtsp.c:475" msg_init message 214
Nov  1 21:41:00 raspberrypi shairport-sync:          0.000024219 "rtsp.c:2653" Connection 4: Received an RTSP Packet of type "OPTIONS":
Nov  1 21:41:00 raspberrypi shairport-sync:          0.000023489 "rtsp.c:507"   Type: "CSeq", content: "34"
Nov  1 21:41:00 raspberrypi shairport-sync:          0.000022344 "rtsp.c:507"   Type: "DACP-ID", content: "905F04226850EA15"
Nov  1 21:41:00 raspberrypi shairport-sync:          0.000023542 "rtsp.c:507"   Type: "Active-Remote", content: "831094973"
Nov  1 21:41:00 raspberrypi shairport-sync:          0.000022135 "rtsp.c:507"   Type: "User-Agent", content: "AirPlay/525.38.42"
Nov  1 21:41:00 raspberrypi shairport-sync:          0.000029791 "rtsp.c:901" Connection 4: OPTIONS
Nov  1 21:41:00 raspberrypi shairport-sync:          0.000023646 "rtsp.c:2696" Connection 4: RTSP Response:
Nov  1 21:41:00 raspberrypi shairport-sync:          0.000022291 "rtsp.c:507"   Type: "CSeq", content: "34"
Nov  1 21:41:00 raspberrypi shairport-sync:          0.000023281 "rtsp.c:507"   Type: "Server", content: "AirTunes/105.1"
Nov  1 21:41:00 raspberrypi shairport-sync:          0.000022188 "rtsp.c:507"   Type: "Public", content: "ANNOUNCE, SETUP, RECORD, PAUSE, FLUSH, TEARDOWN, OPTIONS, GET_PARAMETER, SET_PARAMETER"
Nov  1 21:41:00 raspberrypi shairport-sync:          0.000226144 "rtsp.c:556" msg_free freed message 214
Nov  1 21:41:00 raspberrypi shairport-sync:          0.000170311 "rtsp.c:556" msg_free freed message 213
Nov  1 21:41:01 raspberrypi shairport-sync:          0.295128601 "player.c:1609" soxr_oneshot execution time in nanoseconds: mean, standard deviation and max for 1 interpolations in the last 1250 packets.   0.003876,   0.000000,   0.003876.
Nov  1 21:41:01 raspberrypi shairport-sync:          0.162156979 "rtp.c:628" clock synchronisation request: return time is    1.916 milliseconds.
Nov  1 21:41:01 raspberrypi shairport-sync:          0.000116822 "rtp.c:811" not enough samples to estimate drift -- remaining at 0.00 ppm.
Nov  1 21:41:03 raspberrypi shairport-sync:          1.621956091 "rtsp.c:475" msg_init message 215
Nov  1 21:41:03 raspberrypi shairport-sync:          0.000149582 "rtsp.c:580" RTSP Message Received: "OPTIONS * RTSP/1.0".
Nov  1 21:41:03 raspberrypi shairport-sync:          0.000071823 "rtsp.c:610"     CSeq: 35.
Nov  1 21:41:03 raspberrypi shairport-sync:          0.000052135 "rtsp.c:610"     DACP-ID: 905F04226850EA15.
Nov  1 21:41:03 raspberrypi shairport-sync:          0.000225831 "rtsp.c:610"     Active-Remote: 831094973.
Nov  1 21:41:03 raspberrypi shairport-sync:          0.000066562 "rtsp.c:610"     User-Agent: AirPlay/525.38.42.
Nov  1 21:41:03 raspberrypi shairport-sync:          0.000061406 "rtsp.c:475" msg_init message 216
Nov  1 21:41:03 raspberrypi shairport-sync:          0.000061250 "rtsp.c:2653" Connection 4: Received an RTSP Packet of type "OPTIONS":
Nov  1 21:41:03 raspberrypi shairport-sync:          0.000067499 "rtsp.c:507"   Type: "CSeq", content: "35"
Nov  1 21:41:03 raspberrypi shairport-sync:          0.000046302 "rtsp.c:507"   Type: "DACP-ID", content: "905F04226850EA15"
Nov  1 21:41:03 raspberrypi shairport-sync:          0.000071354 "rtsp.c:507"   Type: "Active-Remote", content: "831094973"
Nov  1 21:41:03 raspberrypi shairport-sync:          0.000045208 "rtsp.c:507"   Type: "User-Agent", content: "AirPlay/525.38.42"
Nov  1 21:41:03 raspberrypi shairport-sync:          0.000055520 "rtsp.c:901" Connection 4: OPTIONS
Nov  1 21:41:03 raspberrypi shairport-sync:          0.000047500 "rtsp.c:2696" Connection 4: RTSP Response:
Nov  1 21:41:03 raspberrypi shairport-sync:          0.000047447 "rtsp.c:507"   Type: "CSeq", content: "35"
Nov  1 21:41:03 raspberrypi shairport-sync:          0.000046719 "rtsp.c:507"   Type: "Server", content: "AirTunes/105.1"
Nov  1 21:41:03 raspberrypi shairport-sync:          0.000082395 "rtsp.c:507"   Type: "Public", content: "ANNOUNCE, SETUP, RECORD, PAUSE, FLUSH, TEARDOWN, OPTIONS, GET_PARAMETER, SET_PARAMETER"
Nov  1 21:41:03 raspberrypi shairport-sync:          0.000206196 "rtsp.c:556" msg_free freed message 216
Nov  1 21:41:03 raspberrypi shairport-sync:          0.000113385 "rtsp.c:556" msg_free freed message 215
Nov  1 21:41:04 raspberrypi shairport-sync:          1.375862909 "rtp.c:628" clock synchronisation request: return time is    1.218 milliseconds.
Nov  1 21:41:04 raspberrypi shairport-sync:          0.000158488 "rtp.c:811" not enough samples to estimate drift -- remaining at 0.00 ppm.
Nov  1 21:41:05 raspberrypi shairport-sync:          0.575501894 "rtsp.c:475" msg_init message 217
Nov  1 21:41:05 raspberrypi shairport-sync:          0.000146353 "rtsp.c:580" RTSP Message Received: "OPTIONS * RTSP/1.0".
Nov  1 21:41:05 raspberrypi shairport-sync:          0.000065104 "rtsp.c:610"     CSeq: 36.
Nov  1 21:41:05 raspberrypi shairport-sync:          0.000051718 "rtsp.c:610"     DACP-ID: 905F04226850EA15.
Nov  1 21:41:05 raspberrypi shairport-sync:          0.000053698 "rtsp.c:610"     Active-Remote: 831094973.
Nov  1 21:41:05 raspberrypi shairport-sync:          0.000049218 "rtsp.c:610"     User-Agent: AirPlay/525.38.42.
Nov  1 21:41:05 raspberrypi shairport-sync:          0.000055573 "rtsp.c:475" msg_init message 218
Nov  1 21:41:05 raspberrypi shairport-sync:          0.000046979 "rtsp.c:2653" Connection 4: Received an RTSP Packet of type "OPTIONS":
Nov  1 21:41:05 raspberrypi shairport-sync:          0.000047187 "rtsp.c:507"   Type: "CSeq", content: "36"
Nov  1 21:41:05 raspberrypi shairport-sync:          0.000047343 "rtsp.c:507"   Type: "DACP-ID", content: "905F04226850EA15"
Nov  1 21:41:05 raspberrypi shairport-sync:          0.000044896 "rtsp.c:507"   Type: "Active-Remote", content: "831094973"
Nov  1 21:41:05 raspberrypi shairport-sync:          0.000046614 "rtsp.c:507"   Type: "User-Agent", content: "AirPlay/525.38.42"
Nov  1 21:41:05 raspberrypi shairport-sync:          0.000170415 "rtsp.c:901" Connection 4: OPTIONS
Nov  1 21:41:05 raspberrypi shairport-sync:          0.000049375 "rtsp.c:2696" Connection 4: RTSP Response:
Nov  1 21:41:05 raspberrypi shairport-sync:          0.000047760 "rtsp.c:507"   Type: "CSeq", content: "36"
Nov  1 21:41:05 raspberrypi shairport-sync:          0.000044219 "rtsp.c:507"   Type: "Server", content: "AirTunes/105.1"
Nov  1 21:41:05 raspberrypi shairport-sync:          0.000043489 "rtsp.c:507"   Type: "Public", content: "ANNOUNCE, SETUP, RECORD, PAUSE, FLUSH, TEARDOWN, OPTIONS, GET_PARAMETER, SET_PARAMETER"
Nov  1 21:41:05 raspberrypi shairport-sync:          0.000205155 "rtsp.c:556" msg_free freed message 218
Nov  1 21:41:05 raspberrypi shairport-sync:          0.000060937 "rtsp.c:556" msg_free freed message 217
Nov  1 21:41:07 raspberrypi shairport-sync:          2.113491261 "rtsp.c:475" msg_init message 219
Nov  1 21:41:07 raspberrypi shairport-sync:          0.000108541 "rtsp.c:580" RTSP Message Received: "OPTIONS * RTSP/1.0".
Nov  1 21:41:07 raspberrypi shairport-sync:          0.000041302 "rtsp.c:610"     CSeq: 37.
Nov  1 21:41:07 raspberrypi shairport-sync:          0.000027708 "rtsp.c:610"     DACP-ID: 905F04226850EA15.
Nov  1 21:41:07 raspberrypi shairport-sync:          0.000025833 "rtsp.c:610"     Active-Remote: 831094973.
Nov  1 21:41:07 raspberrypi shairport-sync:          0.000024688 "rtsp.c:610"     User-Agent: AirPlay/525.38.42.
Nov  1 21:41:07 raspberrypi shairport-sync:          0.000029531 "rtsp.c:475" msg_init message 220
Nov  1 21:41:07 raspberrypi shairport-sync:          0.000024479 "rtsp.c:2653" Connection 4: Received an RTSP Packet of type "OPTIONS":
Nov  1 21:41:07 raspberrypi shairport-sync:          0.000023541 "rtsp.c:507"   Type: "CSeq", content: "37"
Nov  1 21:41:07 raspberrypi shairport-sync:          0.000022031 "rtsp.c:507"   Type: "DACP-ID", content: "905F04226850EA15"
Nov  1 21:41:07 raspberrypi shairport-sync:          0.000022396 "rtsp.c:507"   Type: "Active-Remote", content: "831094973"
Nov  1 21:41:07 raspberrypi shairport-sync:          0.000023698 "rtsp.c:507"   Type: "User-Agent", content: "AirPlay/525.38.42"
Nov  1 21:41:07 raspberrypi shairport-sync:          0.000026770 "rtsp.c:901" Connection 4: OPTIONS
Nov  1 21:41:07 raspberrypi shairport-sync:          0.000023802 "rtsp.c:2696" Connection 4: RTSP Response:
Nov  1 21:41:07 raspberrypi shairport-sync:          0.000022344 "rtsp.c:507"   Type: "CSeq", content: "37"
Nov  1 21:41:07 raspberrypi shairport-sync:          0.000022448 "rtsp.c:507"   Type: "Server", content: "AirTunes/105.1"
Nov  1 21:41:07 raspberrypi shairport-sync:          0.000024114 "rtsp.c:507"   Type: "Public", content: "ANNOUNCE, SETUP, RECORD, PAUSE, FLUSH, TEARDOWN, OPTIONS, GET_PARAMETER, SET_PARAMETER"
Nov  1 21:41:07 raspberrypi shairport-sync:          0.000094218 "rtsp.c:556" msg_free freed message 220
Nov  1 21:41:07 raspberrypi shairport-sync:          0.000071250 "rtsp.c:556" msg_free freed message 219
Nov  1 21:41:07 raspberrypi shairport-sync:          0.117322883 "player.c:602" Frame 33745 is missing with ab_read of 33534 and ab_write of 33761.
Nov  1 21:41:07 raspberrypi shairport-sync:          0.000102499 "player.c:602" Frame 33746 is missing with ab_read of 33534 and ab_write of 33761.
Nov  1 21:41:07 raspberrypi shairport-sync:          0.000031875 "player.c:616" request resend of 2 packets starting at seqno 33745.
Nov  1 21:41:07 raspberrypi shairport-sync:          0.000026718 "common.c:1413" mutex_unlock "&conn->ab_mutex" at "player.c:618".
Nov  1 21:41:07 raspberrypi shairport-sync:          0.000100104 "common.c:1390" mutex_lock "&conn->ab_mutex" at "player.c:620".
Nov  1 21:41:07 raspberrypi shairport-sync:          0.003504661 "rtp.c:425" Control Receiver -- Retransmitted Audio Data Packet 33745 received.
Nov  1 21:41:07 raspberrypi shairport-sync:          0.000184062 "rtp.c:425" Control Receiver -- Retransmitted Audio Data Packet 33746 received.
Nov  1 21:41:07 raspberrypi shairport-sync:          0.190012450 "rtp.c:628" clock synchronisation request: return time is    3.413 milliseconds.
Nov  1 21:41:07 raspberrypi shairport-sync:          0.000155155 "rtp.c:811" not enough samples to estimate drift -- remaining at 0.00 ppm.

Thank you,

mikebrady commented 4 years ago

Thanks for the interesting post. Hmm -- can't see anything untoward there alright. Could you enable statistics, maybe turn the log verbosity down to 2 and let it run for a while (say about three minutes after the audio stops) -- we might get to see if audio is actually arriving at Shairport Sync.

YouTube on iOS has always been problematic from the AirPlay perspective; haven't tried it from an AppleTV.

panjekm commented 4 years ago

Same issue here, only started appearing a few days ago, maybe with the new version of tvOS. Youtube sound from apple tv stops after a second or so. Sounds from any other app from apple tv work fine though. Perhaps its related to dynamic adaptive streaming of youtube.

andru79 commented 3 years ago

Hello Mike, thank you for this great application. I have also the same issue with youtube app on appletv, other apps like Netflix working like a charm. First i tried different settings, ignore_volume_control, keep_dac_busy, disable_synchronisation ... youtube still not properly working Next step was to switch to libalac and self compiled shairport, but this issue still exist. Its also no matter is a DAC or internal sound card will be used. Also audio configuration on apple tv (16bit, only stereo, reset airplay calibration) will not help. Do you have any other idea?

My log is attached.

[Edit: log file attached as file instead of text paste]

shairport_youtube_issue_20201124.log

jacobxdouglas commented 3 years ago

Just commenting that I also have this same issue and that it only happens with the Youtube Apple TV app.

mikebrady commented 3 years ago

Thanks for the posts, @andru79 and @jacobxdouglas and @bertrand-lupart. I don't have a recent Apple TV, I'm afraid, so I've let this slide. @andru79's log file shows nothing unusual at all -- in fact it shows output for a longish play session. Similarly, I can't see anything peculiar about @bertrand-lupart's log. As soon as I can get hold of an ATV, I'll have a look at this. It really does seem to be only the YouTube Apple TV App.

gujo commented 3 years ago

According to this thread: https://discussions.apple.com/thread/251934651 it seems to work with Airplay 2. I have the same issue both with shairplay-sync and and while using an older Apple TV that does not support Airplay 2 as a receiver.

mikebrady commented 3 years ago

According to this thread: https://discussions.apple.com/thread/251934651 it seems to work with Airplay 2. I have the same issue both with shairplay-sync and and while using an older Apple TV that does not support Airplay 2 as a receiver.

Thanks for that. More and more, it looks like a fault in the YouTube app.

jonasschnelli commented 3 years ago

Also facing this issue. Only happens with YouTube tvOS app.

yorhodes commented 3 years ago

This was always an issue for me with the Youtube tvOS app. Now it just started on the Youtube TV app which prevents me from watching TV with any sound. Is the fix here to update to airplay 2?

marshalleq commented 3 years ago

Just clarifying, when it is said it only happens with Airplay 2, that is saying that Shairport sync is only Airplay 1, rather than saying YouTube needs to be on an airplay 2 device e.g. AppleTV 4.

putssander commented 3 years ago

Maybe interesting to know is that the youtube kids tvOS app does works (for same content). Surprised that this bug is still present after months, will all airplay 1 users have this problem?

putssander commented 3 years ago

@mikebrady Hereby some additional verbose logging (not sure if it contains any error related info).

After a short idle period and commercial: 22:11:13 the actual video starts including audio 22:11:23 audio drops (video keeps running)

shairport-sync-youtube-verbose.log

YOUTUBE APP Version: 2.06.21.00/web_20210330_00_RC00 Device: TV (PLATFORM_DETAILS_OTT), Apple/AppleTV5-3/0, Cobalt (21.lts.4.300527-gold),AppleTV(14.5)

Shairport-sync software version: "3.3.7-libdaemon-OpenSSL-Avahi-dns_sd-ALSA-stdout-pipe-soxr-metadata-mqtt-sysconfdir:/etc"

I hope this logging provides some information, maybe something we can report back to YouTube. If I could try something out, please let me know.

knigma commented 3 years ago

Just adding I see this - tvOS 4.7.

pi@raspberrypi:~ $ shairport-sync --version 3.3.8-libdaemon-OpenSSL-Avahi-ALSA-soxr-sysconfdir:/usr/local/etc

Only with YouTube.

mikebrady commented 3 years ago

Thanks. Pretty sure it's an AirPlay 1 issue. In case you missed it, Shairport Sync offers a limited AirPlay 2 functionality on the development branch.

knigma commented 3 years ago

[UPDATE - no audio from my Apple TV, but works from my iPhone. Both 14.7 - weird]

Thanks. Just rebuilt for AirPlay 2 to test - but I must have done something wrong as I'm not getting any audio output now (using Movie app to test, not YouTube). Works fine if I switch back to the earlier version of the executable and I've checked the volume is turned up.

pi@raspberrypi:~/d/shairport-sync $ ./shairport-sync -vu
         0.002222908 "shairport.c:1823" Started!
         0.000111510 "shairport.c:1826" Started in Airplay 2 mode!
         0.000064114 "shairport.c:1868" software version: "4.0-dev-305-g099d21d3-AirPlay2-libdaemon-OpenSSL-Avahi-ALSA-soxr-metadata-dbus-sysconfdir:/usr/local/etc"
         0.000026146 "shairport.c:1874" log verbosity is 1.
         0.000072292 "audio_alsa.c:1015" alsa: alsa_maximum_stall_time of 0.200000 sec.
         0.000063645 "audio_alsa.c:1302" alsa: disable_standby_mode is "never".
         0.000022500 "audio_alsa.c:1304" alsa: disable_standby_mode_silence_threshold is 0.040000 seconds.
         0.000023646 "audio_alsa.c:1306" alsa: disable_standby_mode_silence_scan_interval is 0.004000 seconds.
         0.000035000 "audio_alsa.c:1345" alsa: output device name is "hw:0".
         0.000315103 "shairport.c:1903" libsodium initialised.
         0.000030677 "shairport.c:1930" disable resend requests is off.
         0.000022083 "shairport.c:1934" diagnostic_drop_packet_fraction is 0.000000. A value of 0.0 means no packets will be dropped deliberately.
         0.000025104 "shairport.c:1935" statistics_requester status is 0.
         0.000021302 "shairport.c:1937" daemon status is 0.
         0.000029583 "shairport.c:1938" daemon pid file path is "/var/run/shairport-sync/shairport-sync.pid".
         0.000022761 "shairport.c:1940" rtsp listening port is 7000.
         0.000021718 "shairport.c:1941" udp base port is 6001.
         0.000020990 "shairport.c:1942" udp port range is 10.
         0.000020677 "shairport.c:1943" player name is "knigma-office-audio".
         0.000021041 "shairport.c:1944" backend is "alsa".
         0.000020573 "shairport.c:1945" run_this_before_play_begins action is "(null)".
         0.000021719 "shairport.c:1946" run_this_after_play_ends action is "(null)".
         0.000021198 "shairport.c:1947" wait-cmd status is 0.
         0.000020937 "shairport.c:1948" run_this_before_play_begins may return output is 0.
         0.000021510 "shairport.c:1949" run_this_if_an_unfixable_error_is_detected action is "(null)".
         0.000021563 "shairport.c:1950" run_this_before_entering_active_state action is  "(null)".
         0.000021354 "shairport.c:1951" run_this_after_exiting_active_state action is  "(null)".
         0.000021458 "shairport.c:1952" active_state_timeout is  10.000000 seconds.
         0.000026302 "shairport.c:1953" mdns backend "(null)".
         0.000020886 "shairport.c:1957" interpolation setting is "auto".
         0.000021458 "shairport.c:1958" interpolation soxr_delay_threshold is 30.
         0.000021250 "shairport.c:1959" resync time is 0.050000 seconds.
         0.000022395 "shairport.c:1960" allow a session to be interrupted: 0.
         0.000020782 "shairport.c:1961" busy timeout time is 0.
         0.000020885 "shairport.c:1962" drift tolerance is 0.001995 seconds.
         0.000022552 "shairport.c:1963" password is "(null)".
         0.000020312 "shairport.c:1964" ignore_volume_control is 0.
         0.000020782 "shairport.c:1968" volume_max_db is not set
         0.000020156 "shairport.c:1970" volume range in dB (zero means use the range specified by the mixer): 0.
         0.000022395 "shairport.c:1974" volume_range_combined_hardware_priority (1 means hardware mixer attenuation is used first) is 0.
         0.000022552 "shairport.c:1976" playback_mode is 0 (0-stereo, 1-mono, 1-reverse_stereo, 2-both_left, 3-both_right).
         0.000022240 "shairport.c:1977" disable_synchronization is 0.
         0.000020937 "shairport.c:1978" use_mmap_if_available is 1.
         0.000021042 "shairport.c:1980" output_format automatic selection is enabled.
         0.000020937 "shairport.c:1984" output_rate automatic selection is enabled.
         0.000021094 "shairport.c:1988" audio backend desired buffer length is 0.200000 seconds.
         0.000023125 "shairport.c:1990" audio_backend_buffer_interpolation_threshold_in_seconds is 0.120000 seconds.
         0.000023594 "shairport.c:1991" audio backend latency offset is 0.000000 seconds.
         0.000022812 "shairport.c:1993" audio backend silence lead-in time is "auto".
         0.000021094 "shairport.c:1997" zeroconf regtype is "_raop._tcp".
         0.000021093 "shairport.c:1998" decoders_supported field is 1.
         0.000021094 "shairport.c:1999" use_apple_decoder is 0.
         0.000020729 "shairport.c:2000" alsa_use_hardware_mute is 0.
         0.000021146 "shairport.c:2004" no special mdns service interface was requested.
         0.000064323 "shairport.c:2008" configuration file name "/usr/local/etc/shairport-sync.conf" resolves to "/usr/local/etc/shairport-sync.conf".
         0.000027395 "shairport.c:2014" metadata enabled is 1.
         0.000021563 "shairport.c:2015" metadata pipename is "/tmp/shairport-sync-metadata".
         0.000022031 "shairport.c:2017" metadata socket address is "(null)" port 0.
         0.000021510 "shairport.c:2018" metadata socket packet size is "500".
         0.000021354 "shairport.c:2019" get-coverart is 1.
         0.000020157 "shairport.c:2037" loudness is 0.
         0.000020468 "shairport.c:2038" loudness reference level is -20.000000
         0.000229322 "rtsp.c:3194" metadata pipe name is "/tmp/shairport-sync-metadata".
         0.013436514 "dbus-service.c:1054" *warning: could not acquire a Shairport Sync native D-Bus interface "org.gnome.ShairportSync.i9519" on the system bus.
         1.489757295 "shairport.c:212" "soxr" interpolation has been chosen.
        32.398243798 "rtsp.c:2307" Connection 1. Buffered Audio Stream Detected.
         0.008001845 "audio_alsa.c:900" Lowest dB value is a mute
         0.002661240 "audio_alsa.c:529" alsa: output format chosen is "S32".
         0.000176613 "audio_alsa.c:569" alsa: output speed chosen is 44100.

Thanks. I can think of two possibilities:

  1. For AirPlay 2, Shairport Sync relies on another program, nqptp, so it's worth checking that it is installed and running.
  2. There seems to be a rather large bug in macOS running on an Apple Silicon Mac: If the system has been asleep, the AirPlay 2 infrastructure does not seem to fully "wake up" afterwards. The only cure is to restart the Mac. This does not happen on Intel Macs or iOS devices, so it really seems to be a fault.

Would either one of those situations apply?

[Update] Yes, AFAWK AirPlay 2 support only works from macOS or iOS. It partly works from a HomePod, and we believe that it does not work from an Apple TV. Apologies if it is therefore inapplicable in your situation.

github-actions[bot] commented 3 years ago

This issue has been inactive for 60 days so will be closed 7 days from now. To prevent this, please remove the "stale" label or post a comment.

marshalleq commented 3 years ago

..

github-actions[bot] commented 2 years ago

This issue has been inactive for 60 days so will be closed 7 days from now. To prevent this, please remove the "stale" label or post a comment.

mikebrady commented 2 years ago

Shairport Sync now seems to work well (when built for AirPlay 2) on AppleTV. Make sure you are using the latest development version of Shairport Sync and the latest development branch of nqptp. Thanks.

github-actions[bot] commented 2 years ago

This issue has been inactive for 45 days so will be closed 7 days from now. To prevent this, please remove the "stale" label or post a comment.

yorhodes commented 2 years ago

has a fix for this been released? @mikebrady

mikebrady commented 2 years ago

has a fix for this been released? @mikebrady

AirPlay 2 support in still only the development branch, but that fix is in it and seems to be working well. Tested on the YouTube app on an Apple TV 4K fully up to date.

github-actions[bot] commented 2 years ago

This issue has been inactive for 45 days so will be closed 7 days from now. To prevent this, please remove the "stale" label or post a comment.