Application Topic
   >  Introducing Video Editing
   >  Uploading Video
   >  Installing Kino
   >  Inserting Scenes in Kino
   >  Cutting Scenes in Kino
   >  Scene Transition in Kino
   >  Locating Scenes in Kino
   >  Exporting Video from Kino
   >  Installing KDEnlive
   >  Configuring KDEnlive
   >  Importing Clips into KDEnlive
   >  Editing Video in KDEnlive
   >  Editing Audio in KDEnlive
   >  Adding Transitions in KDEnlive
   >  Blending Video Tracks in KDEnlive
   >  Pan & Zoom in KDEnlive
   >  Rendering Video in KDEnlive
   >  Video Masking in KDEnlive

 

Masking Video Tracks in KDEnlive

 Video of how to use Video Masking in KDEnlive

An Introduction to Video Masking

Put simply, Video Masking is a method of marking which parts of a video track are to be displayed and which parts are not. The concept is analogous to masks used in the GIMP image editor, in that it is a construct overlayed onto the image which defines areas of opacity/transparency in the current image.

You can also view our video section for a video tutorial about masking.


Creating a Video Mask using GIMP

In KDEnlive, a Mask can be created as static image file, with a .pgm extension, using an image editor, such as GIMP. These files are greyscale only, with full white defining total opacity and full black defining full transparency.

The easiest way to do this is probably to edit a frame of the background image that you want to mask. Select the area that you want the foreground slide confined to and fill it with black (i.e. #000000):

Filling the mask background with black where you want the transparency to occur

Next, you need to fill the areas of the background that you want to show through with white (i.e. #ffffff). In our example, we just need to invert our selection using the GIMP option (-Photoshop also has this option):

Select → Invert

Inverting the selection in GIMP

Then just fill the area with white:

Filling the Opaque areas with White

Finally, save the image to disc with a .pgm extension:

Saving the file with a .pgm extension

The KDEnlive mask files (-known as wipes) reside (-at least in version 0.8) in the directory:

/usr/share/kde4/apps/kdenlive/lumas

As a result, you'll need to copy your new file over to that direction before KDEnlive will pick it up, for example:

$ sudo cp <filename>.pgm /usr/share/kde4/apps/kdenlive/lumas/

Note: you'll need to assume root via sudo to access this directory. Also note that you'll have to restart KDEnlive before it will see any new wipe files


Using a Video Mask in KDEnlive

Once your new mask has been created, start KDEnlive and pull the clips into the timeline, placing the foreground clip above the background:

Clips added into KDEnlive

Next, create a transition between the two tracks and change it to composite:

Choosing a Composite type Transition

In the transition parameters, select the mask you created earlier, by clicking on the drop-down box labelled Wipe File:

Selecting the Mask/Wipe file

Finally, adjust the Opacity value until you see effect you desire in the Preview window:

Setting the Opacity of the Mask/Wipe


References and Further Reading:


HomeSite IndexDesktop GuideServer GuideHints and TipsHardware CornerVideo SectionContact Us

 sitelock verified Firefox Download Button