How to make a video file of a particular size?

Try to use AVS DVDtoGo from AVS Video Tools.

This program allows to convert DVD and video files to AVI (DivX, XviD) and specify the output files size.

1. open an input file (it works with both video files and DVDs)
2. select the "Personal computer" preset
3. set the limit for output file size (for example 512 MB)
4. click Next and then Start

I think that AVS Video Converter is the best. It supports virtually all video formats and has built-in DVD, VCD burning engine.