The Temporary, Track and Output Sizes

This section explains a few things which help to understand Compositing - especially with relation to the camera, effects, and the projector.

The Temporary

CINELERRA-GG's compositing routines use a temporary which is a single frame of video in memory where graphics processing takes place. By default the size of the temporary is that of the project ( W×H), i.e., the output size. But if the tracks on the timeline have various sizes different from those of the project, then the temporary will take the size of the active track (viewport = green border). We can also change the size of the viewport using the Camera tool, as well as pans and zooms the temporary displayed in it. Effects are processed in the temporary and as such are affected by the temporary size. In the case of the camera, its viewport is the temporary size. The size of the temporary and of the output in the compositing pipeline can be different and vary for any particular frame. However, projectors are rendered to the output and so are affected by the output size. The temporary is the basis on which the Projector tool acts to display the canvas on the Compositor window. The canvas always has the size of the project, although with the projector we can make pans and resizes of the red border inside it. When the temporary is smaller than the output, the temporary will have blank borders around the region in the output. When the temporary is larger than the output, it will be cropped.

Track and Output size

The Track size is used to define the temporary size with each track having a different size (viewports). It also serves to conform the input media to a chosen format (aspect ratio). So each track can have a different format (viewport). You can see or set the track size by RMB click on a track and then select Resize Track to resize the track to any size. Or select Match output size to make the track the same size as the output. Or from the Resources window, RMB on a video media and choose Info and then Resize. When a track is resized then what it looks like on the compositor changes. The relationship between the track and the project's output size makes it possible to magnify or reduce the size of a track in regards to the final output. This feature means you can create visual effects such as different aspect ratios, adjust split screens, zooms, and pans in the compositor.

The Output size can be set in File New when creating a new project, or by using Settings Format, or in the Resources window with RMB click on a video asset and choosing Match Match project size. When you Match project size, you are conforming the output to the asset. To change the size and aspect ratio of the output (Projector) we have to change the whole project, which will alter all the tracks in the timeline. Once you have set the output size in 1 of these 3 ways, any newly created tracks will conform to the specified output size. When rendering, the project's output size is the final video track size where the temporary pipeline is rendered into.

To clarify, let's take an example.

If we load a media (M) into Resources and adjust the size of the project to the size of M, we will get the canvas size of the media WM×HM). We can see in the Set Format window that the project's default values ( W×H) have changed to those of M ( WM×HM). The tracks on the timeline can have different sizes, but what we will see on the canvas, that is, in the Compositor window, is always the output size i.e. the size of the project. Tracks with smaller sizes will be seen with black bands; tracks with larger sizes will be cropped. Each track has its own size but we will see it inserted in the output size. If we change the output size the tracks will not change, remaining in their original size. We can only change the size of the tracks by manually acting on each one in the ways seen before. Finally, if we create a new track in a project of size W×H, it will assume the size of the project automatically.

Aspect Ratio (Theory)

The aspect ratio is the ratio of the sides of the frame (Width and Height). For example, classically broadcast TV was 4:3 (= 1.33), whereas today it has changed to 16:9 (= 1.78); in cinema we use the 35 mm aspect ratio of 1.375 (Academy aperture), academy flat (1.85 or widescreen) but even more so the super 35 mm (from 1.33 to 2.39). There are also anamorphic formats, i.e. that have no square pixels, like Cinemascope (2.39). The projection must be normalized to have an undistorted view.

From the film or digital sensors of the cameras, we can extract any frame size we want. We are talking about viewports, which we will examine shortly. Also important is the output of the video that will be rendered, because it is what we will see at the cinema, or on TV, or on the monitor of the PC, tablet or smartphone. Referring to figure 2.12, you can see these two possibilities: with the Camera tool you choose the size and aspect ratio of the source file (regardless of the original size); while with the Projector tool you choose the size and aspect ratio of the output. Other ways of changing the aspect ratio of assets or tracks we have seen previously (Resize track; Match Output Size; Resize asset). A method of changing the size of the entire project (canvas) is via the Set Format window. The following formula is used to vary the aspect ratio:

         ${\frac{{W}}{{H}}}$ = frame aspect ratio ( ${\frac{{pixels}}{{pixels}}}$)

For example to obtain an aspect ratio of Super 35 mm (2.35) starting from a FullHD file (1920x1080) whose base extension (1920) we want to keep:

         ${\frac{{1920}}{{H}}}$ = 2.35

from which: H = 816 pixels

At the same time as changing the Height parameter we also need to set Display Aspect ratio to 2.35. In fact, the parameters in Canvas Size are not related to those in Display Aspect ratio, unless we keep the Auto option checked, and we need to set both before we click on the Apply button. To set the aspect ratio to 2.35:1 we can choose from the drop-down menu the value 2.35 or set the value directly in the two input fields. Or again, it can be done automatically via the Auto option. Finally we can click on the Apply button to complete the calculations. Now we have arrived at the desired result: typical Super 35 mm dimensions and aspect ratio, although starting from a 16:9 FullHD. The new canvas, however, lost the pixels of a part of the initial video (crop), to be precise 1080 - 816 = 264 lines of pixels from top and bottom.

CINELERRA-GG allows you to vary the input and output aspect ratio in the ways indicated in the previous section: by varying the pixels of the sides (Width/Height) or by setting a multiplication coefficient (W/H Ratio; in this example: placing HRatio = 816 : 1080 = 0.7556) which performs the calculation automatically. If you set W Ratio and H Ratio at the same time with the same values, they work as multipliers and you get a resizing of the canvas, without altering the initial aspect ratio. If you change them to two different values or change only one of the two parameters, leaving the other at 1, you get an anamorphic video, with the pixels no longer being square (1:1) but becoming rectangular, deforming the image. To avoid anamorphosis, the Display Aspect ratio must also be adjusted at the same time, for example, with the Auto option. Anamorphic format is a complex field that is discussed in Andrea's paper: as well as in the Raffaella Traniello's guide:

The CINELERRA-GG Community, 2021