I have been experimenting with h264 m4v videos with multiple Audio streams built in so that I can easily watch the same movie file with maximum abilities on various devices such as iPhone, iPad and PS3. The point is that I want 5.1 for primary devices such as PS3 and ProLogic2 for the other devices.

I got it right once with ac3+aac streams but 4+ versions of iOS suddenly stopped it working. Then I thought that I got it right with aac5.1 and aac 2 channels but found that the PS3 actually down mixes aac5.1 to stereo (or pass through doesn't work on the stereo).

I am serving the video files from MediaTomb using DLNA and MediaLink Player on iOS. I encode using handbrake. I have more details available if anyone is interested (let me know).

What successes have you had and advice that might help this quest?

I think the best idea would be to store a bunch of streams (possibly in separate files) then remux according to device but I haven't come across any good solution that will work with an m4v/mp4. Tried it with MediaTomb and ffmpeg but it didn't want to pipe the thing because it was a web format and I couldn't find a way to read the device header to make device dependant output.