I'd recommend the mp4 container format, using h.264 encoding for the video and AAC for audio.
If you are just using these files on a mobile device, those settings are great. But if you ever want to enjoy DVD or Blu-ray rips on a decent home theater setup, you will want to stay away from AAC, as its simulated surround sound sucks compared to AC3 or DTS.
If you want your files to work in the tablet and a surround sound HTCP system, use H.264 as your video codec, AC3 or DTS 5.1 for audio, and a mkv container.
Most 3rd party video players on the market will handle these files just fine, and will downmix the 5.1 audio to stereo. The stock vid player that comes with my GSII also plays these files up to 720p resolution just fine.
Sent from my Samsung Galaxy S II