Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Expected Chromecast Audio Delay?

My 10 year old and I are implementing a project which calls for audio to be played by a Chromecast Audio after a physical button is pressed.

She is using python and pychromecast to connect up to a chromecast audio.

The audio files are 50k mp3 files and hosted over wifi on the same raspberry pi running the button tools. They are hosted using nginx.

Delay from firing the play_media function in pychromecast to audio coming out of the chromecast is at times in excess of 3 seconds, and never less than 1.5 seconds. This seems, anecdotally, to be much slower than casting from spotify or pandora. And, it's definitely too slow to make pushing the button 'fun'.

File access times can matter on the pi, but reading the entire file using something like md5sum takes less than .02 seconds, so we are not dealing with filesystem lag.

Average file download times for the mp3 files from the pi is 80-100ms over wifi, so this is not the source of the latency.

Can anyone tell me

  1. What the expected delay is for the chromecast audio to play a short file
  2. If pychromecast is particularly inefficient here, and if so, any suggestions for go, python or lisp-based libraries that could be used.
  3. Any other tips for minimizing latency? We have already downconverted from wav files thinking raw http speed could be an issue.

Thanks in advance!

like image 416
Peter V Avatar asked Mar 21 '16 03:03

Peter V


People also ask

How do I fix audio delay on Chromecast?

Stand between the out of sync speakers (or as close to in between as you can) and adjust their volume levels so you hear them both playing at about the same level. Touch and hold your device's tile. Group delay correction. Move the slider to the left or right until the audio sound in sync.

What is normal audio delay?

These are the milliseconds (ms) it takes to process digital data and convert it to an audio signal that can be streamed through a wired or wireless connection to your headphones. In a regular wired connection, the typical audio latency is 5-10 ms.

How do I fix audio latency?

In particular, look through your soundbar's menu for equalizer settings, presets like “movie” and “sports” mode, dialogue enhancers and volume levelers, or features like “virtual 3D” surround sound. Turn them all off, and you should find the delay is much smaller, if not eliminated.


1 Answers

I've been testing notifications with pychromecast. I've got a delay of 7 sec.

Since you can't play a local file, but only a file hosted on a webserver, I guess the chromecast picks up the file externally.

Routing is via google's servers, which is what google does with all its products.

like image 149
user7427695 Avatar answered Oct 14 '22 11:10

user7427695