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

Unexpected error when casting to Google Home #9

Open melchor629 opened 5 years ago

melchor629 commented 5 years ago

screenshot 2

This is the issue I'm getting could you please let me know what Audio input should be I tried everything it's not working. I'm using google home and trying to cast my pc Audio to Google home Appreciate your work and time

Originally posted by @dharmendrachauhan in https://github.com/melchor629/chromecaster-gui/commit/9ee90142563996cc3629e89e5df8f168ef21654d#commitcomment-30871372

melchor629 commented 5 years ago

Hi, try running the app from a PowerShell. You can do it by opening the PowerShell and drag&drop the executable into it and then pressing enter. You will see the app running, but the PowerShell fill with a text. Do whatever you do to make it crash and then grab that text (from the PowerShell) and paste it here or in a gist. This will be useful to know what is going on under the hood.

melchor629 commented 5 years ago

screenshot 3 i tried using powershell same issue please have a look.

config:reply:selectedAudioDevice [Windows WDM-KS] Stereo Mix (Realtek HD Audio Stereo input) config:reply:selectedQuality 128 connectChromecast called with args: 'Dining room Speaker', '[Windows WDM-KS] Stereo Mix (Realtek HD Audio Stereo input)', '128' discoverChromecasts:error sent with ("First search for a Chromecast") discoverChromecasts called discoverChromecasts:reply sent with {"addresses":["192.168.0.173"],"type":"Google Home Mini","name":"Dining room Speaker"} connectChromecast called with args: 'Dining room Speaker', '[Windows WDM-KS] Stereo Mix (Realtek HD Audio Stereo input)', '128' Pin:932137f0, DataRange:0 FormatSize:88, SampleSize:0 MaxChannels:2 Bits:16-32 SampleRate:48000-48000 Pin:932137f0, DataRange:0 FormatSize:88, SampleSize:0 MaxChannels:2 Bits:16-32 SampleRate:48000-48000 Error: Unsupported audio format at EventEmitter.electron.ipcMain.on.tt.connectChromecast (C:\Users\Dharmendra\Downloads\Compressed\Chromecaster-1.0.5-win\resources\app.asar\main.js:279:14) at emitMany (events.js:147:13) at EventEmitter.emit (events.js:224:7) at WebContents. (C:\Users\Dharmendra\Downloads\Compressed\Chromecaster-1.0.5-win\resources\electron.asar\browser\api\web-contents.js:286:13) at emitTwo (events.js:126:13) at WebContents.emit (events.js:214:7)

https://github.com/melchor629/chromecaster-gui/commit/9ee90142563996cc3629e89e5df8f168ef21654d#commitcomment-30877130

melchor629 commented 5 years ago

It seems that with your current audio setup, the app cannot capture your internal audio (Unsupported audio format) and that's kind weird because the default configuration is basic enough that every computer should work out of the box (sample rate of 44100Hz and bit depth of 16bit).

Check if you can change the configuration of the internal audio device (look for it in the speaker icon in the task bar, at the left) to match these settings. It should be called "CD Quality" probably. But is a guess, it is a long time since I last used Windows...

Meanwhile, I will try to change the error message for one more clearer.

dharmendrachauhan commented 5 years ago

I'll check it and let you know Thanks for the reply. I really appreciate your time and efforts Thank you

dharmendrachauhan commented 5 years ago

I'm getting same error tried to change the input frequency and other stuff still same sharing what option i have screenshot 4

melchor629 commented 5 years ago

I'm impressed with that, wow. I'm loosing all my ideas I have in this issue. I'm sorry to not be able to help you further more :(

I uploaded a new version that now shows an error instead of closing the app. Maybe it helps a bit. Try it and tell me what error you are getting or if it is still crashing.

One thing to note is that I use the same library as Audacity. So, if it goes well there, should go in my app. (If you don't know what app I'm talking about, is an open source multi-platform app for editing audio).

dharmendrachauhan commented 5 years ago

Thanks for the reply, this time it is not giving an error for closing but unfortunately it's working. I tried to run using powershell not sure what it says. I know about Audacity app i used that in the past but Downloaded again today as you said but not sure what to do with that as Chromecaster app is unable to cast any sort of music to my google home. looks like i have to forget about casting and need to think for some other stuff he he. appreciate your time and efforts screenshot 5

melchor629 commented 5 years ago

About the Audacity, the issue has to do with the capturing audio from your computer (you can see the error in the latests lines of the PowerShell). This code is almost the same as Audacity, so if in Audacity works but not in my app, it will tell us that the issue is indeed in my code.

Well, you can always try to cast in other formats different from MP3 128 (like FLAC HD or WAV HD) or try any other app to cast (VLC can now cast to Chromecasts for example).

Anyway, it seems to be an issue with my code, but as I cannot reproduce that, I'm not be able to fix it. I'm so sorry :(

Thanks for posting the issue and helping to solve it :)