Subsections


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.85); in cinema we use the 35 mm aspect ratio of 1.37 (Academic aperture), but even more so the super 35 mm (2.35). There are also anamorphic formats, i.e. that have no square pixels, like Cinemascope (2.35). 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 film 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 you choose the size and aspect ratio of the source file (regardless of the original size); while with the Projector you choose the size and aspect ratio of the output.

The following formula is used to vary the aspect ratio:

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

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

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

from which: H = 817 pixels

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 or by setting a multiplication coefficient.

In Settings Format there is the additional possibility to vary the shape of the pixels from 1:1 (square) to handle anamorphic formats. In such cases we use:

         PAR = ${\frac{{DAR}}{{SAR}}}$

where:

DAR= Display Aspect Ratio

PAR= Pixel Aspect Ratio (1 or 1:1 is square)

SAR= Storage Aspect Ratio (i.e media file aspect ratio)

In practice, there can be a problem with anamorphic format rendering as desired because it does not use square pixels. So, for example, FFV1 format in the mkv container will ignore the DAR (Display Aspect Ratio). You can check if your media is anamorphic format using the Mediainfo program. If the Width/Height is 720/576 (=1.25) and DAR is 16/9 (=1.777) then you have non-square pixels. SAR (Storage Aspect Ratio) is different from DAR and you have to use a workaround as described at the "Cinelerra for Grandma" site by Raffaella Traniello: http://www.g-raffa.eu/Cinelerra/HOWTO/anamorphic.html .

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