SamDel / ChromeCast-Desktop-Audio-Streamer

Stream the sound of your desktop to your Chromecast Audio device
MIT License
416 stars 30 forks source link

Development 1.9 #23

Closed SamDel closed 5 years ago

SamDel commented 5 years ago

@FA-Bubba Let's discuss 1.9 development here.

In 1.9.40 the systray issue, and the issue to stop a 'buffering' device are fixed. And some changes to make the application more stable.

yevaman commented 5 years ago

Hi, A little question there. I own lot of Hi Res FLAC ( 96hz) And I see that the output is "limited" to wav 44100. So the google Cast do not received the real quality of my file. Is there a way to had this support to stream directly the real quality of my file ? Thans for your work

Regards

SamDel commented 5 years ago

No, that's not possible. This application captures the audio from the soundcard, that's always wav. In the coming release there's an option to stream in mp3 format (320 or 128 kbps). Then the captured wav is encoded to mp3 format.

The advantage of this application is that you can use any music player, but the files are not streamed in the original quality. Chromecast supports the flac format, so maybe there are other tools out there!

FA-Bubba commented 5 years ago

OK. I downloaded & installed v1.9.40 this morning, and will post discoveries here as appropriate. AVG still complaining, and I am still clicking "Run Anyway"... On startup, all Speakers and Groups populated into the Device Window. The SysTray icon list does not have any Dupes. I selected the "ALL Speakers" Group; the Device Box eventually showed "Playing..."; but no audio was heard. I de-selected the Group, and selected each individual speaker; they 'bleeped' and began streaming music. Lag seems minimal (using MP3 320)... Will monitor this throughout the day. Stay tuned...

SamDel commented 5 years ago

I also noticed that groups are not as fast as individual devices. I think all devices in the group have to be ready first. I have a speaker with built in Chromecast that takes a lot longer to 'wake up' than the Chromecast audio devices.

I also found out why the devices didn't respond anymore. It was the pause function. If you pause a device and wait for one or two minutes all devices go off-line. I removed the pause button, I'll drop a new version later!

SamDel commented 5 years ago

1.9.40 is doing very well, in 1.9.45 I changed:

FA-Bubba commented 5 years ago

v1.9.40 worked very well for me. Once, when I stopped the stream at the source, all speakers dropped off-line, and I had to restart them after I restarted the source (I think you may have mentioned that would happen) -- I did NOT have the "Automatically Restart..." box checked....

I just installed v1.9.45: I selected "English as the language", but the choice does not "stick" in the field. Sync between speakers is not as close as in previous version, but the previous sync may have been just luck?

By the way, the main tab does not have a label, maybe something like "Main" or "Home" would be meaningful?

FA-Bubba commented 5 years ago

v1.9.45 worked OK until it had a 'hiccup' after about 3.5 hours of Streaming (see annotated pics below)... The App would not let me re-activate any of the speakers, so I unloaded the App, and relaunched it. All of the speakers are now playing (NOT using Speaker Groups yet):

v1-9-45-closedcasting

v1-9-45-closedcasting-2

SamDel commented 5 years ago

Did you check the event viewer (system logs)? It looks like a network hiccup.

I had something similar yesterday, playback stopped, in the system logs there was a line that the WLAN driver stopped working at the same time. The driver was restarted automatically a little while later.

It takes a while now to detect connect errors, see also this issue. There is also an issue with recovering automatically after a network hiccup in 1.9.45, that's fixed in the next version.

FA-Bubba commented 5 years ago

I checked the Event Viewer yesterday when I discovered the App had stopped, but there were no significant events in the previous 24 hours...

v1.9.45 has been running continuously for the past 22 hours.

You referenced the "next version" -- when do you want me to move to that version?

SamDel commented 5 years ago

Here's 1.9.47, I changed:

And your observations:

FA-Bubba commented 5 years ago

OK, I have installed v1.9.47, and it is running now. No issues on initial startup; I selected each speaker and heard the 'bleep'; they all played, and initially have minimal lag -- I will continue to monitor that throughout the playback.

The "Devices" label is fine (it was another choice I had thought of)...

I will let you know of any observations if/when they occur.

Cheers!

GrahamDLL commented 5 years ago

Using 1.9.47.

I switched off my wifi so that it would be easy to test disconnection by unplugging the ethernet cable for a Chromecast.

I used a Chromecast group to stream to three devices. The system recovered and restarted playing after disconnections of one device for up to about 15 seconds ... see the attached log.

I have tested several scenarios and your software performs as well as the Google software when using the Cast button in the Chrome browser.

Curiously, the names of devices became muddled during many tests ... this happened in your software and in the Google software. During the test in the attached log ... the device called Livingcast was displayed on the Devices tab as Bedcast. I have a Chromecast called Bedcast but is was powered off throughout this testing. As I type, the Cast button in the Chrome browser is telling me that Kitcast is "Available" and that Livingcast is "Casting: Desktop Stream" even though both are casting the same stream using your software.

It appears that Chromecast devices have trouble staying in sync when disconnections occur.

Overall, my opinion is that you are handling disconnections well enough.

log001.txt

GrahamDLL commented 5 years ago

The device status displayed in the bottom of the device box continues to show "Not connected" after a device starts streaming.

FA-Bubba commented 5 years ago

I've been running v1.9.47 for two days... Frequent individual speakers dropping off line; sometimes they reconnected automatically within a few minutes; other times, I had to manually select the speaker in the Device Box, but was not always successful.

I eventually unloaded & reloaded the App, but various speakers continued to drop off line frequently. Nothing in the Event Viewer to indicate a cause. Does not seem as stable as v1.9.45.

SamDel commented 5 years ago

Setup 1.9.48.zip

@FA-Bubba : I reverted the 'Connect errors are detected faster' changes in 1.9.48. I think these changes were causing the problems.

@GrahamDLL :

FA-Bubba commented 5 years ago

OK, Thank you... I loaded v1,9,48. It started up OK, recognizing all speakers and groups. I activated individual speakers, and all but 1 buffered, and began play right away. I clicked to close the outlier, then restarted it, and it came on line without any further issues.

I played with the individual volume controls, and all speakers are playing with minimal lags (almost unnoticeable). I'll let this run for a day or longer and let you know if there are any issues.

Cheers!

GrahamDLL commented 5 years ago

With 1.9.47 ... Streaming to a group of three devices. After a lengthy period of streaming without incident ... all three devices stopped playing for no reason that I could see. I did nothing and after about fifteen seconds (a possibly not very accurate estimate) all three devices started playing again.

Moments later, the phone rang and I clicked the group icon to stop streaming. The phone call was at about 12.42 so the lost connection would have been a minute or so earlier. Log is attached.

I will update to 1.9.48 promptly.

log002.zip

GrahamDLL commented 5 years ago

@GrahamDLL :

* Thanks. I looked at the log, it looks like your devices don't have a static IP address. That's why the device names became muddled. If it happens frequently you can check the DHCP settings in your network (router). On my router there's an option to '...always assign fixed IP addresses...' for devices.

I can (and will) give the Chromecast devices static IPs ... but most folk won't want the hassle ... the attached shows the problem ... you are showing two Bedcasts and no Livingcast ... Google software is listing them correctly.

capture01

GrahamDLL commented 5 years ago

You might want to re-visit the language naming plan for the dropdown list on the Options tab.

When you add, for example, German ... you will need to update the French and English translations to add Allemand and English ... when you add Spanish ... you will need to update the French and English and German translations to add Espagnol and Spanish and Spanisch ... when you add the 50th language ... you will need to update each of the previous 49 ... perhaps the dropdown list should always show English as "English" irrespective of the language used for everything else ... :) :)

GrahamDLL commented 5 years ago

Are you making life hard for yourself by letting us click on multiple devices to stream to those devices?

I don't think that I have seen this option in any other software. I'm pretty sure that other software uses "groups" to stream to multiple devices.

I, for one, am quite content to use "groups" and I would not miss the ability to click on multiple devices.

SamDel commented 5 years ago

Thanks, a lot of observations :).

GrahamDLL commented 5 years ago

1.9.48

I just stopped again on all three Chromecasts. Log attached.

I am receiving Radio Paradise in FLAC format from the Internet to the Windows machine and streaming from the Windows machine to the Chromecasts. Where are the dropouts happening? Does the Windows machine stop sending to the Chromecasts (implying a loss of signal from the Internet) or does the Windows machine lose sight of the Chromecasts (implying a problem on my local network)?

I am keen to stick with lossless audio wherever possible. I am expecting delivery of new switches tomorrow and that may solve the problem. Watch this space.

log003.zip

GrahamDLL commented 5 years ago

I like the way it looks as is. Most folk will have a small number of devices and a smaller number of groups so it doesn't need a jazzy interface.

My vote would be to, perhaps, change the appearance of the boxes to distinguish between groups and devices. Perhaps ... heavy outline for groups or "round" boxes for devices (or boxes with rounded corners).

Perhaps ... dark green for devices and light green for groups when they are streaming.

Plus, "ChromeCast-Desktop-Audio-Streamer" is a description rather than a name. It might be easier to stand out in the software crowd if you have a name. My naff suggestions would be WinChro or Chrodio.

Thank for all your good work.

FA-Bubba commented 5 years ago

v1.9.48 has been running with 5 speakers connected for about 20 hours & no issues. I selected each speaker individually (even though I have assigned them to various Groups) -- I'd rather select speakers individually (at least while testing), because I sometimes want to turn specific speakers off...

As for the App Name, I'm OK with "DesktopAudioStreamer", because that is what it does! {Even though two of my speakers are driven by ChromeCast Audio, three others are Google Home devices, so a Chrome or ChromeCast brand may be limiting -- just my opinion}.

FA-Bubba commented 5 years ago

PS: I should mention that Google Home devices respond to verbal commands, then resume streaming.

GrahamDLL commented 5 years ago

As for the App Name, I'm OK with "DesktopAudioStreamer", because that is what it does! {Even though two of my speakers are driven by ChromeCast Audio, three others are Google Home devices, so a Chrome or ChromeCast brand may be limiting -- just my opinion}.

You're right ... Now that I have taken my blinkers off, I can see that it's not all about Chromecast ... and I have remembered that Google have announced that they will soon stop selling the Chromecast Audio. My vote is still for a name that stands out in, for example, search result lists ... but it ain't my software so ...... (Winstreme ... just sayin')

SamDel commented 5 years ago

New in 1.9.49:

I checked log003.zip, it's the same issue. After playing for a while the group sends 'buffering' messages. I think it's because of the network load. Is it still the same? And also when streaming in mp3 format?

I've added a new issue for better group support. Maybe we should also start thread to get an app name.

FA-Bubba commented 5 years ago

v1.9.48 has been streaming continuously for about 48 hours, with no issues. During this time, I have interacted with Google Speakers to ask questions, receive answers, to Cast video to a TV, and a few other tasks. Throughout, all of the speakers continued to stream.... So I'd say that v1.9.48 is very stable.

By the way, when my Google Home Hub is streaming, it displays "Default Media Receiver" & "Desktop Stream"... I believe "Desktop Audio Streamer" is a good name.

I will download v1.9.49 later today, and keep you advised of my experiences.

GrahamDLL commented 5 years ago

For me ... the disconnection issue is closed. It is my problem if I try to stream more data than my network can handle ... A "nice to have" might be to have the devices change colour when they report errors but it isn't important because I can hear when there is a problem.

GrahamDLL commented 5 years ago

My last word about a name for the software.

I would like to be able to post in forums, for example, saying, "Try Winstreme (or whatever) ... it works great." and folk can Google for "Winstreme" (or whatever) and the results will all point to this software. Folk might want to search the name even if I add links in forum posts.

I suggest that you ask family and friends if you want a name. A forum on the Internet might get you a lot of suggestions and not a lot of agreement ... The two of us don't agree ... :) :)

SamDel commented 5 years ago

There was a bug in the device name fix. How's 1.9.51? If it's not ok can you try 192.168.1.26:8008/setup/eureka_info and 192.168.1.16:8008/setup/eureka_info, and post which one returns livingcast and which one officast?

I hope the new switches solve the disconnect issue, otherwise we can continue testing later! I agree, a name can be useful. We can add it later when a good one comes up.

FA-Bubba commented 5 years ago

I'll bookmark v1.9.51, and install it later... v1.9.49 has been running for about 20 hours, with no drop-outs.

I'm not sure what the "device name fix" was, or if it was something I even encountered.

FA-Bubba commented 5 years ago

v1.9.49 crashed last night. Relevant Event Viewer entries attached:...

CrashEvent.zip

FA-Bubba commented 5 years ago

v1.9.49 -- FYI, all speakers dropped off line around 10:50 AM (Log attached). I reselected each speaker again, and they are playing now...

Log-2019-02-07-1045.TXT

GrahamDLL commented 5 years ago

1.9.51

Works very nicely. Always has the device names correct on startup. It gets the group names more quickly that previous versions.

You may decide that the following is a rare case and not worth the effort of handling and that's okay with me. My devices are connected by Ethernet. I can unplug a device from Ethernet ... the device blinks for a few moments and then reconnects to the network via wifi (probably with a new IP). The music on all the devices stops playing when I unplug one device.

Devices appear and disappear in the display as the devices sort themselves out. I can click to stop the (now silent) group and click again to start streaming to the group ... the display appears normal with the group in green and the usual messages in the devices but no music plays.

I stop and restart the software and everything is back to normal.

log005.txt

GrahamDLL commented 5 years ago

1.9.51

Powering off and on a device works nicely.

I unplugged Kitcast from the power ... the other devices continued to work. Kitcast went pink in the display. Waited a few moments. Plugged power back in to Kitcast and it started to play again. About 30 seconds later it went back to white in the display.

This is all as I would expect it to be.

log006.txt

SamDel commented 5 years ago

@FA-Bubba :

@GrahamDLL :

I'm working on some group improvements...

FA-Bubba commented 5 years ago

@SamDel : I did shut down my network around 10:45 this morning, which was AFTER the crash I noted -- if you look at the Event Viewer file I sent, it shows errors at 7:18 PM yesterday (Feb 6). I believe that is what caused the crash.

I've been running v1.9.51 since 11:15 AM

SamDel commented 5 years ago

I looked at the event viewer file, the crash was caused by an access violation in the external module I use for mp3 encoding. I'm going to look for a better option to encode to mp3!

In 1.9.55:

GrahamDLL commented 5 years ago

1.9.55

Nearly ... but not quite.

Log007 ... Start streaming to a group ... disconnect network cable on Livingcast ... music stops on all devices ... group and Livingcast go pink ... wait and wait and nothing changes ... click on group and device and nothing happens.

log007.zip

Log008 ... Start streaming to a group ... disconnect network cable on Livingcast ... music stops on all devices ... device and group do not go pink ... wait and wait and nothing changes ... click "Scan again for devices" button ... click group to start streaming and everything works as normal

log008.zip

Log009 ... Start streaming to a group ... disconnect network cable on Livingcast ... music stops on all devices ... group and Livingcast go pink ... wait and wait and wait and wait and nothing changes ... click on "Scan again for devices" ... device and group go white ... group goes green and music starts playing on all group devices automagically (I didn't click to restart the streaming).

log009.zip

FA-Bubba commented 5 years ago

v1.9.55 crashed...

CrashEvent-2019-02-08-1301.zip

SamDel commented 5 years ago

Good testing, thanks!

Setup 1.9.59.zip

@FA-Bubba : It was caused by the mp3 encoding again, I changed something there in 1.9.59, hope it's fixed. @GrahamDLL : I've made two small changes to recover from these situations. In some situations the application is attempting to reload the stream, automagically ;) (it's not always successful).

GrahamDLL commented 5 years ago

1.9.59

Logs 010, 011 and 012 are from a single session ... you only need 012 but I have attached them all because I can.

Start streaming to a group ... disconnect network cable on Livingcast ... music stops on all devices ... after a pause ... group goes green and music automagically restarts streaming ... saved log010

Reconnected network cable ... music stops on all devices ... wait and wait and streaming never restarts ... saved log011

Clicked group to restart and streaming begins as normal ... saved log012

log010-012.zip

Repeat ... Start streaming to a group ... disconnect network cable on Livingcast ... music stops on all devices ... and never restarts ... saved log013 ... (success of automagic restart appears to be random and not related to Ethernet vs. wifi)

log013.zip

Note: After the above ... I closed the software ... the Cast icon in the Chrome browser reported that the software was still streaming to the devices several minutes after I closed the software. I used the Google Home app on an Android phone to "stop" the streaming.

For what it's worth ... the Cast icon in the Chrome browser does not restart the stream after I disconnect the network cable. My personal opinion is that the sutomagic restart would be nice to have but is not essential.

SamDel commented 5 years ago

@FA-Bubba : I think the mp3-encode crashes where introduced in 1.9.47 ('When nothing is playing on the desktop stream silence' feature), I've made some small changes again. @GrahamDLL : I agree, automatic restarts are not essential, but by testing these rare cases you also find some rare issues. Some small changes again, to make sure the stream is stopped, etc.

Here's 1.9.65, if you don't find major issues I'll make a 2.0 release of it!

GrahamDLL commented 5 years ago

1.9.65

Job done ... time to go home for tea and medals ...

Clicked to stream to group ... devices start streaming ... unplug network cable ... devices stop ... wait for about 20 seconds ... devices start again as if by magic ... plug in network cable ... devices stop ... wait for about 20 seconds ... devices start again as if by magic ... repeat 4 more times and streaming starts every time. Yay!

log014.zip

There is silence for about 20 seconds while the app reconnects. A new user might not realise that the app was trying to reconnect. Would it be good to show a message such as, "Attempting to connect ... Please wait ..." followed by a a countup timer that display 1, 2, 3 at one second intervals up to about 30 then displays, perhaps, "Connection failed ... please restart app."

GrahamDLL commented 5 years ago

What's the Lag Control about? Can it be got rid of?

All of my testing has been done playing FLAC lossless with the control fully to the left and streams are playing without gaps.

On a similar note ... Would it be useful to prefix the text in the "Stream format" dropdown list with "High", "Medium" and "Low" and add text near the dropdown to say, for example, "Try a lower format if there are gaps in the sound during playback."

FA-Bubba commented 5 years ago

FYI, v1.9.59 ran OK for > 48 hours. I just installed v 1.9.65.

Also, I forgot to mention this, but AVG ceased flagging your App about 5 versions ago:

avg_scanok

GrahamDLL commented 5 years ago

Selecting "Automatically start devices at startup" didn't automatically start devices at startup.

log015.zip

GrahamDLL commented 5 years ago

What is "Automatically restart when the stream is closed" ?

GrahamDLL commented 5 years ago

Uninstall using Windows Remove Programs .. re-install and the icon added to the Start Menu is a shortcut that opens the folder containing Start Menu icons. Plus, the icon in the Start Menu is labelled as Chromecast Desktop Audio Streamer ... Should that be Desktop Audio Streamer (without the Chromecast)?

Forgive my cheek but ... Would it be useful to have options that include ...

Minimise to Tray (with a click on the tray icon opening the usual interface). And radio buttons for "Automatically start when Windows starts" or "Automatically start when Windows starts and minimise to tray".