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.

Use of pause desyncs AV?

mltmlt
edited November 2010 in Support
Can somebody confirm that extensive use of pause results in sound artifacts? I haven't ever had problems with AV sync. I use default recommended settings for camstudio codec (200/5/200) and interleave audio every 100 frames. I recorded a video about 30 mintes long and had to pause it a lot. I noticed that even around 10th minute I can hear glitches. I don't mind slight desync for a few frames, but I don't want to hear audible clicks. Also virtualdub reports that audio is shorter than video. I'm thinking to introduce new option to disable merging of audio & video so one can work on them separately. I feel like that something might be wrong in that code. Anyway there are many recommendations to use virtualdub to correct certain things. So I guess if AV are not mixed in the first place, it would make life easier.

Comments

  • edited January 2011
    mlt,

    Nice, old post here! I'll respond to it mainly to point out a couple of items that people often see me comment upon, but I also want to specifically address the problem with pausing, and suggest a potential solution.

    The default of 200/5/200 is a bad choice. (that is, Set Key Frame Every 200 frames/Capture Frames Every 5 milliseconds/Playback Rate of 200 Frames Per Second)

    Firstly: Capturing a key frame only every 200 frames messes up the seek function and makes for synchronization issues when re-merging the video to the audio. You want to capture as many full and complete frames as possible. Pause picks up recording a fresh key frame, but that "complete frame" is now out-of-count with the other non-key-frame data grabs, if I understand my key frames correctly. Basically, a setting of "Set Key Frames Every 200" means one complete capture is grabbed, followed by 199 "partial frame" grabs of only the pixels whose values have changed (ie., "moved") which have to be some-what re-assembled into virtual full frames by the codec at the end in some cases. Pause at frame 100 in this set, and when you restart the recording, it will create a full key frame capture at frame 101, but then the next full one 200 frames from that, beginning the troubles with sync to audio now, especially since you are interleaving, and that feature interleaves with full key frames, if I remember correctly. Low settings here between 15 and 30, though they increase file size, are the safest way to go if you are using pause or are having audio sync issues.

    Second, attempting to capture any kind of frame every 5 milliseconds puts unnecessary burden on your processor, and creates a tug-of-war with your other running applications for processor resources. Every 50 to 100 milliseconds is plenty adequate for most applications, and even pulling a frame every 20-25 milliseconds is far less burdensome than going for every 5 ms.

    Thirdly, going for a crazy playback rate of 200 frames per second is likewise putting a heavy strain on your system when the recording is played back! Film is 24 fps, for goodness sake! Video is around 30 fps. Because of the integer limitation in current versions of CamStudio, going for a Playback Rate that is some division of 1000ms to match with the capture rate helps guarantee audio sync in most recording situations (44 or 22 MHz, 16-bit).

    Consequently, these are good, typically ideal settings:

    CFE PBR
    100-10
    50--20
    40--25
    25--40
    20--50 (tops!)

    I'll eventually be doing a bunch of benchmark tests to discover actual situational "best case scenarios" and their settings, but I hope I've given some useful guidelines here that can be used for now.

    Terry
Sign In or Register to comment.