logo

carol.gimp.org

GIMP 2.2

GIMP Animation Plug-in:Extract

Here is a confession to start this GIMP tutorial: I write them as I learn. This fact might be obvious to anyone reading my tutorials, it is painfully obvious to me at the beginning of this tutorial.

Installing the GIMP Animation Plug-in was a journey into the past for me, as far as getting software I did not understand and installing other software to get the required software to work -- it was like my early days with TheGIMP itself! It was a lot of fun; however, I am still not certain what I installed that I needed and what I installed that I did not need. The video extraction software is where most of this occured. GAP does not extract video frames from existing files itself; and unlike TheGIMP, the menu entries show up without the software being present.

GAP extraction in the menu

screen-toolbox-xtns-extract

TheGIMP cannot load a video file on its own which places the menu entry in the Xtns menu: <Toolbox> -->Xtns -->Split Video into frames.

Extract Any XANIM readable

With my current gnu/linux (and more) installation, selecting: <Toolbox> -->Xtns -->Split Video into frames -->Any XANIM readable gives me an error message complete with instructions on where to get the software. For this series of tutorials, I did not install the software. My first GAP tutorial is probably at best, a demonstration of working through new software apps and with broken software than it is helpful in how to edit movies with GAP. A not so good take on this tutorial would be the broken work flow of a maniac who after this experience was capable of writing this rant about big corporations using free software.

This time I wanted to have the blue channel extracted as well and did not install XANIM.

screen-toolbox-xtns-extract-xanim

Extract videorange

I installed many things when I installed MPlayer; whatever I did, I did not do things correctly or I built from broken sources. The software that I have right here and right now will extract videoframes but will not display video files. This is complicated software and probably the patents and political issues will keep this stuff like this for a long time. I am fairly certain that something I installed when I installed MPlayer allowed me to extract frames from video files.

Start a gimp session from a commandline in the directory you want your extracted movie frames to land. Use <Toolbox> -->Xtns -->Split Video into frames -->Extract videorange and you will get the dialog like the one pictured here. Only a few things to worry about here:

screen-toolbox-xtns-extract-videorange
  1. The button portion of the Videofilename: "[...]" is the file selector. With TheGIMP running from the directory the frames are to land, use this file selector to find the video file from anywhere on your computer.
  2. The dialog will open with From frame [1] To frame [1] and this plug-in will do just that and you will find that you have a one frame movie. Put a bunch of zeros behind the 1; if you are using the movie that came with the tutorial then you only need 400 frames. Setting the number very large here ensures that all of the frames get made. This tutorial used From frame [1] To frame [10000]
  3. It is good to change the Basename so you remember which movie and where it came from and not copy over another project. You can change the Digits to something more reasonable as well. The example movie has only about 400 frames, so 4 digits is very reasonable. The names of the frames images will be named with the Basename-digit.xcf as the options are chosen in this portion of the extracting dialog. This example uses 6 digits. You can use the button at the end of the basename box to direct the frames into a different directory.
  4. Worry about the audio portion of the movie. It is very easy to forget this and to write over other wav files. The audio part of this movie is boring. The mobile made no noise and neither did the wind that was pushing it. Change "frame.wav" to "Basename.wav".
  5. Touch the [OK] button and wait for it to work.

Video Image Window or Frame

extraction-frame

A completely normal gimp Image Window appears once the extraction is finished. It has color channels and can have layers; anything you can do to a gimp image you can do to this. The one layer that is there is a background image, just like a normal photo would be so (for instance) it will need to have alpha added to it before it will handle transparency.

What is different is that it shares a logical name with a set of other images and gap is able to work through the other images in this stack and this Image Window. Another thing that is different about this window is that it stays in the Image Dialog even after it is closed in the session.

Right click on that image and follow the menu to Video -->Video Navigator. With this new dialog you will be able to change the image or video frame in this special image window.

Extract a Portion of the Frames

screen-videoframeplayback

Follow the same instructions for extracting all of the frames (the first part of this tutorial) with the addition of two extra steps and you can extract a smaller portion of a movie. Follow those instructions using this expanded "step 2".

2. On the right side of the From Frame: number entry gui there is a button that says [VideoRange] push that button and launch the Videoframe Playback dialog. Using this dialog, you can skip making the first frame. The first frame contains a poorly rendered color image due to a known bug in ffmpeg, so skipping this frame is a logical first step. Set the To Frame: number the same way. The movies use 20 frames per second, you can use these settings in the Extract Videorange to limit the length of the movie or whatever your other editing needs might be.

This set of tutorials muddles through other editing techniques using the whole frame stack, however.

A Stack of Extracted Frames

You now have a stack of extracted frames. If you are using the movie this example used, you have 396 xcf files, one wav file and a "vin.gap" file. The next tutorial demonstrates how to view the movie one frame at a time in the special window using the GAP's Video Navigator and how to perform a simple frame deletion.

The plug-in faces and the screenshots you see here are all from gimp-2.1 and a soon to be changed gimp-gap. The new gui for all the steps in this tutorial will appear together.

another-gnu-type-sm

Most all of my software is gnu. thanks!

Creative Commons License

This work is licensed under a Creative Commons License.