BalenaSound delay when playing audio

Hello again, I have a Raspberry Pi 3A+, and I’m running the balenaSound project where your old speakers are turned into high tech Bluetooth audio receivers. It works great now, receives audio perfectly, but when watching a movie on my computer, I notice a quite big sound delay. I know, this is using a Raspberry Pi in combination with Bluetooth and some 30 year old speakers, but is there a workaround to avoid this issue?

Thank you very much!

Hi there @polarbear123,

Are you able to play other sounds without delay from your laptop to the balenaSound project, or are all sounds from your laptop to the balenaSound similarly affected?

Thanks for the reply. All the sounds, from my laptop and phone, come with delay.

Do you mean a delay between the image and the sound? (The image on the computer / phone, and the audio played by the RPi.) If so, I imagine this would not be an issue with playing music, and only an issue when watching movies. The only “easy” suggestion that occurs to me, if it is an option, is to adjust the audio/video sync delay in the video player: often there is a menu with an audio delay option, where you can also adjust a “negative delay” (i.e. it actually delays the image). For example, this setting with the VLC player: https://www.vlchelp.com/syncing-audio-vlc-media-player/

Oh, I never knew there was a function like that. I should try it out.
Yeah, I mean the delay between image and sound. When the singer in a video starts talking, the sound only comes 1.5-2 seconds afterwards, which is quite annoying.
But mostly I’ll be watching YouTube, or stuff like NBC.com, Amazon.com, …
How will I fix the issue there?
If there isn’t a fix, it’s not too bad. I’m glad enough I was able to create this myself and that it all works. But I have another small question: Do you know what causes the delay, that would interest me.
Thanks!

Hi there,

Unfortunately audio lag is a known major issue with Bluetooth and usually comes down to the fact that the source transmitter has to re-encode the audio into the A2DP (the Bluetooth Advanced Audio Distribution Profile) format before transmitting. This can be quite hard work for the transmitter (the PC or phone), and coupled with the delay in receiving and then decoding the audio before playback on the Pi, this is what will be introducing the lag.

Because of this, as Paulo mentioned, a lot of players now support audio sync delay to ensure that you can match up the audio lag with the output video. Unfortunately, with the likes of stream players over the web, these are designed to stream to a single renderer (the PC/phone/etc.), rather than the renderer then passing audio or video onto a different renderer, and because of this do not include sync options.

Best regards,

Heds

Thank you very much. I understand there isn’t a way to prevent this lag, right?

Hi there @polarbear123,

Unfortunately I don’t believe so, as it’s dependent on the streaming player as to when it decides to render video and audio, and the audio is being passed off for recoding and transmission to the Raspberry Pi, which is producing the lag.

Best regards,

Heds

1 Like