In this tutorial, I will show you how to take a nice plain rectangular video and using the GAP tools apply masks to the video arriving at various shapes for the video. Well rather than try to explain more, let's get started. If you want to follow the tutorial exactly, please go and download this file:
http://www.archive.org/download/CreativeCommonsanimation/ccau.avi
It is a basic video about the creative commons license for creative works. As per it's
license you and I can make derivatives of this original video as long as we attibute the original work's author or licensor. I have provided a link to the license it is covered under. Since we will be making a change to this video, we will be making a derivative work and therefore can ourselves license it as long as we follow the terms of the original license. But I digress. :w:
The video is around 11 MB, so hopefully that is not too bad for dialup users either.
To start off with, as usual, it is best to create a working directory for your files. I just find it easier to keep track of everything.
In the main gimp window click on:
Xtns/Split Video into Frames/Extract Videorange
In the window that pops up I have highlighted the important regions for this tutorial. First click the button to the right of the text box beside Videofilename and select the video file to be opened. This video is 25 fps and we will just be working with 10 seconds of video to allow the tutorial to proceed faster. So we will change the To Frame to 250. We do not need to save audio, so switch the Audiotrack to 0. Next click the button to the right of the Basename text input box and select the folder and basename for the frames that will be created. Once you have done this, click ok and let GAP create the frames.
A window will open with the last frame of the video in it. In this window, click on:
Video/Go To/First Frame
Above is what should now be showing in the window if you are using the video linked above. (sorry, not exactly the best looking picture, but I'm keeping true to the steps not necessarily looking for aesthetics at this point :w: )
In the main gimp window, click on the eliptical select tool icon.
Now make an eliptical selection in the frame window
Next click on:
Video/Frames Modify
A window will open
Two things, first make sure you have selected:
Pattern is a list of reverse layerstack numbers
(The reason for this is, that if you recall when we did the Extract Videorange, when the frame window first opened, it showed the final frame in the video, which means that from GAP's viewpoint, the top frame is the final frame and the first frame is the bottom, so frame numbers are stored from 250 down to 1 rather than from 1 to 250)
Then click:
Function/Selection/Add selection (source is the active frame)
Then click OK
Now let GAP do it's magic of applying the selection you made on frame one to all frames that we have extracted.
When that is finished, then once again select:
Video/Frames Modify
Again, make sure Pattern is a list of reverse layerstack numbers is selected then click:
Function/Add alpha channel
(your frames need an alpha channel added so they will have a transparent component for the layermasking)
Then click OK and let GAP do it's work.
One final time click:
Video/Frames Modify
Select: Pattern is a list of reverse layerstack numbers again then click:
Function/Layer Mask/Add layermask from selection
Then click OK and wait for the magic to happen.
Now click:
Video/Playback and press the play key and see now that your video has been masked.
In a possibly later tutorial, we can add a new background to the masked video, or we can use this masked video for my previous tutorial about creating animated dvd menus using GAP. Thank you for your time. Enjoy. :h:
Ofcourse, use your imagination, go ahead and try making a star mask or use the lasso tool and create a unique mask , or better yet, the paths tool. The possiblities are endless.
One final note,
http://carol.gimp.org has a tutorial for masking a video that is different from mine. I have followed her tutorial successfully also. She takes a different approach, but that is a good thing, having more than one method to choose from to obtain your final result. Other than that, her site is a great source of information for learning to use gimp and GAP. Check it out if you get the opportunity.