muammar / mkchromecast

Cast macOS and Linux Audio/Video to your Google Cast and Sonos Devices
http://mkchromecast.com
Other
2.21k stars 137 forks source link

connect to chromcast audio but no audio #152

Open renaudh opened 6 years ago

renaudh commented 6 years ago

I am using a chromecast audio, and try to stream sound to it, it connects fine, make the typical sound but no audio. I have installed soundflower 2.0b2, both from dmg, pkg, command line, the verified version, rebooted, rebooted again, it seems to work when I check in input in sound system preference, but no audio coming out of the loudspeakers. The other funny thing is the warning about incoming network connections even though mkchromecast is in the exception list... and even after i quit the application (?)
I had firewall off when i tried though. Any suggestion what to try ?
I am using macbook air 10.12.6

cmclaughlin commented 6 years ago

Same here

beaverc commented 6 years ago

Is there any update on this?

I think I've got the same problem on Mac OS High Sierra (10.13.4) when installing both soundflower and mkchromecast through brew. Funnily enough, adjusting the volume control in the mkchromecast settings produces sound on my speakers, but none of the system audio is being sent to them.

Any suggestions? Is soundflower not redirecting the audio correctly? How can I check?

Note that the exact versions of the packages installed through brew are: Soundflower 2.0b2 Mkchromecast 0.3.8.1

muammar commented 6 years ago

Can you verify that soundflower is the output and input in your sound preferences?

beaverc commented 6 years ago

Hi Muammar,

Thanks for your quick reply!

I can indeed confirm that soundflower (2ch.) is selected as both input and output - see screenshots:

audio_1 audio_2

When I have music playing (eg, in YouTube) I can also see that there is a signal in the input section, but still no sound in speakers.

FYI, the volume control in the mkchromecast drop-down menu is set to maximum.

Thanks, Chris

beaverc commented 6 years ago

Hi Muammar,

I tried running the python3 application straight from GitHub in the hope to get some useful output and indeed there seem to be quite some error messages. See the attached stdout and stderr log files.

Any idea what the missing library "/usr/local/opt/icu4c/lib/libicui18n.60.dylib" is? It seems to be related to the node backend..

Thanks in advance, stderr.log stdout.log

Chris

muammar commented 6 years ago

@beaverc thanks for these logs. That is the problem, the icu4c is not there and the node backend is trying to find it. I have to try and fix this issue. Do you use homebrew?

beaverc commented 6 years ago

@muammar that's right, I'm using homebrew.

muammar commented 6 years ago

@beaverc can you install this formula? http://brewformulas.org/Icu4c and see if it makes it work?

beaverc commented 6 years ago

@muammar after running "brew install icu4c" I can indeed see the lib in the folder with the exception that it seems to be the wrong version. The lib I now have installed is "libicui18n.61.1.dylib" whereas node is looking for "libicui18n.60.dylib".

beaverc commented 6 years ago

@muammar I'll try and install version 60 somehow..

muammar commented 6 years ago

Thank you. So that is the whole problem. Libraries were not compatible. Building the macOS bundle is a PITA. I have a virtualbox machine in order to emulate old processors otherwise the created bundle only works for 2015 upwards (I have a macbook pro 2015). I will try to fix this. It is maybe time for another release soon.

beaverc commented 6 years ago

Hi @muammar

Thank you so much for your helpful feedback so far!

I'm not a homebrew expert, but it seems to be impossible for me to install any other version. Do you think I can (easily) update the version pointed to by node somehow? If not I will have to wait patiently :).

Thanks, Chris

muammar commented 6 years ago

In the interim, you can try to install ffmpeg with homebrew and use that backend instead of node.

beaverc commented 6 years ago

@muammar Using ffmpeg as backend works fine. Just in case anyone needs instructions, the following worked for me:

brew install ffmpeg
export PATH=$PATH:/usr/local/Cellar/ffmpeg/3.4.2/bin/
python3 mkchromecast.py --encoder-backend ffmpeg --control

Didn't try running the tray icon or making a .app - think I'll just wait for the next release now that I have a workaround.

Cheers, Chris

muammar commented 6 years ago

@beaverc nice it worked.

Didn't try running the tray icon or making a .app - think I'll just wait for the next release now that I have a workaround.

The tray icon should work, too. Best.

muammar commented 5 years ago

Can you try this DMG file and see if the problem with libicui is still there, please? @beaverc

https://drive.google.com/drive/folders/1yOMEaW7OWkbH3niCxitxIydV36QJjdYl?usp=sharing

beaverc commented 5 years ago

Hi, sorry for the late reply. I copied the DMG to my /Applications folder and ran it but it doesn't produce a menu bar icon. Do I have to install anything else or is the DMG supposed to be self contained? I tried to run the app using the open command to see if it outputs any kind of error messages, but it just runs in the background and does nothing. I can see the process running with top after launching it. Any ideas?

cmclaughlin commented 5 years ago

I also tried the DMG... it crashed upon launching.

domohawk commented 5 years ago

The fix:

  1. brew cask install mkchromecast
  2. brew install ffmpeg
  3. Start Mkchromecast, in Preferences from taskbar icon change backend to "ffmpeg"
  4. Select Soundflower in your app output or System sound output settings

It seems the default "node" backend is broken, if you don't do step 3 it will connect but have no sound. You might also have to "brew cask reinstall soundflower" before the icon shows up in 3, at least I think I did.

Xeboc commented 4 years ago

I was able to find the way to get node working on the current macOS Catalina, version 10.15.3. To get the correct version of icu4c, run these commands:

brew install node
brew reinstall https://raw.githubusercontent.com/Homebrew/homebrew-core/fb928fcb69debc71e9fbaf2ada5919f180f9667c/Formula/icu4c.rb
brew switch icu4c 60.2

This brings in node version 13.8.0, which I found to work. Node brings in icu4c version 64.2 on Catalina, and icu4c 60.2 is no longer available from just running brew install icu4c@60.2 so it has to be reinstalled from the specific commit that had the information available to install it. The concept came from this conversation:

https://gist.github.com/berkedel/d1fc6d13651c16002f64653096d1fded#gistcomment-3036612

This commit is where version 60.2 was added to homebrew-core:

https://github.com/Homebrew/homebrew-core/commit/86ff03fbfcb44a6bdd3b0662854922a8185db910

But they didn't do the checksums until this commit:

https://github.com/Homebrew/homebrew-core/commit/fb928fcb69debc71e9fbaf2ada5919f180f9667c

Any commit up until they pulled that install code can be used for version 60.2. The other option is to bring in an older version of node (8, I think) from around the High Sierra days, which depends on icu4c 60.2. Node@10 is the oldest available in Catalina, and depends on icu4c 64.3 also, so digging through commits is needed for older versions of Node.

Node 13 itself won't run until you switch its dependency back to the current version of icu4c:

brew reinstall icu4c

Dependencies are always a moving target! Now if I could just figure out how to get the ffmpeg backend to work, I can get drop the 16s delay down to the 6s I have on my Ubuntu box....

Great software @muammar! Keep up the good work!