Synchronizing the Anim Bar to Real Life Video





This tutorial should be of interest to anyone who wants to know how to lip-synch to a real life video or who just wants to use real life video as a guide for creating 3d animations.

How to synchronize a video to the Anim bar:

Convert the movie into a sequence of png files. This is easily done using the Seamless3d installation of FFmpeg using the following batch file command:

"C:\Program Files\seamless3d\ffmpeg\ffmpeg.exe" -i my-video.mpg -an -r 25 -y -s 640x480 frame%%04d.png
pause


Download the batch file from this link.

Replace my-video.mpg to the name of your movie file. The 25 specifies 25 frames per second and 640x480 specifies the resolution of the images.

After creating the png files, plug a Video node into the Anim node so that we see:
      
Click on the Video node and then click on the Video control panel's open file button and select the first png image in the sequence. Now if you move the Anim bar's slider you will see that the video's frames are synchronized to the Anim bar.

To set the Anim bar's period to equal the duration of the frame sequence, right click on the Anim node and select set period from video

To move the anim bar's slider one frame at a time use the keyboard's arrow left and right keys but note this wont work if there is a flashing cursor (carot) as this indicates text editing mode. Tip: pressing enter leaves text editing mode.

To extract the soundtrack to a wav file using FFMpeg use this command:

"C:\Program Files\seamless3d\ffmpeg\ffmpeg.exe" -i my-video.mpg -ar 44100 soundtrack.wav
pause


This creates a wav file with a sample rate of 44.1 khz which nicely fits mathematically a movie playing at 25 frames per second


[3d Modelling Software] [Tutorials] [Forum] [Features] [Download] [Gallery] [FAQ] [Worlds] [Avatars] [Links] [Thyme]