Quarter PIP

 
 

PieroF_QuarterPIP_v2.4R.fxscript.zip: (click the link to Download)

PieroF_QuarterPIP_v2.4.2.fxscript.zip (NEW test version click the link to Download)


What does it do ?

Quarter PIP = Quarter Size “Picture In Picture” is a freeware filter whose main purpose is to resize a video clip to a quarter of its size, in Final Cut Express, to make room for other video clips within the same frame; as a matter of facts it is also possible to reduce it to one half (instead of a quarter).

The PIP background is transparent to allow compositions of many video clips in the same frame by stacking them in the timeline tracks.

You can choose the position of the PIP within the frame, and among others you can also: add a colored border around the clip, additionally scale the clip, use 3 different area sizes as a reference for scaling, and move the PIP around in the window using keyframes (with Position = <manual>).

In other words, it is just a shortcut to avoid the setting of the FCE Basic Motion controls for each clip...


In the above example a basic usage of Quarter PIP is presented: this filter is applied to 2 stacked video clips. The left image is made by applying this filter with the default Position (Left) and a red Border to first clip; the right image is made by applying this filter with Position = Right to the second clip.

This filter allows a very basic usage for positioning a number of clips (usually up to 4) in the same video frame, or an advanced usage where a selected area of each clips may be displayed and where possibly each clip may be moved around in the frame.

Basic Usage

After its Installation drag the filter QuarterPIP v2.4 from the Video Filter > pf folder of Effects into the Viewer on the clip you want to apply it to.

The basic use of the Quarter PIP requires only to select the Position of the PIP within the video frame, and if necessary also the reference frame: Within: the full frame, the safe area, or the title safe area.

The default value for Position is Left, and this may be OK for the first clip, but must be set different in the other clips; you can choose among 9 position for a 50% reduced clip and 4 positions for a half clip.

The default value for Within: is Safe Area, but you can choose also Full Frame or Title Safe Area.

To get a video as in the above example, after the filter Installation, follow these steps:

  1. position clip1 in V1

  2. position clip2 in V2 on top of clip1

  3. apply Quarter PIP to clip1 in V1 with Position=Left (def.), select Add Border and Border Color = Red

  4. apply Quarter PIP to clip2 in V2 with Position=Right

  5. now you see both clips side by side: clip1 on the left and clip2 on the right.

To apply the filter, open the clip in the Viewer and drag QuarterPIP v2.4 from the Video Filter > pf folder of Effects into the Viewer.

As another an example stack 4 clips each with a different Quarter PIP setting, respectively: Top Left, Top Right, Bottom Left and Bottom Right, all Within: Full Frame. The result is something like this:



Setting Position and Within alone is sufficient to address 80-90% of the cases. But if you need more control on the source image and its position within the video frame, you may use the remaining controls, as described below.

Compatibility, Disclaimer

This Quarter PIP filter has been tested in Final Cut Express HD v3.5 and Final Cut Pro v5.1, but it will likely work also in other versions of FCE and FCP as long as they provide support for the fxscript language (see also the Disclaimer).

Version History

v2.4 - Removed a Bug that made FCP (not FCE...) ignore background transparency.

v2.3 - The source area may also be enlarged up to 200% within the PIP.

v2.2 - New Source Area controls that allow to position and resize the source area within the PIP.

v2.1 - Added the <manual> Position that allows to keyframe the PIP position - added also the possibility to rotate the PIP.

v1.3 - Added: “half” areas (half left, right, top, and bottom) and control on slip source.

v1.0 - Added: clip scaling and choice of 3 reference areas (control: Within).

v0.3 - Now the surrounding frame (if any) is inside the PIP rectangle; more, you can choose between cropping and resizing the picture within that frame.

v0.2 - Added Top Center, Center and Bottom Center; fixed frame thickness.

Quarter PIP - Part II

Advanced Usage

Note: since v2.1, Quarter PIP also allows to keyframe the PIP position and to move it around on the screen! For this advanced (manual) usage see also the example f. at the end of this page.

After its Installation choose the filter as described in Basic Usage above, and then set the following controls:


Destination Area:


  1. Position (default: Left): the destination area (PIP: Picture in Picture) where the source video clip is positioned as follows:

  2. <manual>: its position and aspect ratio are defined by the controls Horiz Manual, Vert Manual, Rotation Manual and Aspect Ratio Manual.

  3. Left: reduced to one quarter, is vertically centered on the left

  4. Right: reduced to one quarter, is vertically centered on the right

  5. Top Left: reduced to one quarter, is placed in the top left quarter

  6. Top Right: reduced to one quarter, is placed in the top right quarter

  7. Bottom Left: reduced to one quarter, is placed in the bottom left quarter

  8. Bottom Right: reduced to one quarter, is placed in the bottom right quarter

  9. Top Center: reduced to one quarter, is placed in the top centered quarter

  10. Center: reduced to one quarter, is placed in the center

  11. Bottom Center: reduced to one quarter, is placed in the bottom centered quarter

  12. Half Left: a vertical half of the source (not scaled) is placed on the left half

  13. Half Right: a vertical half of the source (not scaled) is placed on the right half

  14. Half Top: a horizontal half of the source (not scaled) is placed on the top half

  15. Half Bottom: a horizontal half of the source (not scaled) is placed on the bottom half

  16. Within (default: Safe Area): it defines whether the Full Frame (720x576 PAL or 720x480 NTSC) is the reference area for Position, or the Safe area (90% of Full Frame) or the Title safe area (80% of Full Frame).

Position and Within are the only controls to set if you use the basic approach.

  1. Scale PIP (default: 50%): it defines the scaling of the PIP referred to the Within area.

  2. For example if Position = Center, Within = Safe Area and Scale = 100% the clip is scaled to fill the safe area. See example e. at the end of the page.

  3. Note: Scale PIP works also when Position = Half Left, Half Right, Half Top or Half Bottom, but then the source frame is not scaled when Scale PIP = 50% and only half of the source frame is displayed. Only in these 4 cases, when Scale PIP = 50% the visible portion of the source clip is displayed full scale (as if Scale PIP were 100%), when Scale PIP is > 50% the PIP area increases, and when Scale PIP is < 50% the PIP area decreases. See also the Table at the end of the Control description.


Source Area:


  1. Area (default: Select using:):

  2. Select using: the PIP displays the portion of the source clip selected using Full Size, Slip Horizontal and Slip Vertical (below); in the 4 Half preset positions the displayed amount is fixed to 50%.

  3. Distort: the PIP displays the whole source clip that is shrunk to fit the PIP; as a result the image may be distorted if PIP and source clip do not have the same form factor. In this case the following 3 controls have no effect.

All the following controls for the Source Area have effect only when Area = Select Using:.

  1. Full Size (default: 0, range 0 to 2): it defines how the source clip is displayed within the PIP. It has effect only if Area = Select Using:.

  2. 0: the whole source area is scaled down in order to fit the PIP, the amount depending on the Scale PIP value; if Scale PIP = 100% the effect for Full Size = 0 is identical for Full Size = 1.

  3. 1: the source area is not scaled down and the PIP displays only the portion allowed by the Scale PIP value. In this case Slip Horizontal and Slip Vertical (see below) define the portion of the source clip to be displayed.

  4. 2: the source area is scaled up to 200% and the PIP displays only the portion allowed by the Scale PIP value. Again Slip Horizontal and Slip Vertical (see below) define the portion of the source clip to be displayed.

  5. Full Size is not restricted to integral values but it may have any value in the range 0 to 2; e.g. 1.5 scales up the source area to 150% and 0.5 scales the image down to half way between the Scale PIP size and 100%.

  6. Note that in the range 0 to 1 Full Size effect depends also on the Scale PIP value (as already mentioned if Scale PIP = 100% it has no effect). Instead in the range 1 to 2 Full Size effect is independent of Scale PIP and it is an absolute scale control from 100% to 200%.

The following controls for the Source Area have effect only when the PIP is smaller than the full screen (Scale PIP < 100% and Full Size > 0), or it has a different form factor (Aspect Ratio ≠ 0), or the source area is enlarged (Full Size >1); for example, when one of the 4 Half preset positions is selected (no effect on the 9 quarter positions) or when Position = <manual> and Aspect Ratio Manual ≠ 0.

  1. Slip Horizontal (default: 0% = centered, range -50% to +50%): it defines which horizontal portion of the source clip to display. It has effect only if Area = Select Using:.

  2. 0% (default): the source clip is centered horizontally in the PIP.

  3. < 0%: a left portion of the source clip is displayed; negative Slip Horizontal values define how much to the left, where -50% = leftmost portion - See example c. below.

  4. > 0%: a right portion of the source clip is displayed; positive Slip Horizontal values defin how much to the right, where 50% = rightmost portion.

  5. Slip Vertical (default: 0% = centered, range -50% to +50%): it defines which vertical portion of the source clip to display. It has effect only if Area = Select Using:.

  6. 0% (default): the source clip is centered vertically in the PIP.

  7. < 0%: a top portion of the source clip is displayed; negative Slip Vertical values define how much above the center, where -50% = topmost portion.

  8. > 0%: a bottom portion of the source clip is displayed; positive Slip Vertical values define how much below the center, where 50% = lowest portion.


Border:


  1. Add a Border (default: OFF): if checked a frame of Border Color (default: white) and Border Thickness (default: 2) is drawn around the PIP. The PIP and its border (however thick) always fits into the selected destination area.

  2. Picture (default: Crop): when Add a Border is ON, it allows to select one of two options (else it is not used):

  3. Crop: the picture, resized as defined by the above controls, is then cropped by the surrounding border for the amount of the Border Thickness. This may help to hide border artifacts typical of clips imported from analog sources.

  4. Resize: the picture, resized as defined by the above controls, is then additionally resized to fit into surrounding border for the amount of the Border Thickness.


Manual Position Only:


The following controls for the Destination Area have effect only when Position = <manual>.

  1. Horiz Manual (default: -1 = Left, range -4 to +4): if Position = <manual> it defines the horizontal position of the PIP: the standard range is from Left (-1) to Right (+1) with any possible value in the between. In addition values lower than -1 and higher than 1 are allowed to position the PIP out of the window on the horizontal axis.

  2. Vert Manual (default: 0 = Center, range -4 to +4): if Position = <manual> it defines the vertical position of the PIP: the standard range is from Top (-1) to Bottom (+1) with any possible value in the between. In addition values lower than -1 and higher than 1 are allowed to position the PIP out of the window on the vertical axis.

  3. Rotation Manual (default: 0°, range -360° to +360°): if Position = <manual> it defines the position of the PIP around an oval centered in the window: Rotation = 0° corresponds to position defined by Horiz and Vert Manual; Rotation > 0° moves the PIP around the center clockwise by that amount; and Rotation < 0° moves the PIP around the center counterclockwise by that amount.

  4. When keyframed this control allows to rotate the PIP around the window center up to a full “oval”.

  5. Note: The oval center is fixed and corresponds to the window center; its eccentricity is also fixed and is related with the video frame form factor; its size (and its major an minor axes) instead depend on the position of the PIP at Rotation = 0°: e.g. if starting Horiz and Vert position are both 1 or -1 the oval size is larger than if one of them is 0; in general for larger values of Horiz and Vert position the oval is larger, and viceversa.

  6. Aspect Ratio Manual (default: 0, range -100 to +100): if Position = <manual> it defines the aspect ratio of the PIP (Aspect Ratio Manual has no effect for any other value of Position):

  7. in the negative range the top and bottom edges are cropped: from 0 = no crop to -100 = fully hidden; e.g. -50 means that only half vertical size is displayed (as in Position = Half Top or Half Bottom)

  8. in the positive range the left and right edges are cropped: from 0 = no crop to 100 = fully hidden; e.g. 50 means that only half horizontal size is displayed (as in Position = Half Left or Half Right)

If Position is not Manual the filter behaves as if the Aspect Ratio = 0 except with the Half Positions: Half Left and Half Right behave as if Aspect Ratio = 50, and Half Top and Half Bottom behave as if Aspect Ratio = -50. See Table below.

PIP Position Table:

The following Table shows the correspondance between the preset values for Position and the <manual> values for Horiz Manual, Vert Manual, Aspect Ratio Manual. Rotation Manual is always = 0° by default.


*) - The default Scale PIP for the preset Half positions is 100% even if the Scale PIP control shows 50%; instead with Position = <manual> the Scale PIP always displays the real scale; so to emulate any of the Half positions it must be explicitly set to 100%.

Examples:

a. Position = Top Left (Manual: Horiz = -1, Vert = -1, Aspect Ratio = 0, Scale PIP = 50%)

The picture on the left is the result of the control values on the right figure: Position = Top Left within the Title safe area (inner blue rectangle in the Canvas window) scaled to 50% of the same Title safe area. Full Size = 0 means the source clip is adapted to the quarter PIP.

    

b. Position = Half Left (Manual: Horiz = -1, Vert = 0, Aspect Ratio = 50, Scale PIP = 100%)

- Default Source Area controls (note that in this case Full Size has no effect because Scale PIP is 100% or behaves as if it were)

    

c. Position = Half Left (Manual: as above) - Slip Source Area to its left

    

d. Position = Half Left (Manual: as above) - Distort Source Area

     

Note: all above examples have a 2 point thick white frame defined as follows. Crop means that the frame crops the underlying picture.


e. Scale down the full picture to fit the safe area:

(Position = Center, Within = Safe Area, Scale PIP = 100%)

     

f. Move the PIP around: PIP enters horizontally to the left and exit vertically from the bottom...

Try the following keyframes to get the path shown in the bottom sequence (in this example Position = <manual>, Scale PIP = 50% and Within = Safe Area are fixed):

  1. 1.keyframe Horiz = -4 (the PIP is out of the frame on its left)

  2. 2.keyframe Horiz = 0 and Rotation = 0° (the PIP is in the Top Center position)

  3. 3.keyframe Horiz = 0 and Rotation = 90° (the PIP is in the Right position after a quarter ellipse turn)

  4. 4.keyframe Horiz = 4 (the PIP is out of the frame under its bottom)

Note that Vert = -1 never changes, even though the PIP moves down: this thanks to the Rotation = 90°. The following picture shows the control values and keyframes; the playhead is positioned in the middle.


The following is an example of the PIP path where the picture numbers refer to the position of the playhead relative to the above keyframes; e.g. 2.5 picture displays the clip when the playhead is positioned between keyframe 2. and 3. (Horiz = 0 and Rotation roughly = 45° - playhead positioned as in the picture above).

1.5
  2.
  2.5.

3.

3.5

g. Other examples of advanced options:

In the following pictures the blue rectangle bounds the window, and the green rectangle draws the boundary of the source clip: depending on the value of Full Size and Aspect Ratio a small or large part of the clip is hidden. When this is the case, the Slip Horizontal and/or Slip Vertical control which portion of source clip has to be displayed in the PIP. Red values are non standard values for the selected Position. The same video frame is used in the following examples to let better compare the results.


Position: Center

Scale PIP: 100% Full Size: any Aspect Ratio: 0

Slip Horizontal: any Slip Vertical: any


[Corresponding Motion Tab: defaults]









Position: Half Left

Scale PIP: 100% Full Size: any Aspect Ratio: 50

Slip Horizontal: -50 Slip Vertical: any


[Corresponding Motion Tab:

Crop > Right: 50]









Position: Half Left

Scale PIP: 100% Full Size: any Aspect Ratio: 50

Slip Horizontal: +50 Slip Vertical: any


[Corresponding Motion Tab:

Basic Motion > Center: (-360, 0)]









Position: Top Left

Scale PIP: 50% Full Size: 1 Aspect Ratio: 0

Slip Horizontal: -40 Slip Vertical: 0


[Corresponding Motion Tab:

Basic Motion > Center: (-100, -144)

Crop > Right: 37

Crop > Bottom: 25]









Position: Half Bottom

Scale PIP: 50% Full Size: 0 Aspect Ratio: -50

Slip Horizontal: any Slip Vertical: -25


[Corresponding Motion Tab:

Basic Motion > Scale: 50

Basic Motion > Center: (0, 144)

Crop > Top: 25

Crop > Bottom: 25]