This forum software has now been archived into static HTML page (i.e. it does not function as a working forum anymore, so you cannot login.)

In due course a new forum will be available to help support newer CamStudio versions.

Sorry for the inconvenience and thank you for your patience.

Fixing Audio/Video Sync Issues With VirtualDub


I am recording Gameplay with the Divx Codec. I used the settings that Nick mentioned in this post.

But instead of recording from my microphone, I recorded from my speakers(Stereo Mix).

Problem is that the audio is out of sync from the video.

I would appreciate it if someone could tell me why and how I can fix this.



  • Hi Ptolemaios

    I'm not sure, but I think that when you record "from your speakers" it doesn't use the current playback/capture settings - yeah I know it's mad.

    You should be able to import the video into VirtualDub ( - free), select:

    Video Menu
    Direct Stream Copy

    Audio Menu
    Full Processing Mode ... then

    Audio Menu
    Interleaving > Enable Audio/Video Interleaving

    and enter a + or - number in the Audio Skew Correction field.


    Select Audio Menu

    to reencode your audio into a different format (MP3 for instance to help reduce the filesize)

    Then save a new version of the AVI and see if it's OK.

    Adjust the Skew correction figure according and save new AVIs until you get it right.


    Nick :o)
  • edited July 2010
    Thanks for your solution Nick.

    I do it a little simpler though. I'd like to share how I do it.
    This solution is if you are recording from your speakers or microphone and getting out of sync audio.

    1. Set the audio to record from your microphone.
    2. Now go to Options>Audio Options>Audio Options for Microphone
    3. Select the Audio Capture Device as Stereo Mix. If you are recording from your microphone, select your Microphone.
    4. Press OK and record your video.

    The audio should still be out of sync.
    I used the workaround from your blog to fix this problem Nick.

    "Download VirtualDub (Free)

    Open up the AVI file in VirtualDub you recorded previously

    Click “Video”, “Frame Rate…”, and under “Source rate adjustment” choose “Change so video and audio durations match”.

    Save the AVI (using “Video” > “Direct stream copy” mode)".......

    The part in quotes was retrieved from the post on Nick's blog.


    Thanks again! =)
  • edited September 2010
    Since CamStudio does not allow for decimal settings in its setting of "Capture Frames Every", another factor necessary to consider to stay in sync is the relationship of the "Capture Frames Every" setting to that of "Playback Rate" The two, when multiplied, must result in an even number of 1000 (1000 milliseconds, or one second).
    (In speculation, this may be because audio uses an H:M:S:mS framework while video uses an H:M:S:F (F for "Frames") timing system.)

    This limits the available "Capture Frames Every" (CFE) and "Playback Rate" (PBR) settings to the following:


    1000 1
    500 2
    250 4
    200 5
    125 8 *
    100 10 *
    50 20 *
    40 25 *
    25 40 *
    20 50 *
    10 100
    8 125
    5 200
    4 250
    2 500
    1 1000

    ( * marks those which are perhaps most practical.)
    (Note: The first two are time-lapse settings, the first one capturing every second, the second one capturing every half-second.)

    Since the typical ACTUAL possible frame capture rate is usually around 10 to 20 fps, one would think that setting to CFE 100/PBR 10 would be the best (and it might be!) But you can push your machine to perform a little harder by setting higher figures here in the Playback Rate, say like CFE 25/PBR 40 or even higher (20/50, 10/100, etc.). Experiment here! The key issue is how the math is performed ... since trying for a Playback Rate of 30 fps allows for only a non-fractional setting of 33 in the CFE, you wind up with a multiplication result of 990, which would guarantee a lag would be introduced over time that would get worse and worse.

    This does not negate the fix using VirtualDub mentioned above at all, but it might make the repair unnecessary for most people's situations. There are other factors besides the CFE/PBR relationship that can break sync (like dropped frames due to computer disk and pageswap I/O activity and such - realtime capture is a very demanding task on the poor processor!) But this one move has helped many people overcome audio lag completely (as seen in the comments on my old video about this subject at YouTube: )

    The other "big move" that has helped many folks is additionally checking the box in Audio Settings in Camstudio that says "Use MCI for Recording", which forces Camstudio to use your system's native recording methods, bypassing the compression features in Camstudio. You can compress your audio as a separate pass in Virtual Dub with audio set to "Full Processing" mode at a later time.

    These two approaches used together have eliminated audio sync issues for a majority of applications. Let me know if they are working for you ... or, in fact, WHAT is working for you! :-)

    Terry Britton
  • Suggestion to do soon.
    Add two radiobuttons to identify which of the both "Capture Frames Every" (CFE), "Playback Rate" (PBR) should be leading. Camstudio can work internally with floats so we can prevent that it runs out of sync.
Sign In or Register to comment.