Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

As described in the title I experience a half a second delay when playing audio over Bluetooth with A2DP.
This makes watching movies not possible as the sound is not synchronised with the video.

I'm not sure if the delay is caused by the Bluetooth standard, the A2PD protocol, the A2DP implementation on Ubuntu 12.04, or the Belkin Z73 Bluetooth Receiver.

Anyways, is this a normal lag? Is there a way to play audio over Bluetooth without any noticeable latency?

share|improve this question
6  
Not a real solution to your problem but a workaround: If it's only about playing movies, you can adjust the audio/video offset, which will delay the video too. Using mplayer, you do so by pressing the + and - keys. In VLC, I don't know how to set the delay, but I'd be surprised if VLC doesn't have such an option. –  leemes Jun 3 '12 at 14:29
    
I thought about that but I'm missing a solution for YouTube. When the video is played with HTML5 a solution could be to install a browser extension that sets a video offset. But for the case the video is played with flash I'm not sure how to achieve that. –  brillout.com Jun 3 '12 at 14:33
    
Incidentally, the VLC option is at Tools->Track Synchronisation, or play with the --audio-desync option. I'm afraid I'm not sure what the units are, and which direction is positive, and the help is not forthcoming on the matter, but that's where you want to look. –  Darael Jul 31 '12 at 19:32
    
add comment

5 Answers 5

No, this is not normal but I've had a similar problem occasionally with my Altec Lansing iMT525 Bluetooth Speakers. Something similar in concept to Sri's answer almost always works for me, and I need to do it only once per connect.

Auto-switching Bluetooth profiles to re-initialize PulseAudio

If you're looking for a culprit, I'd look at Ubuntu's sound system, PulseAudio first, and then your bluetooth receiver. Try this:

  • First, delete and re-pair your Bluetooth device.

  • Then, copy and paste the below into a .sh file in your home directory, say /home/brillout/pabluezswitch.sh:

    #!/bin/bash
    BLUEZCARD=`pactl list cards short | egrep -o bluez.*[[:space:]]` pactl set-card-profile $BLUEZCARD a2dp pactl set-card-profile $BLUEZCARD hsp pactl set-card-profile $BLUEZCARD a2dp
  • Make the file executable by opening a terminal and typing chmod +x ~/pabluezswitch.sh

  • Go to Settings...Keyboard...Shortcuts, and create a custom shortcut; name it whatever you want, with the command as /home/brillout/pabluezswitch.sh (substitute appropriate username in path!). Click Apply, and then click on the right where it says Disabled to set up a keyboard shortcut to execute the script.

What this does is force the PulseAudio system to resynchronize the audio being sent to your headset/speakers by switching profiles from ad2p -> hsp -> a2dp, thus hopefully getting rid of any latency.


Whenever you connect and notice the lag, you should press the keyboard shortcut chosen above to attempt to fix the latency -- hopefully it works for you!

share|improve this answer
add comment

I get similar problem occasionally, irrespective of the player used. Mine is a Nokia BH-503 Bluetooth Stereo Headphone with MSI CR400 laptop and Ubuntu 11.10. I happened to come across a workaround which you can try.

  • Start the video playback.
  • Go to Sound Settings > Hardware.
  • Select the Bluetooth device.
  • Then in Settings for the Selected Device drop-down, switch to Telephony Duplex (HSP/HFP) profile, then switch back to High Fidelity Playback (A2DP).
share|improve this answer
add comment

individuals who are having this problem Please view this website: http://projectzeorymer.wordpress.com/2011/09/01/ubuntu-how-to-connect-nokia-bh-503-bluetooth-headset-to-your-pc/ to see a pic of what you need to download.

Download the bluetooth manager and use it to manipulate the settings of the headset. Set the sound settings to High Fidelity Playback (A2DP) and then go in sound settings.

share|improve this answer
    
Go on bluetooth manage and go to Audio Profile and then select High Fedelity Playback.. thats it –  Alex Force Aug 18 '12 at 22:25
add comment

Adaptive differential pulse code modulation involves a look-ahead type compressing algorithm where information cannot be transmitted before the encoder has had a chance to examine several bytes of forthcoming info. Hence, data has to stack up in the encoder, and there is an inherent time shift between the streams entering and leaving the encoder. Long ago, I did a study of data network delays to determine the feasibility of voice-over-data telephony (what is now VoIP). I think I concluded that ADPCM-style compression/encoding would introduce too much delay. I think to overcome this Bluetooth-delay problem, one might need a non-compressing type of audio encoding which should have lower latency.

share|improve this answer
add comment

Here's what solved it for me: install phonon-backend-vlc and make sure it's the preferred backend.

share|improve this answer
    
This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post. –  chaos 5 hours ago
    
@dargaud I recommend expanding this to explain how to make it the preferred backend. –  Eliah Kagan 51 mins ago
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.