Video texture desync during animation render [solved; the reason is wonky framerate of source video]

I’m using Blender to mask out some objects in a video. “Matte” objects are meshes with Armature deformation and the video texture projected using Global coordinates. Everything plays well in viewport, but during render, objects’ animation plays out of sync with video. The scene render FPS is set to the same number as video. Match Movie Length is enabled for video texture. (I have to use Blender 2.78 sice the project have to be compatible with older PC)

And for some reason, desync becomes worse the longer is the rendered fragment. Almost not noticeable at something like 20 frames, horrible at full length (971 frames)

Found the “proper” masking tools in Blender’s video editor. Still curious about what causes this desync issue

Now, after I remade my masking set-up with Video Editor masking tools, problem still persists! The masks’ keyframes lag behind the video itself. I’ve removed any objects from the scene, just the movie clips in video editor, so nothing should interfere. Version of Blender doesnt make any difference: same thing in 2.78 and the latest

In the VSE a mask modifier has 2 buttons at the bottom that handles timing of the keyframes. “Relative” locks the keyframes to the strip, so that when you move the strip the keyframes also move. “Absolute” Locks the keyframes to the global timeline, they won’t move when you move the strip.

Thanks. That’s good to know. However, in my project I didnt move any fragments relative to eachother. I found out a solution after all; it is because smartphone videos are recorded at non-standard frame rate and that’s what is confusing the editor. Converted mine from 29.97 FPS to 30 and it fixed everything

Ironically 29.97 fps is the industry standard. Also beware of variable frame rates and variable compression rates. Transcoding may have actually improved on elf these.