Table of Contents
|
8 Compositor window (intro)
This window displays the output of the timeline. It is the interface for most compositing operations or operations that affect the appearance of the timeline output. Operations done in the Compositor affect the timeline but do not affect clips.
8.1 Compositor controls
8.2 Compositing
8.1 Compositor controls
The video output has several navigation functions. The video output size is either locked to the window size or unlocked with scrollbars for navigation. The video output can be zoomed in and out and panned. Navigating the video output this way does not affect the rendered output; it just changes the point of view in the compositor window.
If it is unlocked from the window size, middle clicking and dragging anywhere in the video pans the point of view.
Hitting the '+' and '-' keys unlocks the video size from the window size & zooms in and out of the video output.
Underneath the video output are copies of many of the functions available in the main window. In addition there is a

Selecting a percentage in the zoom menu unlocks the video size from the window size. The zoom menu jumps to all the possible zoom settings and, through the Auto option, locks the video to the window size. The zoom menu does not affect the window size.
The tally light turns red when rendering is happening. This is useful for knowing if the output is current.
Right clicking anywhere in the video output brings up a menu with all the zoom levels and some other options. In this particular case the zoom levels resize the entire window and not just the video. Selecting a percentage here resizes the window. If the video size is locked to the window size, the video changes size. If the video size is unlocked from the window size, the video stays the same size. See section Popup menu of options.
The Reset camera and Reset projector options center the camera and projector See section Compositing.
The Hide controls option hides everything except the video.
Fullscreen/windowed (f): Video displayed in the Compositor window can be displayed in full screen view.
Select this menu item (windowed) again to undo full screen mode.
On the left of the video output is a toolbar specific to the compositor window. Select a tool to enable it. Select it again to disable it. To protect the video from changes, be sure all the tools are deselected. Here are the functions in the toolbar:
8.1.1 Protect video8.1.2 Magnifying glass
8.1.3 Masks tool
8.1.4 Ruler tool
8.1.5 Camera
8.1.6 Projector
8.1.7 Crop tool
8.1.8 Eyedropper
8.1.9 Tool info
8.1.10 Safe regions tool
8.1.1 Protect video
This disables changes to the compositor output from clicks in it. It is an extra layer on top of the track arming toggle to prevent unwanted changes.
8.1.2 Magnifying glass
This tool

Left clicking in the video zooms in.
Ctrl clicking in the video zooms out.
Rotating the wheel on a wheel mouse zooms in and out too.
8.1.3 Masks tool
This tool


8.1.4 Ruler tool
The ruler shows pixel coordinates for the cursor & a line. Click drag in the video output to draw a line to measure. Click without dragging to hide the ruler line. Enable the

8.1.5 Camera
This tool


8.1.6 Projector
This tool


8.1.7 Crop tool
This tool


8.1.8 Eyedropper
This brings up the eyedropper. The eyedropper detects whatever color is under it and stores it in a temporary area. Enabling the

The eyedropper not only lets you see areas which are clipped, but its value can be applied to many effects. Different effects handle the eyedropper differently. They usually have an option called use color picker to use the last scanned eyedropper color.
8.1.9 Tool info
This tool

Controls with dialog boxes are:
- Edit mask
- Camera automation
- Projector automation
- Crop control
8.1.10 Safe regions tool
This tool

8.2 Compositing
A large amount of Cinelerra’s binary size is directed towards compositing. When you remove the letterboxing from a widescreen show, you are compositing. Changing the resolution of a show, making a split screen, and fading in and out among other things are all compositing operations in Cinelerra. Cinelerra detects when it is in a compositing operation and plays back through the compositing engine only then. Otherwise, it uses the fastest decoder available in the hardware.
Compositing operations are done on the timeline and in the Compositor window. Shortcuts exist in the Resource window for changing some compositing attributes. Once some video files are on the timeline, the compositor window is a good place to try compositing.
- 8.2.1 The camera and projector
- 8.2.2 Masks
- 8.2.3 Cropping
- 8.2.4 Safe regions
- 8.2.5 Overlay modes
- 8.2.6 Track and output sizes
8.2.1 The camera and projector
* 8.2.1.1 The temporary
* 8.2.1.2 Compositing projector controls
* 8.2.1.3 Compositing camera controls
* 8.2.1.4 Popup menu of options
* 8.2.1.5 The camera and projector tool window
8.2.1.1 The temporary
In the compositor window, the most important functions are the


The process is pretty much as if we scanned in a roll of film one frame at a time, then (using Gimp, for example) digitally altered the scanned image with various filters. Once the image has been transformed by the filters (color correction, for example) we then project the finished image back into a new roll of film, thus creating a new "modified" version of the original.
Each track has a different "temporary" which is defined by the track size. By resizing the tracks you can create split screens, pans, and zooms.
When editing the camera and projector in the compositing window, the first track with record enabled is the track affected. Even if the track is completely transparent, it is still the affected track. If multiple video tracks exist, the easiest way to select one track for editing is to SHIFT-click on the record icon of the track. This solos the track.
The purpose of the projector is to place the contents of the "temporary" into the project’s output. The intent of the projector is to composite several sources from the various tracks into one final output track.
The projector alignment frame is identical to the camera’s viewport, except that it guides where on the output canvas to put the contents of each temporary.
8.2.1.2 Compositing projector controls
When the projector button is enabled in the compositor window, you are in projector editing mode. A guide box appears in the video window. Dragging anywhere in the video window causes the guide box to move, hopefully along with the video. SHIFT-dragging anywhere in the video window causes the guide box to shrink and grow along with the video. Once you have positioned the video with the projector, you are ready to master the camera.
8.2.1.3 Compositing camera controls
Select the

The viewport is a window on the camera that frames the area of source video to be scanned. The viewport is represented as a red frame with diagonal cross bars.
The size of the viewport is defined by the size of the current track. A smaller viewport (640x400) captures a smaller area. A larger viewport (800x200) captures an area larger than the source video and fills the empty spaces with blanks.
Once we have our viewport defined, we still need to place the camera right above the area of source video we are interested on. To control the location of the camera:
- Open the compositor window with a track selected.
- Select the camera button to enable camera editing mode.
- Drag over the display window.
When we drag over the viewport in the compositor window (although initially counter-intuitive), the viewport does not moves but the area of video that sits under the camera’s location does, like when watching the output of a moving camera.
For example, when you drag the camera down, the viewport in effect is moving downwards on the video, showing its path towards the bottom of the video, but from our perspective on the compositor screen, we see the video moving up. When you drag the camera right, the video seems to move left, and so on.
8.2.1.4 Popup menu of options
In the Compositor window, there is a popup menu of options for the camera and projector. Right click over the video portion of the Compositor window to bring up the menu.
- Zoom levels: 25%, 33%, 50%, 75%, 100%, 150%, 200%, 300%, 400% of the original media size.
- Zooom Auto
- Reset Camera: causes the camera to return to the center position.
- Reset Projector: causes the projector to return to the center.
- Hide controls: Shows/hides the controls around the image area.
- Fullscreen/windowed (f): Video displayed in the Compositor window can be displayed in full screen view. Select this menu item (windowed) again to undo full screen mode.
8.2.1.5 The camera and projector tool window
The camera and projector have shortcut operations that do not appear in the popup menu and are not represented in video overlays. These are accessed in the Tool window. Most operations in the Compositor window have a tool window which is enabled by activating the

In the case of the camera and projector, the tool window shows x, y, and z coordinates. By either tumbling or entering text directly, the camera and projector can be precisely positioned. 9 justification types are also defined for easy access. A popular justification operation is upper left projection after image reduction. This is used when reducing the size of video with aspect ratio adjustment.
Left
Center Horizontal
Right
Top
Center Vertical
Bottom
The Translate effect allows simultaneous aspect ratio conversion and reduction but is easier to use if the reduced video is put in the upper left of the temporary instead of in the center. The track size is set to the original size of the video and the camera is centered. The output size is set to the reduced size of the video. Without any effects, this produces just the cropped center portion of the video in the output.
The Translate effect is dropped onto the video track. The input dimensions of the Translate effect are set to the original size and the output dimensions are set to the reduced size. To put the reduced video in the center subsection that the projector shows would require offsetting out x and out y by a complicated calculation. Instead, we leave out x and out y at 0 and use the projector’s tool window. See the Translate effect
Merely by selecting

8.2.2 Masks
Masks select a region of the video for either opaque or transparent. Masks can be used in conjunction with another effect to isolate the effect to a certain region of the frame. A copy of one video track may be delayed slightly and unmasked in locations where the one copy has interference but the other copy does not. Color correction may be needed in one subsection of a frame but not another. A mask can be applied to just a subsection of the color corrected track while the vanilla track shows through. Removal of boom microphones, airplanes, and housewives are other mask uses.
The order of the compositing pipeline affects what can be done with masks. Mainly, masks are performed on the temporary after effects and before the projector. This means multiple tracks can be bounced to a masked track and projected with the same mask. Click on the 'Apply mask before plugins' checkbox to apply a mask before effects.
Our compositing pipeline graph now has a masking stage. There are 8 possible masks per track. Each mask is defined separately, although they each perform the same operation, whether it is multiplication or subtraction.
To define a mask, go into the Compositor window and enable the

IMPORTANT: You have to select automatic keyframes (See section Automatic keyframes,) if you wish to move a mask over time. If you do not select automatic keyframes, the mask position will be the same even if you edit at different places on the timeline.
Click again in another part of the image to create each new point of the mask (the polygon). Every click creates a new point for a mask. The polygon is automatically closed. Knowing which point is the 1st point is essential for animating masks, so the 1st point is always drawn filled in while other points are drawn as an outline. While it is not the conventional Bezier curve behavior, this masking interface performs in realtime what the effect of the mask is going to be. Creating each point of the mask expands a rubber band curve.
Note: You can have only one number of points (per mask) for the entire track. A number of points is not a keyframable attribute. I.e. you can't add a point, because you need one more, by creating/adjusting a keyframe and later on the track remove it again by creating/adjusting a keyframe.
Once points are defined, they can be moved by CTRL-dragging in the vicinity of the corner.
This, however, does not smooth out the curve. The in-out points of the Bezier curve are accessed by SHIFT-dragging in the vicinity of the corner. Then SHIFT-dragging near the in or out point causes the point to move.
Finally, once you have a mask, the mask can be translated in one piece by CTRL-ALT-dragging the mask. Mask editing in Cinelerra is identical to how The Gimp edits masks except in this case the effect of the mask is always on.
The masks have many more parameters which could not be represented with video overlays. These are represented in the tool window for masks. Selecting the


The mode of the mask determines if the mask removes data or makes data visible. In subtraction mode, the mask causes video to disappear. In multiplication mode, the mask causes video to appear and everything outside the mask to disappear.
The value of the mask determines how extreme the multiplication or subtraction is. In subtraction mode, higher values subtract more alpha. In multiplication mode, higher values make the region in the mask brighter while the region outside the mask is always hidden.
Note: Cinelerra-CV does not interpolate the value of mask. The "Value" doesn't get interpolated between the keyframes. If you created two mask-keyframes: the first with mask-value=0, the second with mask-value=100, the "Value" stays 0 as long as it reaches keyframe#2, then it jumps to 100. But you can always place a identical unmasked copy of your clip on a track above and fade over to this if you don't need the mask anymore.
The mask number determines which one of the 8 possible masks we are editing. Each track has 8 possible masks. When you click-drag in the compositor window, you are only editing one of the masks. Change the value of mask number to cause another mask to be edited. The previous mask is still active but only the curve overlay for the currently selected mask is visible.
When multiple masks are used, their effects are ORed together. Every mask in a single track uses the same mode, value, feather.
The edges of a mask are hard by default but this rarely is desired. The feather parameter determines how many pixels to feather the mask. This creates softer edges but takes longer to render.
Note: The OpenGL mask renderer is of low quality and only suitable as a preview for initial work. For fine-tuning of masks (with large feather values) OpenGL should be switched off and the software renderer be used.
Finally, there are parameters which affect one point on the current mask instead of the whole mask. These are Delete, x, y. The active point is defined as the last point dragged in the compositor window. Any point can be activated merely by CTRL-clicking near it without moving the pointer. Once a point is activated, Delete deletes it and x, y allow repositioning by numeric entry.
How to make a mask copy from a track to another ?
- Make sure you have (only) Mask keyframes turned on (in the View menu)
- Arm the source track only
- The Keyframes menu ->Copy keyframes (Shift-C)
- Arm the destination track only
- The Keyframes menu->Paste keyframes (Shift-V)
How to make Cinelerra-CV keep one mask shape/size (let say a mask in the shape of
a square for frames e.g. N0 - N10), and another mask shape/size (a triangle) for frames e.g. N11 - N20 ?
You have to use mask keyframes. Enable automatic keyframe mode by enabling the automatic keyframe toggle "Generate keyframes while tweaking".
This causes the creation of a new keyframe every time you tweak the parameters of the Mask tool.
Make sure that mask keyframes are actually displayed. Go into the Program —> the View menu and turn on the Mask keyframes.
This makes the Mask parameter parameter visible before performing a change.
Alternatively, there is a small options/toggles window called "Overlays", which you can show via the Program —> the "Window" menu (its called "Show overlays"). In this window, make sure the toggle for "Mask" is set. Now, you should see a green symbol at every mask keframe location right at your video on the timeline.
If you want to have a constant shape of your mask and an abrupt change to a different shape/size then you must place keyframes on subsequent frames: A0 - A10 B11 - B20.
You must have A-keyframes at frames N-0 and N-10 where you defined a square.
You must have B-keyframes at frames N-11 and N-20 where you defined another shape/size (a triangle).
The A keyframes define one shape (a square), the Bs a different shape (a triangle).
If you want to make Cinelerra change the shape/size smoothly until it arrives at the shape that the B-keyframe at frame N-11 defines (i.e. from a square to a triangle), don't create the A-keyframe at frame N-10.
Warning! A and B cannot have different number of mask points!
If you need that, then you have to use separate masks, and switch the "Value" of one to 0, the other to 100.
Can I move a mask in time, or define the end/start point of masks ?
Then cinelerra will do the animation for you (placing them while the movie is being played).
8.2.3 Cropping
Cropping reduces the visible picture area of the whole project.
It changes the values of the output dimensions (width and height in pixels) and the X Y values of the projector in a single operation.
Since it changes project settings it affects all the tracks for their entire duration and it is not keyframable.
Note: The Crop tool is keyframable in the Cinelerra-CVE fork.


Click-drag anywhere in the video to define the crop area. This draws a rectangle over the video.
Click-drag anywhere in the video to start a new rectangle.
Click-drag over any corner of the rectangle to reposition the corner.
ALT-click in the cropping rectangle to translate the rectangle to any position without resizing it.
The crop control dialog allows also text entry of the top left coordinates (X1,Y1) and bottom right coordinates (X2,Y2) that define the crop rectangle.
The Set Format window will show the new project Width and Height values.
The projector tool window will show the new X Y values.
Track size will remain unchanged.
To undo the cropping enter the original project dimensions in the Set Format window and click on Reset projector in the popup menu of the compositor.
8.2.4 Safe regions
On consumer displays the borders of the image are cut off and within the cut-off point is a region which is not always square like it is in the compositor window. The borders are intended for scratch room and vertical blanking data. You can show where these borders are by enabling the

8.2.5 Overlay modes
Every video track has an overlay mode, accessible by expanding the track. The overlay mode is a pull-down menu on the left under the fader. When collapsed, it displays an icon representing the current overlay mode.

Overlay modes are processed inside the projector stage of compositing. The different modes are summarized below.
- Normal
This mode uses a traditional Porter-Diff equation to blend tracks with alpha. When no alpha exists in the project color model, the new track always replaces the output.
- Addition
In this mode, whatever is in the output is added to the current track. The result is blended based on the current track’s alpha onto the output.
- Subtraction
In this mode, the current track is subtracted from the output and the result is alpha blended onto the output.
- Multiply
This is the most useful operation. The current track is multiplied by the output and the result blended onto the output. Usually a black and white image with no alpha channel or a white title on a black image is used as the current track. With the multiply operation, only the output portions under the white area show.
- Divide
This mode divides the current track by the output and the result is blended into the output. It usually results in overloaded levels.
- Replace
This mode does no blending and overwrites the output with the current track.
- Max
Max computes component-wise maximums of source and destination color components and piks the higher (maximum) r, g, b values between the foreground (source) and the background (destination) color components.
8.2.6 Track and output sizes
8.2.6.1 Track size
8.2.6.2 Output size
The size of the temporary and the size of the output in our compositing pipeline are independent and variable. This fits into everything covered so far. The camera’s viewport is the temporary size. Effects are processed in the temporary and are affected by the temporary size. Projectors are rendered to the output and are affected by the output size. If the temporary is smaller than the output, the temporary is bordered by blank regions in the output. If the temporary is bigger than the output, the temporary is cropped.
8.2.6.1 Track size
The temporary size is defined as the track size. Each track has a different size. Right click on a track to bring up the track’s menu. Select Resize Track to resize the track to any arbitrary size. Alternatively you can select Match output size to make the track the same size as the output.
For example, the next image shows how a video track and a project output of equal sizes look when displayed on the compositor.
If you resize a track, then its appearance on the compositor changes accordingly.
Reducing the track (to 640 x 400) and leaving the project’s output size untouched makes the track show on the compositor smaller and framed by a blank area.
Enlarging the track (to 800 x 560) and leaving the project’s output size untouched makes the track show on the compositor larger and cropped to the output’s dimension.
Using this relationship between the track and the project’s output size you can effectively reduce or magnify the size of a particular track with regards to the final output and therefore create visual "effects" like split screens, pans, and zooms on the compositor.
8.2.6.2 Output size
The output size is set in either New when creating a new project or Settings->Format. In the Resource window there is another way to change the output size. Right click on a video asset and select Match project size to conform the output to the asset. When new tracks are created, the track size always conforms to the output size specified by these methods.
When rendering, the project’s output size is the final video track size where the temporary pipeline is rendered into.
If the output size is larger than the temporary then the image transferred from the temporary will fit inside the Output Track. Any space left on the Output is left blank.
If the output size is smaller than the temporary then some of the temporary video will be cropped out.