Compensate for camera shake

Wondering how to accomplish a certain animation task? Ask here.

Moderators: Víctor Paredes, Belgarath, slowtiger

human
Posts: 688
Joined: Tue Jan 02, 2007 7:53 pm

Compensate for camera shake

Post by human »

Much of my work involves rotoscoping, and my video sources are usually suboptimal.

How do I compensate for camera shake?

Is there any low-cost software-assist for this?
Genete
Posts: 3483
Joined: Tue Oct 17, 2006 3:27 pm
Location: España / Spain

Post by Genete »

Maybe cinelerra (a non linear video editor for linux only) can do what you're looking for, But I suppose that it would be very difficult to tune properly. I've not tested.
Cinelerra is a "hard to learn & to manage" program...

http://heroinewarrior.com/cinelerra/cin ... tml#MOTION

-G
User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

Most of the high end video stuff has some of this built in, like After Effects.

There are also a lot of plugins for various applications that do this. I've found they seem to be really expensive and hard to use. It is a tricky thing.

You could try to do this by hand. Find a reference point and line it up as close as possible on key frames through out the time line using linear interpolation. That is basically what those programs are doing automatically.

-vern
human
Posts: 688
Joined: Tue Jan 02, 2007 7:53 pm

Post by human »

heyvern wrote:You could try to do this by hand. Find a reference point and line it up as close as possible on key frames through out the time line using linear interpolation. That is basically what those programs are doing automatically.-vern
Right--this occurred to me after I wrote. (Just not looking forward to it.)

BY the way, I feel that a typical filmstrip for a usable shot consists of roughly 45 frames, if you consider 15 frames a second for about 3 seconds.

If not too much is happening in a shot, the audience eye can usually "get it" in that time and is eager to move on to another view.

This is a very very very rough number, but it gives one a ballpark figure of how many frames one might have to work on when preparing a sequence...

It actually varies a lot...

How does this calculation square with the greater experience of the rest of you? Are most of you working at 12 fps, "on twos"?
User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

How does this calculation square with the greater experience of the rest of you? Are most of you working at 12 fps, "on twos"?
I have been struggling with this actually. I don't really know what I should be doing.

I have been using 30 fps because I don't like the "choppy" nature of 12 fps. I like the smooth motion. This of course increases file size and render times considerably.

The other problem now is that I've commited myself to 30 fps. I would have to practically redo everything to change it. But I am very pleased with the results. What concerns me is that everyone seems to think that 12fps or animating "on twos" is the proper way.

-vern
User avatar
slowtiger
Posts: 6246
Joined: Thu Feb 16, 2006 6:53 pm
Location: Berlin, Germany
Contact:

Post by slowtiger »

Funny how often this subject shows up everywhere, and how often some wrong assumptions are spread again and again ... I can't count how often I had to correct Wikipedia and other lexical articles about this, not to mention forum discussions.

It goes like this:

Don't mix frame rate and number of drawings per second.

Film and video/TV both have a fixed frame rate. It is either 24, 25 or 30 frames per second. (If it says 24 anywhere below, replace it with your local brand if needed.)

If one has to animate by hand, one tries to minimise the number of drawings needed. For average movements like walks or dialogue, 12 drawings per second are smooth enough in "Full Animation". This is called "animating on two's" because each drawing is shot on two frames of film.

For fast movements like runs one animates one drawing for each frame of film, "animating on one's".

For very slow movements one can reduce the number of drawings down to 1 per minute - this would be called a "hold". Japanese animation often does only 6 or 4 drawings per second.

The nice thing about film is that one can mix two's and one's and holds deliberately during a scene. The average number of drawings per second is said to be 18 at Disney's.

Animation software can behave like film, in that one can easily double drawings to create "two's". The default setting for most bitmap animation software would be to set an overall playback speed like 24 fps for all scenes, and draw and copy the animation to create a certain timing.

Other animation software, especially vector-based, has a different default setting. The playback speed is set globally as well as in the bitmap programs (again, 24 fps). Keyframes can be placed anywhere in time. The interpolation between them will automatically create "one's" - that's the default setting.

Some don't like the smoothness of all movements which are created that way. The want the look of "two's" again, which also has the advantage that one has to care for 12 keys per second only, instead of 24 chances to have something go wrong.

Digital files share one aspect with video and film: they must have one consistant playback speed per file, be it digital video or SWF. In former times, this playback speed needed to be 15 fps or 30 fps because it had to synchronise easily with an average computer monitor. Today this isn't so important anymore, so 12 and 24 and 25 are a possible choice as well.

Within this fixed playback speed one can place keys/drawings deliberately, it only takes a bit more work to get the software to recognise "two's" or other not-on-one's. One way is to place keys everywhere and set them to "step". Another way is possible in Flash: one can have movie clips inside the flash file which have a different framerate. Both ways are complicated and a lot of work.

The point is not to say "12 fps is better than 24 fps", the point is to be able to use one's and two's and holds wherever in time dliberately, while maintaining the constant playback frame rate.

Of couse, if you already decided to do everything on one's , just stick to it and don't worry. You have chosen your style, so make the best from it.
User avatar
funksmaname
Posts: 3174
Joined: Tue May 29, 2007 11:31 am
Location: New Zealand

Post by funksmaname »

thats excellent advice Slowtiger... I'm pretty new to this animation game, but i've been reading a few books and stuff (Animators Survival Kit/Timing for Animation)...

I would deffinately work at 24 (or 30 if you like) and get all the smoothness thats automatically created, and i believe there is a plugin in afterFX to interpret footage at a particular frame rate (obviously maintining its over all speed) so you could use something like that to create blocks of 'twos' and then go back to 'ones' for the fast action parts if you prefer that look - i think the bottom line is you can take frames out after the fact, but you cant put them in - ive tried working in 12fps and i think you lose a lot of control...

IMHO: With todays technology (particularly with AS, which almost fights the 'traditional way' of animating) there is no need to try to replicate workflows which were used to save time/money when it takes less time/money to leave it as it is! :) I see animation, like any industry/technology, as a constantly evolving thing and we shouldn't try to stunt its evolution by trying to recreate the past...

if anyone wants to know what the plugin is called, i will investigate further - i'm pretty sure i accidently stumbled on it one day :P
User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

So is this the complaint about AS? You can't animate "on twos"?

I don't see any easy way to do it so this may be why I am doing what I'm doing.

If my final destination is DVD and I set my fps in AS to 12, I would have to "scale" it in post for it to play properly yes? Otherwise the 12fps just "goes real fast".

I would need some other way to duplicate frames to maintain the proper playback.

Actually this might not be that hard. Most of the programs I'm using actually will do automatic transposing from one fps to another. I should play around with this. I could still convert my final rendered scenes to "twos" if I scaled it twice... once down and once back up.

-vern
User avatar
slowtiger
Posts: 6246
Joined: Thu Feb 16, 2006 6:53 pm
Location: Berlin, Germany
Contact:

Post by slowtiger »

Ah, one can fix a lot during post production ... but not everything goes the way I want it.

My "master file" always plays at 24 fps (for film) or 25 fps (for video). It can be a video, for easy editing, or it can be a sequence of PNGs (for output on film).

The source files can have 24 fps or 12 fps. But programs behave differently when it comes to converting from 12 to 24. Some just double every frame - which is what I want. Others use a time-stretch algorythm which creates the average between two original frames to create a new one - and this totally destroys my animation.
User avatar
funksmaname
Posts: 3174
Joined: Tue May 29, 2007 11:31 am
Location: New Zealand

Post by funksmaname »

In AfterFX, if you click the diagonal line on the left set of toggles of a layer (next to motion blur/3d layer) it changes from doubling to tweening of frames i think so you can actually tell it to literally copy frames or come up with an automatic in between.

mine wasnt really a complaint about AS - but if i work at 24, i CAN access 24 frames per second should i choose to - at 12fps, only 12 frame 'slots' exist... :) Personally i would look to postprodcution for reducing frames in a sequence rather than not have them in the first place.
User avatar
jahnocli
Posts: 3471
Joined: Fri Oct 29, 2004 2:13 pm
Location: UK

Post by jahnocli »

Try Gooder Seems like the simplest solution to me...
You can't have everything. Where would you put it?
human
Posts: 688
Joined: Tue Jan 02, 2007 7:53 pm

Post by human »

jahnocli wrote:Try Gooder Seems like the simplest solution to me...
@jahnocli : Whoohoo! Gooder looks very interesting, thanks very much! Hope it works...

@slowtiger : thanks for the excellent clarifications (not the diff between media frame rate and animation rate, tho, most of us take it for granted, but even that part, too, will come in very handy for someone).

@slowtiger: can we return to the part you and I have both mentioned about "linger-time" (to coin a phrase) for the audience eye? I alluded to how long one holds a scene, and I was once told that it often depends upon how much visual detail there is in the scene... the more detail, the more time the audience needs to take it in.

@slowtiger : you clarified the complementary part of satisfying the eye, which is increasing the "drawings per second" for faster motions. It was helpful to be reminded about the differing needs for "ones" and "twos" based upon action level.

Do any of you have in your head representative times, in seconds, for holding scenes and the length of sequences for mundane "business" like walking to a table, turning around to look at something?

(To complicate things, even more, I'd like to reiterate that "Euro time" in movies drives Americans crazy. In live-action films, Euro directors seem hold their shots for three or four times long as it takes an American audience to get restless.)
User avatar
slowtiger
Posts: 6246
Joined: Thu Feb 16, 2006 6:53 pm
Location: Berlin, Germany
Contact:

Post by slowtiger »

I'd like to reiterate that "Euro time" in movies drives Americans crazy
I think I know what kind of films you mean. Not that we Europeans couldn't do action films which are as fast as american ones ...

But your saying proves that the perception of time is a cultural thing and highly depends from one's personal experience. I have seen films over the last years which were just too fast for me - but seemed to be right for their target audience of sugar boosted teens. Films for children have a different pacing from films for grownups. I wouldn't divide films by continent, but by genre it would be OK: comedies have a different timing from action movies, epics other than shorts, japanese samurai movies other than western.

That anime in general is done with much less than 12 drawings per second is not just because it saves time and money - look at the elaborate backgrounds and the detailed special FX - it's also a cultural thing. Japanese moviegoers don't seem to miss the many inbetweens the westerners want to see.

As for concrete timing of scenes: I imagine the whole flow of action with closed eyes while I use a stopwatch. This gives me a rough scene lengh in seconds. Then I time the action in multiples of 8 or 12 frames. Since I'm a musician as well, it's not too hard to put things down into quarternotes and eights. Sometimes I just sing the sound FX for my action to get the right timing. If you absolutely can't imagine a beat, just record the sounds of your action and read it the same way as you do with dialogue.

About "linger time": I try to collect all empirical values about good timing I can get.
- Hitchcock said about "eye candy" that the set should never be allowed to become more important than the story, or better, the tension.
- If you want to learn about the amount of detail in a scene, read John Krikfalusi's lessons about background design, he's absolutely trustworthy in this topic (but not in everything else).
- Tex Avery once noted that the audience didn't need more than 5 frames to recognise an item on screen - bear in mind his style of drawing.
- My own boss Gerhard Hahn often checked linetests and repeatedly said that animation becomes slower when coloured, so if a scene seemed a bit too fast in pencil it would be OK on screen.
(The following are my own observations:)
- Quite often the timing of a scene only feels right with sound, but somehow wrong when seen silent.
- The viewer needs some frames in the beginning of each scene to get oriented. This can be avoided with clever staging and editing.
- Timing should be done with the whole sequence in mind.
- As well as there are different points of interest in a painting, in a clear hierarchy, there should be different points of movement in a scene. Think of main action and secondary motion, or main character and supporting character. Also think of distributing those movements over time in an interesting way.
- Contrast in movement. Don't do all scenes in the same pacing, except it's a machine. I compare an interestingly timed sequence with a good drum solo. Try to listen to Trilok Gurtu on his tablas, and imagine his beats to be movements.

These are just a few non-connected rules of thumb. In the end it all depends on your own sense of timing.
human
Posts: 688
Joined: Tue Jan 02, 2007 7:53 pm

Post by human »

slowtiger wrote:
As for concrete timing of scenes...

About "linger time"....
Damn this is good stuff--(I bet the kind of stuff people pay $$$$ for at film school).

Thanks!

The question I have now is whether the industry has an official term that's used instead of "drawings per second."

It's such a crucial concept, and that phrase sounds so ad hoc.

TURNING BACK NOW TO IMAGE STABILIZATION:

@jahnocli (and everybody who works with video!!!), I checked out the free trial version of SteadyHand on two short sequences extracted from Moving Images Archive. They both had very mild camera shake, but just enough to detract from the quality of rotoscoping.

The app worked quickly, with minimal futzing from the user over options and setup, and was absolutely flawless in its result (given the other quality issues of the source).

This GREAT STUFF -- especially for the price.

If I find drawbacks or limitations with it, I'll report that to you all as well.

THANKS

PS Apparently the code for this traces a pretty impressive pedigree back to the lucrative and growing surveillance industry.

So take comfort!

They may be reading every character of e-mail which you send, listening to your phone conversations, tracking your website usage, opening your mail, photographing you at rallies, monitoring your finances, and screening your plane flights...

...but at least they're making the life of the video editor better!
User avatar
funksmaname
Posts: 3174
Joined: Tue May 29, 2007 11:31 am
Location: New Zealand

Post by funksmaname »

i just realised, if you tick 'export at half frame rate' in AS, (working at 24fps) it exports a 12fps sequence (not sped up, actual time!) so you could export the sequence at 12 and 24 fps and then edit the two together later depending on content?
Post Reply