Sometimes when I add a transition between two clips the first frame or two from clip A will appear at the end of clip A at the transition to clip B and makes the transition look very bad.
How/why does this happen?It seems to be a random occurrence.
How can I stop this from happening?
If you have a one-second transition, for example, you need one second of video left at the end of clip A to complete it. If you run out of video before the transition ends, clip A, by default, will "loop" back to the beginning.
Basically, if you reach the natural end of a clip on the timeline, and try to stretch it out further (by dragging it out or by applying a transition), Vegas defaults to looping back to the start and getting the needed frames from there. You can right-click on a clip (event) on the timeline, select Switches, then un-tick the "Loop" option. In this case, Vegas will not circle back to the beginning, but if it needs additional frames (to complete a transition, for example) it will simply repeat the last frame over and over -- like a freeze frame. This generally won't look so good on a transition either.
About the only two solutions are to shorten the duration of the transition -- so the transition ends before the clip ends -- or start the A-to-B transition earlier, so "A" doesn't hit its end.
Drag the leading edge of clip B to the right temporarily so that it no longer overlaps A, then drag the end of A to the left until it stops at the little notch in the top of the clip, which marks its natural end. Now drag clip B over the end of A to recreate the transition. Be careful to not drag the leading edge of B too far, or you will hit its natural beginning and face the same problem with B.