Cutting AVI Files
Cutting AVI files is actually quite an easy thing to do, if you know which software to use. Although there are many generic file cutting tools available, the problem with them is that they don't "understand" the AVI format, and the files that are cut with them will most likely have problems.
However, using an AVI editing tool to cut AVIs, will almost always yield good results. There are many AVI editors around, but for this tutorial, we'll use VirtualDub, a freeware open-source AVI editor, popular amongst the DivX community.
What VirtualDub does isn't strictly cutting, but what it does is allow you to select a part of the movie, save it as another AVI file (no re-compression needed, so it will only take a few seconds to save the AVI file), and repeat this process until all your AVI cut is completed.
We hope you enjoy this guide.
You'll need to download and install the following software before you proceed with the rest of this guide.
VirtualDub - an AVI editor
 |
|
 |
- Start VirtualDub and load in your AVI file (from the "File" menu).
- From the "Video" menu, select "Direct Stream Copy".

- From the "Audio" menu, select "Direct Stream Copy".

- Let's also get familiar with VirtualDub's controls

- Slider - Can be used to slide to parts of the movie
- Move to last frame - Pressing this button will move the slider to the end of the movie
- Keyframe previous - Skip to the previous keyframe
- Keyframe next - Skip to the next keyframe
- Mark in - Marks a position that tells VirtualDub where to start the cut
- Mark out - Marks a position that tells VirtualDub where to end the cut
- Current Slider position - Tells you where the slider is currently positioned at
- First, press the Move to last frame button to move the slider to the end of the movie. Take a note of the Current Slider position, especially the Frame number. This is the total number of frames. Example : total number of frames is 2387
- Decide how many parts you want to cut the movie, and divide the total number of frames by the number of parts you want to cut - this is the number of frames for each part. Example : number of parts you want to cut is 4. If total number of frames is 2387, then each part will be 596 frames.
- Slide the slider back to the beginning of the movie.
- Press the Mark in button.
- Slide the slider to where you want to stop cutting. Example : move the slider to frame 596 x 1 = 596 (or roughly there).
- Press the Keyframe previous or Keyframe next button once to skip to the next keyframe (it is good to cut at a keyframe, to avoid problems).
- Now press the Mark out button. Note that part of the slider bar will now have been highlighted - the highlighted part is the part you are cutting.

- From the "File" menu, select "Save as AVI" and save the file as a new AVI (don't overwrite your existing files). Example : save the AVI as movie-1.avi
- Press the Mark in button.
- Slide the slider to where you want to stop cutting. Example : move the slider to 596 x 2 = 1192 (or roughly there).
- Press the Keyframe previous or Keyframe next button once to skip to the next keyframe (it is good to cut at a keyframe, to avoid problems).
- Now press the Mark out button. Note that part of the slider bar will now have been highlighted - the highlighted part is the part you are cutting.
- From the "File" menu, select "Save as AVI" and save the file as a new AVI (don't overwrite your existing files). Example : save the AVI as movie-2.avi
- Repeat step 13 through 17 until you are near the end of the movie - if you are near the end of the movie, press the Move to last frame button to cut the last part of the movie.
- Please note that you should have several new AVI files, but your original AVI file should still be there (you can delete it if you don't need it anymore).
 |
|
 |
Sometimes the AVI file you have cut (the second, third ... files) may have it's audio out of synch. The way to fix this isn't very hard, but it takes some maths =)
- First figure out whether the audio is ahead of the video, or the other way around - the easiest way to do this is to listen to the audio when people are talking (and you can see their mouth movements).
- Start VirtualDub and load in your AVI file (from the "File" menu).
- From the "Video" menu, select "Direct Stream Copy".
- From the "Audio" menu, select "Direct Stream Copy".
- From the "Video" menu, select "Frame Rate". You should see the following screen :

Remember both A and B values, but more importantly, you should minus A from B. Example : B - A = 0.536 <== let's call this "C"
Don't touch any other setting in this section.
- Use the Move to last frame to skip to the end of the movie and take note of the total time of the movie.

Remember the end/total time. Example : 49.624 seconds <== let's call this "T"
- From the "Video" menu, select "Select Range". You should see the following screen :

- Disable the "Offset audio to maintain A/V sync" option.
- Now this is the hard (math) part. You'll now need to set the "Start offset" or "End Offset" settings to move the video forwards/backwards (and hence, make the video move backwards/forwards). To work out what you need to type in :
C * T / A * 1000 = 0.536 * 49.624 / 24 * 1000 = 1108
If your audio is ahead of video (you hear it before you see it), then enter this value into the "Start Offset" (Time) box. If the video is ahead of the audio (you see it before you hear it), then enter this value into the "End Offset" (Time) box.
- From the "File" menu, select "Save as AVI" and save the file as a new AVI (don't overwrite your existing files). The new AVI file should have synched audio (although the starting 1108 ms won't have sound).