chromecaster-gui icon indicating copy to clipboard operation
chromecaster-gui copied to clipboard

White noise with 1.0.6 too

Open kbalint opened this issue 6 years ago • 8 comments

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!

kbalint avatar Oct 23 '18 22:10 kbalint

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 avatar Oct 24 '18 08:10 melchor629

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).

melchor629 avatar Oct 24 '18 11:10 melchor629

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!

kbalint avatar Oct 25 '18 17:10 kbalint

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).

melchor629 avatar Oct 26 '18 08:10 melchor629

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.

kbalint avatar Oct 26 '18 12:10 kbalint

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.

melchor629 avatar Oct 26 '18 15:10 melchor629

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)

kbalint avatar Oct 29 '18 18:10 kbalint

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 :(

melchor629 avatar Oct 30 '18 19:10 melchor629