bugBino - Bugs: bug #35103, audio not in sync with video


bug #35103: audio not in sync with video

Submitted by:  S. Christian Collins <mrbumpy409>
Submitted on:  Sun Dec 18 17:40:05 2011  
Severity: 3 - NormalStatus: Fixed
Privacy: PublicAssigned to: Martin Lambers <marlam>
Open/Closed: Closed

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


Wed May 22 12:55:55 2013, comment #4:

Had this issue with Bino 1.4.2 running on a Mac, doesn't seem to be any way to fix it. Even adjusting the Audio delay didn't seem to do anything. Are those times in ms ?

Anyone know the average audio delay for files? Just to try.


OS: Mac OSX 10.8.3
Hardware : MacBook Pro 9,1
CPU: Intel Core i7 (2.6 GHz)
Video: NVIDIA GeForce 650MX 1GB
Sound Card : Intel High Definition Audio
Screen Resolution: 1680 x 1050

George Paul <darthreaper4>
Sun Jan 29 10:15:53 2012, comment #3:

Since we do not have a better solution currently, I added support for an adjustable audio delay. You can use the --audio-delay option or interactively adjust the value in the GUI (Preferences->Audio Settings).

Thanks again for reporting this problem and for the very nice test file.


Martin Lambers <marlam>
Project AdministratorIn charge of this item.
Sat Jan 7 16:42:28 2012, comment #2:

I ran the tests you suggested, and here are my results:
. Compositing on, Vsync on (my current config): noticeable video delay.
. Compositing on, Vsync off: slightest video delay (not much at all)
. Compositing off: slightest video delay (not much at all)

I'm wondering if the fact that my NVIDIA card is using triple-buffering could also be adding to the delay. Unfortunately, I'm compiling software right now so I can't test with it off at the moment.

One solution to this problem would be to implement an audio sync adjustment in the preferences, similar to what VLC has (Tools->Preferences->Show all settings->Audio->Audio desynchronization compensation). Simply delay the audio or video feed for positive and negative values respectively.

S. Christian Collins <mrbumpy409>
Sat Jan 7 16:22:11 2012, comment #1:

Thank you very much for the useful test file!

I cannot confirm the video delay on my system (I tried Bino, ffplay, and vlc and did not notice a difference). Maybe my ear/eye coordination is just not good enough.

However, there are a few problems with A/V sync and OpenGL:

1. We cannot reliably synchronize to the vertical retrace of the display device. We can (and do) synchronize the vertical retrace with the front/back buffer swap to reduce tearing, but we do not know exactly when this vertical retrace will happen. Therefore, Bino currently assumes that a given frame will be displayed immediately, when in fact it will be displayed at the next vertical retrace. This is one source of A/V sync error, but it is still in acceptable bounds. (Note that the *_OML_sync_control extension would allow precise synchronization to the vertical retrace, but this extension seems to be unsupported in most systems. See http://www.opengl.org/registry/specs/OML/glx_sync_control.txt).

2. Compositing window managers will add a frame delay. When Bino sends a frame to the graphics card, it expects this frame to be displayed immediately (or at least at the next vertical retrace). But with a compositing window manager, the frame will first go to the window manager where it will be used in the compositing engine, and will then later be displayed (typically one frame later). See http://dri.freedesktop.org/wiki/CompositeSwap for more information on this.

The second point may be the reason why I don't experience the video delay: I don't use a compositing window manager. Would you be able to test with compositing disabled, and confirm this?

However, even if we confirm that this is the problem, I'm not sure how to fix this. We may be able to detect a compositing window manager and then expect some guessed delay so that we can take it into account, but I suspect that would be fragile at best...

Any suggestions are welcome.


Martin Lambers <marlam>
Project AdministratorIn charge of this item.
Sun Dec 18 17:40:05 2011, original submission:

On the two systems that I have used Bino, the audio is ahead of the video by a noticeable amount.

I made a video (attached) to test a/v synchronization that can be used to verify this. The video contains three bright flashes that are accompanied by a "tick" sound. Playing the video in VLC or any other video player I've tried, such as sView, the audio is synced perfectly with the video. In Bino, I hear the sound a split second ahead of the video flashes.

I have tried this with both the stable (1.2.1) and GIT (1.3.0) versions of Bino with the same results.

    • My System **

OS: Kubuntu 11.10 64-bit w/ KDE 4.7.4
Motherboard: ASRock X58 Extreme3 (Intel X58 chipset)
CPU: Intel Core i7 (2.8 GHz quad-core)
Video: Dell NVIDIA GeForce 7800 GTX w/ 256 MB RAM (PCI Express)
Sound Card #1: Sound Blaster Audigy 2 ZS Gold
Sound Card #2: Echo Gina3G
Linux Kernel: 3.1.0-1-generic
NVIDIA video driver: 280.13
Screen Resolution: 1280 x 960

S. Christian Collins <mrbumpy409>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):

Attached Files
file #24623:  audio-video sync test.mp4 added by mrbumpy409 (28kB - video/mp4 - A/V sync test video)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by darthreaper4 (Posted a comment)
  • -unavailable- added by marlam (Posted a comment)
  • -unavailable- added by mrbumpy409 (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun Jan 29 10:15:53 2012marlamStatusNeed Info=>Fixed
    Sat Jan 7 16:22:11 2012marlamStatusNone=>Need Info
      Assigned toNone=>marlam
    Sun Dec 18 17:40:05 2011mrbumpy409Attached File-=>Added audio-video sync test.mp4, #24623

    Back to the top

    Powered by Savane 3.1-cleanup1