I'll try to find some time to write a nicer guide about how I do it... but for now.. here's some general information...
Here is a link to the codec I use:
http://www.koepi.info/xvid.html
It works quite nice. I've used it for all my TrackMania videos, including my TMUF ones.
General settings I use for rendering out of TM2:
25x Antialias
Motion Blur on
Sound on
1920x1080 resolution
30fps
I usually leave reflections unchecked, and the others as well. They can drastically increase render time. You still get reflections, even if that's unchecked.
Also, you won't get some quality settings if you use the MediaTracker in the track editor. It's best to use the MediaTracker in the Replay editor for rendering out videos or taking screenshots with the "bmp" tool in MediaTracker.
Make sure you select XviD for the codec when it asks (assuming you've already installed it from the link above). Normally it will be set to uncompressed, and that is probably why you were getting such short clips, because it was hitting the filesize limit very quickly and splitting off to a new file. With XviD you won't have that problem for most normal length tracks.
The resulting XviD file you get (it's an .avi file) can be uploaded directly to YouTube with no editing, or optionally you can import it into Sony Vegas or your favorite video editing program for further editing.