There's a big thread on this but the main points were ffmpegx can work but sometimes it won't, Handbrake is good for DVD's so long as you don't use H.264.
There are a few little programs starting to make the rounds so have a look in VersionTracker.
for pc i found the best thing in the world for it. From the ppl who brought you PSP Video 9 now made a program for ipods called "Videora iPod Converter". It works awsome!