Transitions on the timeline
On my Collections vs Timeline Preview post rehan asked an interesting question about where transitions and effects fit in the graph. Well let’s find out shall we?
Brushing off my video editing skills, I made the following MovieMaker timeline.
I imported the Windows Movie Maker Sample File, dragged it down to the timeline twice, and then overlapped them to make a simple fade transition.
Here’s what the graph looks like for the video stream. (For simplicity I removed the audio bits from the diagram as the audio path is very similar to the video path in this case).
This time you can see that there are two source filters created for the same video file. As we have a transition between the two same files we need to actually read frames from different points within the file at the same time, as you’ll see below. We accomplish this by having the two source filters that you see.
You can then see the decoders and frame rate converter that we saw before. However the interesting bit comes when we get to the switch that is part of Dexter. Instead of just one input and one output that we had before we now have three inputs and three outputs. Output 0 is the main output video from the timeline but now you can see that there are two other outputs from the switch which go into another filter and the output of that filter is fed back as an input into the same switch. Some fun stuff :-)
Here’s how it all works. At the beginning of the timeline things are pretty straightforward. The video frames that are fed into Input 4 (I’m not sure why Dexter isn’t starting at 0 in this case) are just passed unchanged to Output 0. When we get to the transition Input 4 is going be receiving frames near the end of the file and Input 5 is going to start receiving frames from the beginning of the file. Input 4 is passed to Output 1 and Input 5 is passed to Output 2. These outputs are received by the filter DEXFILT0000030EDXT Wrapper. This filter is the wrapper for the actual code which combines the two sets of video frames to perform the actual transition. The output of this filter is fed back into the switch as Input 6 and then Dexter will feed the frames from this input to Output 0. This carries on until the transition is finished. After that, Dexter will switch to passing the frames from Input 5 to Output 0 until we reach the end of the file and the end of the timeline. I hope that all makes sense.
Next I'll show what the graph looks like for an effect, but you can probably guess now you’ve seen how transitions work.