I need to convert some video files (avi, mpeg etc) to Nook color format. Here is an excerpt from their faq page.

NOOkcolor supports the following video file formats: 3gp, 3g2, mp4, m4v; MPEG-4 Simple Profile up to 854x480; H.263 up to 352x288; H.264 Baseline profile up to 854x480.

I think I can do this using Quicktime and iPhone settings but I want to do this on my Ubuntu machine.