philippe44 / AirConnect

Use AirPlay to stream to UPnP/Sonos & Chromecast devices
Other
3.46k stars 217 forks source link

OS X: Can connect to renderer but no sound #292

Closed sk365 closed 3 years ago

sk365 commented 3 years ago

Hi, thank you for coding this App!
Using it on OS X I obviously can connect to a renderer (AVM) and it shows up in sound output list, but when selecting it no sound is played. Messages below. Could you please help? Best wishes, Stefan

SKs-MacBook-Air:~ stefan$ chmod +x /Users/stefan/Downloads/AirConnect-master/bin/airupnp-osx-multi SKs-MacBook-Air:~ stefan$ /Users/stefan/Applications/airupnp-osx-multi [18:40:15.194881] main:1385 Starting airupnp version: v0.2.27.0 (Aug 3 2020 @ 11:18:24) [18:40:15.195786] main:1393 no config file, using defaults [18:40:15.197090] Start:1103 Binding to 192.168.178.62:49153 [18:40:15.241946] AddMRDevice:991 [0x109914e80]: adding renderer (AVM FRITZ!MediaRenderer) [18:40:15.253635] MasterHandler:655 [0x109914e80]: subscribe success [18:40:19.063162] rtsp_thread:351 got RTSP connection 11 [18:40:19.067144] rtsp_thread:366 RTSP close 11 [18:40:33.691922] rtsp_thread:351 got RTSP connection 11 [18:40:33.695902] handle_rtsp:399 [0x7f8948408450]: challenge FmYxRNmV3HXHpgix2yb0Fg== [18:40:33.701126] handle_rtsp:392 [0x7f8948408450]: received ANNOUNCE

RTSP/1.0 200 OK Audio-Jack-Status: connected; type=analog CSeq: 2

[18:40:33.705763] handle_rtsp:392 [0x7f8948408450]: received SETUP

RTSP/1.0 200 OK Transport: RTP/AVP/UDP;unicast;mode=record;control_port=61997;timing_port=55989;server_port=61629 Session: DEADBEEF Audio-Jack-Status: connected; type=analog CSeq: 3

[18:40:33.707121] handle_rtsp:392 [0x7f8948408450]: received RECORD [18:40:33.707139] hairtunes_record:504 [0x7f8948500000]: record 0 0

RTSP/1.0 200 OK Audio-Jack-Status: connected; type=analog CSeq: 4

[18:40:33.708885] handle_rtsp:392 [0x7f8948408450]: received SET_PARAMETER [18:40:33.708918] handle_rtsp:559 [0x7f8948408450]: SET PARAMETER volume -20.000000 [18:40:33.708931] CtrlSetVolume:245 [0x109914e80]: uPNP volume 33 (cookie 0x0) [18:40:33.709296] callback:366 [0x109914e80]: Volume[0..100] 33

RTSP/1.0 200 OK Audio-Jack-Status: connected; type=analog CSeq: 5

[18:40:33.711450] rtp_thread_func:736 [0x7f8948500000]: 1st sync packet received [18:40:33.714696] handle_rtsp:392 [0x7f8948408450]: received SET_PARAMETER

RTSP/1.0 200 OK Audio-Jack-Status: connected; type=analog CSeq: 6

[18:40:33.715981] handle_rtsp:392 [0x7f8948408450]: received SET_PARAMETER

RTSP/1.0 200 OK Audio-Jack-Status: connected; type=analog CSeq: 7

[18:40:33.717267] handle_rtsp:392 [0x7f8948408450]: received SET_PARAMETER [18:40:33.717317] handle_rtsp:576 [0x7f8948408450]: received metadata artist: Johann Sebastian Bach, Leopold Stokowski, Symphonica Orchestra album:
title: Passacaglia - Remastered

RTSP/1.0 200 OK Audio-Jack-Status: connected; type=analog CSeq: 8

[18:40:33.717947] ActionHandler:540 Error in action callback -- 401 (cookie 0x0) [18:40:33.740959] rtp_thread_func:736 [0x7f8948500000]: 1st sync packet received [18:40:33.742855] handle_rtsp:392 [0x7f8948408450]: received FLUSH [18:40:33.742935] hairtunes_flush:474 [0x7f8948500000]: FLUSH ignored as same as RECORD (35667 - 931907676) [18:40:33.742966] hairtunes_flush:486 [0x7f8948500000]: flush 35667 931907676

RTSP/1.0 200 OK Audio-Jack-Status: connected; type=analog CSeq: 9

[18:40:33.753331] search_remote_cb:629 [0x7f8948408450]: found ActiveRemote for CE6D59C542519B9A at 192.168.178.62:52873 [18:40:33.771384] flac_init:218 [0x7f8948500000]: Using FLAC-0 (0x7f8948707710) [18:40:33.771508] buffer_put_packet:620 [0x7f8948500000]: fill [level:1] [W:35667 R:35667] [18:40:34.851577] AVTSetURI:91 [0x109914e80]: uPNP setURI http://192.168.178.62:53121/stream.flc (cookie 0x1) [18:40:34.852033] AVTPlay:151 [0x109914e80]: uPNP play (cookie 0x2) [18:40:34.902754] http_thread_func:1060 [0x7f8948500000]: got HTTP connection 17 (silent frames 0) [18:40:34.903660] handle_http:1243 [0x7f8948500000]: received GET

HTTP/1.0 200 OK Server: HairTunes Content-Type: audio/flac Connection: close

[18:40:34.903766] _buffer_get_frame:960 [0x7f8948500000]: drain [level:141 gap:587] [W:35808 R:35667] [R:0 S:0 F:0] [18:40:35.144355] http_thread_func:1079 HTTP close 17 [18:40:35.152267] http_thread_func:1060 [0x7f8948500000]: got HTTP connection 17 (silent frames 0) [18:40:35.155373] http_parse:1132 Request failed, bad header [18:40:35.155470] http_thread_func:1079 HTTP close 17 [18:40:35.271196] ActionHandler:517 [0x109914e80]: uPNP transition [18:40:35.778474] raop_notify:320 [0x7f8948408450]: sending airplay remote GET /ctrl-int/1/stop HTTP/1.0 Active-Remote: 2431414608 Connection: close

<== received ==> HTTP/1.1 200 OK Date: Sun, 01 Nov 2020 17:40:35 GMT Content-Length: 0

[18:40:35.778561] ActionHandler:522 [0x109914e80]: uPNP stopped [18:40:37.851722] buffer_put_packet:620 [0x7f8948500000]: fill [level:340] [W:36179 R:35840] [18:40:41.931650] buffer_put_packet:620 [0x7f8948500000]: fill [level:852] [W:36691 R:35840] [18:40:42.934655] handle_rtsp:392 [0x7f8948408450]: received TEARDOWN

[18:40:42.973231] AVTStop:217 [0x109914e80]: uPNP stop (cookie 0x8)

RTSP/1.0 200 OK Audio-Jack-Status: connected; type=analog CSeq: 14

[18:40:42.977340] rtsp_thread:366 RTSP close 11 [18:40:45.163798] rtsp_thread:351 got RTSP connection 11 [18:40:45.167659] handle_rtsp:399 [0x7f8948408450]: challenge FqWSRPIl2woDY/r12WWffg== [18:40:45.172933] handle_rtsp:392 [0x7f8948408450]: received ANNOUNCE

RTSP/1.0 200 OK Audio-Jack-Status: connected; type=analog CSeq: 2

[18:40:45.177350] handle_rtsp:392 [0x7f8948408450]: received SETUP

RTSP/1.0 200 OK Transport: RTP/AVP/UDP;unicast;mode=record;control_port=55229;timing_port=64081;server_port=59330 Session: DEADBEEF Audio-Jack-Status: connected; type=analog CSeq: 3

[18:40:45.178623] handle_rtsp:392 [0x7f8948408450]: received RECORD [18:40:45.178640] hairtunes_record:504 [0x7f8948500000]: record 0 0

RTSP/1.0 200 OK Audio-Jack-Status: connected; type=analog CSeq: 4

[18:40:45.180527] handle_rtsp:392 [0x7f8948408450]: received SET_PARAMETER [18:40:45.180555] handle_rtsp:559 [0x7f8948408450]: SET PARAMETER volume -20.000000 [18:40:45.180566] CtrlSetVolume:245 [0x109914e80]: uPNP volume 33 (cookie 0x9) [18:40:45.180771] callback:366 [0x109914e80]: Volume[0..100] 33

RTSP/1.0 200 OK Audio-Jack-Status: connected; type=analog CSeq: 5

[18:40:45.182589] rtp_thread_func:736 [0x7f8948500000]: 1st sync packet received [18:40:45.185241] handle_rtsp:392 [0x7f8948408450]: received SET_PARAMETER

RTSP/1.0 200 OK Audio-Jack-Status: connected; type=analog CSeq: 6

[18:40:45.186490] handle_rtsp:392 [0x7f8948408450]: received SET_PARAMETER

RTSP/1.0 200 OK Audio-Jack-Status: connected; type=analog CSeq: 7

[18:40:45.187922] handle_rtsp:392 [0x7f8948408450]: received SET_PARAMETER [18:40:45.187951] handle_rtsp:576 [0x7f8948408450]: received metadata artist: Johann Sebastian Bach, Leopold Stokowski, Symphonica Orchestra album:
title: Passacaglia - Remastered

RTSP/1.0 200 OK Audio-Jack-Status: connected; type=analog CSeq: 8

[18:40:45.189695] ActionHandler:540 Error in action callback -- 401 (cookie 0x9) [18:40:45.211804] rtp_thread_func:736 [0x7f8948500000]: 1st sync packet received [18:40:45.213487] handle_rtsp:392 [0x7f8948408450]: received FLUSH [18:40:45.213537] hairtunes_flush:474 [0x7f8948500000]: FLUSH ignored as same as RECORD (19873 - 2217148661) [18:40:45.213548] hairtunes_flush:486 [0x7f8948500000]: flush 19873 2217148661

RTSP/1.0 200 OK Audio-Jack-Status: connected; type=analog CSeq: 9

[18:40:45.214081] search_remote_cb:629 [0x7f8948408450]: found ActiveRemote for CE6D59C542519B9A at 192.168.178.62:52873 [18:40:45.242186] flac_init:218 [0x7f8948500000]: Using FLAC-0 (0x7f8949806c60) [18:40:45.242248] buffer_put_packet:620 [0x7f8948500000]: fill [level:1] [W:19873 R:19873] [18:40:45.332250] AVTSetURI:91 [0x109914e80]: uPNP setURI http://192.168.178.62:53143/stream.flc (cookie 0xa) [18:40:45.332746] AVTPlay:151 [0x109914e80]: uPNP play (cookie 0xb) [18:40:45.378330] http_thread_func:1060 [0x7f8948500000]: got HTTP connection 17 (silent frames 0) [18:40:45.379182] handle_http:1243 [0x7f8948500000]: received GET

HTTP/1.0 200 OK Server: HairTunes Content-Type: audio/flac Connection: close

[18:40:45.379284] _buffer_get_frame:960 [0x7f8948500000]: drain [level:17 gap:1581] [W:19890 R:19873] [R:0 S:0 F:0] [18:40:45.471085] http_thread_func:1079 HTTP close 17 [18:40:45.479167] http_thread_func:1060 [0x7f8948500000]: got HTTP connection 17 (silent frames 0) [18:40:45.482473] http_parse:1132 Request failed, bad header [18:40:45.482612] http_thread_func:1079 HTTP close 17 [18:40:46.287463] ActionHandler:522 [0x109914e80]: uPNP stopped [18:40:49.323144] buffer_put_packet:620 [0x7f8948500000]: fill [level:483] [W:20385 R:19903] [18:40:53.402949] buffer_put_packet:620 [0x7f8948500000]: fill [level:995] [W:20897 R:19903] [18:40:57.483279] buffer_put_packet:620 [0x7f8948500000]: fill [level:1507] [W:21409 R:19903] [18:41:01.592921] buffer_put_packet:620 [0x7f8948500000]: fill [level:2019] [W:21921 R:19903] [18:41:05.672865] buffer_put_packet:620 [0x7f8948500000]: fill [level:2531] [W:22433 R:19903] [18:41:09.752787] buffer_put_packet:620 [0x7f8948500000]: fill [level:3043] [W:22945 R:19903] exit [18:41:11.506360] main:1497 stopping devices ... [18:41:11.506391] Stop:1166 terminate update thread ... [18:41:11.506489] Stop:1171 flush renderers ... [18:41:11.506551] AVTStop:217 [0x109914e80]: uPNP stop (cookie 0x13)

[18:41:11.639004] Stop:1174 terminate libupnp [18:41:12.151238] Stop:1193 terminate main thread ... [18:41:12.151587] main:1499 all done SKs-MacBook-Air:~ stefan$

shexbeer commented 3 years ago

Same problem here, can connect but no audio at all Did try with a Google Nest Hub and a Sony HT-CT 800

Maybe for the records, i was using AirConnect

Got these warnings:

[15:12:19.901803] hairtunes_flush:474 [0xb5105408]: FLUSH ignored as same as RECORD (53340 - 1415800256)
[15:12:28.037703] _buffer_get_frame:918 [0xb5105408]: Buffer overrun 1024
[15:12:28.701663] _buffer_get_frame:918 [0xb5105408]: Buffer overrun 1042
[15:12:29.200732] _buffer_get_frame:918 [0xb5105408]: Buffer overrun 1025
[15:12:29.763310] _buffer_get_frame:918 [0xb5105408]: Buffer overrun 1031
[15:12:30.277469] _buffer_get_frame:918 [0xb5105408]: Buffer overrun 1025
[15:12:30.809881] _buffer_get_frame:918 [0xb5105408]: Buffer overrun 1025
[15:12:31.291935] _buffer_get_frame:918 [0xb5105408]: Buffer overrun 1025
[15:12:31.854089] _buffer_get_frame:918 [0xb5105408]: Buffer overrun 1031
[15:12:32.351671] _buffer_get_frame:918 [0xb5105408]: Buffer overrun 1025
timtn commented 3 years ago

Hi, thank you for coding this App! Using it on OS X I obviously can connect to a renderer (AVM) and it shows up in sound output list, but when selecting it no sound is played. Messages below. Could you please help? Best wishes, Stefan

Does your renderer actually support flac? Have you tried another codec like mp3 -c mp3?

philippe44 commented 3 years ago

The first comment is about a wrong http header sent by the player. I woud need "sdebug" to be activated to see what's going on. The second one looks totally different, like the usual firewall issue: the Nest does not request the audio (no GET) so as the audio continues to arrive from the AirPlay devices, internal buffer runs over all the time

sk365 commented 3 years ago

Does your renderer actually support flac? Have you tried another codec like mp3 -c mp3?

Yes, I tried to use mp3. Same error, same messages.

shexbeer commented 3 years ago

Hi, i provide the sdebug log here:

https://gist.github.com/shexbeer/b229a8ac25cfaec75914cb77b651a851

philippe44 commented 3 years ago

These was a missing item in my log statement so unfortunately it needs to be redone with version 0.2.28.4. Still, In the log, I don't see the error that happened previously. Can you rather clean the logfile, take a log and then zip and share it somewhere? It will be much more convenient.

philippe44 commented 3 years ago

Closed for inactivity