FBX and MP4 synchronization

We have a requirement wherein we can show FBX and MP4 together on single page, and both of the videos should synchronized.

We can load them and all functionality achieved, the only thing pending is how we can synchronized them with each other.

If there are any suggestions then please do let us know.

Thanks

FBX is not a video but a 3D format. So I guess you want to playback an animation defined in a FBX asset next to a MP4 video?

Yes, so basically we have one FBX and one MP4, when user click on Play then will start palying the video and FBX together, user can slowdown the video, pause, play etc. Based on the user action we have to trigger event on FBX and MP4 together and their frame sequence should synchronized.

Looking for the solution for same.

Um, you can try to work with the currentTime property of your video which returns the current position (in seconds) of the video playback. Use this value to set the playback time of the animation action that is used to playback the respective animation clip. TBH, the API of the animation system is not intended for this use case so you have to use the following hack to ensure AnimationMixer does not alter the defined time value:

action.time = video.currentTime;
mixer.update( 0 ); // hack

I’ve not verified this approach but it is the only idea that pops in my mind right now.

1 Like