copy – Problem with seeking with ffmpeg with two sources (video + audio)

I’m having this problem with ffmpeg. I’m combining video and audio from two different files (video – reencode, audio – copy):

ffmpeg -i avisynth.avs -i audio.mp4 -map 0:v -map 1:a -c:v libx264 -c:a copy out.mp4

and after this operation, when I load out.mp4 into VDub or Vegas, I have problems with seeking. The seek jumps to a different frame than it should.
If I seek frame by frame, everything is fine.If I recompress out.mp4, everything is fine again.
But if I seek to different frames in the same out.mp4, it jumps to a different frame than it should (the difference is 2-4 frames).
What’s the reason?

I was expecting proper frames during seek.

Read more here: Source link