Syncing a collider to a video
I'm creating a 2D game in which the player is supposed to censor a portion of a video with a censor bar. In order to determine if they're doing so, I need to add a collider that follows the object to be censored in the video. This is where I'm stuck.
So far, I've created a game object that I want to sync with the video and added an animation to it. I've added keys to that animation that change the position of the object to cover the right part of the video. I'm getting the positions while moving frame by frame in play mode, and then adding them to the animation at the time, in seconds, that I recorded the position in the video.
The problem is that this method does not accurately sync the movement of the object to the movement of the video. There's a time difference between the animation, the game, and the actual video playing within the game.
I thought perhaps syncing the positions to a specific frame number within the animation would work, but the same issues appear to be happening.
I know there's some way to export a different version of the video with alpha channel info that could maybe be helpful to me, but I'm unsure how.