melchor629 / chromecaster-gui

Cast your computer audio to a Chromecast (Audio)
http://melchor9000.me/chromecaster-gui/
GNU General Public License v3.0
20 stars 0 forks source link

White noise with 1.0.6 too #10

Open kbalint opened 5 years ago

kbalint commented 5 years ago

Hi, I'm on Windows 10 [Version 10.0.17763.104] x64, and I see the following input devices: jegyzet

but all of them only plays white noise on my Android TV (casting from Chrome browser / Android works flawlessly). Any hints to debug? Thanks!

melchor629 commented 5 years ago

Hi, in the folder of the .exe should be some logs, you can start with that. Also, can be a good idea to run the app with a PowerShell (drag & drop the executable and press enter should work), it will show you more logs (including audio system logs).

What format are you trying to cast? The ones I didn't test on Windows are WAV HD and FLAC HD (96KHz/24bit). I will try to do some tests with windows and post them here.

Thanks for reporting the issue :)

melchor629 commented 5 years ago

I've been testing for a while and I think there's something wrong with the executable (it's only a guess). After rebuilding the app and testing, it seems that some weird noises I heard, disappeared. And also I can confirm that both untested formats works perfectly on Windows.

I let you the testing build here to give it a try. Also, try to change the quality setting.

Edit: You can try something, if you listen to http://localhost:9877 (in VLC for example), that's the audio that Windows gives to the app, and http://localhost:9876 is the audio stream that chromecasts and so uses to play. Could be a good idea to see if the error comes from the encoder (last link) or from the audio capturing system (first link).

kbalint commented 5 years ago

Hi, thanks for the reply. If I connect a mic to the desktop, I can hear it on the :9877 port with 1sec delay, and on the Chrome device with a 3sec delay with the new build. But no other sound, just what the mic receives - I thought all desktop sound will be forwarded via some virtual driver? Thanks!

melchor629 commented 5 years ago

For desktop sound, some audio drivers offers a virtual device to use as a "mic" called "Stereo Mix" or "Loopback" (see this image). In case you don't have any virtual device like those mentioned, wait for something I just found for Windows to capture audio from the desktop (I have to test it correctly before adding it :).

The delays is something difficult to me to fix (Google devices likes to buffer for a long time).

kbalint commented 5 years ago

Unfortunately I don't have a loopback sound device :( My 2 cents: I know ffmpeg can grab the audio out perfectly [nearly] real time (works on my machine):

ffmpeg -f dshow -i audio="virtual-audio-capturer" output.mkv

but can't really grasp how to put the udp/rtp stream under http; or if the output is redirected to a file, make it available to clients for reading.

melchor629 commented 5 years ago

Well, the ffmpeg-thing is really easy to use, but I think it is really complicated to put on the app. But is a good idea by the way. The drawback is that ffmpeg is really heavy because has a lot of utilities and codecs.

Any way, I think I managed to apply a patch from Audacity that allows users to capture the output of something. That should help you to send your computer's audio without having a virtual device (as I mentioned before). The testing build is at the same link.

captura de pantalla 2018-10-26 a las 16 56 41

In the image above, you can see that my Speakers ("Altavoces" in the image) appears as input device, but its name ends with (loopback). These are the output devices that Windows allow the app to capture as input device, and so, you may now send your desktop sound to the Chromecast (or anything similar from Google).

My few tests run really well, but please try it as well. Hope it helps solve your issue :)

(Edit): I've tested on a MacBook Pro with Windows, and the trick does not work (Audacity has the same issue). Seems to be dependant on the driver you have installed, but it's something.

kbalint commented 5 years ago

Hi, I see the loopback interface, but in all variations (flac/mp3/wav), it always says 'unsupported audio format' in the debug window, but does not even start the cast up (no UI showing on the chromecast device)

melchor629 commented 5 years ago

It seems that it is not supported (the loopback device) with your driver. I think I cannot do anything more to solve that specific issue of capturing desktop audio :(