Align Timecodes is especially useful in the case where you create video with multiple cameras capable of recording a timecode in the metadata of each file. Let’s say we have recorded three videos at the same time at a concert with each camera set up at unique positions and at different angles. All of the cameras start recording at various times but were synchronized with the same master clock (Timecode Sync Generator or Jam Sync timecode) so that the recordings are timestamped with that synchronized time. For example, the 3 cameras have embedded metadata as follows: camera 1 = 00:00:00:01 camera 2 = 00:00:10:07 camera 3 = 00:00:17:22
Timecode synchronization is performed by the program when you choose the option Align Timecodes and works in 2 steps. The first automatic step is to locate the earliest timecode and the second step is to align the edits on the armed tracks using that time on the timeline.
When you load in the three files to different tracks, they'll be placed on a timeline that starts from 00 : 00 : 00 : 00 as usual. But, by middle mouse clicking (MMB) on any of the video tracks, you can view the timecode embedded at that point in that file.
To make it easy to align the videos onto the timeline manually, set the origin point, that is the leftmost time index, of the timebar to the timecode of the earliest video. For the 3 aforementioned cameras this would be camera 1 with a timeecode of 00 : 00 : 00 : 01. By using the clapboard button on the main timeline, you can set 00 : 00 : 00 : 01 as the start timecode. Then positioning the camera 1 video at the start of the timeline will line its frames up with the times on the timebar.
Similarly, using the middle mouse button to view the other 2 camera’s timecodes, you can position them so their timecodes line up and now all three tracks will be in sync. You can do this manually or simply do it automatically with the option under: Tracks → Align Timecodes. See figure 6.18
Timecode synchronization in CINELERRA-GG is based on the inclusion of an actual timecode saved in the media as can be seen using the ffprobe or mediainfo command line. Examples are shown here:
# ffprobe tut1.mov Metadata: handler_name: VideoHandler timecode: 00:00:20:01 # mediainfo mtb.mp4 Time code of first frame: 11:05:49:41 Time code, striped: Yes Title: GoPro AVC
Many newer cameras and media in a MOV container have valid timecodes often with SMPTE compliant start Timecode in Quicktime format, whereas others do not. Most low end cameras do not. When no timecode is present, various clock time values may be used to synchronize instead.
There are various types of timecodes and they are written in metadata in various ways. Because it is not clear which timecode in the file is the one to use or there is none, the precedence as described next is followed. The contexts, packets, streams, and data refer to the corresponding ffmpeg data or metadata objects:
Operation of Align Timecodes includes the following options to help in your setup and review (figure 6.19):
ffmpeg -i originalfile.mp4 -metadata timecode="14:36:08:29" -c copy newfile.mp4 # where "-i" is followed by the input filename # where "-metadata timecode" is followed by the timecode key # where "-c copy" just copies the video/audio to the following output filename
The CINELERRA-GG Community, 2021