muammar / mkchromecast

Cast macOS and Linux Audio/Video to your Google Cast and Sonos Devices
http://mkchromecast.com
Other
2.21k stars 137 forks source link

mkchromecast plays with ~ 15 secs delay on Chromecast Audio #349

Open nikur opened 3 years ago

nikur commented 3 years ago

mkchromecast version: 0.3.8.1 OS: Linux Mint 19.3 "Tricia"

I'm using a Chromecast Audio (late 2018) device as a streaming client for mkchromecast. However, the audio always plays with a delay of ~ 15 secs. I configured mkchromecast to use ffmpeg as the encoder backend and WAV with a sample rate of 44.1 kHz as audio format.

The same issue occurs when using pulseaudio-dlna, yet the Chromecast responds to stopping the playback nearly instantaneously but produces playback delays of > 20 secs.

When streaming audio from my Android smartphone through the "Share Screen" function of the Google Home app, the playback delay is only about a few seconds.

Pinging the Chromecast device in my wifi network yields a latency of ~ 230 msecs on average with an stddev of ~ 111 msecs.

To me, this looks like the Chromecast is filling some buffer when controlled by the mkchromecast App but not when using the Google Home app. Has anyone else ever experienced that behaviour?

JustCryen commented 2 years ago

It's not as bad… at the begginning It gets worse with time. I also think that my ram is getting filled up with time which might hint into a memory leak somewhere in the mkchromecast. I even experienced full system lockup when it was running for a long time.

I'm on Arch and I was casting to Google Home Mini