Xvid is basically divx. You should be ok there.
Check the appendix for your units manual.
I have an 8400 and I found after a lot of trial and error the best settings at least for me were:
800x480 MP4 MPEG ( not h.264) with AAC audio.
My unit says if can play h.264 1280x720p but I have yet to accomplish this yet.
The 800x480 gives the closest ratio that fits the screen with only a tiny bit of black edge.
I use this mostly for music video I rip from YouTube.
With the P8400 I was able to use the IPOD/USB1 input to toggle from music to video. Just press the magnifying glass search icon and the very root level at the left has a button for music or video.
This worked better for me on iOS5.0.1. Since being on 5.1.1 I've had bugger results.
Hope that helps. But SD card is the best. I have to agree.