masmu / pulseaudio-dlna

A lightweight streaming server which brings DLNA / UPNP and Chromecast support to PulseAudio and Linux
GNU General Public License v3.0
1.25k stars 162 forks source link

Chromecast Audio connects but doesn't play audio #347

Open jfrench206 opened 6 years ago

jfrench206 commented 6 years ago

Hi, everything appears to be working, terminal output confirms connection and I hear the sound when connected to Chromecast, but no audio ever comes thru. Chromecast works fine with other sound sources (streaming from Chrome, or Spotify).

Ubuntu 16.04 LTS pulseaudio 8.0 Installed pulseaudio-dlna via apt Running as root seems to make no difference.

Terminal output:

$ pulseaudio-dlna 05-29 15:31:49 pulseaudio_dlna.application INFO Using version: 0.5.2 05-29 15:31:49 pulseaudio_dlna.application INFO Using localhost: 192.168.1.110:8080 05-29 15:31:49 pulseaudio_dlna.application INFO Encoder settings: 05-29 15:31:49 pulseaudio_dlna.application INFO \ 05-29 15:31:49 pulseaudio_dlna.application INFO \ 05-29 15:31:49 pulseaudio_dlna.application INFO \ 05-29 15:31:49 pulseaudio_dlna.application INFO \ 05-29 15:31:49 pulseaudio_dlna.application INFO \ 05-29 15:31:49 pulseaudio_dlna.application INFO \ 05-29 15:31:49 pulseaudio_dlna.application INFO \ 05-29 15:31:49 pulseaudio_dlna.application INFO \ 05-29 15:31:49 pulseaudio_dlna.application INFO \ 05-29 15:31:49 pulseaudio_dlna.application INFO \ 05-29 15:31:49 pulseaudio_dlna.application INFO \ 05-29 15:31:49 pulseaudio_dlna.application INFO \ 05-29 15:31:49 pulseaudio_dlna.application INFO \ 05-29 15:31:49 pulseaudio_dlna.application INFO \ 05-29 15:31:49 pulseaudio_dlna.application INFO \ 05-29 15:31:49 pulseaudio_dlna.application INFO \ 05-29 15:31:49 pulseaudio_dlna.application INFO \ 05-29 15:31:49 pulseaudio_dlna.application INFO \ 05-29 15:31:49 pulseaudio_dlna.application INFO \ 05-29 15:31:49 pulseaudio_dlna.application INFO \ 05-29 15:31:49 pulseaudio_dlna.application INFO \ 05-29 15:31:49 pulseaudio_dlna.application INFO \ 05-29 15:31:49 pulseaudio_dlna.application INFO Codec settings: 05-29 15:31:49 pulseaudio_dlna.application INFO \ 05-29 15:31:49 pulseaudio_dlna.application INFO \ 05-29 15:31:49 pulseaudio_dlna.application INFO \ 05-29 15:31:49 pulseaudio_dlna.application INFO \ 05-29 15:31:49 pulseaudio_dlna.application INFO \ 05-29 15:31:49 pulseaudio_dlna.application INFO \ 05-29 15:31:49 pulseaudio_dlna.application INFO \ 05-29 15:31:49 pulseaudio_dlna.pulseaudio INFO Could not get default sink. Perhaps there is no one set? 05-29 15:31:49 pulseaudio_dlna.pulseaudio INFO Added the device "Garage Speaker (Chromecast)". 05-29 15:31:49 pulseaudio_dlna.pulseaudio INFO on_device_updated "/org/pulseaudio/core1/sink11" 05-29 15:31:50 pulseaudio_dlna.pulseaudio INFO _async_handle_sink_update /org/pulseaudio/core1/sink11 05-29 15:31:50 pulseaudio_dlna.pulseaudio INFO Instructing the device "Garage Speaker (Chromecast)" to play ... 05-29 15:32:00 pulseaudio_dlna.pulseaudio INFO The device "Garage Speaker (Chromecast)" is playing. 05-29 15:32:00 pulseaudio_dlna.pulseaudio INFO _async_handle_sink_update /org/pulseaudio/core1/sink11 finished!

VGrol commented 6 years ago

I've encountered a similar issue on Arch. The Chromecast confirms reception and displays the playing application from the correct machine, although no audio comes through.

minsonj2016 commented 6 years ago

Have you installed/run pav (pulse audio volume control) and had a look at what it thinks ? See attached file for what my 2 chromecast audio's show up as screenshot_20180608_154716

OvermindDL1 commented 6 years ago

Are you sending audio to them via pulseaudio source/sink setting? They won't by default until you redirect a program to them.

minsonj2016 commented 6 years ago

Here is a screenshot of pav playback tab showing application 'Amarok' directed to 'Porch'

woops no file attached . hold

minsonj2016 commented 6 years ago

screenshot_20180608_162230

minsonj2016 commented 6 years ago

I upgraded to Fedora 28 yesterday and have found that its default firewalld/iptables settings are causing the same symptom as yours . I turned off firewalld and it starts working again . I dont rememer having this issue on Fedora 27 . This may or may not have anything to do with your issue .

ivazqueznet commented 6 years ago

I managed to get it to work by opening the port pulseaudio-dlna was using for its server (8080 by default).

ohle commented 6 years ago

I have the same issue; no firewall in the way. I occasionally hear a little connection sound from the chromecast when switching to it / changing volume, but never the actual audio I'm sending. Chromecast works fine with other sources.

ohle commented 6 years ago

OK, in my case it seems like the reason was that the port (8080) was in use, and I missed the corresponding error message because it says

07-05 23:25:40 pulseaudio_dlna.application                    INFO     Using localhost: 192.168.0.16:8080

followed by 31 lines of encoder settings and only then

07-05 23:25:40 pulseaudio_dlna.streamserver                   CRITICAL The streaming server could not bind to your specified port (8080). Perhaps this is already in use? The application cannot work properly!
minsonj2016 commented 6 years ago

shouldn't someone close this ? :}

On 07/04/2018 07:11 PM, ivazqueznet wrote:

I managed to get it to work by opening the port pulseaudio-dlna was using for its server (8080 by default).

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/masmu/pulseaudio-dlna/issues/347#issuecomment-402570248, or mute the thread https://github.com/notifications/unsubscribe-auth/AjMKnNFFgAx1QPf8C-J1NAZmsZU5rHAGks5uDUuLgaJpZM4USLft.

sim590 commented 6 years ago

I have the same issue as @jfrench206 right now and also when I interrupt the process after a few seconds, let's say 5 seconds, the music starts playing right after and indeed stops after 5 seconds. I have attached two log files bellow. The first without --debug and the latter with the debug flag. I make sure that I use an available port with --port 8081. If that can help, I have also provided the list of packages that I did upgrade recently because I don't recall having this issue before upgrading.

pdlna.log pdlna-debug.log apt-history.log

sim590 commented 6 years ago

Update: it seems like the bug, at least for me, is about a long delay instead of just not playing audio. The delay was about 38 seconds the last time I tested.

sim590 commented 6 years ago

Update again (it's more interresting): the bug occurs with mkchromecast too so may be this bug (at least mine) is not related to pulseaudio-dlna exclusively? @jfrench206 have you tried mkchromecast?

ivazqueznet commented 6 years ago

The latency is because of the DLNA client within the Chromecast itself; there is nothing computer-side that can be done about it aside from using a lower latency interface that may or may not exist.

jfrench206 commented 6 years ago

@sim590 yes I've tried mkchromecast, and was unable to get it to work either. See my thread here: https://github.com/muammar/mkchromecast/issues/199

jfrench206 commented 6 years ago

Reading back, I have yet to test if the "port in use" issue is what I'm encountering. I'm currently traveling, but will take a look in a couple weeks.

sim590 commented 6 years ago

@ivazqueznet Up until a few weeks, the same chromecast device did work with no delay like that. How is that consistent with your comment? I'm not following. Please explain further.

Did the chromecast device receive an update and now creates a delay since then? If Chrome browser can stream to the chromecast without delay how is it that other programs can't?

Also, I have tried with castnow and there is absolutely no delay. I acknowledge that the two projects may differ in many ways, but I have difficulty accepting that it's on the chromecast's side.

PureTryOut commented 5 years ago

I'm not sure how this thread went from "not hearing any sound" to "I don't have the same issue but I'm having a delay". Please keep threads on-topic, and make new ones for other issues.

Anyways, I have the issue of OP atm. According to the log it binds to 8080 fine so that isn't the issue. The Chromecast does display a screen indicating it's connected, and according to the logs everything is fine, but I hear nothing.

Leatherface75 commented 5 years ago

Same problem here with openSUSE with no firewall and it connects as it should. Also tried changing codec settings without results.