You are on page 1of 2

The tutorial that I learned from seems to be offline at the moment. I'll just copy/paste it instead.

I read about how to make Cinemagraphs (a fancy name for an animated gif made from a video
that looks like a still image with one or more moving parts) from this tutorial at Photojojo. It is a
good tutorial, and worth reading to supplement my tutorial. It uses Photoshop, but I use GIMP.
The technique is quite simple when using Photoshop, and is also quite simple with GIMP but not
as elegant: it is not as automated, and therefore contains a simple, repetitive element. Also you
need to prepare the video file as image files first, as GIMP can't open AVI files. Neither
differences pose difficulties.

If you open a Cinemagraph in GIMP you will find it is a regular animated gif but that it
comprises a complete background image, and above that a stack of images that are entirely
transparent, save for the section/s of each image that comprise the moving elements seen when
you view the Cinemagraph. This is worth bearing in mind to understand how to make them.

You will need:

 a video clip (this tutorial assumes AVI format)


 GIMP
 The GIMP Animation Package (GAP) extension to GIMP if you don't have it
already (if the tab 'Filters' in GIMP shows no 'Animation' subheading I guess that
means you don't have it)
 A method to export frames of a video as image files. This tutorial uses 'ffmpeg' as
I'm using GNU/Linux and it's available easily via a package manager. Windows
and Mac users may have to use something like Streamclip, unless there is a free
software option for their platform

If you want to give it a go here's how to make a simple Cinemagraph in GIMP:

1. Take your video clip and place it in its own folder. Open a terminal emulator in
the folder and use the command-line tool 'ffmpeg' to export all the frames from
the video as image files. :
ffmpeg -i YourVideoClip.AVI frame%d.jpg
Needless to say, if the video is long there will be a lot of frames and a lot of
resulting jpg files.
2. Choose the sequence of images to make the Cinemagraph with. Delete the rest.
Open the first frame of your sequence in GIMP. The layers window will label it
'Background'.
3. Save this as 'a-title-you-choose.xcf' so it can be opened and edited easily later (xcf
being GIMP's native file format).
4. Go to 'File', then 'Open as layers'. Select all the remaining images in your
sequence (click the first then Shift click the last) and load them into GIMP. They
will be added sequentially by file name into the layers stack.
5. On the top layer (just because its currently the only visible one) select the area/s
you want to show moving in the finished Cinemagraph. I used a feathered edge of
radius 10.0 to give a soft edge to the resulting mask.
6. Save the selection you have made to a channel by going to 'Select' and choosing
'Save to channel'. Now deselect your selection by doing 'Select' and then 'None'.
7. Now comes the sweetly repetitive part. Right click in the 'Layers' window on the
top-most layer of the stack. Select 'Add layer mask'. In the dialog that opens click
the radio button for 'Channel'. You will notice that the selection you saved to a
channel is pre-selected for you. Click 'Add' in the dialog. Now right-click on the
next layer down and click 'Add layer mask', you will see 'Channel' is pre-selected
so just press 'Enter' on your keyboard. Now right-click the next layer down, click
'Add layer mask', press 'Enter'. Repeat and repeat and repeat. When you get down
to the 'Background' layer stop. The 'Background' layer needs no mask.
8. Done. If you want to use the 'Filters/Animation/Playback' function to preview
your gif (ahem...Cinemagraph) you will need to apply all those masks, layer by
layer. Instead I go to 'File' and 'Save a copy' and give it a name (ie:
'something.gif.'). The gif dialog will open, showing radio buttons. Choose to save
as an animation, and to limit colours or to use greyscale. Under the 'Frame
Disposal' options choose 'Cumulative Layers (combine)' as this keeps the
background layer on display while the masked layers animate over the top of it.*
All the layer masks will be applied automatically.
9. Enjoy your Cinemagraph, or continue working on it in GIMP until it's looks right.

Notes:

My ghost car Cinemagraph uses a frame from the video taken before the car drove past as its
background layer. I made this one layer have a slower frame speed than the others to allow a
pause between times when the car drives by, thus saving on using unnecessary frames. You can
change the default frame speed (100ms per frame) for individual layers in GIMP by double-
clicking on the layer name in the 'Layers' window and adding a space and a bracketed time in
milliseconds after the name ('Background' became 'Background (1500ms)' in this case). The area
around the car is not very high quality; you can see the landscape move jerkily. This is because I
did not have a tripod with me (I rested the camera on a chain-link fence) so there was some
camera movement. Never mind, it serves as an illustration of the principles involved, if not as a
perfect creation!

*[Edit] Thanks to Gulliver for pointing out that the 'Frame disposal' options must be set to
cumulative on export. Alternatively, the animation layers could also be set to combine rather
than replace preceding layers before exporting the project by optimising the layers for GIF
(Filters > Animation > Optimise for GIF), if this is done then the 'Frame Disposal' export option
can be left as its eloquently worded 'I don't care' default.

You might also like