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
ffmpeg playback not working on MacOS #40
Comments
Muammar, any idea ? |
Can you try using the git repository with the |
Hi Muammar. I installed the git, flask and everything. running in node.js it works, but again not working in ffmpeg. as per your request, i ran the following command in Terminal
and this was response .... ('ALSA device name:', None)
self.cclist [u'ChromecastAudio1000'] List of Google Cast devices available in your network:Index Friendly name We will cast to first device in the list above! ChromecastAudio1000 def get_cc(self): Information about ChromecastAudio1000 DeviceStatus(friendly_name=u'ChromecastAudio1000', model_name=u'Chromecast Audio', manufacturer=u'Google Inc.', api_version=(1, 0), uuid=UUID('01006qc7-402b-bgcd-14g8-111190e7aef4'), cast_type='audio') Status of device ChromecastAudio1000 CastStatus(is_active_input=None, is_stand_by=None, volume_level=0.5199999809265137, volume_muted=False, app_id=None, display_name=None, namespaces=[], session_id=None, transport_id=None, status_text='') Switching to soundflower... The media type string used is: audio/mpeg Cast media controller status CastStatus(is_active_input=None, is_stand_by=None, volume_level=0.5199999809265137, volume_muted=False, app_id=u'CC1ED846', display_name=u'Default Media Receiver', namespaces=[u'urn:x-cast:com.google.cast.broadcast', u'urn:x-cast:com.google.cast.media'], session_id=u'5e1601ef-12af-1e35-1e60-0a1a7fd3defd', transport_id=u'5e1601ef-12af-1e35-1e60-0a1a7fd3defd', status_text=u'Ready To Cast') Ctrl-C to kill the application at any time ffmpeg version 3.2.2 Copyright (c) 2000-2016 the FFmpeg developers |
any update on this issue, Muammar ? |
I have been unable to reproduce this. As of writing this comment, I am casting from macOS with ffmpeg:
You can try the following:
Can you let me know if it works?. |
dear Muammar. i re-installed Soundflower, nice clean re-install, proper removal, reboot and reinstall. however, still no sound via ffmpeg. unfortunately, i can't get it to work on MacOS Sierra, neither from Terminal nor from .dmg package. |
Arrg. I have no idea at this point on what's going on in your case. When using node, you have no problem, isn't it?. Can you confirm that?. |
thnks Muammar. dont worry about it, thnx for your help. yes, when using node.js, it works. only with ffmpeg no sound coming out at all. i was interested in ffmpeg, to stream hi-res audio to chromecast (Tidal, 44.1kHz / 88.2kHhz and 96kHz, both 16-bit as well as 24-bit, using wav or flac via ffmpeg/Soundflower) |
PS - i would even be more than happy to pay for a working solution to get Mac Desktop audio to Chromecast Audio at high sampling-rates and bit-depth. all commercial solutions dont offer this for Mac (e.g. Airfoil only does 16-bit / 44.1kHz, as it is Airplay-protocol-based). as Tidal is now offering MQA file-streaming, there is obviously a large market for streaming un-folded MQA at 24-bit / 44.1 / 48 / 88.2 and 96 kHz to Chromecast, given Tidal only offers Chromecast support on mobile apps, and there it only goes up to 16-bit / 44.1kHz. so there is huge market for people looking to stream software-unfolded MQA from Tidal desktop App to Chromecast Audio. unfortunately there is nothing available to do this, right now. |
Yes, I understand. Try the following:
|
i get an error: "[AVFoundation input device @ 0x7ff8c740f5c0] Video device not found" |
what's the list you get when executing the above? |
ffmpeg -f avfoundation -list_devices true -i "" |
I think in your case the command should be:
Because we want to capture this:
Try again and tell me if it records something. |
i still get the same error - "[AVFoundation input device @ 0x7fe58fd02560] Video device not found also noticed that the device address is changing everytime i run an ffmpeg command, but maybe that's normal, i dont know |
Let's do things in a cleaner way. Without casting anything (just play anything you like in your browser or media player), open the sound preferences of your macbook pro and change http://cdn.osxdaily.com/wp-content/uploads/2013/02/redirect-system-audio-input-from-soundflower.jpg Then, list your devices with:
And use the index of your soundflower here:
I am suspecting that the default device I have set in the code is not working for you. What we need is to confirm that it is the case, so then, I can implement a solution for your problem. |
i tried, but still not working ! maybe also important to note, is that there is more than 1 device with same index !!! the Facetime camera's and (i don't know what this is, but still) Capture Screen, also have indices from 0 to 2, so maybe choosing 2 (as i did per your request), point to whatever Capture screen is, and not to Soundflower ? [AVFoundation input device @ 0x7f87e5500300] AVFoundation video devices: |
Yes, I think you are correct. Another way would be this one:
Note that there is an appended |
yes, it worked ! so what is that capture screen device that i have at same device number as soundflower, namely both on 2 ? i don't know what it is ! :-) and how do we get mkchromecast to work properly now we know this ? |
Holy s***! finally. I think this is very easy to fix. The thing is that the order of your devices is different. I may just try setting the device explicitly using its name?. Can you try this and tell me if it records something?
|
yes, it worked also with referring to soundflower explicitly. |
Thank you for your patience and feedback. Let me change the code in |
ok, great teamwork, Muammar !!! thanks so much, i appreciate your work ! |
Thank you :). Hopefully this commit 23fab81 solves the problem. Can you test it, please?. You need to checkout in |
ok, how do i install the development version of mkchromecast from terminal ? |
If I remember correctly, you had installed git and you had also downloaded the git repository. So you will need to get inside the
If you deleted the repository you cloned, you can from scratch do the following:
|
ok, didn't delete directory :-) so did first 3 command in directory, and tried
|
Can you do a |
hmmm, yeah, your change is showing up, so git install devel went ok, see below. so there must be something else going on ... commit 23fab81
|
thanks Muammar ! i had gone to sleep :-) but just tried, and it works ! great work, Muammar ! |
I am glad to know it works for you now!.
No cache file here. Everything is piped to the webserver.
What I do is to take the redirected input from soundflower (note that soundflower has a maximum of 48khz sample rate https://github.com/muammar/mkchromecast/wiki/Sample-rates). If I understand correctly soundflower maxium bit-depth is 32bits?. You can check more details in ffmpeg if you pass the
You are welcome, and thanks for reporting and making better the app. I am interested on understanding if the bit-depth is sent as I think. |
i don't really understand - if i go to audio/midi settings, i can choose the sample rates for SoundFlower (both input as well as output) to 44.1 / 48 / 88.2 / 96 / 176.4 and 192 kHz, always at 32-bit. so that leaves 3 questions:
lastly, i checked, launching with --debug parameter, and found something interesting (see full output below); here a summary:
Input #0, avfoundation, from ':Soundflower (2ch)': PS - i checked before, using JRiver to send audio to Chromecast Audio, and maximum quality it accepts without troubles is 192kHz sampling rate at 24-bit depth, both PCM / wav as well as flac files |
…devel * 'devel' of https://github.com/muammar/mkchromecast: Updated README> Quotations are not needed for setting the name of devices. This commit is related to #40. Device names are not ordered the same in different systems.
I have just checked again. I read elsewhere that last year the chromecast audio was resampling everything to 48khz. Now I believe it is not the case. That's why I was just talking about 48khz. I have just checked my laptop and I have the same options as you.
Yes, look at this line of code the command is taking the Soundflower input and then the resampling (or whatever is set) is done in the output part.
Yes, that's what would happen. In such a case, I believe I should add 88.2kHz as an option. The method is the method implemented in ffmpeg. I have no idea about those details to be honest.
I think that the output of the ffmpeg has to be modified to accomplish this. If you don't mind to test the changes I can try to fix it :). |
I think that WAV code is fine? Problem seems to be only with flac. I agree with you on that one.
|
I have modified the FLAC part to support the bitrate:
Now the output looks like:
Let me know if this is ok. |
Great work Muammar - both wav as well as flac encoding now streaming at full bit-rate ! |
such incredible value-for-money - streaming un-folded MQA at 24-bit / 88.2 / 96kHz with Chromecast Audio for $35 dollar in combination with mkchromecast ! |
@PePeHa Nice! I will close this bug report. But before doing so, do you think I should add |
if it's not too much extra work for you, i would add 88.2 as well as 176.4kHz. better would even be, if mkchromecast could automatically take over the Soundflower sample rate settings. in that latter case, Tidal could exclusively force the appropriate sample rate upon Soundflower, depending on the source file (so to 44.1, 48, 88.2 or 96kHz) and mkchromecast would automatically switch its ffmpeg sample rate accordingly. at the moment, i noticed that if sample rate is changed in Soundflower after mkchromecast is launched (so mkchromecast already running), for example when changing to a track with a different sample rate, i have to re-connect Chromecast from the mkchromecast panel or otherwise there is no sound any longer. would be nice if mkchromecast could do this automatically. if it would be easy to implement, that would be a very nice feature, but if it is too complex, i can live with this limitation and am more than happy with the way it works currently !!! thanks for all this great work Muammar ! i say, Nobel Prize for Music Chromecast Audio for you !!! |
On Wed, Feb 01, 2017 at 07:16:55AM -0800, PePeHa wrote:
if it's not too much extra work for you, i would add 88.2 as well as 176.4kHz.
That wouldn't be too much trouble to be added in the system tray.
better would even be, if mkchromecast could automatically take over the
Soundflower sample rate settings. in that latter case, Tidal could exclusively
force the appropriate sample rate upon Soundflower, depending on the source
file (so to 44.1, 48, 88.2 or 96kHz) and mkchromecast would automatically
switch its ffmpeg sample rate accordingly. at the moment, i noticed that if
sample rate is changed in Soundflower after mkchromecast is launched (so
mkchromecast already running), for example when changing to a track with a
different sample rate, i have to re-connect Chromecast from the mkchromecast
panel or otherwise there is no sound any longer.
I think that that would require more work to be done. At least detecting the
sample rate from source and change ffmpeg accordingly could be more possible.
would be nice if mkchromecast could do this automatically. if it would be easy
to implement, that would be a very nice feature, but if it is too complex,
i can live with this limitation and am more than happy with the way it works
currently !!! thanks for all this great work Muammar ! i say, Nobel Prize for
Music Chromecast Audio for you !!!
Thank you for noticing all of these issues with the codecs, it makes the
application better. You are more than welcome, and I LOL'ed a lot when reading
about being the Nobel prize for the CC audio.
|
glad you LOL'd - Stockholm is waiting for you ;-) |
* master: (96 commits) FLAC does support bitrate. This is related to #40. Fixed aac codec in macOS. Updated brew command for macOS. Updated README> Quotations are not needed for setting the name of devices. This commit is related to #40. Device names are not ordered the same in different systems. Qt 5.8.0. This commit is another attempt to issues #41, and #43. - Added support to 192000Hz sampling rate support. This commit closes #39. - Fixed a minimal problem with size of preferences pane. Update README.md - Updated to node 7.4.0. - Updated ChangeLog. Updated Makefile. Update README.md Updated README. A lambda function that passes clicked_item as an argument to the self.clicked_cc() method was added to cast_list(). This last method, sets the correct index and name of the chromecast to be used by self.play_cast() when a user click on the menu item. This issue was reported by Térence Clastres. --resolution flag is now working. First steps towards `--resolution` flag. Catching TypeError introduced by pull #38. - Fixed some if statements. - Some cleaning in the code. - Renamed flag from -f to -i. ...
i installed from your mac .dmg image, latest version 0.3.6, and in node, playback seems to be working (up to 320kbps, in mp3 - 500kbps mp3 not working either by the way), but if i select ffmpeg (and yes, i have installed full package with options as you described, via brew), MKCHROMECAST is not working, regardless of settings, mp3, flac, wav, anything - just no sound at all. what could be wrong ?
PS - i am using MacOS Sierra
The text was updated successfully, but these errors were encountered: