I have a
.avi file but I only want to play part of it (the first 20 seconds, and the segment between the 120th second and the 150th second). How can I generate a new file with just those parts of the original movie?
Another option would be AviSynth, given that your requirements appear to be very specific as to what parts of the material you want to use and not use. It appears that you already know what you want to use and not use.
Check out this good tutorial guide for AviSynth: http://www.reghardware.co.uk/2009/06/25/beginners_guide_avisynth/