Out of sync when I render whole the frames but it's OK when I render sub of it I have two video in blender with 30 frame/second for both of them. When I play the video in blender, everything is fine. When I use animation button for whole the frames, in the middle of video, audio and video are not sync, but when I do the same thing for just sub-frames (for example 200 frames), the output is Ok. I am totally confused and don't know what's the problem.
Blender has an integrated feature for this very problem. Under your timeline, you have a sync too. If you set this to 'Frame Dropping', it will skip some frames during playback if your fps rate is too slow. This way it keeps the video in sync with real time.