SmoothCam is smooth, but slow


Does that say 14 hours?


Yessssssssssssssssssss it does.

There’s a great thread at the Apple support forums called the SmoothCam dirty little secret about the massively huge analysis times for the magic camera stabilization tool in Final Cut Pro 6 known as SmoothCam. Yep, they are quite large. According to the FCP 6 user manual this is how SmoothCam works:

Unlike other filters in Final Cut Pro, the SmoothCam filter must analyze a clip’s entire
media file before the effect can be rendered or played in real time. Using the
SmoothCam filter requires two independent phases:
Motion analysis: Pixels in successive frames are analyzed to determine the direction of
camera movement. Analysis data is stored on disk for use when calculating the effect.
Motion compensation: During rendering or real-time playback, the SmoothCam filter
uses the motion analysis data to apply a four-corner transformation to each frame,
compensating for camera movement.

It is indeed a 2 step process and that first step is a biggie. The manual suggests using a Quicktime Reference file to cut down on the huge analysis time. Do you really need to do that? I ran a little test on some HDV footage with my dual 2.7 G5 and here are the results.

I took a 1 minute and 35 second (01:35:26 to be exact) shot that is its own individual Quicktime file and edited a 12 second 26 frame shot into a sequence. I then exported that same 12:26 shot to a Quicktime Reference file as suggested in Chapter 22 of the manual, Using the SmoothCam Filter. The result? The near 13 second Quicktime reference clip nearly an hour to analyze:

smoothcam_53minutes.png 13 Sec. self-contained masterclip – HDV

The other 13 second shot that was part of the original one and a half minute master clip, 5 hours:
smoothcam_5hrs.png 13 Sec. clip part of 1.5 minute masterclip – HDV

After setting up this little test I read another test that suggested the huge analysis times might be a result of the HDV codec and its mpeg/i frame existence. So I then exported these same clips using Apple’s ProRes 422 codec.

The 13 second self-contatined Quicktime in ProRes 422, around 36 minutes:

smoothcam_selx422_36min.png 13 Sec. self-contained masterclip – ProRes 422 (HQ)

The 13 second ProRes 422 cut that was still part of the original one and a half minute converted master clip:

smoothcam_422_5hrs.png 13 Sec. clip part of 1.5 minute masterclip – ProRes 422 (HQ)

A bit less time but not by much. HDV file sizes and data rates are quite small while the file sizes and data rates of the ProRes 422 (HQ) clips are very large. So just for comparison I exported the same clips as DV-NTSC to see the difference.

smoothcam_3min_dv.png 13 Sec. self-contained masterclip – DV

smoothcam_21min_dv.png 13 Sec. clip part of 1.5 minute masterclip – DV

So from the looks of this informal little test it seems as if the SmoothCam analysis speed has many factors that contributes to how fast or slow it can analyze a clip. HDV clips have low file size and data rates but the complicated i-frame compression seems to cause a lot more difficulty in analysis, kind of like conforming HDV for an output to tape. It’s a no-brainer that regular DV25 resolution would be fastest since it has small data rates and frame sizes. Just because we can, let’s try it with DVCPRO-HD 720 files:

smoothcam_14min_dvcpro.png 13 Sec. self-contained masterclip – DVCPRO-HD 720p60

smoothcam_hour_dvcpro.png 13 Sec. clip part of 1.5 minute masterclip – DVCPRO-HD 720p60

It makes sense that DVCPRO-HD 720 would be somewhere in the middle. What this tells me is to take the analysis time into consideration when using SmoothCam. If you can build that time into the edit it will produce amazing results. To see the “snake shot” before and after SmoothCam, or side by side, have a look at the H.264 Quicktime clips below:

snake shot WITH SmoothCam – 1.4 mb

snake shot WITHOUT SmoothCam – 2 mb

both snake shots SIDE BY SIDE – 2.6 mb

As you can see it works pretty well, kind of like the Steady Shot mode on a Sony camcorder. Of course all this can be avoided by just using a tripod!