I use avide­mux to re-encode my movies (divx, xvid, mpeg) to a smaller size. Avide­mux pro­vides a very good GUI which makes live a lot eas­ier… I use those set­tings to re-encode a movie for my gp2x (works even in the safe mode with­out any problems):

video, xvid4:
con­fig­ure: main, encod­ing type=Single pass — bitrate, Tar­get bitrate: 350
con­fig­ure: motion esti­ma­tion, Motion search pre­ci­sion = 6
fil­ters, MPlayer resize: 320*170 (for a dvd, if you re-encode a 4:3 tv rip you can use 320*240)

audio, lame:
con­fig­ure: CBR, 96kbits
fil­ters, resam­pling 48 to 44,1kHz

The file­size will be reduced to 200-300mb.