I have MKV format video that contained video was H.264(AVC) and audio was Vorbis. I need to convert it AVI(Xvid),Audio Mp3. when I convert it. it getting Audio Sync problem. I searched on this forum about this problem and used avidemux but it can't encode B-frames perfectly. it creating video dirty. My video info was Seems like this:

General
Complete name : C:\Documents and Settings\system4\Desktop\
Testfiles\Dattebayo_Naruto_Special_.mkv
Format : Matroska
File size : 173 MiB
Duration : 25mn 6s
Overall bit rate : 961 Kbps
Encoded date : UTC 2007-04-01
Writing application : mkvmerge v2.2.0
Writing library : libebml v0.7.8 + libmatroska v0.8.1
Cover : Yes / Yes

Video
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L5.1
Format settings, CABAC : Yes
Format settings, ReFrames : 3 frames
Codec ID : V_MPEG4/ISO/AVC
Duration : 25mn 5s
Nominal bit rate : 778 Kbps
Width : 704 pixels
Height : 480 pixels
Display aspect ratio : 16/9
Frame rate : 23.976 fps
Colorimetry : 4:2:0
Scan type : Progressive
Bits/(Pixel*Frame) : 0.096
Title : Video (H.264)
Writing library : x264 core 58
Encoding settings : cabac=1 / ref=3 / deblock=1:-2:-3 / analyse=0x3:0x133 / me=umh / subme=7 /
me-prepass=0 / brdo=1 / mixed_ref=1 / me_range=32 / chroma_me=1 / trellis=1
/ 8x8dct=1 / cqm=0 / deadzone=6,6 / chroma_qp_offset=0 / threads=6 / nr=1000 /
decimate=1 / mbaff=0 / bframes=3 / b_pyramid=1 / b_adapt=1 / b_bias=10 /
direct=2 / wpredb=1 / bime=1 / keyint=250 / keyint_min=25 / scenecut=80(pre) /
rc=2pass / bitrate=778 / ratetol=90.0 / rceq='blurCplx^(1-qComp)' / qcomp=0.60
/ qpmin=1 / qpmax=51 / qpstep=40 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.80 /
pb_ratio=2.20 / aq=0
Language : Japanese

Audio
Format : Vorbis
Codec ID : A_VORBIS
Duration : 25mn 6s
Bit rate mode : Variable
Channel(s) : 2 channels
Sampling rate : 48.0 KHz
Title : Japanese Audio (2ch Vorbis)
Language : Japanese

Text
Format : ASS
Codec ID : S_TEXT/ASS
Codec ID/Info : Advanced Sub Station Alpha
Title : English Subtitles (ASS)
Language : English

Chapters
Language : English
1 : 00:00:00.000 Episode
2 : 00:22:33.869 Ending
3 : 00:24:11.833 Outro
4 : 00:24:56.711 Credits

So. I need to convert it AVI with MP3 audio without Audio Sync. Please help me. which tools and which setting will require for this.