<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>  KeyFrame &lt; Cinelerra &lt; TWiki</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />

<link rel="alternate" type="application/rss+xml" title="RSS Feed" href="http://www.ftconsult.com/twiki/bin/view/Cinelerra/WebRss?skin=rss&contenttype=text/xml" />
<!-- <base href="KeyFrame" /> -->
<style type="text/css" media="all">
	/* Default TWiki layout */
	@import url('../../../pub/TWiki/PatternSkin/layout.css');
	/* Default TWiki style */
	@import url('../../../pub/TWiki/PatternSkin/style.css');
	/* Custom overriding layout per web or per topic */
	@import url('http://www.ftconsult.com/twiki/bin/view/Cinelerra/%USERLAYOUTURL%');
	/* Custom overriding style per web or per topic */
	@import url('http://www.ftconsult.com/twiki/bin/view/Cinelerra/%USERSTYLEURL%');
	.twikiToc li {
		list-style-image:url('../../../pub/TWiki/PatternSkin/i_arrow_down.gif');
	}	        
	.twikiWebIndicator {
		background-color:#D0D0D0;
	}
</style>
<style type="text/css" media="all"></style>
<script type="text/javascript">
<!-- HIDE
	function initPage() { }
-->
</script>
</head>
<body class="twikiViewPage" onload="initPage()"><a name="PageTop"></a>
<div class="twikiHidden"><a href="#Content">Skip to topic</a> | <a href="#PageBottom">Skip to bottom</a><hr /></div><div class="twikiTopBar"><div class="twikiTopBarContents"><form name="top" action="KeyFrame"> <div class="twikiLeft">
<a href="http://twiki.org/"><img src="../../../pub/TWiki/TWikiLogos/twikiRobot46x50.gif" border="0" alt="Home"/></a>
</div>
<div class="twikiRight twikiSearchBox">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><label for="go">Jump: </label><input type="text" id="go" name="topic" size="16" /></td>
</tr>
</table>
</div>
</form></div></div><div class="twikiMiddleContainer"><div class="twikiLeftBar"><div class="twikiWebIndicator"><b>Cinelerra</b></div>
<div class="twikiLeftBarContents"><form name="main" action="KeyFrame"> 
<ul>
<li> <b>Cinelerra Web</b>
</li>
<li> <a class="twikiLink" href="WebHome">Cinelerra Web Home</a>
</li>
<li> <a class="twikiLink" href="WebChanges">Changes</a> 
</li>
<li> <a class="twikiLink" href="WebIndex">Index</a>
</li>
<li> <a class="twikiLink" href="WebSearch">Search</a>
</li>
</ul>
<hr />
<ul>
<li> <strong>Webs</strong>
<ul>
<li> <a class="twikiLink" href="WebHome">Cinelerra</a>
</li>
<li> <a class="twikiLink" href="../Espanol/WebHome">Espanol</a>
</li>
<li> <a class="twikiLink" href="../Francais/WebHome">Francais</a>
</li>
<li> <a class="twikiLink" href="../Italiano/WebHome">Italiano</a>
</li>
<li> <a class="twikiLink" href="../Main/WebHome">Main</a>
</li>
<li> <a class="twikiLink" href="../Sandbox/WebHome">Sandbox</a>
</li>
<li> <a class="twikiLink" href="../Slovenian/WebHome">Slovenian</a>
</li>
<li> <a class="twikiLink" href="../TWiki/WebHome">TWiki</a>
</li>
</ul>
</li>
</ul>
<div class="twikiLeftBarPersonal">
<p />
<ul>
<li> <strong>My links</strong>
</li>
<li> <a class="twikiLink" href="../Main/AeliotBoswell">My home page</a>
</li>
<li> <a href="http://www.ftconsult.com/twiki/bin/search/Codev/?search=InterestedParties.*AeliotBoswell&regex=on" target="_top"><img src="../../../pub/TWiki/TWikiDocGraphics/stargold.gif" style="width:16px; height:16px; border:0px;" alt="Show me topics of interest" /></a>
</li>
</ul>
<div class="twikiSmall"><a href="http://www.ftconsult.com/twiki/bin/edit/Main/TWikiGuestLeftBar?t=20051021151831">edit</a></div>
<p />
</div>
</form></div></div><div class="twikiMain"><div class="twikiToolBar"><div>
<ul>
<li> <a href="http://www.ftconsult.com/twiki/bin/edit/Cinelerra/KeyFrame?t=1129907911"><b>Edit</b></a>
</li>
<li> <a href="http://www.ftconsult.com/twiki/bin/attach/Cinelerra/KeyFrame">Attach</a>
</li>
<li> <a href="http://www.ftconsult.com/twiki/bin/view/Cinelerra/KeyFrame?skin=print.pattern">Printable</a>
</li>
</ul>
</div><div class="twikiRevInfo"><span class="twikiGrayText"><span class="twikiToolbarElem">Cinelerra.KeyFrame</span><span class="twikiToolbarElem">r1.3 - 16 Jun 2004 - 09:21 - <a class="twikiLink" href="../Main/AndrazTori">AndrazTori</a></span><span class="twikiToolbarElem"><a href="#TopicEnd">topic&nbsp;end</a></span></span></div></div>
<div class="twikiHidden"><hr /></div><a name="Content"> </a><div class="twikiHidden">Start of topic | <a href="#Actions">Skip to actions</a><hr /></div>
<div class="twikiTopic">
<h3><a name="KeyFrames"> </a> <a class="twikiLink" href="KeyFrame">KeyFrames</a> </h3>
Setting static compositing parameters isn't very useful most of the time. Normally you need to move the camera around over time or change <a class="twikiLink" href="CompositingMask">CompositingMask</a> positions. <a class="twikiLink" href="CompositingMask">CompositingMask</a> need to follow objects. We create dynamic changes by defining keyframes. A keyframe is a certain point in time when the settings for one operation change. In <strong>Cinelerra</strong>, there are <a class="twikiLink" href="KeyFrame">KeyFrames</a> for almost every compositing parameter and effect parameter.
<p />
Whenever you adjust any parameter, the value is stored in a <a class="twikiLink" href="KeyFrame">KeyFrame</a>. If the value is stored in a <a class="twikiLink" href="KeyFrame">KeyFrame</a>, why doesn't it always change? The <a class="twikiLink" href="KeyFrame">KeyFrame</a> it is stored in is known as the default <a class="twikiLink" href="KeyFrame">KeyFrame</a>. The default <a class="twikiLink" href="KeyFrame">KeyFrame</a> applies to the entire duration if no other <a class="twikiLink" href="KeyFrame">KeyFrames</a> are present. The default <a class="twikiLink" href="KeyFrame">KeyFrame</a> is not drawn anywhere because it always exists. The only way change occurs over time is if non-default <a class="twikiLink" href="KeyFrame">KeyFrames</a> are created.
<p />
Display <a class="twikiLink" href="KeyFrame">KeyFrame</a> for any parameter by using the <a class="twikiLink" href="ViewMenu">ViewMenu</a>. When <a class="twikiLink" href="KeyFrame">KeyFrames</a> are selected, they are drawn on the timeline over the tracks they apply to. 
<p />
<h3><a name="Curve_Keyframes"> </a> Curve Keyframes </h3>
<p />
Fade and zoom settings are stored in bezier curves. Go to <a class="twikiLink" href="ViewMenu">ViewMenu</a> -&gt;fade keyframes or <a class="twikiLink" href="ViewMenu">ViewMenu</a> -&gt;...zoom to show curves on the timeline. It's sometimes easier to pull down the <a class="twikiLink" href="ViewMenu">ViewMenu</a> and then use the keyboard shortcuts listed in the menu to enable or disable keyframes while the menu is visible. In either arrow editing mode or i-beam editing mode, move the cursor over the curves in the timeline until it changes shape. Then merely by clicking and dragging on the curve you can create a keyframe at the position.
<p />
After the keyframe is created, click drag on it again to reposition it. When you click-drag a second keyframe on the curve, it creates a smooth ramp. <strong>ctrl-dragging</strong> on a keyframe changes the value of either the input control or the output control. This affects the sharpness of the curve. While the input control and the output control can be moved horizontally as well as vertically, the horizontal movement is purely for legibility and isn't used in the curve value.
<p />
You may remember that <span class="twikiNewLink" style="background : #FFFFCE;"><font color="#0000FF">The Gimp</font><a href="http://www.ftconsult.com/twiki/bin/edit/Cinelerra/TheGimp?topicparent=Cinelerra.KeyFrame"><sup>?</sup></a></span> and the Compositing masks all use <strong>shift</strong> to select control points so why does the timeline use ctrl? When you <strong>shift-drag</strong> on a timeline curve, the keyframe jumps to the value of either the next or previous keyframe, depending on which exists. This lets you set a constant curve value without having to copy the next or previous keyframe. 
<p />
<h3><a name="Toggle_Keyframes"> </a> Toggle Keyframes </h3>
<p />
Mute is the only toggle keyframe. Mute keyframes determine where the track is processed but not rendered to the output. <strong>Click-drag</strong> on these curves to create a keyframe. Unlike curves, the toggle keyframe has only two values: on or off. Ctrl and shift do nothing on toggle keyframes. 
<p />
<h3><a name="AUTOMATIC_KEYFRAMES"> </a> AUTOMATIC KEYFRAMES </h3>
<p />
You may have noticed when a few fade curves are set up, moving the insertion point around the curves causes the faders to reflect the curve value under the insertion point. This isn't just to look cool. The faders themselves can set keyframes in automatic keyframe mode. Automatic keyframe mode is usually more useful than dragging curves.
<p />
Enable automatic keyframe mode by enabling the automatic keyframe toggle autokeyframe.png. In automatic keyframe mode, every time you tweek a keyframeable parameter it creates a keyframe on the timeline. Since automatic keyframes affect many parameters, it's best enabled just before you need a keyframe and disabled immediately thereafter.
<p />
It's useful to go into the <a class="twikiLink" href="ViewMenu">ViewMenu</a> and make the desired parameter visible before performing a change. The location where the automatic keyframe is generated is under the insertion point. If the timeline is playing back during a tweek, several automatic keyframes will be generated as you change the parameter.
<p />
When automatic keyframe mode is disabled, a similarly strange thing happens. Adjusting a parameter adjusts the keyframe immediately preceeding the insertion point. If two fade keyframes exist and the insertion point is between them, changing the fader changes the first keyframe.
<p />
There are many parameters which can only be keyframed in automatic keyframe mode. These are parameters for which curves would take up too much space on the track or which can't be represented easily by a curve.
<p />
Effects are only keyframable in automatic mode because of the number of parameters in each individual effect.
<p />
Camera and projector translation can only be keyframed in automatic keyframe mode while camera and projector zoom can be keyframed with curves. It is here that we conclude the discussion of compositing, since compositing is highly dependant on the ability to change over time. 
<p />
<h3><a name="Compositor_Keyframes"> </a> Compositor Keyframes </h3>
<p />
Camera and projector translation is represented by two parameters: x and y. Therefore it is cumbersome to adjust with curves. Cinelerra solves this problem by relying on automatic keyframes. With a video track loaded, move the insertion point to the beginning of the track and enable automatic keyframe mode.
<p />
Move the projector slightly in the compositor window to create a keyframe. Then go forward several seconds. Move the projector a long distance to create another keyframe and emphasize motion. This creates a second projector box in the compositor, with a line joining the two boxes. The joining line is the motion path. If you create more keyframes, more boxes are created. Once all the desired keyframes are created, disable automatic keyframe mode.
<p />
Now when scrubbing around with the compositor window's slider, the video projection moves over time. At any point between two keyframes, the motion path is read for all time before the insertion point and green for all time after the insertion point. It's debatable if this is a very useful feature but it makes you feel good to know what keyframe is going to be affected by the next projector tweek.
<p />
Click-drag when automatic keyframes are off to adjust the preceeding keyframe. If you're halfway between two keyframes, the first projector box is adjusted while the second one stays the same. Furthermore, the video doesn't appear to move in step with the first keyframe. This is because, halfway between two keyframes the projector translation is interpolated. In order to set the second keyframe you'll need to scrub after the second keyframe.
<p />
By default the motion path is a straight line, but it can be curved with control points. Ctrl-drag to set either the in or out control point of the preceeding keyframe. Once again, we depart from The Gimp because shift is already used for zoom. After the in or out control points are extrapolated from the keyframe, Ctrl-dragging anywhere in the video adjusts the nearest control point. A control point can be out of view entirely yet still controllable.
<p />
When editing the camera translation, the behavior of the camera boxes is slightly different. Camera automation is normally used for still photo panning. The current camera box doesn't move during a drag, but if multiple keyframes are set, every camera box except the current keyframe appears to move. This is because the camera display shows every other camera position relative to the current one.
<p />
The situation becomes more intuitive if you bend the motion path between two keyframes and scrub between the two keyframes. The division between red and green, the current position between the keyframes, is always centered while the camera boxes move.
<p />
<p />
<h3><a name="Editing_Keyframes"> </a> Editing Keyframes </h3>
<p />
Keyframes can be shifted around and moved between tracks on the timeline using similar cut and paste operations to editing media. Only the keyframes selected in the view menu are affected by keyframe editing operations, however.
<p />
The most popular keyframe editing operation is replication of some curve from one track to the other, to make a stereo pair. The first step is to solo the source track's record recordpatch_up.png patch by <strong>shift-clicking</strong> on it. Then either set in/out points or highlight the desired region of keyframes. Go to <a class="twikiLink" href="KeyFramesMenu">KeyFramesMenu</a> <strong>-&gt;copy keyframes</strong> to copy them to the clipboard. Solo the destination track's record recordpatch_up.png patch by <strong>shift-clicking</strong> on it and go to <a class="twikiLink" href="KeyFramesMenu">KeyFramesMenu</a> <strong>-&gt;paste keyframes</strong> to paste the clipboard.
<p />
The media editing commands are mapped to the keyframe editing commands by using the <strong>shift</strong> key instead of just the keyboard shortcut.
<p />
This leads to the most complicated part of keyframe editing, the default keyframe. Remember that when no keyframes are set at all, there is still a default keyframe which stores a global parameter for the entire duration. The default keyframe isn't drawn because it always exists. What if the default keyframe is a good value which you want to transpose between other non-default keyframes? The <a class="twikiLink" href="KeyFramesMenu">KeyFramesMenu</a> <strong>-&gt;copy default keyframe</strong> and <a class="twikiLink" href="KeyFramesMenu">KeyFramesMenu</a> <strong>-&gt;paste default keyframe</strong> allow conversion of the default keyframe to a non-default keyframe.
<p />
<a class="twikiLink" href="KeyFramesMenu">KeyFramesMenu</a> <strong>-&gt;copy default keyframe</strong> copies the default keyframe to the clipboard, no matter what region of the timeline is selected. The <a class="twikiLink" href="KeyFramesMenu">KeyFramesMenu</a> <strong>-&gt;paste keyframes</strong> function may then be used to paste the clipboard as a non-default keyframe.
<p />
If you've copied a non-default keyframe, it can be stored as the default keyframe by calling <a class="twikiLink" href="KeyFramesMenu">KeyFramesMenu</a> <strong>-&gt;paste default keyframe</strong>. After using paste default keyframe to convert a non-default keyframe into a default keyframe, you won't see the value of the default keyframe reflected until all the non-default keyframes are removed.
<p />
Finally, there is a convenient way to delete keyframes besides selecting a region and calling <a class="twikiLink" href="KeyFramesMenu">KeyFramesMenu</a> <strong>-&gt;clear keyframes</strong>. Merely <strong>click-drag</strong> a keyframe before its preceeding keyframe or after its following keyframe on the track. 
<p />
<p />
-- <a class="twikiLink" href="../Main/AlexFerrer">AlexFerrer</a> - 20 Dec 2003 from <a class="twikiLink" href="SecretsOfCinelerra">SecretsOfCinelerra</a>
<hr />
<br class="twikiClear" />
<a name="TopicEnd"></a>
<span class="twikiRight twikiPageNav twikiGrayText"><a href="#PageTop">to&nbsp;top</a></span><br class="twikiClear" />
</div><div class="twikiHidden"><hr />End of topic<br /><a href="#Actions">Skip to action links</a> | <a href="#PageTop">Back&nbsp;to&nbsp;top</a><hr /></div>
<!---->
<!---->
<a name="Actions"> </a><span class="twikiHidden"><br /></span><div class="twikiTopicAction"><a href="http://www.ftconsult.com/twiki/bin/edit/Cinelerra/KeyFrame?t=1129907911"><b>Edit</b></a> <span class="twikiSeparator">|</span> <a href="http://www.ftconsult.com/twiki/bin/attach/Cinelerra/KeyFrame">Attach image or document</a> <span class="twikiSeparator">|</span> <a href="http://www.ftconsult.com/twiki/bin/view/Cinelerra/KeyFrame?skin=print.pattern">Printable version</a> <span class="twikiSeparator">|</span> <a href="http://www.ftconsult.com/twiki/bin/view/Cinelerra/KeyFrame?raw=on">Raw text</a> <span class="twikiSeparator">|</span> <a href="http://www.ftconsult.com/twiki/bin/oops/Cinelerra/KeyFrame?template=oopsmore&param1=1.3&param2=1.3">More topic actions</a><br />Revisions:  | r1.3 | <a href="http://www.ftconsult.com/twiki/bin/rdiff/Cinelerra/KeyFrame?rev1=1.3&rev2=1.2">&gt;</a> | <a href="http://www.ftconsult.com/twiki/bin/view/Cinelerra/KeyFrame?rev=1.2">r1.2</a> | <a href="http://www.ftconsult.com/twiki/bin/rdiff/Cinelerra/KeyFrame?rev1=1.2&rev2=1.1">&gt;</a> | <a href="http://www.ftconsult.com/twiki/bin/view/Cinelerra/KeyFrame?rev=1.1">r1.1</a> <span class="twikiSeparator">|</span> <a href="../../rdiff/Cinelerra/KeyFrame">Total page history</a> <span class="twikiSeparator">|</span> <a href="http://www.ftconsult.com/twiki/bin/search/Cinelerra/SearchResult?scope=text&regex=on&excludetopic=KeyFrame&search=Key%20*Frame%5B%5EA-Za-z0-9%5D">Backlinks</a></div>
<div class="twikiTopicInfo twikiRevInfo twikiGrayText twikiMoved"><i>Cinelerra.KeyFrame moved from Cinelerra.KeyFrames on 21 Dec 2003 - 19:52 by <a class="twikiLink" href="../Main/AlexFerrer">AlexFerrer</a> </i> - <a title="Click to move topic back to previous location, with option to change references." href="http://www.ftconsult.com/twiki/bin/rename/Cinelerra/KeyFrame?newweb=Cinelerra&newtopic=KeyFrames&confirm=on">put it back</a></div>
<div class="twikiTopicFooter"><span class="twikiLeft"><span class="twikiHomePath">You are here: <a class="twikiLink" href="WebHome">Cinelerra</a>  <span class='twikiSeparator'>&gt;</span> <a class="twikiLink" href="CinelerraManualTOC">CinelerraManualTOC</a> &gt; <a class="twikiLink" href="UnderstandingTheUI">UnderstandingTheUI</a> &gt; <a class="twikiLink" href="MainProgram">MainProgram</a> &gt; <a class="twikiLink" href="TopMenuBar">TopMenuBar</a> &gt; <a class="twikiLink" href="KeyFramesMenu">KeyFramesMenu</a> <span class='twikiSeparator'>&gt;</span> KeyFrame </span></span><span class="twikiHidden"><br /><br /></span><span class="twikiRight twikiPageNav twikiGrayText"><a href="#PageTop">to&nbsp;top</a></span><br class="twikiClear" /><span class="twikiHidden"><br /></span></div>
<a name="PageBottom"></a> </div></div><div class="twikiBottomBar"><div class="twikiBottomBarContents"><span class="twikiGrayText">Copyright &copy; 1999-2005 by the contributing authors. 
All material on this collaboration platform is the property of the contributing authors. <br /> 
Ideas, requests, problems regarding TWiki? <a href="mailto:alex@ftconsult.com?subject=TWiki&#32;Feedback&#32;on&#32;TWiki.WebBottomBar">Send feedback</a>
</span></div></div>
</body></html>