Adjacent Edits in timeline

In CINELERRA-GG, sometimes there might be two consecutive pieces of footage (edits) in a video track that are not exactly adjacent to each other in the timeline. There is a tiny empty segment in between the two that is narrower than one single frame in the track where there is no video at all. This happens when the next edit is attached to the preceding one in which the lengths of audio (quantified in units of audio samples, for example 48000Hz) is slightly more than the length of video (quantified in frames, for example 30Hz). If this is the case, the playback can blink with a black frame at this position.

Figure 5.4: Black frame between two edits
Image AV_sync

The figure 5.4 shows that edit 2 (audio and video) should be placed next to edit 1 (audio and video) at position A, so that they are adjacent. Instead, edit 2 is positioned at position C, which is the next frame. This is because the audio 1 samples are longer than determined by the fps of video 1. Edit 2 cannot even be placed next to position B, i.e., at the end of audio edit 1, because this is within a single frame and the program only works discretely from frame to frame. This difference can appear at any stage: reading source, editing/compositing, or rendering the result. The desynchronization can even accumulate and become worse.

The cause is probably the way in which CINELERRA-GG internally resamples the media to conform it to the project settings. The source media are allowed to be in different formats, have different framerates/samplerates from that of the project. If this is the case, CINELERRA-GG tries to resample them, this is resource consuming and not very accurate, leading to desync and black blinking frames. For example, if the source media has VFR (variable frame rate) formats, the program will definitely perform its own internal resampling. The rendering phase can also be affected by desync, as can cutting, splicing and overwriting. Usually desynchonization does not occur, but if it does occur (and worse still, propagate during the editing phases), the cause is probably due to internal resampling. Codecs and formats can also affect desync or the functionality of CINELERRA-GG for audio/video synchronization via waveform GoTo or Trimming.

The easiest solution is to prevent the problem by using source media with settings identical to those of the project, or transcoded externally to the project values before being imported into CINELERRA-GG.

If, on the other hand, we notice blinking black frames during editing or in the final rendering, cut away the excess samples from audio edit 1 (A-B region) to allow for precise alignment of audio/video edits 2 at point A. If the user sets Settings Align cursor on frames in the Program window menu and manually cuts out this tiny empty segment, the two edit segments become exactly adjacent and black blinking disappears.

The CINELERRA-GG Community, 2021
https://www.cinelerra-gg.org