Using GIFs

G

Gazmum

Is there any way that Movie Maker will allow a GIF graphic
to form just part of a clip? For example, can I get a
little walking animal moving across my movie clip? When I
import a GIF it automatically takes up the whole clip and
I can't resize it, or superimpose it onto a movie clip.
 
P

PapaJohn \(MVP\)

No, you are seeing how MM2 handles GIF files. It doesn't support
transparency of video/still clips. You have to use higher end software like
Premiere to do that, and then import the clips from it into MM2.

PapaJohn
 
K

Ken

I have done this with static picture files over video and video over video.
I imagine that WMM will handle an animated gif just the same. You will need
to add a custom transition, but it is not hard to do.

1. copy the following text and save it as a text file in the "c:\Program
Files\Movie Maker\1033\AddOnTFX\" folder with a .xml extension.
NOTE: the actual directory may be different depending on your language (1033
is for English) and installation (you may have elected to install to a
location other than "Program Files"). You may also have to create the folder
AddOnTFX.

=========.xml file==============
<TransitionsAndEffects Version="1.0">
<Transitions>
<TransitionDLL guid="{C5B19592-145E-11D3-9F04-006008039E37}">
<Transition name="CromaBlue" iconid="91">
<Param name="KeyType" value="0" />
<Param name="RGB" value="0x0000FF" />
</Transition>
</TransitionDLL>
</Transitions>
</TransitionsAndEffects>
================================

2. The file I have given is for a gif file with a blue background (the
background will be transparent). In order for this to work, you have to know
the exact RGB values of the portion of the animated gif you want to be
transparent. The transition I have given treats all pure blue (RGB = 0000FF)
pixels as transparent. You will need to replace the value of the RGB
Parameter to match the actual value for the pixels you wish to be
transparent. Make sure to resave the .xml file after you make changes.

3. Restart WMM. Custom Transitions are loaded at run time, so you must
restart WMM before the transition will be visible.

4. Place the video clip on the time line.

5. Place your gif on the timeline after the video clip

6. Grab the gif and slide it over on top of the video clip to create a
transition between the two.

7. Open the transition collection and find the new transition you just
created (CromaBlue). Drag and drop onto the overlaped portion of the video
clip and animated gif.

The trick is to know the exact RGB value of the transparent pixels. If you
have created the gif yourself, this is probably easy to determine.

Another note. If the gif is stored with an alpha value to designate each
pixels transparency there may be an easier way. A KeyType value of 3 instead
of 0 prompts the transition to look at the alpha value instead of the RGB to
determine a pixels transparency. I have never tried this method so I don't
know how it works, but it may be easier than the RGB method. For more
information on the Key Transition including the alpha key, see:
http://msdn.microsoft.com/library/d...n-us/directx9_c/directx/htm/keytransition.asp

If you need to resize the gif, it will be easier to do it in the program
that you used to create the gif. Barring that, there is a way to do it in
WMM, but it involves more custom transitions and saving the movie at least
twice. Let me know if you want info on the WMM method for resizing the gif.

Hope this helps,

Ken
 
P

PapaJohn \(MVP\)

Hi Ken,

Sounds like you achieved some success in the arena of custom transitions and
effects. Nice!! I assume that the non-transparent part of the clip does a
normal fade with the other overlapping clip.

I added a section about Animated GIFS on the Importing Source Files... Still
Pictures page of www.papajohn.org - and will be adding your notes here to
those on the Editing... Video... Transitions page.

PapaJohn
 
K

Ken

PapaJohn,

It is a hard cut at the beginning and end of the transition. When the
transition begins, the transparent portion is completely transparent and the
opaque part is completely opaque. There is no fade at the end of the clip
either. The opaque part is completely opaque for the entire length of the
transition.

I would appreciate some feedback from you or Gazmum regarding the behavior
of animated gifs in WMM as I have not had a chance to try them yet. It seams
like it would be a relatively nice and simple method to put a customized
logo, perhaps for copyright purposes over the top of demo video.

Ken
 
J

John Kelly

Hi there,

Can I ask, would this work for a piece of video with a one colour background
instead of a GIF. I use a program called Swish to create flash
presentations, and one option in the program is to create an AVI file
instead of a flash file. If it is possible, WOW !!
 
K

Ken

John,

I believe that it would. My problem with the video, is that I did not have
any samples with a flat, one colour background, do I have not been able to
try it. I would like to try creating a video with PowerPoint (see PapaJohn)
with text animations to expand the logo/title/credit capabilities. I do not
see why it would not work. Please let us all know of your success!

Ken

John Kelly said:
Hi there,

Can I ask, would this work for a piece of video with a one colour background
instead of a GIF. I use a program called Swish to create flash
presentations, and one option in the program is to create an AVI file
instead of a flash file. If it is possible, WOW !!
sea.
 
K

Ken

John,

I made a post about this transition a couple of weeks ago. PapaJohn put it
on his web page in editing...video...transitions. It has more detail about
some of the other options and my trouble shooting notes. I have not tried
all of the KeyType values yet, and some of the other types look like they
might be useful.

Ken

John Kelly said:
Hi there,

Can I ask, would this work for a piece of video with a one colour background
instead of a GIF. I use a program called Swish to create flash
presentations, and one option in the program is to create an AVI file
instead of a flash file. If it is possible, WOW !!
sea.
 
J

John Kelly

Hi there,

Yes, thanks for all of that. I will definitely give it a try out, and let
you know if I succeed. Many thanks
 
J

John Kelly

Hi Ken,

Today I made a simple AVI with Swish. an RGB(0,0,255) background and some
white text moving around.

The transition did not work, in fact what happened was that instead of
getting a transition of any sort it switched from clip A to Clip B at the
begining of the transition. At first I thought I had messed up the XML file
so I replaced the Swish made AVI with a GIF89a non interlaced file and the
transition worked exactly as you describe.

I am going to experiment with the Swish made AVI, maybe Swish does not save
it exactly the way we need, I am wondering would things improve if I
imported and then saved to file the AVI.

Its meal time here (in the loony bin) So I will have a play later and let
you know of or success or failure.
 
P

PapaJohn

Ken,

I added the meat of this thread to the Editing... Video... Transitions page.
And made the XML file from your code to start playing with.
 
P

PapaJohn

Just to note that Microsoft Paint includes a color picker and can handle a
transparent GIF file, so you can use it to determine the exact RGB value.
 
P

PapaJohn

Ken,

I tried it using a video clip and a BMP image. It worked great. Now for an
animated GIF test.
 
J

John Kelly

Hi Ken,

The AVI file that failed to do what we wanted. Using Corel Graphics suite I
converted it into an MPEG and used that instead...and...IT WORKS!!!

But, there is an issue. The text I used fades in from nothing and moves
around a lot until it forms the phrase, "This is Great" on top of that the
font used is one of those highly stylized ones...lots of twiddley bits and
so on. you are probably in front of me by now....the edges of the text
becomes a little ragged and for whatever reason, takes on the wrong colour.
When the text settles down, it looks less than good enough.

Bit of course using Swish to create a Macromedia SWF files and saving that
as an AVI and then converting that to an MPEG is probably not the best way
of getting the desired result anyway.

What it does give me the ability to do now is to have more than one still
image (limitation of Swish...you cannot import AVI's) and multiple lines of
text doing there own thing with the ability to move them around as I
wish...I expect I will find a better approach in time, but without your help
I would not have even started this...So Thank You very much
 
J

John Kelly

Hi yet again,

I found out why the original AVI did not work...the process of creating the
blue made it RGB(0,2,255) which of course is the reason it failed before.
It now works perfectly. So I am well pleased with your initial
ideas...Thank You again.
 
K

Ken

John and PapaJohn,

I am glad that it works. This expands WMM considerably. I still need to play
around with some of the other options to see what they can do.

Ken

John Kelly said:
Hi yet again,

I found out why the original AVI did not work...the process of creating the
blue made it RGB(0,2,255) which of course is the reason it failed before.
It now works perfectly. So I am well pleased with your initial
ideas...Thank You again.
sea.
 
J

John Kelly

Hi Both,

Yep, its going to be a whole new ball game....I think that "Method of
Application" (video overlap) is going to play a role as well, but compared
to the steps you have already made ... that's going to be small fry.
 
P

PapaJohn

To illustrate the transparency feature, I revised my short monkey video,
adding a logo to the lower right corner. There's a link to it on the
Editing... General page - just click on the monkey.
 
P

PapaJohn \(MVP\)

I can't stop playing with it! Just added a link to a 37 second clip that
illustrates using the transparency feature for a video clip playing over
another video clip. The link is the new image on the Editing... Video...
Transitions page of www.papajohn.org

I still haven't done it with an animated GIF, but it works fine with still
pix and video. And MM2 treats an animated GIF as both, depending on what
it's doing. So it should work for them too.

PapaJohn
 
J

John Kelly

Hi there,

I see that you get the unwanted change of colour at the edge of the graphic
as well. I solved it for Quadri-Lateral Recti-Linear Objects !! (Rectangles)
and it would also work for anything that has a predictable curve...circles
and ovals etc. Take your picture and make the canvas a couple of pixels
wider. Then draw a Black box around the picture covering those new pixels.
Then process the AVI to get your blue background video. The use of black was
completely arbitrary...any colour other than pure blue would work just as
well.

I have Corel 6 which is now quite old, but it still works.....Using
PhotoPaint, magic wand everything that is blue or close to blue (Fairly
tight tolerance) and force it to be RGB(0,0,255), and that's it Job Done.

So far I have done this manually and it is a bit tedious, but I will be able
to script Corel Photo Paint so that the process will be fairly automatic.

The above process without the box could of course be used for text. It would
obviously be less reliable.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top