2 video files one has the audio with 15fps the other has the video with 5fps audio is out of sync

I'm trying to sync the audio and video of 2 different files, one is a 15 FPS…

2 video files one has the audio with 15fps the other has the video with 5fps audio is out of sync

I'm trying to sync the audio and video of 2 different files, one is a 15 FPS webcam stream with audio and the other is a screen share with 5 FPS.

This is an educational setting.

I'm trying to do the math in my head on what causes the audio desync, is it the 10FPS difference?

I first extracted the audio from the webcam mp4 and inserted it into the video using mkvmerge, then used handbrake to encode it in constant fps and it didn't work.

I tried 5, 15 and 30 fps in handbrake.

The question is, is there a way I can sync these by messing with FPS or some other property, or d I need to manually determine how desynced the audio is and manually shift it?

Question from user user5688333 at stackexchange.

Answer:

The two devices that recorded the videos weren't synchronised together, so their clocks will drift over time.

There's no way to guarantee perfect synchronisation, but if you have audio recorded on both, you could use something like Premiere's multi-cam workflow to sync the footage.

If it drifts, you'll have to do some manual editing and recutting to get it back into sync.

Answer from user tomh at stackexchange.

2 video files one has the audio with 15fps the other has the video with 5fps audio is out of sync