You want to place the muzzle fire right where the hole of the barrel is. Get some reference pictures. As always, reference is key! A Google search should provide you with plenty of reference photos.
As you may have noticed, the perspective of the muzzle fire is off in Figure 3. The footage of our actor is a quarter-angle view. Our muzzle flash is a side view. Sometimes, depending on the muzzle flash footage, we can turn the muzzle-fire layer into a 3D layer and rotate it along the Y-axis in order to match the perspective. This will not always look correct, so it's best to start off with a muzzle flash shot in the same perspective as the shot of your actor. If, however, a side view is all you have, here is a solution.
Click on the 3D box for the Muzzle Flash layer in the timeline to convert it into a 3D layer (see Figure 4).
As you see in Figure 5, a rotation along the Y-axis (the green arrow) and a rotation along the Z-axis (the blue arrow) have put the footage into an acceptable alignment. Remember, this is going to be only one frame long, so if it feels right, no one will notice.
Realign the barrel and the muzzle flash by changing the position of the muzzle fire (see Figure 6).
Figure 3 (click to enlarge)
Figure 4 (click to enlarge)
Figure 5 (click to enlarge)
Figure 6 (click to enlarge)
You may have to desaturate or saturate your muzzle fire, depending on your footage. In this example, we have to desaturate the muzzle flash. Apply the Hue/Saturation effect (Effect > Color Correction > Hue/Saturation). I brought the Master Saturation down to -25 (see Figure 7).
You may also need to add a blur (Effect > Blur & Sharpen > Fast Blur OR Box Blur - these are the two best blurs), in order to make the muzzle fire match your footage. In this case, a blur is not necessary.
Figure 7 (click to enlarge)
Try Turbulent Displace (Effect>Distort>Turbulent Displace) if the muzzle fire isn't "fiery" enough. I set Amount to 25, Size to 7 and Complexity to 6. See which combination works best for you.
Your muzzle fire is now complete. Be sure to tweak every setting to blend your muzzle flashes properly. Blurs, exposure, color correction and interactive lighting are your friends, so call upon them when the going gets tough.
Again, please remember to use caution and common sense when shooting scenes with guns. Safety is your number one priority, so take this stuff seriously and everyone else will too. We want you all back for my next demo... Light Sabers!
Oh, and yes, that is a La Femme Nikita reference at the beginning of this article.
Figure 7 (click to enlarge)
Paul Del Vecchio is a "do-it-all" director and owns Triple E Productions, a movie/video production company..
To view the tutorial video for Making Realistic Muzzle Flashes, click here.


After Effects Apprentice
Creating Motion Graphics with After Effects, Vol. 1 (3rd Ed., Version 6.5)
Creating Motion Graphics with After Effects, Vol.2, (3rd Ed., Version 6.5)
Creating Motion Graphics with After Effects (4th Ed., Version 6.5)
Videomaker Multimedia Tutorial - After Effects Part 1 (DVD-ROM)
Videomaker Multimedia Tutorial - After Effects Part 2 (DVD-ROM)
Composition 201
Simple Compositing
Wedding Videoland
How to Composite Video for Inserting Backgrounds in Sets