Get MeGUI.
Demux all the streams, that includes video, audio and subs.
Load avisynth script creator and put the video and subs in, or you can just fire up notepad and DIY.
Encode using one of the xvid profiles, or mix and match your own preference in scratch pad.
If the audio isn't compatible, encode it to a compatible format, mp3/ac3/whatever that goes in AVI.
Mux it back into AVI, using the AVI-muxer also available in MeGUI.
Test the video.