mask xy scale, mask boundary only overlay, fix 8 char mask nm bug, rework maskgui...
[goodguy/cinelerra.git] / cinelerra-5.1 / doc / cinelerra.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <html>
3 <!-- Created by GNU Texinfo 6.0, http://www.gnu.org/software/texinfo/ -->
4 <head>
5 <title>SECRETS OF CINELERRA</title>
6
7 <meta name="description" content="SECRETS OF CINELERRA">
8 <meta name="keywords" content="SECRETS OF CINELERRA">
9 <meta name="resource-type" content="document">
10 <meta name="distribution" content="global">
11 <meta name="Generator" content="makeinfo">
12 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
13 <link href="#Top" rel="start" title="TOP">
14 <link href="#SEC_Contents" rel="contents" title="Table of Contents">
15 <link href="dir.html#Top" rel="up" title="(dir)">
16 <style type="text/css">
17 <!--
18 a.summary-letter {text-decoration: none}
19 blockquote.indentedblock {margin-right: 0em}
20 blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
21 blockquote.smallquotation {font-size: smaller}
22 div.display {margin-left: 3.2em}
23 div.example {margin-left: 3.2em}
24 div.lisp {margin-left: 3.2em}
25 div.smalldisplay {margin-left: 3.2em}
26 div.smallexample {margin-left: 3.2em}
27 div.smalllisp {margin-left: 3.2em}
28 kbd {font-style: oblique}
29 pre.display {font-family: inherit}
30 pre.format {font-family: inherit}
31 pre.menu-comment {font-family: serif}
32 pre.menu-preformatted {font-family: serif}
33 pre.smalldisplay {font-family: inherit; font-size: smaller}
34 pre.smallexample {font-size: smaller}
35 pre.smallformat {font-family: inherit; font-size: smaller}
36 pre.smalllisp {font-size: smaller}
37 span.nocodebreak {white-space: nowrap}
38 span.nolinebreak {white-space: nowrap}
39 span.roman {font-family: serif; font-weight: normal}
40 span.sansserif {font-family: sans-serif; font-weight: normal}
41 ul.no-bullet {list-style: none}
42 -->
43 </style>
44
45
46 </head>
47
48 <body lang="en">
49 <h1 class="settitle" align="center">SECRETS OF CINELERRA</h1>
50
51
52 <a name="Top"></a>
53 <div class="header">
54 <p>
55 Next: <a href="#ABOUT-CINELERRA" accesskey="n" rel="next">ABOUT CINELERRA</a>, Up: <a href="dir.html#Top" accesskey="u" rel="up">(dir)</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
56 </div>
57 <a name="SEC_Top"></a>
58
59
60 <p>Version 4.1
61 </p>
62 <p>by Adam Williams
63 </p>
64 <p>Copyright &copy; 2011
65 </p>
66
67
68 <a name="SHORT-CONTENTS"></a>
69 <h2 class="chapter">1 SHORT CONTENTS</h2>
70
71 <table class="menu" border="0" cellspacing="0">
72 <tr><td align="left" valign="top">&bull; <a href="#ABOUT-CINELERRA" accesskey="1">ABOUT CINELERRA</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Cinelerra in brief.
73 </td></tr>
74 <tr><td align="left" valign="top">&bull; <a href="#INSTALLATION" accesskey="2">INSTALLATION</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Making Cinelerra work on your system.
75 </td></tr>
76 <tr><td align="left" valign="top">&bull; <a href="#CONFIGURATION" accesskey="3">CONFIGURATION</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Adjusting the behavior of Cinelerra.
77 </td></tr>
78 <tr><td align="left" valign="top">&bull; <a href="#CREATING-A-NEW-PROJECT" accesskey="4">CREATING A NEW PROJECT</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Creating a new project
79 </td></tr>
80 <tr><td align="left" valign="top">&bull; <a href="#THE-MAIN-WINDOWS" accesskey="5">THE MAIN WINDOWS</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">The most often used user interfaces.
81 </td></tr>
82 <tr><td align="left" valign="top">&bull; <a href="#LOADING-AND-SAVING-FILES" accesskey="6">LOADING AND SAVING FILES</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Moving media between disk and Cinelerra.
83 </td></tr>
84 <tr><td align="left" valign="top">&bull; <a href="#NAVIGATING-THE-PROJECT" accesskey="7">NAVIGATING THE PROJECT</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Moving around the media.
85 </td></tr>
86 <tr><td align="left" valign="top">&bull; <a href="#EDITING" accesskey="8">EDITING</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Moving the media in time.
87 </td></tr>
88 <tr><td align="left" valign="top">&bull; <a href="#USING-EFFECTS" accesskey="9">USING EFFECTS</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Altering the media.
89 </td></tr>
90 <tr><td align="left" valign="top">&bull; <a href="#SETTING-PROJECT-ATTRIBUTES">SETTING PROJECT ATTRIBUTES</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Changing the way the media is displayed.
91 </td></tr>
92 <tr><td align="left" valign="top">&bull; <a href="#COMPOSITING">COMPOSITING</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Overlaying different sources of video.
93 </td></tr>
94 <tr><td align="left" valign="top">&bull; <a href="#KEYFRAMES">KEYFRAMES</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Making effects change over time.
95 </td></tr>
96 <tr><td align="left" valign="top">&bull; <a href="#CAPTURING-MEDIA">CAPTURING MEDIA</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Moving media from the real world to disk.
97 </td></tr>
98 <tr><td align="left" valign="top">&bull; <a href="#IMPROVING-PERFORMANCE">IMPROVING PERFORMANCE</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Making Cinelerra run better on Linux.
99 </td></tr>
100 <tr><td align="left" valign="top">&bull; <a href="#TROUBLESHOOTING">TROUBLESHOOTING</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Problems with Cinelerra.
101 </td></tr>
102 <tr><td align="left" valign="top">&bull; <a href="#SECRETS-OF-CINELERRA">SECRETS OF CINELERRA</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Unusual applications of Cinelerra to common problems.
103 </td></tr>
104 <tr><td align="left" valign="top">&bull; <a href="#SECRETS-OF-CINELERRA-EFFECTS">SECRETS OF CINELERRA EFFECTS</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Secrets of the more complicated effects.
105 </td></tr>
106 <tr><td align="left" valign="top">&bull; <a href="#PLUGIN-AUTHORING">PLUGIN AUTHORING</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">How to write new effects.
107 </td></tr>
108 <tr><td align="left" valign="top">&bull; <a href="#KEYBOARD-SHORTCUTS">KEYBOARD SHORTCUTS</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">How to accelerate most commands with the keyboard.
109 </td></tr>
110 </table>
111
112
113
114 <a name="SEC_Contents"></a>
115 <h2 class="contents-heading">Table of Contents</h2>
116
117 <div class="contents">
118
119 <ul class="no-bullet">
120   <li><a name="toc-SHORT-CONTENTS" href="#SHORT-CONTENTS">1 SHORT CONTENTS</a></li>
121   <li><a name="toc-ABOUT-CINELERRA-1" href="#ABOUT-CINELERRA">2 ABOUT CINELERRA</a>
122   <ul class="no-bullet">
123     <li><a name="toc-ABOUT-THIS-MANUAL-1" href="#ABOUT-THIS-MANUAL">2.1 ABOUT THIS MANUAL</a></li>
124   </ul></li>
125   <li><a name="toc-INSTALLATION-1" href="#INSTALLATION">3 INSTALLATION</a>
126   <ul class="no-bullet">
127     <li><a name="toc-INSTALLING-AN-RPM-1" href="#INSTALLING-AN-RPM">3.1 INSTALLING AN RPM</a></li>
128     <li><a name="toc-COMPILING-FROM-SCRATCH-1" href="#COMPILING-FROM-SCRATCH">3.2 COMPILING FROM SCRATCH</a></li>
129     <li><a name="toc-RUNNING-CINELERRA-1" href="#RUNNING-CINELERRA">3.3 RUNNING CINELERRA</a></li>
130   </ul></li>
131   <li><a name="toc-CONFIGURATION-1" href="#CONFIGURATION">4 CONFIGURATION</a>
132   <ul class="no-bullet">
133     <li><a name="toc-ENVIRONMENT-VARIABLES-1" href="#ENVIRONMENT-VARIABLES">4.1 ENVIRONMENT VARIABLES</a></li>
134     <li><a name="toc-AUDIO-DRIVERS-1" href="#AUDIO-DRIVERS">4.2 AUDIO DRIVERS</a>
135     <ul class="no-bullet">
136       <li><a name="toc-COMMON-SOUND-DRIVER-ATTRIBUTES-1" href="#COMMON-SOUND-DRIVER-ATTRIBUTES">4.2.1 COMMON SOUND DRIVER ATTRIBUTES</a></li>
137       <li><a name="toc-OSS-1" href="#OSS">4.2.2 OSS</a></li>
138       <li><a name="toc-OSS-Envy24-1" href="#OSS-Envy24">4.2.3 OSS Envy24</a></li>
139       <li><a name="toc-ALSA-1" href="#ALSA">4.2.4 ALSA</a></li>
140       <li><a name="toc-ESOUND-1" href="#ESOUND">4.2.5 ESOUND</a></li>
141       <li><a name="toc-RAW-1394-1" href="#RAW-1394">4.2.6 RAW 1394</a></li>
142       <li><a name="toc-DV-1394-1" href="#DV-1394">4.2.7 DV 1394</a></li>
143       <li><a name="toc-IEC-61883-1" href="#IEC-61883">4.2.8 IEC 61883</a></li>
144     </ul></li>
145     <li><a name="toc-VIDEO-DRIVERS-1" href="#VIDEO-DRIVERS">4.3 VIDEO DRIVERS</a>
146     <ul class="no-bullet">
147       <li><a name="toc-COMMON-VIDEO-DRIVER-ATTRIBUTES-1" href="#COMMON-VIDEO-DRIVER-ATTRIBUTES">4.3.1 COMMON VIDEO DRIVER ATTRIBUTES</a></li>
148       <li><a name="toc-X11-1" href="#X11">4.3.2 X11</a></li>
149       <li><a name="toc-X11_002dXV-1" href="#X11_002dXV">4.3.3 X11-XV</a></li>
150       <li><a name="toc-X11_002dOPENGL-1" href="#X11_002dOPENGL">4.3.4 X11-OPENGL</a></li>
151       <li><a name="toc-BUZ-1" href="#BUZ">4.3.5 BUZ</a></li>
152       <li><a name="toc-RAW-1394-VIDEO-PLAYBACK-1" href="#RAW-1394-VIDEO-PLAYBACK">4.3.6 RAW 1394 VIDEO PLAYBACK</a></li>
153       <li><a name="toc-DV-1394-VIDEO-PLAYBACK-1" href="#DV-1394-VIDEO-PLAYBACK">4.3.7 DV 1394 VIDEO PLAYBACK</a></li>
154       <li><a name="toc-IEC-61883-VIDEO-PLAYBACK-1" href="#IEC-61883-VIDEO-PLAYBACK">4.3.8 IEC 61883 VIDEO PLAYBACK</a></li>
155     </ul></li>
156     <li><a name="toc-PLAYBACK-1" href="#PLAYBACK">4.4 PLAYBACK</a>
157     <ul class="no-bullet">
158       <li><a name="toc-AUDIO-OUT-1" href="#AUDIO-OUT">4.4.1 AUDIO OUT</a></li>
159       <li><a name="toc-VIDEO-OUT-1" href="#VIDEO-OUT">4.4.2 VIDEO OUT</a></li>
160     </ul></li>
161     <li><a name="toc-RECORDING-1" href="#RECORDING">4.5 RECORDING</a>
162     <ul class="no-bullet">
163       <li><a name="toc-FILE-FORMAT-1" href="#FILE-FORMAT">4.5.1 FILE FORMAT</a></li>
164       <li><a name="toc-AUDIO-IN-1" href="#AUDIO-IN">4.5.2 AUDIO IN</a></li>
165       <li><a name="toc-VIDEO-IN-1" href="#VIDEO-IN">4.5.3 VIDEO IN</a></li>
166     </ul></li>
167     <li><a name="toc-PERFORMANCE-1" href="#PERFORMANCE">4.6 PERFORMANCE</a>
168     <ul class="no-bullet">
169       <li><a name="toc-BACKGROUND-RENDERING-1" href="#BACKGROUND-RENDERING">4.6.1 BACKGROUND RENDERING</a></li>
170       <li><a name="toc-RENDERFARM-1" href="#RENDERFARM">4.6.2 RENDERFARM</a></li>
171     </ul></li>
172     <li><a name="toc-INTERFACE-1" href="#INTERFACE">4.7 INTERFACE</a></li>
173     <li><a name="toc-ABOUT-1" href="#ABOUT">4.8 ABOUT</a></li>
174   </ul></li>
175   <li><a name="toc-CREATING-A-NEW-PROJECT-1" href="#CREATING-A-NEW-PROJECT">5 CREATING A NEW PROJECT</a>
176   <ul class="no-bullet">
177     <li><a name="toc-USING-THE-NEW-PROJECT-DIALOG-1" href="#USING-THE-NEW-PROJECT-DIALOG">5.1 USING THE NEW PROJECT DIALOG</a></li>
178     <li><a name="toc-CHANGING-PARAMETERS-AFTER-LOADING-1" href="#CHANGING-PARAMETERS-AFTER-LOADING">5.2 CHANGING PARAMETERS AFTER LOADING</a></li>
179   </ul></li>
180   <li><a name="toc-THE-MAIN-WINDOWS-1" href="#THE-MAIN-WINDOWS">6 THE MAIN WINDOWS</a>
181   <ul class="no-bullet">
182     <li><a name="toc-VIEWER-1" href="#VIEWER">6.1 VIEWER</a></li>
183     <li><a name="toc-COMPOSITOR-1" href="#COMPOSITOR">6.2 COMPOSITOR</a>
184     <ul class="no-bullet">
185       <li><a name="toc-PROTECT-VIDEO-1" href="#PROTECT-VIDEO">6.2.1 PROTECT VIDEO</a></li>
186       <li><a name="toc-MAGNIFYING-GLASS-1" href="#MAGNIFYING-GLASS">6.2.2 MAGNIFYING GLASS</a></li>
187       <li><a name="toc-MASKS-TOOL-1" href="#MASKS-TOOL">6.2.3 MASKS TOOL</a></li>
188       <li><a name="toc-CAMERA-1" href="#CAMERA">6.2.4 CAMERA</a></li>
189       <li><a name="toc-PROJECTOR-1" href="#PROJECTOR">6.2.5 PROJECTOR</a></li>
190       <li><a name="toc-CROP-TOOL-1" href="#CROP-TOOL">6.2.6 CROP TOOL</a></li>
191       <li><a name="toc-EYEDROPPER-1" href="#EYEDROPPER">6.2.7 EYEDROPPER</a></li>
192       <li><a name="toc-TOOL-INFO-1" href="#TOOL-INFO">6.2.8 TOOL INFO</a></li>
193       <li><a name="toc-SAFE-REGIONS-TOOL-1" href="#SAFE-REGIONS-TOOL">6.2.9 SAFE REGIONS TOOL</a></li>
194     </ul></li>
195     <li><a name="toc-PROGRAM-1" href="#PROGRAM">6.3 PROGRAM</a></li>
196     <li><a name="toc-RESOURCES-1" href="#RESOURCES">6.4 RESOURCES</a></li>
197     <li><a name="toc-SOUND-LEVEL-METERS-1" href="#SOUND-LEVEL-METERS">6.5 SOUND LEVEL METERS</a></li>
198     <li><a name="toc-OTHER-WINDOWS-1" href="#OTHER-WINDOWS">6.6 OTHER WINDOWS</a></li>
199   </ul></li>
200   <li><a name="toc-LOADING-AND-SAVING-FILES-1" href="#LOADING-AND-SAVING-FILES">7 LOADING AND SAVING FILES</a>
201   <ul class="no-bullet">
202     <li><a name="toc-SUPPORTED-FILE-FORMATS-1" href="#SUPPORTED-FILE-FORMATS">7.1 SUPPORTED FILE FORMATS</a>
203     <ul class="no-bullet">
204       <li><a name="toc-QUICKTIME-1" href="#QUICKTIME">7.1.1 QUICKTIME</a></li>
205       <li><a name="toc-MPEG_002d4-AUDIO-1" href="#MPEG_002d4-AUDIO">7.1.2 MPEG-4 AUDIO</a></li>
206       <li><a name="toc-IMAGE-SEQUENCES-1" href="#IMAGE-SEQUENCES">7.1.3 IMAGE SEQUENCES</a></li>
207       <li><a name="toc-STILL-IMAGES-1" href="#STILL-IMAGES">7.1.4 STILL IMAGES</a>
208       <ul class="no-bullet">
209         <li><a name="toc-OPEN-EXR-IMAGES-1" href="#OPEN-EXR-IMAGES">7.1.4.1 OPEN EXR IMAGES</a></li>
210         <li><a name="toc-RAW-DIGITAL-CAMERA-IMAGES-1" href="#RAW-DIGITAL-CAMERA-IMAGES">7.1.4.2 RAW DIGITAL CAMERA IMAGES</a></li>
211       </ul></li>
212       <li><a name="toc-AVI-1" href="#AVI">7.1.5 AVI</a></li>
213       <li><a name="toc-MPEG-FILES-CONTAINING-VIDEO-1" href="#MPEG-FILES-CONTAINING-VIDEO">7.1.6 MPEG FILES CONTAINING VIDEO</a></li>
214       <li><a name="toc-DVD-MOVIES-1" href="#DVD-MOVIES">7.1.7 DVD MOVIES</a></li>
215       <li><a name="toc-MPEG-1-AUDIO-1" href="#MPEG-1-AUDIO">7.1.8 MPEG 1 AUDIO</a></li>
216       <li><a name="toc-OGG-THEORA_002fVORBIS-1" href="#OGG-THEORA_002fVORBIS">7.1.9 OGG THEORA/VORBIS</a></li>
217       <li><a name="toc-EDIT-DECISION-LIST-1" href="#EDIT-DECISION-LIST">7.1.10 EDIT DECISION LIST</a></li>
218     </ul></li>
219     <li><a name="toc-LOADING-FILES-1" href="#LOADING-FILES">7.2 LOADING FILES</a>
220     <ul class="no-bullet">
221       <li><a name="toc-INSERTION-STRATEGY-1" href="#INSERTION-STRATEGY">7.2.1 INSERTION STRATEGY</a></li>
222       <li><a name="toc-LOADING-MULTIPLE-FILES-1" href="#LOADING-MULTIPLE-FILES">7.2.2 LOADING MULTIPLE FILES</a></li>
223     </ul></li>
224     <li><a name="toc-LOADING-THE-BACKUP-1" href="#LOADING-THE-BACKUP">7.3 LOADING THE BACKUP</a></li>
225     <li><a name="toc-SAVING-FILES-1" href="#SAVING-FILES">7.4 SAVING FILES</a></li>
226     <li><a name="toc-RENDERING-FILES-1" href="#RENDERING-FILES">7.5 RENDERING FILES</a>
227     <ul class="no-bullet">
228       <li><a name="toc-SINGLE-FILE-RENDERING-1" href="#SINGLE-FILE-RENDERING">7.5.1 SINGLE FILE RENDERING</a></li>
229       <li><a name="toc-BATCH-RENDERING-1" href="#BATCH-RENDERING">7.5.2 BATCH RENDERING</a></li>
230       <li><a name="toc-THE-RENDER-FARM-1" href="#THE-RENDER-FARM">7.5.3 THE RENDER FARM</a></li>
231       <li><a name="toc-COMMAND-LINE-RENDERING-1" href="#COMMAND-LINE-RENDERING">7.5.4 COMMAND LINE RENDERING</a></li>
232     </ul></li>
233   </ul></li>
234   <li><a name="toc-NAVIGATING-THE-PROJECT-1" href="#NAVIGATING-THE-PROJECT">8 NAVIGATING THE PROJECT</a>
235   <ul class="no-bullet">
236     <li><a name="toc-NAVIGATING-THE-PROGRAM-WINDOW-1" href="#NAVIGATING-THE-PROGRAM-WINDOW">8.1 NAVIGATING THE PROGRAM WINDOW</a>
237     <ul class="no-bullet">
238       <li><a name="toc-THE-INSERTION-POINT-1" href="#THE-INSERTION-POINT">8.1.1 THE INSERTION POINT</a></li>
239       <li><a name="toc-THE-IN_002fOUT-POINTS-1" href="#THE-IN_002fOUT-POINTS">8.1.2 THE IN/OUT POINTS</a></li>
240       <li><a name="toc-USING-LABELS-IN-THE-PROGRAM-WINDOW-1" href="#USING-LABELS-IN-THE-PROGRAM-WINDOW">8.1.3 USING LABELS IN THE PROGRAM WINDOW</a></li>
241     </ul></li>
242     <li><a name="toc-NAVIGATING-THE-VIEWER-AND-COMPOSITOR-1" href="#NAVIGATING-THE-VIEWER-AND-COMPOSITOR">8.2 NAVIGATING THE VIEWER AND COMPOSITOR</a></li>
243     <li><a name="toc-NAVIGATING-THE-RESOURCES-1" href="#NAVIGATING-THE-RESOURCES">8.3 NAVIGATING THE RESOURCES</a></li>
244     <li><a name="toc-USING-THE-TRANSPORT-CONTROLS-1" href="#USING-THE-TRANSPORT-CONTROLS">8.4 USING THE TRANSPORT CONTROLS</a></li>
245     <li><a name="toc-USING-BACKGROUND-RENDERING-1" href="#USING-BACKGROUND-RENDERING">8.5 USING BACKGROUND RENDERING</a></li>
246   </ul></li>
247   <li><a name="toc-EDITING-1" href="#EDITING">9 EDITING</a>
248   <ul class="no-bullet">
249     <li><a name="toc-THE-PATCHBAY-1" href="#THE-PATCHBAY">9.1 THE PATCHBAY</a></li>
250     <li><a name="toc-NUDGING-TRACKS-1" href="#NUDGING-TRACKS">9.2 NUDGING TRACKS</a></li>
251     <li><a name="toc-PANNING-TRACKS-1" href="#PANNING-TRACKS">9.3 PANNING TRACKS</a></li>
252     <li><a name="toc-AUTOMATIC-TRACK-PANNING-1" href="#AUTOMATIC-TRACK-PANNING">9.4 AUTOMATIC TRACK PANNING</a></li>
253     <li><a name="toc-STANDARD-AUDIO-MAPPINGS-1" href="#STANDARD-AUDIO-MAPPINGS">9.5 STANDARD AUDIO MAPPINGS</a></li>
254     <li><a name="toc-MANIPULATING-TRACKS-1" href="#MANIPULATING-TRACKS">9.6 MANIPULATING TRACKS</a></li>
255     <li><a name="toc-TWO-SCREEN-EDITING-1" href="#TWO-SCREEN-EDITING">9.7 TWO SCREEN EDITING</a></li>
256     <li><a name="toc-DRAG-AND-DROP-EDITING-1" href="#DRAG-AND-DROP-EDITING">9.8 DRAG AND DROP EDITING</a></li>
257     <li><a name="toc-CUT-AND-PASTE-EDITING-1" href="#CUT-AND-PASTE-EDITING">9.9 CUT AND PASTE EDITING</a></li>
258     <li><a name="toc-TRIMMING-1" href="#TRIMMING">9.10 TRIMMING</a></li>
259   </ul></li>
260   <li><a name="toc-USING-EFFECTS-1" href="#USING-EFFECTS">10 USING EFFECTS</a>
261   <ul class="no-bullet">
262     <li><a name="toc-REALTIME-EFFECTS-1" href="#REALTIME-EFFECTS">10.1 REALTIME EFFECTS</a>
263     <ul class="no-bullet">
264       <li><a name="toc-REALTIME-EFFECT-TYPES-1" href="#REALTIME-EFFECT-TYPES">10.1.1 REALTIME EFFECT TYPES</a></li>
265       <li><a name="toc-EDITING-REALTIME-EFFECTS-1" href="#EDITING-REALTIME-EFFECTS">10.1.2 EDITING REALTIME EFFECTS</a></li>
266     </ul></li>
267     <li><a name="toc-RENDERED-EFFECTS-1" href="#RENDERED-EFFECTS">10.2 RENDERED EFFECTS</a></li>
268     <li><a name="toc-TRANSITIONS-1" href="#TRANSITIONS">10.3 TRANSITIONS</a></li>
269     <li><a name="toc-LADSPA-EFFECTS-1" href="#LADSPA-EFFECTS">10.4 LADSPA EFFECTS</a></li>
270     <li><a name="toc-EFFECT-PRESETS-1" href="#EFFECT-PRESETS">10.5 EFFECT PRESETS</a></li>
271   </ul></li>
272   <li><a name="toc-SETTING-PROJECT-ATTRIBUTES-1" href="#SETTING-PROJECT-ATTRIBUTES">11 SETTING PROJECT ATTRIBUTES</a>
273   <ul class="no-bullet">
274     <li><a name="toc-AUDIO-CHANNEL-POSITIONS-1" href="#AUDIO-CHANNEL-POSITIONS">11.1 AUDIO CHANNEL POSITIONS</a></li>
275     <li><a name="toc-COLOR-MODEL-1" href="#COLOR-MODEL">11.2 COLOR MODEL</a></li>
276     <li><a name="toc-ASPECT-RATIO-1" href="#ASPECT-RATIO">11.3 ASPECT RATIO</a></li>
277   </ul></li>
278   <li><a name="toc-COMPOSITING-1" href="#COMPOSITING">12 COMPOSITING</a>
279   <ul class="no-bullet">
280     <li><a name="toc-THE-CAMERA-AND-PROJECTOR-1" href="#THE-CAMERA-AND-PROJECTOR">12.1 THE CAMERA AND PROJECTOR</a></li>
281     <li><a name="toc-MASKS-1" href="#MASKS">12.2 MASKS</a></li>
282     <li><a name="toc-CROPPING-1" href="#CROPPING">12.3 CROPPING</a></li>
283     <li><a name="toc-SAFE-REGIONS-1" href="#SAFE-REGIONS">12.4 SAFE REGIONS</a></li>
284     <li><a name="toc-OVERLAY-MODES-1" href="#OVERLAY-MODES">12.5 OVERLAY MODES</a></li>
285     <li><a name="toc-TRACK-AND-OUTPUT-SIZES-1" href="#TRACK-AND-OUTPUT-SIZES">12.6 TRACK AND OUTPUT SIZES</a></li>
286   </ul></li>
287   <li><a name="toc-KEYFRAMES-1" href="#KEYFRAMES">13 KEYFRAMES</a>
288   <ul class="no-bullet">
289     <li><a name="toc-CURVE-KEYFRAMES-1" href="#CURVE-KEYFRAMES">13.1 CURVE KEYFRAMES</a></li>
290     <li><a name="toc-CHANGING-BEZIER-_0026-LINEAR-MODE-1" href="#CHANGING-BEZIER-_0026-LINEAR-MODE">13.2 CHANGING BEZIER &amp; LINEAR MODE</a></li>
291     <li><a name="toc-SNAPPING-TO-NEIGHBOR-KEYFRAMES-1" href="#SNAPPING-TO-NEIGHBOR-KEYFRAMES">13.3 SNAPPING TO NEIGHBOR KEYFRAMES</a></li>
292     <li><a name="toc-NAVIGATING-CURVE-KEYFRAMES-1" href="#NAVIGATING-CURVE-KEYFRAMES">13.4 NAVIGATING CURVE KEYFRAMES</a></li>
293     <li><a name="toc-TOGGLE-KEYFRAMES-1" href="#TOGGLE-KEYFRAMES">13.5 TOGGLE KEYFRAMES</a></li>
294     <li><a name="toc-AUTOMATIC-KEYFRAMES-1" href="#AUTOMATIC-KEYFRAMES">13.6 AUTOMATIC KEYFRAMES</a></li>
295     <li><a name="toc-COMPOSITOR-KEYFRAMES-1" href="#COMPOSITOR-KEYFRAMES">13.7 COMPOSITOR KEYFRAMES</a></li>
296     <li><a name="toc-EDITING-KEYFRAMES-1" href="#EDITING-KEYFRAMES">13.8 EDITING KEYFRAMES</a></li>
297     <li><a name="toc-KEYFRAME-SPANNING-1" href="#KEYFRAME-SPANNING">13.9 KEYFRAME SPANNING</a></li>
298   </ul></li>
299   <li><a name="toc-CAPTURING-MEDIA-1" href="#CAPTURING-MEDIA">14 CAPTURING MEDIA</a>
300   <ul class="no-bullet">
301     <li><a name="toc-BATCHES-1" href="#BATCHES">14.1 BATCHES</a></li>
302     <li><a name="toc-EDITING-TUNER-INFORMATION-1" href="#EDITING-TUNER-INFORMATION">14.2 EDITING TUNER INFORMATION</a></li>
303   </ul></li>
304   <li><a name="toc-IMPROVING-PERFORMANCE-1" href="#IMPROVING-PERFORMANCE">15 IMPROVING PERFORMANCE</a>
305   <ul class="no-bullet">
306     <li><a name="toc-DISABLING-SWAP-SPACE-1" href="#DISABLING-SWAP-SPACE">15.1 DISABLING SWAP SPACE</a></li>
307     <li><a name="toc-ENLARGING-SOUND-BUFFERS-1" href="#ENLARGING-SOUND-BUFFERS">15.2 ENLARGING SOUND BUFFERS</a></li>
308     <li><a name="toc-FREEING-MORE-SHARED-MEMORY-1" href="#FREEING-MORE-SHARED-MEMORY">15.3 FREEING MORE SHARED MEMORY</a></li>
309     <li><a name="toc-SPEEDING-UP-THE-HARD-DRIVE-1" href="#SPEEDING-UP-THE-HARD-DRIVE">15.4 SPEEDING UP THE HARD DRIVE</a></li>
310     <li><a name="toc-DISABLING-CRON-1" href="#DISABLING-CRON">15.5 DISABLING CRON</a></li>
311     <li><a name="toc-REDUCING-USB-MOUSE-SENSITIVITY-1" href="#REDUCING-USB-MOUSE-SENSITIVITY">15.6 REDUCING USB MOUSE SENSITIVITY</a></li>
312     <li><a name="toc-ASSORTED-X-TWEEKS-1" href="#ASSORTED-X-TWEEKS">15.7 ASSORTED X TWEEKS</a></li>
313     <li><a name="toc-SPEEDING-UP-THE-FILE-SYSTEM-1" href="#SPEEDING-UP-THE-FILE-SYSTEM">15.8 SPEEDING UP THE FILE SYSTEM</a></li>
314     <li><a name="toc-IMPROVING-ZORAN-VIDEO-1" href="#IMPROVING-ZORAN-VIDEO">15.9 IMPROVING ZORAN VIDEO</a>
315     <ul class="no-bullet">
316       <li><a name="toc-NEW-IN-2_002e6_002e5" href="#NEW-IN-2_002e6_002e5">15.9.1 NEW IN 2.6.5</a></li>
317     </ul></li>
318   </ul></li>
319   <li><a name="toc-TROUBLESHOOTING-1" href="#TROUBLESHOOTING">16 TROUBLESHOOTING</a>
320   <ul class="no-bullet">
321     <li><a name="toc-BUZ-DRIVER-CRASHES-1" href="#BUZ-DRIVER-CRASHES">16.1 BUZ DRIVER CRASHES</a></li>
322     <li><a name="toc-DRAGGING-IN-AND-OUT-POINTS-DOESN_0027T-WORK-1" href="#DRAGGING-IN-AND-OUT-POINTS-DOESN_0027T-WORK">16.2 DRAGGING IN AND OUT POINTS DOESN&rsquo;T WORK</a></li>
323     <li><a name="toc-LOCKING-UP-WHEN-LOADING-FILES-1" href="#LOCKING-UP-WHEN-LOADING-FILES">16.3 LOCKING UP WHEN LOADING FILES</a></li>
324     <li><a name="toc-SYNCHRONIZATION-LOST-WHILE-RECORDING-1" href="#SYNCHRONIZATION-LOST-WHILE-RECORDING">16.4 SYNCHRONIZATION LOST WHILE RECORDING</a></li>
325     <li><a name="toc-APPLYING-LINEARIZE-FOLLOWED-BY-BLUR-DOESN_0027T-WORK-1" href="#APPLYING-LINEARIZE-FOLLOWED-BY-BLUR-DOESN_0027T-WORK">16.5 APPLYING LINEARIZE FOLLOWED BY BLUR DOESN&rsquo;T WORK</a></li>
326   </ul></li>
327   <li><a name="toc-SECRETS-OF-CINELERRA-1" href="#SECRETS-OF-CINELERRA">17 SECRETS OF CINELERRA</a>
328   <ul class="no-bullet">
329     <li><a name="toc-DOLBY-PRO-LOGIC-ENCODING-1" href="#DOLBY-PRO-LOGIC-ENCODING">17.1 DOLBY PRO LOGIC ENCODING</a></li>
330     <li><a name="toc-ANALOG-TV-CLEANING-1" href="#ANALOG-TV-CLEANING">17.2 ANALOG TV CLEANING</a></li>
331     <li><a name="toc-DEFEATING-INTERLACING-1" href="#DEFEATING-INTERLACING">17.3 DEFEATING INTERLACING</a></li>
332     <li><a name="toc-MAKING-VIDEO-LOOK-LIKE-FILM-1" href="#MAKING-VIDEO-LOOK-LIKE-FILM">17.4 MAKING VIDEO LOOK LIKE FILM</a></li>
333     <li><a name="toc-CLEARING-OUT-HAZE-1" href="#CLEARING-OUT-HAZE">17.5 CLEARING OUT HAZE</a></li>
334     <li><a name="toc-MAKING-A-DVD-1" href="#MAKING-A-DVD">17.6 MAKING A DVD</a></li>
335     <li><a name="toc-MAKING-A-RINGTONE-1" href="#MAKING-A-RINGTONE">17.7 MAKING A RINGTONE</a></li>
336     <li><a name="toc-TIME-STRETCHING-AUDIO-1" href="#TIME-STRETCHING-AUDIO">17.8 TIME STRETCHING AUDIO</a></li>
337     <li><a name="toc-PITCH-SHIFTING-AUDIO-1" href="#PITCH-SHIFTING-AUDIO">17.9 PITCH SHIFTING AUDIO</a></li>
338     <li><a name="toc-TEXT-TO-MOVIE-1" href="#TEXT-TO-MOVIE">17.10 TEXT TO MOVIE</a></li>
339   </ul></li>
340   <li><a name="toc-SECRETS-OF-CINELERRA-EFFECTS-1" href="#SECRETS-OF-CINELERRA-EFFECTS">18 SECRETS OF CINELERRA EFFECTS</a>
341   <ul class="no-bullet">
342     <li><a name="toc-1080-TO-480-1" href="#g_t1080-TO-480">18.1 1080 TO 480</a></li>
343     <li><a name="toc-CHROMA-KEY-1" href="#CHROMA-KEY">18.2 CHROMA KEY</a></li>
344     <li><a name="toc-COMPRESSOR-1" href="#COMPRESSOR">18.3 COMPRESSOR</a></li>
345     <li><a name="toc-DECIMATE-1" href="#DECIMATE">18.4 DECIMATE</a></li>
346     <li><a name="toc-DEINTERLACE-1" href="#DEINTERLACE">18.5 DEINTERLACE</a></li>
347     <li><a name="toc-DIFFERENCE-KEY-1" href="#DIFFERENCE-KEY">18.6 DIFFERENCE KEY</a></li>
348     <li><a name="toc-FIELDS-TO-FRAMES-1" href="#FIELDS-TO-FRAMES">18.7 FIELDS TO FRAMES</a></li>
349     <li><a name="toc-FREEZE-FRAME-1" href="#FREEZE-FRAME">18.8 FREEZE FRAME</a></li>
350     <li><a name="toc-HISTOGRAM-1" href="#HISTOGRAM">18.9 HISTOGRAM</a></li>
351     <li><a name="toc-INVERSE-TELECINE-1" href="#INVERSE-TELECINE">18.10 INVERSE TELECINE</a></li>
352     <li><a name="toc-INTERPOLATE-VIDEO-1" href="#INTERPOLATE-VIDEO">18.11 INTERPOLATE VIDEO</a></li>
353     <li><a name="toc-LENS-1" href="#LENS">18.12 LENS</a></li>
354     <li><a name="toc-LINEARIZE-1" href="#LINEARIZE">18.13 LINEARIZE</a></li>
355     <li><a name="toc-LIVE-AUDIO-1" href="#LIVE-AUDIO">18.14 LIVE AUDIO</a></li>
356     <li><a name="toc-LIVE-VIDEO-1" href="#LIVE-VIDEO">18.15 LIVE VIDEO</a></li>
357     <li><a name="toc-LOOP-1" href="#LOOP">18.16 LOOP</a></li>
358     <li><a name="toc-MOTION-1" href="#MOTION">18.17 MOTION</a>
359     <ul class="no-bullet">
360       <li><a name="toc-SECRETS-OF-MOTION-TRACKING-1" href="#SECRETS-OF-MOTION-TRACKING">18.17.1 SECRETS OF MOTION TRACKING</a></li>
361       <li><a name="toc-2-PASS-MOTION-TRACKING-1" href="#g_t2-PASS-MOTION-TRACKING">18.17.2 2 PASS MOTION TRACKING</a></li>
362       <li><a name="toc-USING-BLUR-TO-IMPROVE-MOTION-TRACKING-1" href="#USING-BLUR-TO-IMPROVE-MOTION-TRACKING">18.17.3 USING BLUR TO IMPROVE MOTION TRACKING</a></li>
363       <li><a name="toc-USING-HISTOGRAM-TO-IMPROVE-MOTION-TRACKING-1" href="#USING-HISTOGRAM-TO-IMPROVE-MOTION-TRACKING">18.17.4 USING HISTOGRAM TO IMPROVE MOTION TRACKING</a></li>
364       <li><a name="toc-INTERPOLATING-MOTION-BETWEEN-FRAMES-1" href="#INTERPOLATING-MOTION-BETWEEN-FRAMES">18.17.5 INTERPOLATING MOTION BETWEEN FRAMES</a></li>
365       <li><a name="toc-FILLING-IN-THE-BLACK-AREAS-1" href="#FILLING-IN-THE-BLACK-AREAS">18.17.6 FILLING IN THE BLACK AREAS</a></li>
366     </ul></li>
367     <li><a name="toc-MOTION-2-POINT-1" href="#MOTION-2-POINT">18.18 MOTION 2 POINT</a></li>
368     <li><a name="toc-REFRAMERT-1" href="#REFRAMERT">18.19 REFRAMERT</a></li>
369     <li><a name="toc-REFRAME-1" href="#REFRAME">18.20 REFRAME</a></li>
370     <li><a name="toc-RESAMPLE-1" href="#RESAMPLE">18.21 RESAMPLE</a></li>
371     <li><a name="toc-REVERSE-VIDEO_002fAUDIO-1" href="#REVERSE-VIDEO_002fAUDIO">18.22 REVERSE VIDEO/AUDIO</a></li>
372     <li><a name="toc-SWAP-FRAMES-1" href="#SWAP-FRAMES">18.23 SWAP FRAMES</a></li>
373     <li><a name="toc-THRESHOLD-1" href="#THRESHOLD">18.24 THRESHOLD</a></li>
374     <li><a name="toc-TIME-AVERAGE-1" href="#TIME-AVERAGE">18.25 TIME AVERAGE</a></li>
375     <li><a name="toc-TITLER-1" href="#TITLER">18.26 TITLER</a>
376     <ul class="no-bullet">
377       <li><a name="toc-ADDING-FONTS-TO-THE-TITLER-1" href="#ADDING-FONTS-TO-THE-TITLER">18.26.1 ADDING FONTS TO THE TITLER</a></li>
378       <li><a name="toc-THE-TITLE_002dSAFE-REGION-1" href="#THE-TITLE_002dSAFE-REGION">18.26.2 THE TITLE-SAFE REGION</a></li>
379       <li><a name="toc-MAKING-TITLES-LOOK-GOOD-1" href="#MAKING-TITLES-LOOK-GOOD">18.26.3 MAKING TITLES LOOK GOOD</a></li>
380     </ul></li>
381     <li><a name="toc-VIDEO-SCOPE-1" href="#VIDEO-SCOPE">18.27 VIDEO SCOPE</a></li>
382   </ul></li>
383   <li><a name="toc-PLUGIN-AUTHORING-1" href="#PLUGIN-AUTHORING">19 PLUGIN AUTHORING</a>
384   <ul class="no-bullet">
385     <li><a name="toc-INTRODUCING-THE-PULL-METHOD-1" href="#INTRODUCING-THE-PULL-METHOD">19.1 INTRODUCING THE PULL METHOD</a></li>
386     <li><a name="toc-COMMON-PLUGIN-FUNCTIONS-1" href="#COMMON-PLUGIN-FUNCTIONS">19.2 COMMON PLUGIN FUNCTIONS</a>
387     <ul class="no-bullet">
388       <li><a name="toc-THE-PROCESSING-OBJECT-1" href="#THE-PROCESSING-OBJECT">19.2.1 THE PROCESSING OBJECT</a></li>
389       <li><a name="toc-THE-CONFIGURATION-OBJECT-1" href="#THE-CONFIGURATION-OBJECT">19.2.2 THE CONFIGURATION OBJECT</a></li>
390       <li><a name="toc-THE-USER-INTERFACE-OBJECT-1" href="#THE-USER-INTERFACE-OBJECT">19.2.3 THE USER INTERFACE OBJECT</a></li>
391     </ul></li>
392     <li><a name="toc-REALTIME-PLUGINS-1" href="#REALTIME-PLUGINS">19.3 REALTIME PLUGINS</a></li>
393     <li><a name="toc-NONREALTIME-PLUGINS-1" href="#NONREALTIME-PLUGINS">19.4 NONREALTIME PLUGINS</a></li>
394     <li><a name="toc-AUDIO-PLUGINS-1" href="#AUDIO-PLUGINS">19.5 AUDIO PLUGINS</a></li>
395     <li><a name="toc-VIDEO-PLUGINS-1" href="#VIDEO-PLUGINS">19.6 VIDEO PLUGINS</a></li>
396     <li><a name="toc-TRANSITION-PLUGINS-1" href="#TRANSITION-PLUGINS">19.7 TRANSITION PLUGINS</a></li>
397     <li><a name="toc-PLUGIN-GUI_0027S-WHICH-UPDATE-DURING-PLAYBACK-1" href="#PLUGIN-GUI_0027S-WHICH-UPDATE-DURING-PLAYBACK">19.8 PLUGIN GUI&rsquo;S WHICH UPDATE DURING PLAYBACK</a></li>
398     <li><a name="toc-PLUGIN-QUERIES-1" href="#PLUGIN-QUERIES">19.9 PLUGIN QUERIES</a>
399     <ul class="no-bullet">
400       <li><a name="toc-SYSTEM-QUERIES-1" href="#SYSTEM-QUERIES">19.9.1 SYSTEM QUERIES</a></li>
401       <li><a name="toc-TIMING-QUERIES-1" href="#TIMING-QUERIES">19.9.2 TIMING QUERIES</a></li>
402     </ul></li>
403     <li><a name="toc-USING-OPENGL-1" href="#USING-OPENGL">19.10 USING OPENGL</a>
404     <ul class="no-bullet">
405       <li><a name="toc-GETTING-OPENGL-DATA-1" href="#GETTING-OPENGL-DATA">19.10.1 GETTING OPENGL DATA</a></li>
406       <li><a name="toc-DRAWING-USING-OPENGL-1" href="#DRAWING-USING-OPENGL">19.10.2 DRAWING USING OPENGL</a></li>
407       <li><a name="toc-USING-SHADERS-1" href="#USING-SHADERS">19.10.3 USING SHADERS</a></li>
408       <li><a name="toc-AGGREGATING-PLUGINS-1" href="#AGGREGATING-PLUGINS">19.10.4 AGGREGATING PLUGINS</a></li>
409     </ul></li>
410   </ul></li>
411   <li><a name="toc-KEYBOARD-SHORTCUTS-1" href="#KEYBOARD-SHORTCUTS">20 KEYBOARD SHORTCUTS</a>
412   <ul class="no-bullet">
413     <li><a name="toc-PROGRAM-WINDOW" href="#PROGRAM-WINDOW">20.1 PROGRAM WINDOW</a>
414     <ul class="no-bullet">
415       <li><a name="toc-Editing-Media" href="#Editing-Media">20.1.1 Editing Media</a></li>
416       <li><a name="toc-Editing-Labels-_0026-In_002fOut-Points" href="#Editing-Labels-_0026-In_002fOut-Points">20.1.2 Editing Labels &amp; In/Out Points</a></li>
417       <li><a name="toc-Navigation" href="#Navigation">20.1.3 Navigation</a></li>
418       <li><a name="toc-File-operations" href="#File-operations">20.1.4 File operations</a></li>
419       <li><a name="toc-Key-Frame-Editing" href="#Key-Frame-Editing">20.1.5 Key Frame Editing</a></li>
420       <li><a name="toc-Track-Manipulation" href="#Track-Manipulation">20.1.6 Track Manipulation</a></li>
421       <li><a name="toc-What_0027s-drawn-on-the-timeline" href="#What_0027s-drawn-on-the-timeline">20.1.7 What&rsquo;s drawn on the timeline</a></li>
422     </ul></li>
423     <li><a name="toc-VIEWER-_0026-COMPOSITOR-WINDOWS" href="#VIEWER-_0026-COMPOSITOR-WINDOWS">20.2 VIEWER &amp; COMPOSITOR WINDOWS</a></li>
424     <li><a name="toc-PLAYBACK-TRANSPORT" href="#PLAYBACK-TRANSPORT">20.3 PLAYBACK TRANSPORT</a></li>
425     <li><a name="toc-RECORD-WINDOW" href="#RECORD-WINDOW">20.4 RECORD WINDOW</a></li>
426   </ul></li>
427 </ul>
428 </div>
429
430
431
432
433
434
435
436
437 <hr>
438 <a name="ABOUT-CINELERRA"></a>
439 <div class="header">
440 <p>
441 Next: <a href="#INSTALLATION" accesskey="n" rel="next">INSTALLATION</a>, Previous: <a href="#Top" accesskey="p" rel="prev">TOP</a>, Up: <a href="#Top" accesskey="u" rel="up">TOP</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
442 </div>
443 <a name="ABOUT-CINELERRA-1"></a>
444 <h2 class="chapter">2 ABOUT CINELERRA</h2>
445
446 <p><b>BROADCAST 1.0</b>
447 </p>
448 <p>In 1996 our first editor came out: Broadcast 1.0.  It was just a window
449 with a waveform in it, it could cut and paste stereo audio waveforms on
450 a UNIX box, except unlike other audio editors it could handle files up
451 to 2 gigabytes with only 64 megs of RAM.  That was a feature normally
452 only accessible to the highest end professional audio houses.
453 </p>
454
455 <p><b>BROADCAST 2.0</b>
456 </p>
457 <p>In 1997 Broadcast 1.0 was replaced by Broadcast 2.0.  This time the
458 window had a menubar, patchbay, console, and transport control. 
459 Broadcast 2.0 still only handled audio but this time it handled
460 unlimited tracks, and it could perform effects on audio and save the
461 resulting waveform to disk.  More notably a few effects could be
462 performed as the audio was playing back, in realtime.  A user could mix
463 unlimited numbers of tracks, adjust fade, pan, and EQ, and hear the
464 result instantly.   Amazingly this real time tweeking is still
465 unavailable on most audio programs.
466 </p>
467 <p><b>BROADCAST 2000</b>
468 </p>
469 <p>But Broadcast 2.0 still didn&rsquo;t handle video and it wasn&rsquo;t very graceful
470 at audio either.  In 1999 video broke into the story with Broadcast
471 2000.  This iteration of the Broadcast series could do wonders with
472 audio and offered a pretty good video feature set.  It could edit video
473 files up to 64 terabytes.  It could do everything Broadcast 2.1 did
474 with audio except now all effects for video and audio could be chained
475 and performed on the fly, with instant feedback as a user tweeked
476 parameters during playback.  Broadcast 2000 made it very easy to do a
477 lot of processing and editing on video and audio that would otherwise
478 involve many hours setting up command line sequences and writing to
479 disk. For a time it seemed as if the original dream of immersive movie
480 making for everyone regardless of income level had arrived.
481 </p>
482 <p><b>CINELERRA</b>
483 </p>
484
485 <p>Later on Broadcast 2000 began to come short.  Its audio and video was
486 graceful if you knew how to use it efficiently, but quality issues and
487 new user interface techniques were emerging.  Broadcast 2000 kept the
488 audio interface from its ancestors, which didn&rsquo;t apply well to video. 
489 Users likewise were maturing.  No longer would it be sufficient to just
490 edit video on a UNIX box.  Most users expected on UNIX the same thing
491 they got in Win or Mac. In mid 2000 designs for a Broadcast 2000
492 replacement were drafted.  The Broadcast name was officially retired
493 from the series and the software would now be called Cinelerra. 
494 Cinelerra would allow users to configure certain effects in much less
495 time than required with Broadcast 2000.  It would begin to emulate some
496 of the features found in Win and Mac software while not attempting to
497 become a clone.  It&rsquo;s interface would be designed for video from the
498 ground up, while supplementing that with the Broadcast audio
499 interface.  As always, quality improvements would happen.
500 </p>
501 <p><b>LINUX DERIVATIVES</b>
502 </p>
503 <p>Linux became more and more fragmented after corporations adopted it. 
504 Threading once worked the same on all derivatives.  Today there are more
505 threading models than days of the week.  We try to focus on 1 of the
506 most popular Linux derivatives at any moment.  The threading model is
507 ported to that Linux derivative shortly before a release, but Linux
508 derivatives quickly evolve to new threading models and everything
509 breaks.
510 </p>
511 <p>Also, there is no consistent behaviour for sound and video drivers.  The
512 situation with video capture has improved in that modern video sources
513 can all be mounted like disk drives.  The audio capture drivers have
514 been a bit more reliable.
515 </p>
516
517
518
519
520
521 <table class="menu" border="0" cellspacing="0">
522 <tr><td align="left" valign="top">&bull; <a href="#ABOUT-THIS-MANUAL" accesskey="1">ABOUT THIS MANUAL</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
523 </td></tr>
524 </table>
525
526 <hr>
527 <a name="ABOUT-THIS-MANUAL"></a>
528 <div class="header">
529 <p>
530 Up: <a href="#ABOUT-CINELERRA" accesskey="u" rel="up">ABOUT CINELERRA</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
531 </div>
532 <a name="ABOUT-THIS-MANUAL-1"></a>
533 <h3 class="section">2.1 ABOUT THIS MANUAL</h3>
534
535 <p>This is the original manual for Cinelerra.  This manual has been copied
536 and translated into many languages on many websites in varying degrees
537 of completeness.
538 </p>
539 <p>Organizing information in the easiest manner for users to find out what
540 they need to know is sort of like cataloging the internet.  They&rsquo;ve
541 been trying to get it right for 30 years and will probably keep trying
542 until the end of time.
543 </p>
544 <p>There a lot of fragments of documentation scattered throughout the
545 internet about Cinelerra.  This document attempts to combine all the
546 pieces of information in one piece.
547 </p>
548 <p>Like the operating system and compiler for a piece of software, the
549 document writing format is the most important thing in choosing our
550 document format.  We wanted a format which would be readable regardless
551 of corporate whims and fads.  A piece of software which compiles on GCC
552 and Linux will be usable as long as there are C compilers.  Documents
553 written in Texinfo will be readable as long as there&rsquo;s a C compiler.
554 </p>
555 <p>After many years of searching for the perfect documentation format
556 we&rsquo;ve arrived at TexInfo.  This format can be converted to HTML,
557 printed, automatically indexed, but most importantly is not bound to
558 any commercial word processor.
559 </p>
560 <p>There are no screenshots in this manual.  Screenshots become obsolete
561 quickly and as a result confuse the users.  What looks one way in a
562 screenshot will always look different in the real program because the
563 real program and the manual are always evolving, never perfectly
564 synchronized.  It is true that manuals should have screenshots, but our
565 objective in omitting screenshots is to keep the software costs minimal
566 so you don&rsquo;t have to pay for it.  That includes additional labor to
567 synchronize the manual with the software.
568 </p>
569 <p>In addition to telling you the basic editing features of Cinelerra this
570 manual covers tricks that won&rsquo;t be described anywhere else.  We&rsquo;re
571 going to try to come up with certain things you can do with Cinelerra
572 that you wouldn&rsquo;t think of on your own.
573 </p>
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590 <hr>
591 <a name="INSTALLATION"></a>
592 <div class="header">
593 <p>
594 Next: <a href="#CONFIGURATION" accesskey="n" rel="next">CONFIGURATION</a>, Previous: <a href="#ABOUT-CINELERRA" accesskey="p" rel="prev">ABOUT CINELERRA</a>, Up: <a href="#Top" accesskey="u" rel="up">TOP</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
595 </div>
596 <a name="INSTALLATION-1"></a>
597 <h2 class="chapter">3 INSTALLATION</h2>
598
599
600 <p>The Cinelerra package contains Cinelerra and most of the libraries
601 needed to run it.  We try to include all the dependancies because of
602 the difficulty in tracking down the right versions.  Also included are
603 some utilities for handling files.  The following are the general
604 contents of all Cinelerra packages.
605 </p>
606 <ul>
607 <li> 
608 <b>Foreign language translations</b> - These go into /usr/share/locale.
609
610 </li><li> 
611 <b>Cinelerra executable</b> - This goes into /usr/bin
612
613 </li><li> 
614 <b>Cinelerra plugins</b> - These go into /usr/lib/cinelerra in 32 bit
615 systems and /usr/lib64/cinelerra in 64 bit systems.
616
617 </li><li> 
618 <b>soundtest</b> - Utility for determining sound card buffer size.
619
620 </li><li> 
621 <b>mplexlo</b> - Multiplexing of MPEG elementary streams without standards
622 conformance but more efficiently.
623
624 </li><li> 
625 <b>mpeg3cat</b> - Utility for reading an MPEG file from a certain standard
626 and outputting it to stdout.
627
628 </li><li> 
629 <b>mpeg3toc, mpeg3cat, mpeg3dump</b> - Utilities/ for indexing and reading MPEG files.
630
631 </li><li> 
632 <b>mpeg3peek</b> - Utility for displaying the byte offset of a frame in an
633 MPEG file.
634
635 </li></ul>
636
637
638
639 <table class="menu" border="0" cellspacing="0">
640 <tr><td align="left" valign="top">&bull; <a href="#INSTALLING-AN-RPM" accesskey="1">INSTALLING AN RPM</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
641 </td></tr>
642 <tr><td align="left" valign="top">&bull; <a href="#COMPILING-FROM-SCRATCH" accesskey="2">COMPILING FROM SCRATCH</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
643 </td></tr>
644 <tr><td align="left" valign="top">&bull; <a href="#RUNNING-CINELERRA" accesskey="3">RUNNING CINELERRA</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
645 </td></tr>
646 </table>
647
648
649
650
651
652
653
654
655 <hr>
656 <a name="INSTALLING-AN-RPM"></a>
657 <div class="header">
658 <p>
659 Next: <a href="#COMPILING-FROM-SCRATCH" accesskey="n" rel="next">COMPILING FROM SCRATCH</a>, Up: <a href="#INSTALLATION" accesskey="u" rel="up">INSTALLATION</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
660 </div>
661 <a name="INSTALLING-AN-RPM-1"></a>
662 <h3 class="section">3.1 INSTALLING AN RPM</h3>
663
664 <p>Cinelerra is easiest installed by downloading an RPM and running
665 </p>
666 <div class="example">
667 <pre class="example">rpm -U --force --nodeps hvirtual*.rpm
668 </pre></div>
669
670 <p>on a Fedora 4 system.
671 </p>
672 <p>On systems which don&rsquo;t support RPM look for a utility called
673 <b>rpm2cpio</b>.  Download a Cinelerra RPM and from the /
674 directory run
675 </p>
676 <div class="example">
677 <pre class="example">rpm2cpio hvirtual*.rpm | cpio -i --make-directories
678 </pre></div>
679
680 <p>This doesn&rsquo;t always work because there are many forks of the C library,
681 each incompatible with the others.  This is the biggest reason to
682 compile from scratch.
683 </p>
684
685
686
687
688
689
690 <hr>
691 <a name="COMPILING-FROM-SCRATCH"></a>
692 <div class="header">
693 <p>
694 Next: <a href="#RUNNING-CINELERRA" accesskey="n" rel="next">RUNNING CINELERRA</a>, Previous: <a href="#INSTALLING-AN-RPM" accesskey="p" rel="prev">INSTALLING AN RPM</a>, Up: <a href="#INSTALLATION" accesskey="u" rel="up">INSTALLATION</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
695 </div>
696 <a name="COMPILING-FROM-SCRATCH-1"></a>
697 <h3 class="section">3.2 COMPILING FROM SCRATCH</h3>
698
699 <p>It should be noted that the compiler used in building Cinelerra
700 binaries is the free GNU compiler and very conservative optimization
701 flags.  Alternative optimization flags and compilers produce varying
702 results.  Compiling the source is hard and there&rsquo;s no warranty if the
703 source code fails to compile, but the method for compiling starts by
704 downloading the source code and decompressing.
705 </p>
706 <p>The compilation is verified on a vanilla Fedora 4 installation,
707 workstation mode.  Fedora doesn&rsquo;t install a lot of dependancies like
708 <b>nasm</b> and <b>yasm</b>.  Yes, 3 assemblers are now required to assemble
709 x86 code.  Compiling the source is hard and there&rsquo;s no warranty if the
710 source code fails to compile, but the method for compiling starts by
711 downloading the source code and decompressing.
712 </p>
713 <div class="example">
714 <pre class="example">tar jxf cinelerra*.tar.bz2
715 </pre></div>
716
717
718 <p>The compilation is verified on a Fedora 4 installation.  Fedora 4
719 doesn&rsquo;t install a lot of the reqiured compilers.  Mainly <b>nasm</b> and
720 <b>yasm</b>, 2 of the 3 assemblers.  These have to be installed manually
721 for compilation to succeed.
722 </p>
723 <p>Enter the hvirtual directory
724 </p>
725 <div class="example">
726 <pre class="example">cd cinelerra
727 </pre></div>
728
729 <p>Then run
730 </p>
731 <div class="example">
732 <pre class="example">./configure
733 </pre></div>
734
735 <p>This checks the build environment for the right tools and should give
736 you an error if a tool is missing.  Once that succeeds run
737 </p>
738 <div class="example">
739 <pre class="example">make
740 </pre></div>
741
742 <p>The make procedure should run through all the directories and put
743 binaries in the <b>i686</b> or <b>x86_64</b> directories.  When NFS was
744 a lot faster, we compiled Alpha and i686 binaries in the same
745 filesystem with the objects in different subdirectories, so all the
746 binaries are still put in subdirectories.
747 </p>
748 <p>A lot of libraries are included to get the version numbers right.  Some
749 of the libraries don&rsquo;t compile on SMP systems.  One solution is to
750 disable SMP when rebooting and reenable it when compilation is
751 finished.  Another solution is to rerun make over and over until it
752 gets through the offending libraries.
753 </p>
754
755 <p>Once finished, make sure you are root and run
756 </p>
757 <div class="example">
758 <pre class="example">make install
759 </pre></div>
760
761 <p>to install the binaries.  If installation fails it means something
762 failed to compile or you weren&rsquo;t root.  Run <b>make</b> again and watch
763 for errors.
764 </p>
765 <p>Sometimes you&rsquo;ll want to run <b>make clean</b> if you&rsquo;re programming
766 something or the system libraries change.  In this case, you&rsquo;ll
767 probably need to run <b>configure</b> again because some libraries delete
768 their configuration files in <b>make clean</b>.
769 </p>
770 <hr>
771 <a name="RUNNING-CINELERRA"></a>
772 <div class="header">
773 <p>
774 Previous: <a href="#COMPILING-FROM-SCRATCH" accesskey="p" rel="prev">COMPILING FROM SCRATCH</a>, Up: <a href="#INSTALLATION" accesskey="u" rel="up">INSTALLATION</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
775 </div>
776 <a name="RUNNING-CINELERRA-1"></a>
777 <h3 class="section">3.3 RUNNING CINELERRA</h3>
778
779
780 <p>The simplest way to run Cinelerra is by running
781 </p>
782
783 <div class="example">
784 <pre class="example">/usr/bin/cinelerra
785 </pre></div>
786
787 <p>This command hides a much more capable command line interface.  Run
788 <b>cinelerra -h</b> to get a listing of command line options.  The use of
789 these options is described in several sections.
790 </p>
791 <p>For rendering from the command line See <a href="#RENDERING-FILES">RENDERING FILES</a>.
792 </p>
793
794
795
796
797
798
799
800
801
802
803
804 <hr>
805 <a name="CONFIGURATION"></a>
806 <div class="header">
807 <p>
808 Next: <a href="#CREATING-A-NEW-PROJECT" accesskey="n" rel="next">CREATING A NEW PROJECT</a>, Previous: <a href="#INSTALLATION" accesskey="p" rel="prev">INSTALLATION</a>, Up: <a href="#Top" accesskey="u" rel="up">TOP</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
809 </div>
810 <a name="CONFIGURATION-1"></a>
811 <h2 class="chapter">4 CONFIGURATION</h2>
812
813
814 <p>Because of the variety of uses, Cinelerra cannot be run optimally
815 without some intimate configuration for your specific needs. Very few
816 parameters are adjustible at compile time.  Runtime configuration is
817 the only option for most configuration because of the multitude of
818 parameters.
819 </p>
820 <p>Here we discuss not only the configuration options but which of the
821 different API&rsquo;s in Linux are supported.
822 </p>
823 <p>Go to <b>settings-&gt;preferences</b> and to see the options.
824 </p>
825
826 <table class="menu" border="0" cellspacing="0">
827 <tr><td align="left" valign="top">&bull; <a href="#ENVIRONMENT-VARIABLES" accesskey="1">ENVIRONMENT VARIABLES</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">These environment variables are recognized by Cinelerra
828 </td></tr>
829 <tr><td align="left" valign="top">&bull; <a href="#AUDIO-DRIVERS" accesskey="2">AUDIO DRIVERS</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Information about the audio drivers
830 </td></tr>
831 <tr><td align="left" valign="top">&bull; <a href="#VIDEO-DRIVERS" accesskey="3">VIDEO DRIVERS</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Information about the video drivers
832 </td></tr>
833 <tr><td align="left" valign="top">&bull; <a href="#PLAYBACK" accesskey="4">PLAYBACK</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Configuring parameters related to playback.
834 </td></tr>
835 <tr><td align="left" valign="top">&bull; <a href="#RECORDING" accesskey="5">RECORDING</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Configuring parameters related to recording.
836 </td></tr>
837 <tr><td align="left" valign="top">&bull; <a href="#PERFORMANCE" accesskey="6">PERFORMANCE</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Configuring parameters related to how fast things go.
838 </td></tr>
839 <tr><td align="left" valign="top">&bull; <a href="#INTERFACE" accesskey="7">INTERFACE</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Configuring the user interface.
840 </td></tr>
841 <tr><td align="left" valign="top">&bull; <a href="#ABOUT" accesskey="8">ABOUT</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Viewing information about the program.
842 </td></tr>
843 </table>
844
845
846 <hr>
847 <a name="ENVIRONMENT-VARIABLES"></a>
848 <div class="header">
849 <p>
850 Next: <a href="#AUDIO-DRIVERS" accesskey="n" rel="next">AUDIO DRIVERS</a>, Up: <a href="#CONFIGURATION" accesskey="u" rel="up">CONFIGURATION</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
851 </div>
852 <a name="ENVIRONMENT-VARIABLES-1"></a>
853 <h3 class="section">4.1 ENVIRONMENT VARIABLES</h3>
854
855 <p>In UNIX derivatives, environment variables are global variables in the
856 shell which all applications can read.  They are set with a command
857 like <b>set VARIABLE=value</b>.  All the environment variables can be
858 viewed with a command like <b>env</b>.  Cinelerra recognizes the following
859 environment variables:
860 </p>
861 <ul>
862 <li> <b>LADSPA_PATH</b> - If you want to use LADSPA plugins, this must be
863 defined: a colon separated list of directories to search for LADSPA
864 plugins.  These are not native Cinelerra plugins.  See <a href="#LADSPA-EFFECTS">LADSPA EFFECTS</a>.
865
866
867 </li></ul>
868
869
870
871
872
873
874 <hr>
875 <a name="AUDIO-DRIVERS"></a>
876 <div class="header">
877 <p>
878 Next: <a href="#VIDEO-DRIVERS" accesskey="n" rel="next">VIDEO DRIVERS</a>, Previous: <a href="#ENVIRONMENT-VARIABLES" accesskey="p" rel="prev">ENVIRONMENT VARIABLES</a>, Up: <a href="#CONFIGURATION" accesskey="u" rel="up">CONFIGURATION</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
879 </div>
880 <a name="AUDIO-DRIVERS-1"></a>
881 <h3 class="section">4.2 AUDIO DRIVERS</h3>
882
883 <p>The audio drivers are used for both recording and playback to get data
884 to and from the hardware.  Since the same drivers are used for both
885 recording and playback, their functionality is described here in a
886 separate section.
887 </p>
888
889
890
891 <table class="menu" border="0" cellspacing="0">
892 <tr><td align="left" valign="top">&bull; <a href="#COMMON-SOUND-DRIVER-ATTRIBUTES" accesskey="1">COMMON SOUND DRIVER ATTRIBUTES</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Attributes used for more than one sound driver.
893 </td></tr>
894 <tr><td align="left" valign="top">&bull; <a href="#OSS" accesskey="2">OSS</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Notes about the OSS driver
895 </td></tr>
896 <tr><td align="left" valign="top">&bull; <a href="#OSS-Envy24" accesskey="3">OSS Envy24</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Notes about the OSS driver for the Envy24 chip
897 </td></tr>
898 <tr><td align="left" valign="top">&bull; <a href="#ALSA" accesskey="4">ALSA</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Notes about the ALSA driver
899 </td></tr>
900 <tr><td align="left" valign="top">&bull; <a href="#ESOUND" accesskey="5">ESOUND</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Notes about the ESound driver
901 </td></tr>
902 <tr><td align="left" valign="top">&bull; <a href="#RAW-1394" accesskey="6">RAW 1394</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Notes about the Raw1394 driver
903 </td></tr>
904 <tr><td align="left" valign="top">&bull; <a href="#DV-1394" accesskey="7">DV 1394</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Notes about the DV1394 driver
905 </td></tr>
906 <tr><td align="left" valign="top">&bull; <a href="#IEC-61883" accesskey="8">IEC 61883</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Notes about the IEC 61883 driver
907 </td></tr>
908 </table>
909
910 <hr>
911 <a name="COMMON-SOUND-DRIVER-ATTRIBUTES"></a>
912 <div class="header">
913 <p>
914 Next: <a href="#OSS" accesskey="n" rel="next">OSS</a>, Up: <a href="#AUDIO-DRIVERS" accesskey="u" rel="up">AUDIO DRIVERS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
915 </div>
916 <a name="COMMON-SOUND-DRIVER-ATTRIBUTES-1"></a>
917 <h4 class="subsection">4.2.1 COMMON SOUND DRIVER ATTRIBUTES</h4>
918
919 <ul>
920 <li> DEVICE PATH
921
922 <p>Usually a file in the <b>/dev/</b> directory which controls the
923 device.
924 </p>
925 </li><li> 
926 BITS
927
928 <p>The number of bits of precision Cinelerra should set the device for. 
929 This sometimes has a figuritive meaning.  Some sound drivers need to be
930 set to 32 bits to perform 24 bit playback and won&rsquo;t play anything when
931 set to 24 bits.  Some sound drivers need to be set to 24 bits for 24
932 bit playback.
933 </p>
934 </li></ul>
935
936
937
938 <hr>
939 <a name="OSS"></a>
940 <div class="header">
941 <p>
942 Next: <a href="#OSS-Envy24" accesskey="n" rel="next">OSS Envy24</a>, Previous: <a href="#COMMON-SOUND-DRIVER-ATTRIBUTES" accesskey="p" rel="prev">COMMON SOUND DRIVER ATTRIBUTES</a>, Up: <a href="#AUDIO-DRIVERS" accesskey="u" rel="up">AUDIO DRIVERS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
943 </div>
944 <a name="OSS-1"></a>
945 <h4 class="subsection">4.2.2 OSS</h4>
946
947 <p>This was the first Linux sound driver.  It had an open source
948 implementation and a commercial implementation with more sound cards
949 supported.  It was the standard sound driver up to linux 2.4.  It still
950 is the only sound driver which an i386 binary can use when running on
951 an x86_64 system.
952 </p>
953 <hr>
954 <a name="OSS-Envy24"></a>
955 <div class="header">
956 <p>
957 Next: <a href="#ALSA" accesskey="n" rel="next">ALSA</a>, Previous: <a href="#OSS" accesskey="p" rel="prev">OSS</a>, Up: <a href="#AUDIO-DRIVERS" accesskey="u" rel="up">AUDIO DRIVERS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
958 </div>
959 <a name="OSS-Envy24-1"></a>
960 <h4 class="subsection">4.2.3 OSS Envy24</h4>
961
962 <p>The commercial version of OSS had a variant for 24 bit 96 Khz
963 soundcards.  This variant required significant changes to the way the
964 sound drivers were used, which is what the OSS Envy24 variant is for.
965 </p>
966
967 <hr>
968 <a name="ALSA"></a>
969 <div class="header">
970 <p>
971 Next: <a href="#ESOUND" accesskey="n" rel="next">ESOUND</a>, Previous: <a href="#OSS-Envy24" accesskey="p" rel="prev">OSS Envy24</a>, Up: <a href="#AUDIO-DRIVERS" accesskey="u" rel="up">AUDIO DRIVERS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
972 </div>
973 <a name="ALSA-1"></a>
974 <h4 class="subsection">4.2.4 ALSA</h4>
975
976 <p>ALSA is the most common sound driver in Linux 2.6.  It supports the
977 most sound cards now.  It takes advantage of low latency features in
978 Linux 2.6 to get better performance than OSS had in 2.4 but roughly the
979 same performance that OSS had in 2.0.  Unfortunately ALSA is constantly
980 changing.  A program which works with it one day may not the next day. 
981 New wrappers are being developed on top of ALSA at such a pace, we plan
982 to support them at regular intervals, not at every new release of a new
983 wrapper.
984 </p>
985 <p>ALSA is no longer portable between i386 and x86_64.  If an i386 binary
986 tries to play back on an x86_64 kernel it&rsquo;ll crash.  For this scenario,
987 use OSS.
988 </p>
989 <hr>
990 <a name="ESOUND"></a>
991 <div class="header">
992 <p>
993 Next: <a href="#RAW-1394" accesskey="n" rel="next">RAW 1394</a>, Previous: <a href="#ALSA" accesskey="p" rel="prev">ALSA</a>, Up: <a href="#AUDIO-DRIVERS" accesskey="u" rel="up">AUDIO DRIVERS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
994 </div>
995 <a name="ESOUND-1"></a>
996 <h4 class="subsection">4.2.5 ESOUND</h4>
997
998 <p>ESOUND was a sound server that sat on top of OSS.  It was written for a
999 window manager called Enlightenment.  It supported a limited number of
1000 bits and had high latency compared to modern times but multiplexed
1001 multiple audio sources.  It&rsquo;s unknown whether it still works.
1002 </p>
1003 <hr>
1004 <a name="RAW-1394"></a>
1005 <div class="header">
1006 <p>
1007 Next: <a href="#DV-1394" accesskey="n" rel="next">DV 1394</a>, Previous: <a href="#ESOUND" accesskey="p" rel="prev">ESOUND</a>, Up: <a href="#AUDIO-DRIVERS" accesskey="u" rel="up">AUDIO DRIVERS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1008 </div>
1009 <a name="RAW-1394-1"></a>
1010 <h4 class="subsection">4.2.6 RAW 1394</h4>
1011
1012 <p>The first interface between linux software and firewire camcorders. 
1013 This was the least reliable way to play audio to a camcorder.  It
1014 consisted of a library on top of the kernel commands.
1015 </p>
1016 <hr>
1017 <a name="DV-1394"></a>
1018 <div class="header">
1019 <p>
1020 Next: <a href="#IEC-61883" accesskey="n" rel="next">IEC 61883</a>, Previous: <a href="#RAW-1394" accesskey="p" rel="prev">RAW 1394</a>, Up: <a href="#AUDIO-DRIVERS" accesskey="u" rel="up">AUDIO DRIVERS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1021 </div>
1022 <a name="DV-1394-1"></a>
1023 <h4 class="subsection">4.2.7 DV 1394</h4>
1024
1025 <p>The second rewrite of DV camcorder support in Linux.  This was the most
1026 reliable way to play audio to a camcorder.  This consisted of direct
1027 kernel commands.
1028 </p>
1029 <hr>
1030 <a name="IEC-61883"></a>
1031 <div class="header">
1032 <p>
1033 Previous: <a href="#DV-1394" accesskey="p" rel="prev">DV 1394</a>, Up: <a href="#AUDIO-DRIVERS" accesskey="u" rel="up">AUDIO DRIVERS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1034 </div>
1035 <a name="IEC-61883-1"></a>
1036 <h4 class="subsection">4.2.8 IEC 61883</h4>
1037
1038 <p>The third rewrite of DV camcorder support in Linux.  This is a library
1039 on top of RAW 1394 which is a library on top of the kernel commands. 
1040 It&rsquo;s less reliable than DV 1394 but more reliable than RAW 1394.  The
1041 next rewrite ought to fix that.
1042 </p>
1043
1044
1045
1046
1047
1048
1049
1050 <hr>
1051 <a name="VIDEO-DRIVERS"></a>
1052 <div class="header">
1053 <p>
1054 Next: <a href="#PLAYBACK" accesskey="n" rel="next">PLAYBACK</a>, Previous: <a href="#AUDIO-DRIVERS" accesskey="p" rel="prev">AUDIO DRIVERS</a>, Up: <a href="#CONFIGURATION" accesskey="u" rel="up">CONFIGURATION</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1055 </div>
1056 <a name="VIDEO-DRIVERS-1"></a>
1057 <h3 class="section">4.3 VIDEO DRIVERS</h3>
1058
1059 <p>The audio drivers are used for both recording and playback to get data
1060 to and from the hardware.  Since the same drivers are used for both
1061 recording and playback, their functionality is described here in a
1062 separate section.
1063 </p>
1064
1065 <table class="menu" border="0" cellspacing="0">
1066 <tr><td align="left" valign="top">&bull; <a href="#COMMON-VIDEO-DRIVER-ATTRIBUTES" accesskey="1">COMMON VIDEO DRIVER ATTRIBUTES</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Parameters used by more than one driver.
1067 </td></tr>
1068 <tr><td align="left" valign="top">&bull; <a href="#X11" accesskey="2">X11</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
1069 </td></tr>
1070 <tr><td align="left" valign="top">&bull; <a href="#X11_002dXV" accesskey="3">X11-XV</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
1071 </td></tr>
1072 <tr><td align="left" valign="top">&bull; <a href="#X11_002dOPENGL" accesskey="4">X11-OPENGL</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
1073 </td></tr>
1074 <tr><td align="left" valign="top">&bull; <a href="#BUZ" accesskey="5">BUZ</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
1075 </td></tr>
1076 <tr><td align="left" valign="top">&bull; <a href="#RAW-1394-VIDEO-PLAYBACK" accesskey="6">RAW 1394 VIDEO PLAYBACK</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
1077 </td></tr>
1078 <tr><td align="left" valign="top">&bull; <a href="#DV-1394-VIDEO-PLAYBACK" accesskey="7">DV 1394 VIDEO PLAYBACK</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
1079 </td></tr>
1080 <tr><td align="left" valign="top">&bull; <a href="#IEC-61883-VIDEO-PLAYBACK" accesskey="8">IEC 61883 VIDEO PLAYBACK</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
1081 </td></tr>
1082 </table>
1083
1084 <hr>
1085 <a name="COMMON-VIDEO-DRIVER-ATTRIBUTES"></a>
1086 <div class="header">
1087 <p>
1088 Next: <a href="#X11" accesskey="n" rel="next">X11</a>, Up: <a href="#VIDEO-DRIVERS" accesskey="u" rel="up">VIDEO DRIVERS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1089 </div>
1090 <a name="COMMON-VIDEO-DRIVER-ATTRIBUTES-1"></a>
1091 <h4 class="subsection">4.3.1 COMMON VIDEO DRIVER ATTRIBUTES</h4>
1092
1093
1094 <ul>
1095 <li> 
1096 DISPLAY
1097
1098 <p>The is intended for dual monitor
1099 displays.  Depending on the value of Display, the Compositor window
1100 will appear on a different monitor from the rest of the windows.
1101 </p>
1102 </li><li> 
1103 DEVICE PATH
1104
1105 <p>Usually a file in the <b>/dev/</b> directory
1106 which controls the device.
1107 </p>
1108 </li><li> 
1109 SWAP FIELDS
1110
1111 <p>Make the even lines odd and the odd lines even
1112 when sending to the device.  On an NTSC or 1080i monitor the fields may
1113 need to be swapped to prevent jittery motion.
1114 </p>
1115 </li><li> 
1116 OUTPUT CHANNEL
1117
1118 <p>Devices with multiple outputs may need a
1119 specific connector to send video on.
1120 </p>
1121 </li><li> 
1122 PORT
1123
1124 <p>The IEEE1394 standard specifies something known as the
1125 <b>port</b>.  This is probably the firewire card number in the system
1126 to use.
1127 </p>
1128 </li><li> 
1129 CHANNEL
1130
1131 <p>The IEEE1394 standard specifies something known as the
1132 <b>channel</b>.  For DV cameras it&rsquo;s always <b>63</b>.
1133 </p>
1134 </li></ul>
1135
1136 <hr>
1137 <a name="X11"></a>
1138 <div class="header">
1139 <p>
1140 Next: <a href="#X11_002dXV" accesskey="n" rel="next">X11-XV</a>, Previous: <a href="#COMMON-VIDEO-DRIVER-ATTRIBUTES" accesskey="p" rel="prev">COMMON VIDEO DRIVER ATTRIBUTES</a>, Up: <a href="#VIDEO-DRIVERS" accesskey="u" rel="up">VIDEO DRIVERS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1141 </div>
1142 <a name="X11-1"></a>
1143 <h4 class="subsection">4.3.2 X11</h4>
1144
1145 <p>This was the first method of video playback on any UNIX system, valid
1146 all the way until 1999.  It just writes the RGB triplet for each pixel
1147 directly to the window.  It&rsquo;s the slowest playback method.  It&rsquo;s still
1148 useful as a fallback when graphics hardware can&rsquo;t handle very large
1149 frames.
1150 </p>
1151 <hr>
1152 <a name="X11_002dXV"></a>
1153 <div class="header">
1154 <p>
1155 Next: <a href="#X11_002dOPENGL" accesskey="n" rel="next">X11-OPENGL</a>, Previous: <a href="#X11" accesskey="p" rel="prev">X11</a>, Up: <a href="#VIDEO-DRIVERS" accesskey="u" rel="up">VIDEO DRIVERS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1156 </div>
1157 <a name="X11_002dXV-1"></a>
1158 <h4 class="subsection">4.3.3 X11-XV</h4>
1159
1160 <p>This was the second big method of video playback in UNIX starting in
1161 1999.  It converts YUV to RGB in hardware with scaling.  It&rsquo;s the
1162 preferred playback method but can&rsquo;t handle large frame sizes.  The
1163 maximum video size for XV is usually 1920x1080.
1164 </p>
1165
1166 <hr>
1167 <a name="X11_002dOPENGL"></a>
1168 <div class="header">
1169 <p>
1170 Next: <a href="#BUZ" accesskey="n" rel="next">BUZ</a>, Previous: <a href="#X11_002dXV" accesskey="p" rel="prev">X11-XV</a>, Up: <a href="#VIDEO-DRIVERS" accesskey="u" rel="up">VIDEO DRIVERS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1171 </div>
1172 <a name="X11_002dOPENGL-1"></a>
1173 <h4 class="subsection">4.3.4 X11-OPENGL</h4>
1174
1175 <p>The most powerful video playback method is OpenGL.  With this driver,
1176 most effects are done in hardware.  OpenGL allows video sizes up to the
1177 maximum texture size, which is usually larger than what XV supports,
1178 depending on the graphics driver.
1179 </p>
1180 <p>OpenGL doesn&rsquo;t affect rendering.  It just accelerates playback.  OpenGL
1181 relies on PBuffers and shaders to do video rendering.  The graphics
1182 driver must support OpenGL 2 and Cinelerra needs to be explicitely
1183 compiled with OpenGL 2 support.  This requires compiling it on a system
1184 with the OpenGL 2 headers.
1185 </p>
1186 <p>PBuffers are known to be fickle.  If the graphics card doesn&rsquo;t have
1187 enough memory or doesn&rsquo;t have the right visuals, PBuffers won&rsquo;t work. 
1188 Try seeking several frames or restarting Cinelerra if OpenGL doesn&rsquo;t
1189 work.
1190 </p>
1191 <p>Because of OpenGL limitations, X11-OpenGL processes everything in 8 bit
1192 colormodels, although the difference between YUV and RGB is retained.
1193 </p>
1194 <p>The <b>scaling equation</b> in Preferences is ignored by OpenGL.  OpenGL
1195 always uses linear scaling.
1196 </p>
1197 <p>Project and track sizes need to be multiples of 4 for OpenGL to work.  
1198 </p>
1199 <p>To get the most acceleration, OpenGL-enabled effects must be placed
1200 after software-only effects.  All rendering before the last
1201 software-only effect is done in software.  The core Cinelerra
1202 operations like camera and projector are of course OpenGL.
1203 </p>
1204
1205
1206 <hr>
1207 <a name="BUZ"></a>
1208 <div class="header">
1209 <p>
1210 Next: <a href="#RAW-1394-VIDEO-PLAYBACK" accesskey="n" rel="next">RAW 1394 VIDEO PLAYBACK</a>, Previous: <a href="#X11_002dOPENGL" accesskey="p" rel="prev">X11-OPENGL</a>, Up: <a href="#VIDEO-DRIVERS" accesskey="u" rel="up">VIDEO DRIVERS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1211 </div>
1212 <a name="BUZ-1"></a>
1213 <h4 class="subsection">4.3.5 BUZ</h4>
1214
1215 <p>This is a method for playing motion JPEG-A files directly to a
1216 composite analog signal.  It uses a popular hack of the Video4Linux 1
1217 driver from 2000 to decompress JPEG in hardware.  Sadly, even though
1218 analog output is largely obsolete, newer drivers have replaced BUZ.
1219 </p>
1220 <hr>
1221 <a name="RAW-1394-VIDEO-PLAYBACK"></a>
1222 <div class="header">
1223 <p>
1224 Next: <a href="#DV-1394-VIDEO-PLAYBACK" accesskey="n" rel="next">DV 1394 VIDEO PLAYBACK</a>, Previous: <a href="#BUZ" accesskey="p" rel="prev">BUZ</a>, Up: <a href="#VIDEO-DRIVERS" accesskey="u" rel="up">VIDEO DRIVERS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1225 </div>
1226 <a name="RAW-1394-VIDEO-PLAYBACK-1"></a>
1227 <h4 class="subsection">4.3.6 RAW 1394 VIDEO PLAYBACK</h4>
1228
1229 <p>The first interface between linux software and firewire camcorders. 
1230 This was the least reliable way to play video to a camcorder.  It
1231 consisted of a library on top of the kernel commands.
1232 </p>
1233
1234 <hr>
1235 <a name="DV-1394-VIDEO-PLAYBACK"></a>
1236 <div class="header">
1237 <p>
1238 Next: <a href="#IEC-61883-VIDEO-PLAYBACK" accesskey="n" rel="next">IEC 61883 VIDEO PLAYBACK</a>, Previous: <a href="#RAW-1394-VIDEO-PLAYBACK" accesskey="p" rel="prev">RAW 1394 VIDEO PLAYBACK</a>, Up: <a href="#VIDEO-DRIVERS" accesskey="u" rel="up">VIDEO DRIVERS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1239 </div>
1240 <a name="DV-1394-VIDEO-PLAYBACK-1"></a>
1241 <h4 class="subsection">4.3.7 DV 1394 VIDEO PLAYBACK</h4>
1242
1243 <p>The second rewrite of DV camcorder support in Linux.  This was the most
1244 reliable way to play video to a camcorder.  This consisted of direct
1245 kernel commands.
1246 </p>
1247 <hr>
1248 <a name="IEC-61883-VIDEO-PLAYBACK"></a>
1249 <div class="header">
1250 <p>
1251 Previous: <a href="#DV-1394-VIDEO-PLAYBACK" accesskey="p" rel="prev">DV 1394 VIDEO PLAYBACK</a>, Up: <a href="#VIDEO-DRIVERS" accesskey="u" rel="up">VIDEO DRIVERS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1252 </div>
1253 <a name="IEC-61883-VIDEO-PLAYBACK-1"></a>
1254 <h4 class="subsection">4.3.8 IEC 61883 VIDEO PLAYBACK</h4>
1255
1256
1257 <p>The third rewrite of DV camcorder support in Linux.  This is a library
1258 on top of RAW 1394 which is a library on top of the kernel commands. 
1259 It&rsquo;s less reliable than DV 1394 but more reliable than RAW 1394.  The
1260 next rewrite ought to fix that.
1261 </p>
1262
1263
1264
1265
1266
1267
1268 <hr>
1269 <a name="PLAYBACK"></a>
1270 <div class="header">
1271 <p>
1272 Next: <a href="#RECORDING" accesskey="n" rel="next">RECORDING</a>, Previous: <a href="#VIDEO-DRIVERS" accesskey="p" rel="prev">VIDEO DRIVERS</a>, Up: <a href="#CONFIGURATION" accesskey="u" rel="up">CONFIGURATION</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1273 </div>
1274 <a name="PLAYBACK-1"></a>
1275 <h3 class="section">4.4 PLAYBACK</h3>
1276
1277
1278
1279 <table class="menu" border="0" cellspacing="0">
1280 <tr><td align="left" valign="top">&bull; <a href="#AUDIO-OUT" accesskey="1">AUDIO OUT</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
1281 </td></tr>
1282 <tr><td align="left" valign="top">&bull; <a href="#VIDEO-OUT" accesskey="2">VIDEO OUT</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
1283 </td></tr>
1284 </table>
1285
1286
1287
1288 <hr>
1289 <a name="AUDIO-OUT"></a>
1290 <div class="header">
1291 <p>
1292 Next: <a href="#VIDEO-OUT" accesskey="n" rel="next">VIDEO OUT</a>, Up: <a href="#PLAYBACK" accesskey="u" rel="up">PLAYBACK</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1293 </div>
1294 <a name="AUDIO-OUT-1"></a>
1295 <h4 class="subsection">4.4.1 AUDIO OUT</h4>
1296
1297 <p>These determine what happens when you play sound from the timeline.
1298 </p>
1299 <ul>
1300 <li> SAMPLES TO SEND TO CONSOLE:
1301
1302 <p>For playing audio, small fragments of sound are read from disk and
1303 processed in a virtual console sequentially.  A larger value here
1304 causes more latency when you change mixing parameters but gives more
1305 reliable playback.
1306 </p>
1307 <p>Some sound drivers don&rsquo;t allow changing of the console fragment so
1308 latency is unchanged no matter what this value is.
1309 </p>
1310 <p>A good way of ensuring high quality playback was to read bigger
1311 fragments from the disk and break them into smaller fragments for the
1312 soundcard.  That changed when the virtual console moved from the push
1313 model to the pull model.  Since different stages of the rendering
1314 pipeline can change the rate of the incoming data, it would now be real
1315 hard to disconnect size of the console fragments from the size of the
1316 fragments read from disk.
1317 </p>
1318 </li><li> 
1319 AUDIO OFFSET:
1320
1321 <p>The ability to tell the exact playback position on Linux sound drivers
1322 is pretty bad if it&rsquo;s provided at all.  Since this information is
1323 required for proper video synchronization, it has to be accurate.  The
1324 <b>AUDIO OFFSET</b> allows users to adjust the position returned by the
1325 sound driver to reflect reality.  The audio offset doesn&rsquo;t affect the
1326 audio playback or rendering at all.  It merely changes the
1327 synchronization of video playback.
1328 </p>
1329 <p>The easiest way to set the audio offset is to create a timeline with 1
1330 video track and one audio track.  Expand the audio track and center the
1331 audio pan.  The frame rate should be something over 24fps and the
1332 sampling rate should be over 32000.  The frame size should be small
1333 enough for your computer to render it at the full framerate.  Highlight
1334 a region of the timeline starting at 10 seconds and ending at 20
1335 seconds.  Drop a <b>gradient</b> effect on the video track and configure
1336 it to be clearly visible.  Drop a <b>synthesizer</b> effect on the audio
1337 and configure it to be clearly audible.
1338 </p>
1339 <p>Play the timeline from 0 and watch to see if the gradient effect starts
1340 exactly when the audio starts.  If it doesn&rsquo;t, expand the audio track
1341 and adjust the nudge.  If the audio starts ahead of the video, decrease
1342 the nudge value.  If the audio starts after the video, increase the
1343 nudge value.  Once the tracks play back synchronized, copy the nudge
1344 value to the <b>AUDIO OFFSET</b> value in preferences.
1345 </p>
1346 <p><b>Note:</b> if you change sound drivers or you change the value of <b>USE
1347 SOFTWARE FOR POSITIONING INFORMATION</b>, you&rsquo;ll need to change the audio
1348 offset because different sound drivers are unequally inaccurate.
1349 </p>
1350 </li><li> 
1351 VIEW FOLLOWS PLAYBACK
1352
1353 <p>Causes the timeline window to scroll when the playback cursor moves. 
1354 This can bog down the X Server or cause the timeline window to lock up
1355 for long periods of time while drawing the assetse.
1356 </p>
1357 </li><li> USE SOFTWARE FOR POSITIONING INFORMATION
1358
1359 <p>Most soundcards and sound drivers don&rsquo;t give reliable information on
1360 the number of samples the card has played. When playing video you need
1361 this information for synchronization. This option causes the sound
1362 driver to be ignored and a software timer to be used for
1363 synchronization.
1364 </p>
1365 </li><li> AUDIO PLAYBACK IN REALTIME:
1366
1367 <p>Back in the days when 150Mhz was the maximum, this allowed
1368 uninterrupted playback on heavy loads.  It forces the audio playback to
1369 the highest priority in the kernel.  Today it&rsquo;s most useful for
1370 achieving very low latency between console tweeks and soundcard
1371 output.  You must be root to get realtime priority.
1372 </p>
1373 </li><li> AUDIO DRIVER
1374
1375 <p>There are many sound drivers for Linux.  This allows selecting one
1376 sound driver and setting parameters specific to it.  The sound drivers
1377 and their parameters are described in the sound driver section. 
1378 See <a href="#AUDIO-DRIVERS">AUDIO DRIVERS</a>.
1379 </p>
1380 </li></ul>
1381
1382
1383
1384
1385 <hr>
1386 <a name="VIDEO-OUT"></a>
1387 <div class="header">
1388 <p>
1389 Previous: <a href="#AUDIO-OUT" accesskey="p" rel="prev">AUDIO OUT</a>, Up: <a href="#PLAYBACK" accesskey="u" rel="up">PLAYBACK</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1390 </div>
1391 <a name="VIDEO-OUT-1"></a>
1392 <h4 class="subsection">4.4.2 VIDEO OUT</h4>
1393
1394 <p>These determine how video gets from the timeline to your eyes.
1395 </p>
1396 <ul>
1397 <li> PLAY EVERY FRAME
1398
1399 <p>Causes every frame of video to be displayed even if it means falling
1400 behind the audio.  This should always be on unless you use mostly
1401 uncompressed codecs.  Most compressed codecs don&rsquo;t support frame
1402 dropping anymore.
1403 </p>
1404
1405
1406 </li><li> 
1407 FRAMERATE ACHIEVED
1408
1409 <p>The number of frames per second being displayed during playback.  This
1410 is only updated during playback.
1411 </p>
1412 </li><li> DECODE FRAMES ASYNCHRONOUSLY
1413
1414 <p>If you have lots of memory and more than one CPU, this option can
1415 improve playback performance by decoding video on one CPU as fast as
1416 possible while dedicating other CPU to displaying video only.  It
1417 assumes all playback operations are forward and no frames are dropped. 
1418 Operations involving reverse playback or frame dropping are negatively
1419 impacted.
1420 </p>
1421 <p>Since this option requires enourmous amounts of memory, it may crash if
1422 the input frames are very large.
1423 </p>
1424
1425 </li><li> 
1426 SCALING EQUATION
1427
1428 <p>When video playback involves any kind of scaling or translation, this
1429 algorithm is used.  This doesn&rsquo;t affect 1:1 playback.
1430 </p>
1431 <ul>
1432 <li> NEAREST NEIGHBOR ENLARGE AND REDUCE
1433
1434 <p>lowest but fastest
1435 quality.  Produces jagged edges and uneven motion.
1436 </p>
1437
1438 </li><li> 
1439 BICUBIC ENLARGE AND BILINEAR REDUCE
1440
1441 <p>highest but slowest
1442 quality.  For enlarging a bicubic interpolation is used, which blurs
1443 slightly but doesn&rsquo;t reveal stair steps.  For reduction a bilinear
1444 interpolation is used, which produces very sharp images and reduces
1445 noise.  The bilinear reduced images can be sharpened with a sharpen
1446 effect with less noise than a normal sized image.
1447 </p>
1448 </li><li> 
1449 BILINEAR ENLARGE AND BILINEAR REDUCE
1450
1451 <p>when slight enlargement
1452 is needed a bilinear enlargement looks better than a bicubic
1453 enlargement.
1454 </p>
1455 </li></ul>
1456
1457
1458 </li><li> 
1459 PRELOAD BUFFER FOR QUICKTIME
1460
1461 <p>The Quicktime/AVI decoder can handle DVD sources better when this is
1462 around 10000000.  This reduces the amount of seeking required. 
1463 Unfortunately when reading high bitrate sources from a hard drive, this
1464 tends to slow it down.  For normal use this should be 0.
1465 </p>
1466
1467 </li><li> 
1468 DVD SUBTITLE TO DISPLAY
1469
1470 <p>DVD IFO files usually contain subtitle tracks.  These must be decoded
1471 with by the MPEG decoder.  Select <b>Enable subtitles</b> to enable
1472 subtitle decoding.  There are usually multiple subtitle tracks starting
1473 from 0.  The subtitle track to be decoded for all MPEG streams goes in
1474 the DVD subtitlee to display text box.  Go to the asset corresponding
1475 to the MPEG file in the Resources window and right click.  Click on
1476 Info.  The number of subtitle tracks is given at the bottom.
1477 </p>
1478
1479 </li><li> 
1480 INTERPOLATE CR2 IMAGES
1481
1482 <p>Enables interpolation of CR2 images.  This is required since the raw
1483 image in a CR2 file is a bayer pattern.  The interpolation uses dcraw&rsquo;s
1484 built-in interpolation and is very slow.  This operation can be
1485 disabled and the <b>Interpolate Pixels</b> effect used instead for fast
1486 previewing.
1487 </p>
1488
1489 </li><li> 
1490 WHITE BALANCE CR2 IMAGES
1491
1492 <p>This enables white balancing for CR2 images if interpolation is also
1493 enabled.  It uses the camera&rsquo;s matrix which is contained in the CR2
1494 file.  White balancing is not performed if interpolation is not
1495 performed because white balancing needs a blending of all 3 primary
1496 colors. 
1497 </p>
1498 <p>Disabling white balancing is useful for operations involving dark frame
1499 subtraction.  The dark frame and the long exposure need to have the
1500 same color matrix.
1501 </p>
1502 <p>If you disable <b>Interpolate CR2 Images</b> and use the <b>Interpolate
1503 Pixels</b> effect, be aware the <b>Interpolate Pixels</b> effect always does
1504 both interpolation and white balancing using the camera&rsquo;s matrix,
1505 regardless of the settings in Preferences.  Dark frame subtraction
1506 needs to be performed before <b>Interpolate Pixels</b>.
1507 </p>
1508 </li><li> 
1509
1510
1511
1512 VIDEO DRIVER
1513
1514 <p>Normally video on the timeline goes to the compositor window during
1515 continuous playback and when the insertion point is repositioned. 
1516 Instead of sending video to the Compositor window the video driver can
1517 be set to send video to another output device during continuous
1518 playback.  This doesn&rsquo;t affect where video goes when the insertion
1519 point is repositioned, however.
1520 </p>
1521 <p>The video drivers and their parameters are described in the video
1522 driver section.  See <a href="#VIDEO-DRIVERS">VIDEO DRIVERS</a>.
1523 </p>
1524
1525 </li></ul>
1526
1527
1528
1529
1530 <hr>
1531 <a name="RECORDING"></a>
1532 <div class="header">
1533 <p>
1534 Next: <a href="#PERFORMANCE" accesskey="n" rel="next">PERFORMANCE</a>, Previous: <a href="#PLAYBACK" accesskey="p" rel="prev">PLAYBACK</a>, Up: <a href="#CONFIGURATION" accesskey="u" rel="up">CONFIGURATION</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1535 </div>
1536 <a name="RECORDING-1"></a>
1537 <h3 class="section">4.5 RECORDING</h3>
1538
1539 <table class="menu" border="0" cellspacing="0">
1540 <tr><td align="left" valign="top">&bull; <a href="#FILE-FORMAT" accesskey="1">FILE FORMAT</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
1541 </td></tr>
1542 <tr><td align="left" valign="top">&bull; <a href="#AUDIO-IN" accesskey="2">AUDIO IN</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
1543 </td></tr>
1544 <tr><td align="left" valign="top">&bull; <a href="#VIDEO-IN" accesskey="3">VIDEO IN</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
1545 </td></tr>
1546 </table>
1547
1548
1549
1550 <p>The parameters here affect what happens when you go to
1551 <b>File-&gt;Record...</b>.  The intention was to make <b>File-&gt;Record...</b> go
1552 as fast as possible into the record monitoring window, without a
1553 lengthy dialog to configure the file format.  Instead the file format
1554 for recording is set here and it is applied to all recordings.  Also
1555 set here is the hardware for recording, since the hardware determines
1556 the supported file format in most cases.
1557 </p>
1558
1559 <hr>
1560 <a name="FILE-FORMAT"></a>
1561 <div class="header">
1562 <p>
1563 Next: <a href="#AUDIO-IN" accesskey="n" rel="next">AUDIO IN</a>, Up: <a href="#RECORDING" accesskey="u" rel="up">RECORDING</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1564 </div>
1565 <a name="FILE-FORMAT-1"></a>
1566 <h4 class="subsection">4.5.1 FILE FORMAT</h4>
1567
1568 <p>This determines the output file format for recordings.  It depends
1569 heavily on the type of driver used.  The interface is the same as the
1570 rendering interface.  The <b>Record audio tracks</b> toggle must be
1571 enabled to record audio.  The <b>Record video tracks</b> toggle must be
1572 enabled to record video.  The wrench button left of each toggle opens a
1573 configuration dialog to set the codec corresponding to audio and
1574 video.  The audio and video is wrapped in a wrapper defined by the
1575 <b>File Format</b> menu.  Different wrappers may record audio only, video
1576 only, or both.
1577 </p>
1578 <p>Some video drivers can only record to a certain wrapper.  DV, for
1579 example, can only record to Quicktime with DV as the video compression.
1580 If the video driver is changed, the file format may be updated to give
1581 the supported output.  If you change the file format to an unsupported
1582 format, it may not work with the video driver.
1583 </p>
1584
1585
1586 <hr>
1587 <a name="AUDIO-IN"></a>
1588 <div class="header">
1589 <p>
1590 Next: <a href="#VIDEO-IN" accesskey="n" rel="next">VIDEO IN</a>, Previous: <a href="#FILE-FORMAT" accesskey="p" rel="prev">FILE FORMAT</a>, Up: <a href="#RECORDING" accesskey="u" rel="up">RECORDING</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1591 </div>
1592 <a name="AUDIO-IN-1"></a>
1593 <h4 class="subsection">4.5.2 AUDIO IN</h4>
1594
1595 <p>These determine what happens when you record audio.
1596 </p>
1597 <ul>
1598 <li> 
1599 RECORD DRIVER
1600
1601 <p>This is used for recording audio in the Record window.  It may be
1602 shared with the Record Driver for video if the audio and video are
1603 wrapped in the same stream.  It takes variable parameters depending on
1604 the driver.  The parameters have the same meaning as they do for
1605 playback.
1606 </p>
1607 <ul>
1608 <li> 
1609 DEVICE PATH
1610
1611 <p>Usually a file in the <b>/dev/</b> directory which controls the
1612 device.
1613 </p>
1614 </li><li> 
1615 BITS
1616
1617 <p>The number of bits of precision Cinelerra should set the device for. 
1618 This sometimes has a figuritive meaning.  Some sound drivers need to be
1619 set to 32 bits to perform 24 bit recording and won&rsquo;t record anything
1620 when set to 24 bits.  Some sound drivers need to be set to 24 bits for
1621 24 bit recording.
1622 </p>
1623
1624
1625 </li></ul>
1626
1627 </li><li> 
1628 SAMPLES TO WRITE AT A TIME
1629
1630 <p>Audio is first read in small fragments from the device.  Many small
1631 fragments are combined into a large fragment before writing to disk. 
1632 The disk writing process is done in a different thread.  The value here
1633 determines how large the combination of fragments is for each disk
1634 write.
1635 </p>
1636 </li><li> 
1637 SAMPLE RATE FOR RECORDING
1638
1639 <p>Regardless of what the project settings are.  This is the sample rate
1640 used for recording.  This should be the highest the audio device
1641 supports.
1642 </p>
1643 </li></ul>
1644
1645 <hr>
1646 <a name="VIDEO-IN"></a>
1647 <div class="header">
1648 <p>
1649 Previous: <a href="#AUDIO-IN" accesskey="p" rel="prev">AUDIO IN</a>, Up: <a href="#RECORDING" accesskey="u" rel="up">RECORDING</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1650 </div>
1651 <a name="VIDEO-IN-1"></a>
1652 <h4 class="subsection">4.5.3 VIDEO IN</h4>
1653
1654 <p>These determine what happens when you record video.
1655 </p>
1656 <ul>
1657 <li> 
1658 RECORD DRIVER
1659
1660 <p>This is used for recording video in the Record window.  It may be
1661 shared with the Record Driver for audio if the audio and video are
1662 wrapped in the same stream.  It takes variable parameters depending on
1663 the driver.  The parameters have the same meaning as they do for
1664 playback.
1665 </p>
1666 </li><li> 
1667 FRAMES TO RECORD TO DISK AT A TIME
1668
1669 <p>Frames are recorded in a pipeline.  First frames are buffered in the
1670 device.  Then they&rsquo;re read into a larger buffer for writing to disk. 
1671 The disk writing is done in a different thread as the device reading. 
1672 For certain codecs the disk writing uses multiple processors.  This
1673 value determines how many frames are written to disk at a time.
1674 </p>
1675 </li><li> 
1676 FRAMES TO BUFFER IN DEVICE
1677
1678 <p>The number of frames to store in the device before reading.  This
1679 determines how much latency there can be in the system before frames
1680 are dropped.
1681 </p>
1682 </li><li> USE SOFTWARE FOR POSITIONING INFORMATION
1683
1684 <p>Video uses audio for
1685 </p>
1686
1687 <p>synchronization but most soundcards don&rsquo;t give accurate position
1688 information.  This calculates an estimation of audio position in
1689 software instead of the hardware for synchronization.
1690 </p>
1691 </li><li> 
1692 SYNC DRIVES AUTOMATICALLY
1693
1694 <p>For high bitrate recording the drives may be fast enough to store the
1695 data but Linux may wait several minutes and stall as it writes several
1696 minutes of data at a time.  This forces Linux to flush its buffers
1697 every second instead of every few minutes and produce slightly better
1698 realtime behavior.
1699 </p>
1700 </li><li> 
1701 SIZE OF CAPTURED FRAME
1702
1703 <p>This is the size of the frames recorded.  It is independant of the
1704 project frame size because most video devices only record a fixed frame
1705 size.  If the frame size given here isn&rsquo;t supported by the device it
1706 might crash Cinelerra.
1707 </p>
1708 </li><li> FRAME RATE FOR RECORDING
1709
1710 <p>The frame rate recorded is different from the project settings.  This
1711 sets the recorded frame rate.
1712 </p>
1713 </li></ul>
1714
1715
1716
1717
1718
1719
1720
1721
1722 <hr>
1723 <a name="PERFORMANCE"></a>
1724 <div class="header">
1725 <p>
1726 Next: <a href="#INTERFACE" accesskey="n" rel="next">INTERFACE</a>, Previous: <a href="#RECORDING" accesskey="p" rel="prev">RECORDING</a>, Up: <a href="#CONFIGURATION" accesskey="u" rel="up">CONFIGURATION</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1727 </div>
1728 <a name="PERFORMANCE-1"></a>
1729 <h3 class="section">4.6 PERFORMANCE</h3>
1730
1731
1732 <p>You&rsquo;ll spend most of your time configuring this section.  The main
1733 focus of performance is rendering parameters not available in the
1734 rendering dialog.  
1735 </p>
1736
1737
1738
1739
1740 <ul>
1741 <li> CACHE ITEMS
1742
1743
1744
1745 <p>To speed up rendering, several assets are kept open simultaneously.
1746 This determines how many are kept open.  A number too large may exhaust
1747 your memory pretty fast and result in a crash.  A number too small may
1748 result in slow playback as assets need to be reopened more frequently.
1749 </p>
1750
1751 </li><li> 
1752 SECONDS TO PREROLL RENDERS
1753
1754 <p>Some effects need a certain amount of time to settle in.  This sets a
1755 number of seconds to render without writing to disk before the selected
1756 region is rendered.  When using the renderfarm you&rsquo;ll sometimes need to
1757 preroll to get seemless transitions between the jobs.  Every job in a
1758 renderfarm is prerolled by this value.  This does not affect background
1759 rendering, however.  Background rendering uses a different preroll
1760 value.
1761 </p>
1762 </li><li> 
1763 FORCE SINGLE PROCESSOR USE
1764
1765 <p>Cinelerra tries to use all processors on the system by default but
1766 sometimes you&rsquo;ll only want to use one processor, like in a renderfarm
1767 client.  This forces only one processer to be used.  The operating
1768 system, however, usually uses the second processor anyway for disk
1769 access so this option is really a 1.25 processor mode.  The value of
1770 this parameter is used in renderfarm clients.
1771 </p>
1772 </li></ul>
1773
1774
1775 <table class="menu" border="0" cellspacing="0">
1776 <tr><td align="left" valign="top">&bull; <a href="#BACKGROUND-RENDERING" accesskey="1">BACKGROUND RENDERING</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
1777 </td></tr>
1778 <tr><td align="left" valign="top">&bull; <a href="#RENDERFARM" accesskey="2">RENDERFARM</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
1779 </td></tr>
1780 </table>
1781
1782
1783 <hr>
1784 <a name="BACKGROUND-RENDERING"></a>
1785 <div class="header">
1786 <p>
1787 Next: <a href="#RENDERFARM" accesskey="n" rel="next">RENDERFARM</a>, Up: <a href="#PERFORMANCE" accesskey="u" rel="up">PERFORMANCE</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1788 </div>
1789 <a name="BACKGROUND-RENDERING-1"></a>
1790 <h4 class="subsection">4.6.1 BACKGROUND RENDERING</h4>
1791
1792 <p>Background rendering was originally concieved to allow HDTV effects to
1793 be displayed in realtime.  Background rendering causes temporary output
1794 to constantly be rendered while the timeline is being modified.  The
1795 temporary output is played during playack whenever possible.  It&rsquo;s very
1796 useful for transitions and previewing effects which are too slow to
1797 display in a reasonable amount of time.  If renderfarm is enabled, the
1798 renderfarm is used for background rendering, giving you the potential
1799 for realtime effects if enough network bandwidth and CPU nodes exist.
1800 </p>
1801 <ul>
1802 <li> FRAMES PER BACKGROUND RENDERING JOB
1803
1804 <p>This only works if renderfarm is being used, otherwise background
1805 rendering creates a single job for the entire timeline.  The number of
1806 frames specified here is scaled to the relative CPU speed of rendering
1807 nodes and used in a single renderfarm job.  The optimum number is 10 -
1808 30 since network bandwidth is used to initialize each job.
1809 </p>
1810
1811
1812 </li><li> FRAMES TO PREROLL BACKGROUND
1813
1814 <p>This is the number of frames to render ahead of each background
1815 rendering job.  Background rendering is degraded when preroll is used
1816 since the jobs are small.  When using background rendering, this number
1817 is ideally 0.  Some effects may require 3 frames of preroll.
1818 </p>
1819
1820
1821
1822
1823 </li><li> OUTPUT FOR BACKGROUND RENDERING
1824
1825 <p>Background rendering generates a sequence of image files in a certain
1826 directory.  This parameter determines the filename prefix of the image
1827 files.  It should be on a fast disk, accessible to every node in the
1828 renderfarm by the same path.  Since hundreds of thousands of image
1829 files are usually created, <b>ls</b> commands won&rsquo;t work in the
1830 background rendering directory.  The <img src="magnify.png" alt="magnify"> browse button for
1831 this option normally won&rsquo;t work either, but the <img src="wrench.png" alt="wrench">
1832 configuration button for this option works.
1833 </p>
1834 </li><li> FILE FORMAT
1835
1836 <p>The file format for background rendering has to be a sequence of
1837 images. The format of the image sequence determines the quality and
1838 speed of playback.  JPEG is good most of the time.
1839 </p>
1840
1841 </li></ul>
1842
1843 <hr>
1844 <a name="RENDERFARM"></a>
1845 <div class="header">
1846 <p>
1847 Previous: <a href="#BACKGROUND-RENDERING" accesskey="p" rel="prev">BACKGROUND RENDERING</a>, Up: <a href="#PERFORMANCE" accesskey="u" rel="up">PERFORMANCE</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1848 </div>
1849 <a name="RENDERFARM-1"></a>
1850 <h4 class="subsection">4.6.2 RENDERFARM</h4>
1851
1852 <p>To use the renderfarm set these options.  Ignore them for a standalone
1853 system
1854 </p>
1855 <ul>
1856 <li> 
1857 USE RENDER FARM FOR RENDERING
1858
1859 <p>When selected, all the
1860 <b>file-&gt;render</b> operations use the renderfarm.
1861 </p>
1862 </li><li> 
1863 NODES
1864
1865 <p>Displays all the nodes on the renderfarm and which ones are active. 
1866 </p>
1867 <p>Nodes are added by entering the host name of the node, verifying the
1868 value of <b>port</b> and hitting <b>add node</b>.
1869 </p>
1870 <p>Computer freaks may be better off editing the
1871 <b>~/.bcast/.Cinelerra_rc</b> file than this if they have hundreds of
1872 nodes.  Remember that .Cinelerra_rc is overwritten whenever a copy of
1873 Cinelerra exits.
1874 </p>
1875 <p>Select the <b>ON</b> column to activate and deactivate nodes once they
1876 are created.
1877 </p>
1878 <p>Nodes may be edited by highlighting a row and hitting <b>apply changes</b>.
1879 </p>
1880 </li><li> 
1881 HOSTNAME
1882
1883 <p>Edit the hostname of an existing node or enter the hostname of a new
1884 node here.
1885 </p>
1886 </li><li> 
1887 PORT
1888
1889 <p>Edit the port of an existing node or enter the port of a new node here.
1890 </p>
1891 </li><li> 
1892 REPLACE NODE
1893
1894 <p>When editing an existing node, hit this to commit the changes to
1895 <b>HOSTNAME</b> and <b>PORT</b>.  The changes won&rsquo;t be committed if you
1896 don&rsquo;t hit this button.
1897 </p>
1898 </li><li> 
1899 ADD NODE
1900
1901 <p>Create a new node with the <b>HOSTNAME</b> and <b>PORT</b> settings.
1902 </p>
1903 </li><li> 
1904 DELETE NODE
1905
1906 <p>Deletes whatever node is highlighted in the <b>NODES</b> list.
1907 </p>
1908 </li><li> 
1909 SORT NODES
1910
1911 <p>Sorts the <b>NODES</b> list based on the hostname.
1912 </p>
1913 </li><li> 
1914 RESET RATES
1915
1916 <p>This sets the framerate for all the nodes to 0.  Frame rates are used
1917 to scale job sizes based on CPU speed of the node.  Frame rates are
1918 only calculated when renderfarm is enabled.
1919 </p>
1920
1921
1922
1923
1924
1925 </li><li> 
1926 TOTAL JOBS TO CREATE
1927
1928 <p>Determines the number of jobs to dispatch to the renderfarm.  The more
1929 jobs you create, the more finely balanced the renderfarm becomes.
1930 </p>
1931 <p>Determine the total jobs to create by multiplying the number of nodes
1932 including the master node by some number.  Multiply them by 1 to have
1933 one job dispatched for every node.  Multiply them by 3 to have 3 jobs
1934 dispatched for every node.  If you have 10 slave nodes and one master
1935 node, specify 33 to have a well balanced renderfarm.
1936 </p>
1937 </li></ul>
1938
1939
1940
1941
1942
1943 <hr>
1944 <a name="INTERFACE"></a>
1945 <div class="header">
1946 <p>
1947 Next: <a href="#ABOUT" accesskey="n" rel="next">ABOUT</a>, Previous: <a href="#PERFORMANCE" accesskey="p" rel="prev">PERFORMANCE</a>, Up: <a href="#CONFIGURATION" accesskey="u" rel="up">CONFIGURATION</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1948 </div>
1949 <a name="INTERFACE-1"></a>
1950 <h3 class="section">4.7 INTERFACE</h3>
1951
1952 <p>These parameters affect purely how the user interface works.
1953 </p>
1954 <ul>
1955 <li> 
1956 INDEX FILES GO HERE
1957
1958 <p>Back in the days when 4 MB/sec was unearthly speed for a hard drive,
1959 index files were introduced to speed up drawing the audio tracks.  This
1960 option determines where index files are placed on the hard drive.
1961 </p>
1962
1963 </li><li> 
1964 SIZE OF INDEX FILE
1965
1966 <p>Determines the size of an index file. Larger index sizes allow smaller
1967 files to be drawn faster while slowing down the drawing of large files.
1968 Smaller index sizes allow large files to be drawn faster while slowing
1969 down small files.
1970 </p>
1971 </li><li> 
1972 NUMBER OF INDEX FILES TO KEEP
1973
1974 <p>To keep the index directory from becoming unruly, old index files are
1975 deleted. This determines the maximum number of index files to keep in
1976 the directory.
1977 </p>
1978 </li><li> 
1979 DELETE ALL INDEXES
1980
1981 <p>When you change the index size or you want to clean out excessive index
1982 files, this deletes all the index files.
1983 </p>
1984 </li><li> USE HOURS:MINUTES:SECONDS.XXX
1985
1986 <p>Various representations of time are given.  Select the most convenient
1987 one.  The time representation can also be changed by <b>CTRL</b>
1988 clicking on the time ruler.
1989 </p>
1990 </li><li> USE THUMBNAILS
1991
1992 <p>The Resource Window displays thumbnails of assets by default.  This can
1993 take a long time to set up.  This option disables the thumbnails.
1994 </p>
1995 </li><li> CLICKING IN/OUT POINTS DOES WHAT
1996
1997 <p>Cinelerra not only allows you to perform editing by dragging in/out
1998 points but also defines three seperate operations which occur when you
1999 drag an in/out point. For each mouse button you select the behavior in
2000 this window. The usage of each editing mode is described in editing.
2001 </p>
2002 </li><li> MIN DB FOR METER
2003
2004 <p>Some sound sources have a lower noise threshold than others. 
2005 Everything below the noise threshold is meaningless.  This option sets
2006 the meters to clip below a certain level.  Consumer soundcards usually
2007 bottom out at -65.  Professional soundcards bottom out at -90.
2008 See <a href="#SOUND-LEVEL-METERS">SOUND LEVEL METERS</a>.
2009 </p>
2010 </li><li> MAX DB FOR METER
2011
2012 <p>This sets the maximum sound level represented by the sound meters.  No
2013 matter what this value is, no soundcard can play sound over 0 db.  This
2014 value is presented merely to show how far over the limit a sound wave
2015 is.
2016 See <a href="#SOUND-LEVEL-METERS">SOUND LEVEL METERS</a>.
2017 </p>
2018 </li><li> THEME
2019
2020 <p>Cinelerra supports variable themes.  Select one here and restart
2021 Cinelerra to see it.
2022 </p>
2023 </li></ul>
2024
2025
2026
2027 <hr>
2028 <a name="ABOUT"></a>
2029 <div class="header">
2030 <p>
2031 Previous: <a href="#INTERFACE" accesskey="p" rel="prev">INTERFACE</a>, Up: <a href="#CONFIGURATION" accesskey="u" rel="up">CONFIGURATION</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
2032 </div>
2033 <a name="ABOUT-1"></a>
2034 <h3 class="section">4.8 ABOUT</h3>
2035
2036 <p>This section gives you information about the copyright, the time of the
2037 current build, the lack of a warranty, and the versions of some of the
2038 libraries.  Be sure to agree to the terms of the lack of the warranty.
2039 </p>
2040
2041
2042
2043
2044
2045
2046 <hr>
2047 <a name="CREATING-A-NEW-PROJECT"></a>
2048 <div class="header">
2049 <p>
2050 Next: <a href="#THE-MAIN-WINDOWS" accesskey="n" rel="next">THE MAIN WINDOWS</a>, Previous: <a href="#CONFIGURATION" accesskey="p" rel="prev">CONFIGURATION</a>, Up: <a href="#Top" accesskey="u" rel="up">TOP</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
2051 </div>
2052 <a name="CREATING-A-NEW-PROJECT-1"></a>
2053 <h2 class="chapter">5 CREATING A NEW PROJECT</h2>
2054
2055 <p>There are 2 ways to create a new project: going to <b>File-&gt;New</b> or
2056 loading new files See <a href="#LOADING-FILES">LOADING FILES</a>.  Once a new project is
2057 created, all the parameters can be changed later without creating a new
2058 project.  
2059 </p>
2060
2061 <table class="menu" border="0" cellspacing="0">
2062 <tr><td align="left" valign="top">&bull; <a href="#USING-THE-NEW-PROJECT-DIALOG" accesskey="1">USING THE NEW PROJECT DIALOG</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
2063 </td></tr>
2064 <tr><td align="left" valign="top">&bull; <a href="#CHANGING-PARAMETERS-AFTER-LOADING" accesskey="2">CHANGING PARAMETERS AFTER LOADING</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
2065 </td></tr>
2066 </table>
2067
2068
2069
2070 <hr>
2071 <a name="USING-THE-NEW-PROJECT-DIALOG"></a>
2072 <div class="header">
2073 <p>
2074 Next: <a href="#CHANGING-PARAMETERS-AFTER-LOADING" accesskey="n" rel="next">CHANGING PARAMETERS AFTER LOADING</a>, Up: <a href="#CREATING-A-NEW-PROJECT" accesskey="u" rel="up">CREATING A NEW PROJECT</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
2075 </div>
2076 <a name="USING-THE-NEW-PROJECT-DIALOG-1"></a>
2077 <h3 class="section">5.1 USING THE NEW PROJECT DIALOG</h3>
2078
2079 <p>One way is to go to <b>File-&gt;New</b>.  This dialog contains the parameters
2080 for the new project.  The sections of the <b>New</b> dialog are described
2081 here:
2082 </p>
2083 <ul>
2084 <li> 
2085 <b>Presets</b> - Select an option from this menu to have all the project
2086 settings set to one of the known standards.
2087
2088 </li><li> <b>Audio -&gt; Tracks</b> - Sets the number of audio tracks the new project
2089 should have.  Tracks can be added or deleted later, but options are
2090 provided here for convenience.
2091
2092 </li><li> <b>Audio -&gt; Channels</b> - Sets the number of audio channels the new
2093 project should have.  The number of audio channels doesn&rsquo;t have to be
2094 the same as the number of tracks.
2095
2096 </li><li> <b>Audio -&gt; Samplerate</b> - Sets the samplerate of the audio.  The
2097 project samplerate doesn&rsquo;t have to be the same as the media sample rate
2098 that you load.  Media is resampled to match the project sample rate.
2099
2100 </li><li> <b>Video -&gt; Tracks</b> - Sets the number of video tracks the new project
2101 should have.  Tracks can be added or deleted later, but options are
2102 provided here for convenience.
2103
2104 </li><li> <b>Video -&gt; Framerate</b> - Sets the framerate of the video.  The project
2105 framerate doesn&rsquo;t have to be the same as the media frame rate that you
2106 load.  Media is reframed to match the project framerate.
2107
2108 </li><li> <b>Video -&gt; Canvas size</b> - Sets the size of the video output.  Each
2109 track also has its own frame size.  Initially the <b>New</b> dialog
2110 creates video tracks whose sizes all match the video output, but the
2111 video track sizes can be changed later without changing the video
2112 output.
2113
2114 </li><li> <b>Video -&gt; Aspect ratio</b> - Sets the aspect ratio.  The aspect ratio is
2115 applied to the video output.  The aspect ratio can be different than
2116 the number of horizontal pixels / the number of vertical pixels. 
2117 Setting a different aspect ratio than the number of pixels results in
2118 nonsquare pixels.
2119
2120 </li><li> <b>Video -&gt; Auto aspect ratio</b> - If this is checked, the <b>New</b> dialog
2121 always recalculates the <b>Aspect ratio</b> setting when the <b>Canvas
2122 size</b> is changed.  This ensures pixels are always square.
2123
2124 </li><li> <b>Video -&gt; Color model</b> - This sets the color model video intermediates
2125 in the project will be stored in.  Color models are described in a 
2126 separate section See <a href="#COLOR-MODEL">COLOR MODEL</a>.
2127
2128 </li></ul>
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142 <hr>
2143 <a name="CHANGING-PARAMETERS-AFTER-LOADING"></a>
2144 <div class="header">
2145 <p>
2146 Previous: <a href="#USING-THE-NEW-PROJECT-DIALOG" accesskey="p" rel="prev">USING THE NEW PROJECT DIALOG</a>, Up: <a href="#CREATING-A-NEW-PROJECT" accesskey="u" rel="up">CREATING A NEW PROJECT</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
2147 </div>
2148 <a name="CHANGING-PARAMETERS-AFTER-LOADING-1"></a>
2149 <h3 class="section">5.2 CHANGING PARAMETERS AFTER LOADING</h3>
2150
2151 <p>After a project is created, you have to use the set format dialog to
2152 change parameters without deleting the project.  Go to <b>Settings-&gt;Set
2153 format</b>.  
2154 </p>
2155 <p>Most of the options are identical to the <b>File-&gt;New</b>
2156 options except the lack of a number of tracks to create and the
2157 addition of audio channel locations.
2158 </p>
2159 <p>This section is discussed in See <a href="#SETTING-PROJECT-ATTRIBUTES">SETTING PROJECT ATTRIBUTES</a>.
2160 </p>
2161
2162
2163
2164
2165
2166 <hr>
2167 <a name="THE-MAIN-WINDOWS"></a>
2168 <div class="header">
2169 <p>
2170 Next: <a href="#LOADING-AND-SAVING-FILES" accesskey="n" rel="next">LOADING AND SAVING FILES</a>, Previous: <a href="#CREATING-A-NEW-PROJECT" accesskey="p" rel="prev">CREATING A NEW PROJECT</a>, Up: <a href="#Top" accesskey="u" rel="up">TOP</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
2171 </div>
2172 <a name="THE-MAIN-WINDOWS-1"></a>
2173 <h2 class="chapter">6 THE MAIN WINDOWS</h2>
2174
2175 <p>When Cinelerra first starts, you&rsquo;ll get four main windows.  Hitting
2176 <b>CTRL-w</b> in any window closes it.
2177 </p>
2178
2179 <table class="menu" border="0" cellspacing="0">
2180 <tr><td align="left" valign="top">&bull; <a href="#VIEWER" accesskey="1">VIEWER</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
2181 </td></tr>
2182 <tr><td align="left" valign="top">&bull; <a href="#COMPOSITOR" accesskey="2">COMPOSITOR</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
2183 </td></tr>
2184 <tr><td align="left" valign="top">&bull; <a href="#PROGRAM" accesskey="3">PROGRAM</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
2185 </td></tr>
2186 <tr><td align="left" valign="top">&bull; <a href="#RESOURCES" accesskey="4">RESOURCES</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
2187 </td></tr>
2188 <tr><td align="left" valign="top">&bull; <a href="#SOUND-LEVEL-METERS" accesskey="5">SOUND LEVEL METERS</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
2189 </td></tr>
2190 <tr><td align="left" valign="top">&bull; <a href="#OTHER-WINDOWS" accesskey="6">OTHER WINDOWS</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
2191 </td></tr>
2192 </table>
2193
2194 <hr>
2195 <a name="VIEWER"></a>
2196 <div class="header">
2197 <p>
2198 Next: <a href="#COMPOSITOR" accesskey="n" rel="next">COMPOSITOR</a>, Up: <a href="#THE-MAIN-WINDOWS" accesskey="u" rel="up">THE MAIN WINDOWS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
2199 </div>
2200 <a name="VIEWER-1"></a>
2201 <h3 class="section">6.1 VIEWER</h3>
2202
2203
2204 <p>In here you&rsquo;ll scrub around source media and clips, selecting regions
2205 to paste into the project.  Operations done in the viewer affect a
2206 temporary EDL or a clip but not the timeline.
2207 </p>
2208 <hr>
2209 <a name="COMPOSITOR"></a>
2210 <div class="header">
2211 <p>
2212 Next: <a href="#PROGRAM" accesskey="n" rel="next">PROGRAM</a>, Previous: <a href="#VIEWER" accesskey="p" rel="prev">VIEWER</a>, Up: <a href="#THE-MAIN-WINDOWS" accesskey="u" rel="up">THE MAIN WINDOWS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
2213 </div>
2214 <a name="COMPOSITOR-1"></a>
2215 <h3 class="section">6.2 COMPOSITOR</h3>
2216
2217
2218 <p>This window displays the output of the timeline.  It&rsquo;s the interface
2219 for most compositing operations or operations that affect the
2220 appearance of the timeline output.  Operations done in the Compositor
2221 affect the timeline but don&rsquo;t affect clips.
2222 </p>
2223 <p>The video output has several navigation functions.  The video output
2224 size is either locked to the window size or unlocked with scrollbars
2225 for navigation.  The video output can be zoomed in and out and panned. 
2226 Navigating the video output this way doesn&rsquo;t affect the rendered
2227 output, it just changes the point of view in the compositor window.
2228 </p>
2229 <p>If it is unlocked from the window size, middle clicking and dragging
2230 anywhere in the video pans the point of view.
2231 </p>
2232 <p>Hitting the + and - keys zooms in and out of the video output.
2233 </p>
2234 <p>Underneath the video output are copies of many of the functions
2235 available in the main window.  In addition there is a
2236 <img src="cwindow_zoom.png" alt="cwindow_zoom"> zoom menu and a <img src="cwindow_light.png" alt="cwindow_light"> tally light.
2237 </p>
2238 <p>The zoom menu jumps to all the possible zoom settings and, through the
2239 <b>Auto</b> option, locks the video to the window size.  The zoom menu
2240 does not affect the window size.
2241 </p>
2242 <p>The tally light turns red when rendering is happening.  This is useful
2243 for knowing if the output is current.
2244 </p>
2245 <p>Right clicking anywhere in the video output brings up a menu with all
2246 the zoom levels and some other options.  In this particular case the
2247 zoom levels resize the entire window and not just the video.  
2248 </p>
2249 <p>The <b>reset camera</b> and <b>reset projector</b> options center the camera
2250 and projector See <a href="#COMPOSITING">COMPOSITING</a>.
2251 </p>
2252 <p>The <b>Hide controls</b> option hides everything except the video.
2253 </p>
2254 <p>On the left of the video output is a toolbar specific to the compositor
2255 window.  Here are the functions in the toolbar:
2256 </p>
2257 <table class="menu" border="0" cellspacing="0">
2258 <tr><td align="left" valign="top">&bull; <a href="#PROTECT-VIDEO" accesskey="1">PROTECT VIDEO</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
2259 </td></tr>
2260 <tr><td align="left" valign="top">&bull; <a href="#MAGNIFYING-GLASS" accesskey="2">MAGNIFYING GLASS</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
2261 </td></tr>
2262 <tr><td align="left" valign="top">&bull; <a href="#MASKS-TOOL" accesskey="3">MASKS TOOL</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
2263 </td></tr>
2264 <tr><td align="left" valign="top">&bull; <a href="#CAMERA" accesskey="4">CAMERA</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
2265 </td></tr>
2266 <tr><td align="left" valign="top">&bull; <a href="#PROJECTOR" accesskey="5">PROJECTOR</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
2267 </td></tr>
2268 <tr><td align="left" valign="top">&bull; <a href="#CROP-TOOL" accesskey="6">CROP TOOL</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
2269 </td></tr>
2270 <tr><td align="left" valign="top">&bull; <a href="#EYEDROPPER" accesskey="7">EYEDROPPER</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
2271 </td></tr>
2272 <tr><td align="left" valign="top">&bull; <a href="#TOOL-INFO" accesskey="8">TOOL INFO</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
2273 </td></tr>
2274 <tr><td align="left" valign="top">&bull; <a href="#SAFE-REGIONS-TOOL" accesskey="9">SAFE REGIONS TOOL</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
2275 </td></tr>
2276 </table>
2277
2278 <hr>
2279 <a name="PROTECT-VIDEO"></a>
2280 <div class="header">
2281 <p>
2282 Next: <a href="#MAGNIFYING-GLASS" accesskey="n" rel="next">MAGNIFYING GLASS</a>, Up: <a href="#COMPOSITOR" accesskey="u" rel="up">COMPOSITOR</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
2283 </div>
2284 <a name="PROTECT-VIDEO-1"></a>
2285 <h4 class="subsection">6.2.1 PROTECT VIDEO</h4>
2286
2287 <img src="protect.png" alt="protect">
2288
2289 <p>This disables changes to the compositor output from clicks in it.  It
2290 is an extra layer on top of the track arming toggle to prevent
2291 unwanted changes.
2292 </p>
2293 <hr>
2294 <a name="MAGNIFYING-GLASS"></a>
2295 <div class="header">
2296 <p>
2297 Next: <a href="#MASKS-TOOL" accesskey="n" rel="next">MASKS TOOL</a>, Previous: <a href="#PROTECT-VIDEO" accesskey="p" rel="prev">PROTECT VIDEO</a>, Up: <a href="#COMPOSITOR" accesskey="u" rel="up">COMPOSITOR</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
2298 </div>
2299 <a name="MAGNIFYING-GLASS-1"></a>
2300 <h4 class="subsection">6.2.2 MAGNIFYING GLASS</h4>
2301
2302 <img src="magnify.png" alt="magnify">
2303
2304 <p>This zooms in and out of the compositor output without resizing the
2305 window.  If the video output is currently locked to the size of the
2306 window, clicking in it with the magnifying glass unlocks it and
2307 creates scrollbars for navigation.
2308 </p>
2309 <p>Left clicking in the video zooms in.
2310 </p>
2311 <p>Ctrl clicking in the video zooms out.
2312 </p>
2313 <p>Rotating the wheel on a wheel mouse zooms in and out.
2314 </p>
2315
2316 <hr>
2317 <a name="MASKS-TOOL"></a>
2318 <div class="header">
2319 <p>
2320 Next: <a href="#CAMERA" accesskey="n" rel="next">CAMERA</a>, Previous: <a href="#MAGNIFYING-GLASS" accesskey="p" rel="prev">MAGNIFYING GLASS</a>, Up: <a href="#COMPOSITOR" accesskey="u" rel="up">COMPOSITOR</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
2321 </div>
2322 <a name="MASKS-TOOL-1"></a>
2323 <h4 class="subsection">6.2.3 MASKS TOOL</h4>
2324
2325 <img src="mask.png" alt="mask">
2326
2327 <p>This brings up the mask editing tool See <a href="#MASKS">MASKS</a>.  Enable the
2328 <img src="toolwindow.png" alt="toolwindow"> tool window to see options for this tool.
2329 </p>
2330 <hr>
2331 <a name="CAMERA"></a>
2332 <div class="header">
2333 <p>
2334 Next: <a href="#PROJECTOR" accesskey="n" rel="next">PROJECTOR</a>, Previous: <a href="#MASKS-TOOL" accesskey="p" rel="prev">MASKS TOOL</a>, Up: <a href="#COMPOSITOR" accesskey="u" rel="up">COMPOSITOR</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
2335 </div>
2336 <a name="CAMERA-1"></a>
2337 <h4 class="subsection">6.2.4 CAMERA</h4>
2338
2339
2340 <img src="camera.png" alt="camera">
2341
2342 <p>This brings up the camera editing tool See <a href="#THE-CAMERA-AND-PROJECTOR">THE CAMERA AND PROJECTOR</a>.  Enable the <img src="toolwindow.png" alt="toolwindow"> tool window to see options
2343 for this tool.
2344 </p>
2345 <hr>
2346 <a name="PROJECTOR"></a>
2347 <div class="header">
2348 <p>
2349 Next: <a href="#CROP-TOOL" accesskey="n" rel="next">CROP TOOL</a>, Previous: <a href="#CAMERA" accesskey="p" rel="prev">CAMERA</a>, Up: <a href="#COMPOSITOR" accesskey="u" rel="up">COMPOSITOR</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
2350 </div>
2351 <a name="PROJECTOR-1"></a>
2352 <h4 class="subsection">6.2.5 PROJECTOR</h4>
2353
2354 <img src="projector.png" alt="projector">
2355
2356 <p>This brings up the projector editing tool See <a href="#THE-CAMERA-AND-PROJECTOR">THE CAMERA AND PROJECTOR</a>.  Enable the <img src="toolwindow.png" alt="toolwindow"> tool window to see options
2357 for this tool.
2358 </p>
2359 <hr>
2360 <a name="CROP-TOOL"></a>
2361 <div class="header">
2362 <p>
2363 Next: <a href="#EYEDROPPER" accesskey="n" rel="next">EYEDROPPER</a>, Previous: <a href="#PROJECTOR" accesskey="p" rel="prev">PROJECTOR</a>, Up: <a href="#COMPOSITOR" accesskey="u" rel="up">COMPOSITOR</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
2364 </div>
2365 <a name="CROP-TOOL-1"></a>
2366 <h4 class="subsection">6.2.6 CROP TOOL</h4>
2367
2368 <img src="crop.png" alt="crop">
2369
2370 <p>This brings up the cropping tool See <a href="#CROPPING">CROPPING</a>.  The
2371 <img src="toolwindow.png" alt="toolwindow"> tool window must be enabled to use this tool.
2372 </p>
2373 <hr>
2374 <a name="EYEDROPPER"></a>
2375 <div class="header">
2376 <p>
2377 Next: <a href="#TOOL-INFO" accesskey="n" rel="next">TOOL INFO</a>, Previous: <a href="#CROP-TOOL" accesskey="p" rel="prev">CROP TOOL</a>, Up: <a href="#COMPOSITOR" accesskey="u" rel="up">COMPOSITOR</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
2378 </div>
2379 <a name="EYEDROPPER-1"></a>
2380 <h4 class="subsection">6.2.7 EYEDROPPER</h4>
2381
2382 <img src="eyedrop.png" alt="eyedrop">
2383
2384 <p>This brings up the eyedropper.  The eyedropper detects whatever color
2385 is under it and stores it in a temporary area.  Enabling the
2386 <img src="toolwindow.png" alt="toolwindow"> tool info shows the currently selected color.  Click
2387 anywhere in the video output to select the color at that point.
2388 </p>
2389 <p>The eyedropper not only lets you see areas which are clipped, but its
2390 value can be applied to many effects.  Different effects handle the
2391 eyedropper differently.
2392 </p>
2393
2394 <hr>
2395 <a name="TOOL-INFO"></a>
2396 <div class="header">
2397 <p>
2398 Next: <a href="#SAFE-REGIONS-TOOL" accesskey="n" rel="next">SAFE REGIONS TOOL</a>, Previous: <a href="#EYEDROPPER" accesskey="p" rel="prev">EYEDROPPER</a>, Up: <a href="#COMPOSITOR" accesskey="u" rel="up">COMPOSITOR</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
2399 </div>
2400 <a name="TOOL-INFO-1"></a>
2401 <h4 class="subsection">6.2.8 TOOL INFO</h4>
2402
2403 <img src="toolwindow.png" alt="toolwindow">
2404
2405 <p>This brings up a window containing options for the currently selected
2406 tool.
2407 </p>
2408
2409 <hr>
2410 <a name="SAFE-REGIONS-TOOL"></a>
2411 <div class="header">
2412 <p>
2413 Previous: <a href="#TOOL-INFO" accesskey="p" rel="prev">TOOL INFO</a>, Up: <a href="#COMPOSITOR" accesskey="u" rel="up">COMPOSITOR</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
2414 </div>
2415 <a name="SAFE-REGIONS-TOOL-1"></a>
2416 <h4 class="subsection">6.2.9 SAFE REGIONS TOOL</h4>
2417
2418 <img src="titlesafe.png" alt="titlesafe">
2419
2420 <p>This draws the safe regions in the video output.  This doesn&rsquo;t affect
2421 the rendered output See <a href="#SAFE-REGIONS">SAFE REGIONS</a>.
2422 </p>
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433 <hr>
2434 <a name="PROGRAM"></a>
2435 <div class="header">
2436 <p>
2437 Next: <a href="#RESOURCES" accesskey="n" rel="next">RESOURCES</a>, Previous: <a href="#COMPOSITOR" accesskey="p" rel="prev">COMPOSITOR</a>, Up: <a href="#THE-MAIN-WINDOWS" accesskey="u" rel="up">THE MAIN WINDOWS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
2438 </div>
2439 <a name="PROGRAM-1"></a>
2440 <h3 class="section">6.3 PROGRAM</h3>
2441
2442
2443 <p>This contains the timeline and the entry point for all menu driven
2444 operations.  The timeline consists of a vertical stack of tracks with
2445 horizontal representation of time.  This defines the output of
2446 rendering operations and what is saved when you save files.  Left of
2447 the timeline is the patchbay which contains options affecting each
2448 track.
2449 </p>
2450 <p>Under the <b>Window</b> menu you&rsquo;ll find options affecting the main
2451 windows.  <b>default positions</b> repositions all the windows to a 4
2452 screen editing configuration.  On dual headed displays, the
2453 <b>default positions</b> operation fills only one monitor with windows.
2454 </p>
2455
2456 <hr>
2457 <a name="RESOURCES"></a>
2458 <div class="header">
2459 <p>
2460 Next: <a href="#SOUND-LEVEL-METERS" accesskey="n" rel="next">SOUND LEVEL METERS</a>, Previous: <a href="#PROGRAM" accesskey="p" rel="prev">PROGRAM</a>, Up: <a href="#THE-MAIN-WINDOWS" accesskey="u" rel="up">THE MAIN WINDOWS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
2461 </div>
2462 <a name="RESOURCES-1"></a>
2463 <h3 class="section">6.4 RESOURCES</h3>
2464
2465
2466 <p>Effects, transitions, clips, and assets are accessed here.  Most of the
2467 resources are inserted into the project by dragging them out of the
2468 resource window.  Management of resource allocation is also performed
2469 here.
2470 </p>
2471 <hr>
2472 <a name="SOUND-LEVEL-METERS"></a>
2473 <div class="header">
2474 <p>
2475 Next: <a href="#OTHER-WINDOWS" accesskey="n" rel="next">OTHER WINDOWS</a>, Previous: <a href="#RESOURCES" accesskey="p" rel="prev">RESOURCES</a>, Up: <a href="#THE-MAIN-WINDOWS" accesskey="u" rel="up">THE MAIN WINDOWS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
2476 </div>
2477 <a name="SOUND-LEVEL-METERS-1"></a>
2478 <h3 class="section">6.5 SOUND LEVEL METERS</h3>
2479
2480 <p>An additional window, the <b>levels window</b> can be brought up from
2481 the <b>Window</b> menu.  The <b>levels</b> window displays the output
2482 audio levels after all mixing is done.
2483 </p>
2484 <p>Sound level meters appear in many locations.  They can be toggled in
2485 the viewer and compositor windows with the <img src="show_meters.png" alt="show_meters"> level
2486 toggle. They appear in the patchbay when a track is expanded (See <a href="#THE-PATCHBAY">THE PATCHBAY</a>.)  They appear in the recording monitor when audio is being
2487 recorded.  
2488 </p>
2489 <p>The sound levels in the <b>levels window, compositor, and viewer</b>
2490 correspond to the final output levels before they are clipped to the
2491 soundcard range.  In the <b>record monitor</b> they are the input values
2492 from the sound card.  In the <b>patchbay</b> they are the sound levels for
2493 each track after all effects are processed and before downmixing for
2494 the output.
2495 </p>
2496 <p>Most of the time, audio levels have numerical markings in DB but in the
2497 patchbay there isn&rsquo;t enough room.
2498 </p>
2499 <p>The sound level is color coded as an extra means of determining the
2500 sound level.  Even without numerical markings, the sound level color
2501 can distinguish between several ranges and overload.  Look at the color
2502 codings in a meter with numerical markings to see what colors
2503 correspond to what sound level.  Then for meters in the patchbay in
2504 expanded audio tracks, use the color codings to see if it&rsquo;s overloading.
2505 </p>
2506 <p>Be aware that sound levels in Cinelerra can go above 0DB.  This allows
2507 not only seeing if a track is overloading but how much information is
2508 being lost by the overloading.  Overloading by less than 3DB is usually
2509 acceptable.  While overloading is treated as positive numbers in
2510 Cinelerra, it is clipped to 0 when sent to a sound card or file.
2511 </p>
2512 <p>The visible range of the sound level meters is configurable in
2513 <b>settings-&gt;preferences-&gt;interface</b> (See <a href="#INTERFACE">INTERFACE</a>.)
2514 </p>
2515 <hr>
2516 <a name="OTHER-WINDOWS"></a>
2517 <div class="header">
2518 <p>
2519 Previous: <a href="#SOUND-LEVEL-METERS" accesskey="p" rel="prev">SOUND LEVEL METERS</a>, Up: <a href="#THE-MAIN-WINDOWS" accesskey="u" rel="up">THE MAIN WINDOWS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
2520 </div>
2521 <a name="OTHER-WINDOWS-1"></a>
2522 <h3 class="section">6.6 OTHER WINDOWS</h3>
2523
2524 <p>The <b>Overlays window</b> can be brought up from the <b>Window</b>
2525 menu.  This is a quick way to toggle what is drawn in the timeline. 
2526 Every option in the <b>View</b> menu is available here.
2527 </p>
2528
2529
2530
2531
2532
2533
2534 <hr>
2535 <a name="LOADING-AND-SAVING-FILES"></a>
2536 <div class="header">
2537 <p>
2538 Next: <a href="#NAVIGATING-THE-PROJECT" accesskey="n" rel="next">NAVIGATING THE PROJECT</a>, Previous: <a href="#THE-MAIN-WINDOWS" accesskey="p" rel="prev">THE MAIN WINDOWS</a>, Up: <a href="#Top" accesskey="u" rel="up">TOP</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
2539 </div>
2540 <a name="LOADING-AND-SAVING-FILES-1"></a>
2541 <h2 class="chapter">7 LOADING AND SAVING FILES</h2>
2542
2543
2544 <table class="menu" border="0" cellspacing="0">
2545 <tr><td align="left" valign="top">&bull; <a href="#SUPPORTED-FILE-FORMATS" accesskey="1">SUPPORTED FILE FORMATS</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">What formats Cinelerra can import and export
2546 </td></tr>
2547 <tr><td align="left" valign="top">&bull; <a href="#LOADING-FILES" accesskey="2">LOADING FILES</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Loading all types of files
2548 </td></tr>
2549 <tr><td align="left" valign="top">&bull; <a href="#LOADING-THE-BACKUP" accesskey="3">LOADING THE BACKUP</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Recovering the session from before a crash
2550 </td></tr>
2551 <tr><td align="left" valign="top">&bull; <a href="#SAVING-FILES" accesskey="4">SAVING FILES</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Saving edit decision lists
2552 </td></tr>
2553 <tr><td align="left" valign="top">&bull; <a href="#RENDERING-FILES" accesskey="5">RENDERING FILES</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Saving media files
2554 </td></tr>
2555 </table>
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566 <hr>
2567 <a name="SUPPORTED-FILE-FORMATS"></a>
2568 <div class="header">
2569 <p>
2570 Next: <a href="#LOADING-FILES" accesskey="n" rel="next">LOADING FILES</a>, Up: <a href="#LOADING-AND-SAVING-FILES" accesskey="u" rel="up">LOADING AND SAVING FILES</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
2571 </div>
2572 <a name="SUPPORTED-FILE-FORMATS-1"></a>
2573 <h3 class="section">7.1 SUPPORTED FILE FORMATS</h3>
2574
2575 <p>Here are most of the supported file formats and notes regarding their
2576 compression.  You may be able to load other formats not described here.
2577 </p>
2578 <p>The format of the file affects what Cinelerra does with it.  Edit
2579 decision lists replace the project settings.  Formats which contain
2580 media but no edit decisions just add data to the tracks.  If your
2581 project sample rate is 48khz and you load a sound file with 96khz,
2582 you&rsquo;ll still be playing it at 48khz.   If you load an EDL file at 96khz
2583 and the current project sample rate is 48khz, you&rsquo;ll change it to
2584 96khz.
2585 </p>
2586 <p>Some file formats are very slow to display on the timeline.  These
2587 usually have video which is highly compressed.  Drawing highly
2588 compressed video picons can be very slow.  Disable picon drawing for
2589 these files with the <b>draw media</b> toggle to speed up operations.
2590 </p>
2591
2592 <br>
2593 <img src="track_attributes.png" alt="track_attributes">
2594 <p><b>Track attributes</b>
2595 </p>
2596 <p>Supported file formats are currently:
2597 </p>
2598 <ul>
2599 <li> WAV
2600 </li><li> FLAC
2601 </li><li> PCM
2602 </li><li> AIFF
2603 </li><li> AC3 audio
2604 </li></ul>
2605
2606 <table class="menu" border="0" cellspacing="0">
2607 <tr><td align="left" valign="top">&bull; <a href="#QUICKTIME" accesskey="1">QUICKTIME</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
2608 </td></tr>
2609 <tr><td align="left" valign="top">&bull; <a href="#MPEG_002d4-AUDIO" accesskey="2">MPEG-4 AUDIO</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
2610 </td></tr>
2611 <tr><td align="left" valign="top">&bull; <a href="#IMAGE-SEQUENCES" accesskey="3">IMAGE SEQUENCES</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
2612 </td></tr>
2613 <tr><td align="left" valign="top">&bull; <a href="#STILL-IMAGES" accesskey="4">STILL IMAGES</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
2614 </td></tr>
2615 <tr><td align="left" valign="top">&bull; <a href="#AVI" accesskey="5">AVI</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
2616 </td></tr>
2617 <tr><td align="left" valign="top">&bull; <a href="#MPEG-FILES-CONTAINING-VIDEO" accesskey="6">MPEG FILES CONTAINING VIDEO</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
2618 </td></tr>
2619 <tr><td align="left" valign="top">&bull; <a href="#DVD-MOVIES" accesskey="7">DVD MOVIES</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
2620 </td></tr>
2621 <tr><td align="left" valign="top">&bull; <a href="#MPEG-1-AUDIO" accesskey="8">MPEG 1 AUDIO</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
2622 </td></tr>
2623 <tr><td align="left" valign="top">&bull; <a href="#OGG-THEORA_002fVORBIS" accesskey="9">OGG THEORA/VORBIS</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
2624 </td></tr>
2625 <tr><td align="left" valign="top">&bull; <a href="#EDIT-DECISION-LIST">EDIT DECISION LIST</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
2626 </td></tr>
2627 </table>
2628
2629
2630 <hr>
2631 <a name="QUICKTIME"></a>
2632 <div class="header">
2633 <p>
2634 Next: <a href="#MPEG_002d4-AUDIO" accesskey="n" rel="next">MPEG-4 AUDIO</a>, Up: <a href="#SUPPORTED-FILE-FORMATS" accesskey="u" rel="up">SUPPORTED FILE FORMATS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
2635 </div>
2636 <a name="QUICKTIME-1"></a>
2637 <h4 class="subsection">7.1.1 QUICKTIME</h4>
2638 <p>Quicktime is not the standard for UNIX but we use it because it&rsquo;s well
2639 documented.  All of the Quicktime movies on the internet are
2640 compressed.  Cinelerra doesn&rsquo;t support most compressed Quicktime movies
2641 but does support some.  If it crashes when loading a Quicktime movie,
2642 that means the format probably wasn&rsquo;t supported.
2643 </p>
2644 <p><b>NOTES ON QUICKTIME ENCODING</b>
2645 </p>
2646 <p>Here are some notes regarding making Quicktime movies in Cinelerra:
2647 </p>
2648 <p>Quicktime is a wrapper for 2 codecs, a video codec and an audio codec. 
2649 The video and audio codecs are picked separately.  The preferred
2650 encoding for Quicktime output is MPEG-4 Video and MPEG-4 Audio.  This
2651 format plays in the commercial players for Windows and has good
2652 compression quality.  For better compression, use H-264 Video. 
2653 Unfortunately H-264 decoding is so slow it can&rsquo;t play very large frame
2654 sizes.
2655 </p>
2656 <p>Cinelerra supports 2 nonstandard codecs: Dual MPEG-4 video and dual
2657 H.264 video.  These won&rsquo;t play in anything but Cinelerra and XMovie. 
2658 They are designed for movies where the frames have been divided into 2
2659 fields, each field displayed sequentially.  The dual codecs interleave
2660 2 video streams to improve efficiency without requiring major changes
2661 to the player.
2662 </p>
2663 <hr>
2664 <a name="MPEG_002d4-AUDIO"></a>
2665 <div class="header">
2666 <p>
2667 Next: <a href="#IMAGE-SEQUENCES" accesskey="n" rel="next">IMAGE SEQUENCES</a>, Previous: <a href="#QUICKTIME" accesskey="p" rel="prev">QUICKTIME</a>, Up: <a href="#SUPPORTED-FILE-FORMATS" accesskey="u" rel="up">SUPPORTED FILE FORMATS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
2668 </div>
2669 <a name="MPEG_002d4-AUDIO-1"></a>
2670 <h4 class="subsection">7.1.2 MPEG-4 AUDIO</h4>
2671
2672 <p>This is the same as Quicktime with MPEG-4 Audio as the audio codec.
2673 </p>
2674 <hr>
2675 <a name="IMAGE-SEQUENCES"></a>
2676 <div class="header">
2677 <p>
2678 Next: <a href="#STILL-IMAGES" accesskey="n" rel="next">STILL IMAGES</a>, Previous: <a href="#MPEG_002d4-AUDIO" accesskey="p" rel="prev">MPEG-4 AUDIO</a>, Up: <a href="#SUPPORTED-FILE-FORMATS" accesskey="u" rel="up">SUPPORTED FILE FORMATS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
2679 </div>
2680 <a name="IMAGE-SEQUENCES-1"></a>
2681 <h4 class="subsection">7.1.3 IMAGE SEQUENCES</h4>
2682
2683
2684 <p>Rendering an image sequence is not the same as rendering a single
2685 image.  When rendering an image sequence Cinelerra generates a table of
2686 contents file for the image sequence and makes a different image file
2687 for every timeline position.  The table of contents can be loaded
2688 instead of the individual images to get better performance.  To learn
2689 more about the different image formats supported in an image sequence,
2690 read about still images.
2691 </p>
2692
2693 <hr>
2694 <a name="STILL-IMAGES"></a>
2695 <div class="header">
2696 <p>
2697 Next: <a href="#AVI" accesskey="n" rel="next">AVI</a>, Previous: <a href="#IMAGE-SEQUENCES" accesskey="p" rel="prev">IMAGE SEQUENCES</a>, Up: <a href="#SUPPORTED-FILE-FORMATS" accesskey="u" rel="up">SUPPORTED FILE FORMATS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
2698 </div>
2699 <a name="STILL-IMAGES-1"></a>
2700 <h4 class="subsection">7.1.4 STILL IMAGES</h4>
2701
2702
2703 <p>Rendering a single image causes the image file to be overwritten for
2704 every timeline position.  No table of contents is created.  When
2705 loaded, the image takes up one frame in length and doesn&rsquo;t change the
2706 project attributes.
2707 </p>
2708 <p>Several still image formats not normally found in other programs are
2709 described here.
2710 </p>
2711 <table class="menu" border="0" cellspacing="0">
2712 <tr><td align="left" valign="top">&bull; <a href="#OPEN-EXR-IMAGES" accesskey="1">OPEN EXR IMAGES</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
2713 </td></tr>
2714 <tr><td align="left" valign="top">&bull; <a href="#RAW-DIGITAL-CAMERA-IMAGES" accesskey="2">RAW DIGITAL CAMERA IMAGES</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
2715 </td></tr>
2716 </table>
2717
2718 <hr>
2719 <a name="OPEN-EXR-IMAGES"></a>
2720 <div class="header">
2721 <p>
2722 Next: <a href="#RAW-DIGITAL-CAMERA-IMAGES" accesskey="n" rel="next">RAW DIGITAL CAMERA IMAGES</a>, Up: <a href="#STILL-IMAGES" accesskey="u" rel="up">STILL IMAGES</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
2723 </div>
2724 <a name="OPEN-EXR-IMAGES-1"></a>
2725 <h4 class="subsubsection">7.1.4.1 OPEN EXR IMAGES</h4>
2726
2727 <p>You may not know about Open EXR.  This format stores floating point RGB
2728 images.  It also supports a small amount of compression.  Projects
2729 which render to EXR should be in a floating point color model to take
2730 advantage of it See <a href="#SETTING-PROJECT-ATTRIBUTES">SETTING PROJECT ATTRIBUTES</a>.  Several compression
2731 options are available for EXR.
2732 </p>
2733 <ul>
2734 <li> 
2735 <b>PIZ</b> Lossless wavelet compression.  This is the best compression.
2736
2737 </li><li> <b>ZIP</b> Lossless gzip algorithm.
2738
2739 </li><li> <b>RLE</b> Lossless run length encoding.  This is the fastest and worst
2740 compression.
2741
2742 </li><li> <b>PXR24</b> Lossy compression where the floating point numbers are
2743 converted to 24 bits and compressed with gzip.
2744
2745 </li></ul>
2746
2747 <p>Select <b>Use Alpha</b> if the project colormodel has an alpha channel and
2748 you want to retain it in the file.  Otherwise the primary colors are
2749 multiplied by the alpha channel.
2750 </p>
2751 <hr>
2752 <a name="RAW-DIGITAL-CAMERA-IMAGES"></a>
2753 <div class="header">
2754 <p>
2755 Previous: <a href="#OPEN-EXR-IMAGES" accesskey="p" rel="prev">OPEN EXR IMAGES</a>, Up: <a href="#STILL-IMAGES" accesskey="u" rel="up">STILL IMAGES</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
2756 </div>
2757 <a name="RAW-DIGITAL-CAMERA-IMAGES-1"></a>
2758 <h4 class="subsubsection">7.1.4.2 RAW DIGITAL CAMERA IMAGES</h4>
2759
2760 <p>RAW digital camera images are a special kind of image file which
2761 Cinelerra only imports.  These must be processed in a floating point
2762 color space once they are on the timeline.  Raw images from Canon
2763 cameras are the only ones tested.  They need to have the <b>Linearize</b>
2764 effect applied to correct gamma.  Because raw images take a long time
2765 to interpolate, they are usually viewed first in a proxy file and then
2766 touched up.
2767 </p>
2768 <p>First apply the Linearize effect to a track of raw images and set it to
2769 <b>automatic</b> with <b>0.6</b> gamma.  Then render the timeline to a
2770 Quicktime JPEG file.  Append the Quicktime JPEG file in a new track and
2771 disable playback of the old track.  Now the gamma corrected copy of
2772 each raw image can be previewed relatively fast in the same timeline
2773 position as the original image.
2774 </p>
2775
2776
2777 <hr>
2778 <a name="AVI"></a>
2779 <div class="header">
2780 <p>
2781 Next: <a href="#MPEG-FILES-CONTAINING-VIDEO" accesskey="n" rel="next">MPEG FILES CONTAINING VIDEO</a>, Previous: <a href="#STILL-IMAGES" accesskey="p" rel="prev">STILL IMAGES</a>, Up: <a href="#SUPPORTED-FILE-FORMATS" accesskey="u" rel="up">SUPPORTED FILE FORMATS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
2782 </div>
2783 <a name="AVI-1"></a>
2784 <h4 class="subsection">7.1.5 AVI</h4>
2785
2786 <p>AVI with assorted audio and video codecs.  Because AVI is so
2787 fragmented, your luck will vary.
2788 </p>
2789
2790 <hr>
2791 <a name="MPEG-FILES-CONTAINING-VIDEO"></a>
2792 <div class="header">
2793 <p>
2794 Next: <a href="#DVD-MOVIES" accesskey="n" rel="next">DVD MOVIES</a>, Previous: <a href="#AVI" accesskey="p" rel="prev">AVI</a>, Up: <a href="#SUPPORTED-FILE-FORMATS" accesskey="u" rel="up">SUPPORTED FILE FORMATS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
2795 </div>
2796 <a name="MPEG-FILES-CONTAINING-VIDEO-1"></a>
2797 <h4 class="subsection">7.1.6 MPEG FILES CONTAINING VIDEO</h4>
2798
2799
2800 <p>MPEG files containing video can be loaded directly into Cinelerra.  If
2801 the file is supported, a table of contents is built.  If the file is
2802 unsupported, it usually crashes or shows very short tracks. 
2803 Unfortunately, this method of loading MPEG files isn&rsquo;t good enough if
2804 you intend to use the files in a renderfarm.  
2805 </p>
2806 <p>To use MPEG files in a renderfarm you need to run <b>mpeg3toc</b> to
2807 generate a table of contents for the file, then load the table of
2808 contents.  Mpeg3toc needs the absolute path of the MPEG file.  If you
2809 don&rsquo;t use an absolute path, it assumes the MPEG file is in the same
2810 directory that Cinelerra is run from.
2811 </p>
2812 <p>MPEG streams are structured into multiple tracks.  Each track can be
2813 video or audio.  Each audio track can have 1-6 channels.  Cinelerra
2814 converts each channel of audio into a track.
2815 </p>
2816 <p><b>NOTES ON MPEG VIDEO ENCODING</b>
2817 </p>
2818 <p>MPEG video encoding is done separately from MPEG audio encoding.  In
2819 MPEG video there are 2 colormodels.  The YUV 4:2:0 colormodel is
2820 encoded by a highly optimized version of mpeg2enc with presets for
2821 standard consumer electronics.  In the process of optimizing mpeg2enc,
2822 they got rid of YUV 4:2:2 encoding.  The YUV 4:2:2 colormodel is
2823 encoded by a less optimized version of mpeg2enc.
2824 </p>
2825 <p>YUV 4:2:2 encoding was kept around because the NTSC version of DV video
2826 loses too much quality when transferred to YUV 4:2:0.  This DV video
2827 must be transferred to YUV 4:2:2.
2828 </p>
2829 <p>When encoding YUV 4:2:0, the bitrate parameter changes meaning
2830 depending on whether the bitrate or quantization is fixed.  If the
2831 bitrate is fixed, it&rsquo;s the target bitrate.  If the quantization is
2832 fixed, it&rsquo;s the maximum bitrate allowed.  This is a quirk of the
2833 mpeg2enc version.
2834 </p>
2835 <hr>
2836 <a name="DVD-MOVIES"></a>
2837 <div class="header">
2838 <p>
2839 Next: <a href="#MPEG-1-AUDIO" accesskey="n" rel="next">MPEG 1 AUDIO</a>, Previous: <a href="#MPEG-FILES-CONTAINING-VIDEO" accesskey="p" rel="prev">MPEG FILES CONTAINING VIDEO</a>, Up: <a href="#SUPPORTED-FILE-FORMATS" accesskey="u" rel="up">SUPPORTED FILE FORMATS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
2840 </div>
2841 <a name="DVD-MOVIES-1"></a>
2842 <h4 class="subsection">7.1.7 DVD MOVIES</h4>
2843
2844
2845 <p>DVD&rsquo;s are spit into a number of programs, each identified by a unique
2846 <b>IFO</b> file.  If you want to load a DVD, find the corresponding
2847 <b>IFO</b> file for the program of interest.  Load the IFO file directly
2848 and a table of contents will be built.  Alternatively for renderfarm
2849 usage, a table of contents can be created separately.
2850 </p>
2851 <p>Run
2852 </p>
2853 <div class="example">
2854 <pre class="example">mpeg3toc -v /cdrom/video_ts/vts_01_0.ifo dvd.toc
2855 </pre></div>
2856
2857 <p>or something similar.  Then load <b>dvd.toc</b>.
2858 </p>
2859
2860
2861 <hr>
2862 <a name="MPEG-1-AUDIO"></a>
2863 <div class="header">
2864 <p>
2865 Next: <a href="#OGG-THEORA_002fVORBIS" accesskey="n" rel="next">OGG THEORA/VORBIS</a>, Previous: <a href="#DVD-MOVIES" accesskey="p" rel="prev">DVD MOVIES</a>, Up: <a href="#SUPPORTED-FILE-FORMATS" accesskey="u" rel="up">SUPPORTED FILE FORMATS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
2866 </div>
2867 <a name="MPEG-1-AUDIO-1"></a>
2868 <h4 class="subsection">7.1.8 MPEG 1 AUDIO</h4>
2869
2870 <p>These are .mp2 and .mp3 files.  If fixed bitrate, they can be loaded
2871 directly with no table of contents.  Variable bitrate streams need to
2872 have a table of contents created with <b>mpeg3toc</b>.
2873 </p>
2874 <hr>
2875 <a name="OGG-THEORA_002fVORBIS"></a>
2876 <div class="header">
2877 <p>
2878 Next: <a href="#EDIT-DECISION-LIST" accesskey="n" rel="next">EDIT DECISION LIST</a>, Previous: <a href="#MPEG-1-AUDIO" accesskey="p" rel="prev">MPEG 1 AUDIO</a>, Up: <a href="#SUPPORTED-FILE-FORMATS" accesskey="u" rel="up">SUPPORTED FILE FORMATS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
2879 </div>
2880 <a name="OGG-THEORA_002fVORBIS-1"></a>
2881 <h4 class="subsection">7.1.9 OGG THEORA/VORBIS</h4>
2882
2883
2884 <p>The OGG format is an antiquated but supposedly unpatented way of
2885 compressing audio and video.  The quality isn&rsquo;t as good as H.264 or
2886 MPEG-4 Audio.  In reality, anyone with enough money and desire can find
2887 a patent violation so the justification for OGG is questionable.
2888 </p>
2889 <hr>
2890 <a name="EDIT-DECISION-LIST"></a>
2891 <div class="header">
2892 <p>
2893 Previous: <a href="#OGG-THEORA_002fVORBIS" accesskey="p" rel="prev">OGG THEORA/VORBIS</a>, Up: <a href="#SUPPORTED-FILE-FORMATS" accesskey="u" rel="up">SUPPORTED FILE FORMATS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
2894 </div>
2895 <a name="EDIT-DECISION-LIST-1"></a>
2896 <h4 class="subsection">7.1.10 EDIT DECISION LIST</h4>
2897
2898
2899 <p>Edit decision lists are generated by Cinelerra for storing projects. 
2900 They end in .xml.  They change project attributes when loaded.
2901 </p>
2902 <p>Because edit decision lists consist of text, they can be edited in a
2903 text editor.
2904 </p>
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922 <hr>
2923 <a name="LOADING-FILES"></a>
2924 <div class="header">
2925 <p>
2926 Next: <a href="#LOADING-THE-BACKUP" accesskey="n" rel="next">LOADING THE BACKUP</a>, Previous: <a href="#SUPPORTED-FILE-FORMATS" accesskey="p" rel="prev">SUPPORTED FILE FORMATS</a>, Up: <a href="#LOADING-AND-SAVING-FILES" accesskey="u" rel="up">LOADING AND SAVING FILES</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
2927 </div>
2928 <a name="LOADING-FILES-1"></a>
2929 <h3 class="section">7.2 LOADING FILES</h3>
2930
2931 <p>All data that you work with in Cinelerra is acquired either by
2932 <b>recording from a device</b> or by <b>loading from disk</b>.  This
2933 section describes loading.
2934 </p>
2935 <p>The loading and playing of files is just as you would expect. Just go
2936 to <b>file-&gt;Load</b>, select a file for loading, and hit <b>ok</b>. Hit
2937 the forward play button and it should start playing, regardless of
2938 whether a progress bar has popped up.
2939 </p>
2940 <p>Another way to load files is to pass the filenames as arguments on the
2941 command line.  This creates new tracks for every file and starts the
2942 program with all the arguments loaded.
2943 </p>
2944 <p>If the file is a still image, the project&rsquo;s attributes are not changed
2945 and the first frame of the track becomes the image.  If the file has
2946 audio, Cinelerra may build an index file for it to speed up drawing. 
2947 You can edit and play the file while the index file is being built.
2948 </p>
2949 <table class="menu" border="0" cellspacing="0">
2950 <tr><td align="left" valign="top">&bull; <a href="#INSERTION-STRATEGY" accesskey="1">INSERTION STRATEGY</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
2951 </td></tr>
2952 <tr><td align="left" valign="top">&bull; <a href="#LOADING-MULTIPLE-FILES" accesskey="2">LOADING MULTIPLE FILES</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
2953 </td></tr>
2954 </table>
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966 <hr>
2967 <a name="INSERTION-STRATEGY"></a>
2968 <div class="header">
2969 <p>
2970 Next: <a href="#LOADING-MULTIPLE-FILES" accesskey="n" rel="next">LOADING MULTIPLE FILES</a>, Up: <a href="#LOADING-FILES" accesskey="u" rel="up">LOADING FILES</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
2971 </div>
2972 <a name="INSERTION-STRATEGY-1"></a>
2973 <h4 class="subsection">7.2.1 INSERTION STRATEGY</h4>
2974
2975 <p>Usually three things happen when you load a file.  First the existing
2976 project is cleared from the screen, second the project&rsquo;s attributes are
2977 changed to match the file&rsquo;s, and finally the new file&rsquo;s tracks are
2978 created in the timeline.
2979 </p>
2980 <p>But Cinelerra lets you change what happens when you load a file.
2981 </p>
2982 <p>In the file selection box there is a range of options for <b>Insertion
2983 strategy</b>.  Each of these options loads the file a different way.
2984 </p>
2985 <img src="insertion_strategy.png" alt="insertion_strategy">
2986
2987 <ul>
2988 <li> <b>Replace current project</b>
2989 <img src="loadmode_new.png" alt="loadmode_new">
2990
2991 <p>All tracks in the current project are deleted and new tracks are
2992 created to match the source.  Project attributes are only changed when
2993 loading XML.  If multiple files are selected it adds new tracks for
2994 every file.
2995 </p>
2996 </li><li> <b>Replace current project and concatenate tracks</b>
2997 <img src="loadmode_newcat.png" alt="loadmode_newcat">
2998
2999 <p>Same as replace current project except if multiple files are selected
3000 it concatenates the tracks of every file after the first.
3001 </p>
3002 </li><li> <b>Append in new tracks</b>
3003 <img src="loadmode_newtracks.png" alt="loadmode_newtracks">
3004
3005 <p>The current project is not deleted and new tracks are created for the
3006 source.
3007 </p>
3008 </li><li> <b>Concatenate to existing tracks</b>
3009 <img src="loadmode_cat.png" alt="loadmode_cat">
3010
3011 <p>The current project is not deleted and new files are concatenated to
3012 the existing tracks.
3013 </p>
3014 </li><li> <b>Paste at insertion point</b>
3015 <img src="loadmode_paste.png" alt="loadmode_paste">
3016
3017 <p>The file is pasted in like a normal paste operation.
3018 </p>
3019 </li><li> <b>Create new resources only</b>
3020 <img src="loadmode_resource.png" alt="loadmode_resource">
3021
3022 <p>The timeline is unchanged and new resources are created in the Resource
3023 Window.
3024 </p>
3025 </li><li> <b>Nested EDL</b>
3026 <img src="loadmode_nested.png" alt="loadmode_nested">
3027
3028 <p>If the file is an EDL, the output of the EDL is pasted in like a media
3029 file.  Nested EDLs have 1 video track &amp; a number of audio tracks
3030 corresponding to the number of output channels.  They allow larger
3031 sequences composed of many smaller sequences, transitions to be applied
3032 to the output of another EDL, &amp; global processing on the output of an
3033 EDL without having to manipulate each track.
3034 </p>
3035
3036
3037 </li></ul>
3038
3039
3040 <p>The insertion strategy is a recurring option in many of Cinelerra&rsquo;s
3041 functions.  In each place the options do the same thing.  With these
3042 options you can almost do all your editing by loading files.
3043 </p>
3044 <p>If you load files by passing command line arguments to Cinelerra, the
3045 files are loaded with <b>Replace current project</b> rules.
3046 </p>
3047
3048
3049
3050
3051 <hr>
3052 <a name="LOADING-MULTIPLE-FILES"></a>
3053 <div class="header">
3054 <p>
3055 Previous: <a href="#INSERTION-STRATEGY" accesskey="p" rel="prev">INSERTION STRATEGY</a>, Up: <a href="#LOADING-FILES" accesskey="u" rel="up">LOADING FILES</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
3056 </div>
3057 <a name="LOADING-MULTIPLE-FILES-1"></a>
3058 <h4 class="subsection">7.2.2 LOADING MULTIPLE FILES</h4>
3059
3060 <p>In the file selection box go to the list of files.  Select a file.  Go
3061 to another file and select it while holding down <b>CTRL</b>.  This
3062 selects one additional file.  Go to another file and select it while
3063 holding down <b>SHIFT</b>.  This selects every intervening file.  This
3064 behavior is available in most every list box.
3065 </p>
3066 <p>Select a bunch of mp3 files and <b>Replace current project and
3067 concatenate tracks</b> in the insertion strategy to create a song
3068 playlist.
3069 </p>
3070
3071
3072
3073 <hr>
3074 <a name="LOADING-THE-BACKUP"></a>
3075 <div class="header">
3076 <p>
3077 Next: <a href="#SAVING-FILES" accesskey="n" rel="next">SAVING FILES</a>, Previous: <a href="#LOADING-FILES" accesskey="p" rel="prev">LOADING FILES</a>, Up: <a href="#LOADING-AND-SAVING-FILES" accesskey="u" rel="up">LOADING AND SAVING FILES</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
3078 </div>
3079 <a name="LOADING-THE-BACKUP-1"></a>
3080 <h3 class="section">7.3 LOADING THE BACKUP</h3>
3081
3082 <p>There is one special XML file on disk at all times.  After every
3083 editing operation Cinelerra saves the current project to a backup in
3084 <b>$HOME/.bcast/backup.xml</b>.  In the event of a crash go to
3085 <b>file-&gt;load backup</b> to load the backup.  It is important after a
3086 crash to reboot Cinelerra without performing any editing operations. 
3087 Loading the backup should be the first operation or you&rsquo;ll overwrite
3088 the backup.
3089 </p>
3090
3091 <hr>
3092 <a name="SAVING-FILES"></a>
3093 <div class="header">
3094 <p>
3095 Next: <a href="#RENDERING-FILES" accesskey="n" rel="next">RENDERING FILES</a>, Previous: <a href="#LOADING-THE-BACKUP" accesskey="p" rel="prev">LOADING THE BACKUP</a>, Up: <a href="#LOADING-AND-SAVING-FILES" accesskey="u" rel="up">LOADING AND SAVING FILES</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
3096 </div>
3097 <a name="SAVING-FILES-1"></a>
3098 <h3 class="section">7.4 SAVING FILES</h3>
3099
3100 <p>When Cinelerra saves a file it saves an edit decision list of the
3101 current project but doesn&rsquo;t save any media.  Go to <b>File-&gt;save
3102 as...</b>.  Select a file to overwrite or enter a new file.  Cinelerra
3103 automatically concatenates <b>.xml</b> to the filename if no
3104 <b>.xml</b> extension is given.
3105 </p>
3106 <p>The saved file contains all the project settings and locations of every
3107 edit but instead of media it contains pointers to the original media
3108 files on disk.
3109 </p>
3110 <p>For each media file the XML file stores either an absolute path or just
3111 the relative path.  If the media is in the same directory as the XML
3112 file a relative path is saved.  If it&rsquo;s in a different directory an
3113 absolute path is saved.
3114 </p>
3115 <p>In order to move XML files around without breaking the media linkages
3116 you either need to keep the media in the same directory as XML file
3117 forever or save the XML file in a different directory than the media
3118 and not move the media ever again.
3119 </p>
3120 <p>If you want to create an audio playlist and burn it on CD-ROM, save the
3121 XML file in the same directory as the audio files and burn the entire
3122 directory.  This keeps the media paths relative.
3123 </p>
3124 <p>XML files are useful for saving the current state before going to sleep
3125 and saving audio playlists but they&rsquo;re limited in that they&rsquo;re specific
3126 to Cinelerra.  You can&rsquo;t play XML files in a dedicated movie player. 
3127 Realtime effects in an XML file have to be resynthesized every time you
3128 play it back.  The XML file also requires you to maintain copies of all
3129 the source assets on hard drives, which can take up space and cost a
3130 lot of electricity to spin.  For a more persistent storage of the
3131 output there&rsquo;s rendering.
3132 </p>
3133
3134
3135
3136
3137
3138 <hr>
3139 <a name="RENDERING-FILES"></a>
3140 <div class="header">
3141 <p>
3142 Previous: <a href="#SAVING-FILES" accesskey="p" rel="prev">SAVING FILES</a>, Up: <a href="#LOADING-AND-SAVING-FILES" accesskey="u" rel="up">LOADING AND SAVING FILES</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
3143 </div>
3144 <a name="RENDERING-FILES-1"></a>
3145 <h3 class="section">7.5 RENDERING FILES</h3>
3146
3147 <p>Rendering takes a section of the timeline, performs all the editing,
3148 effects and compositing, and stores it in a pure movie file.  You can
3149 then delete all the source assets, play the rendered file in a movie
3150 player, or bring it back into Cinelerra for more editing.  It&rsquo;s very
3151 difficult to retouch any editing decisions in the pure movie file,
3152 however, so keep the original assets and XML file around several days
3153 after you render it.
3154 </p>
3155 <p>All rendering operations are based on a region of the timeline to be
3156 rendered.  You need to define this region on the timeline.  The
3157 navigation section describes methods of defining regions. 
3158 See <a href="#NAVIGATING-THE-PROJECT">NAVIGATING THE PROJECT</a>.  The rendering functions define the
3159 region based on a set of rules.  When a region is highlighted or in/out
3160 points are set, the affected region is rendered.  When no region is
3161 highlighted, everything after the insertion point is rendered.  Merely
3162 by positioning the insertion point at the beginning of a track and
3163 unsetting all in/out points, the entire track is rendered.
3164 </p>
3165
3166
3167 <table class="menu" border="0" cellspacing="0">
3168 <tr><td align="left" valign="top">&bull; <a href="#SINGLE-FILE-RENDERING" accesskey="1">SINGLE FILE RENDERING</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Rendering a single file
3169 </td></tr>
3170 <tr><td align="left" valign="top">&bull; <a href="#BATCH-RENDERING" accesskey="2">BATCH RENDERING</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Rendering several files unattended
3171 </td></tr>
3172 <tr><td align="left" valign="top">&bull; <a href="#THE-RENDER-FARM" accesskey="3">THE RENDER FARM</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Rendering using many computers
3173 </td></tr>
3174 <tr><td align="left" valign="top">&bull; <a href="#COMMAND-LINE-RENDERING" accesskey="4">COMMAND LINE RENDERING</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Rendering from the command line without a GUI
3175 </td></tr>
3176 </table>
3177
3178
3179
3180 <hr>
3181 <a name="SINGLE-FILE-RENDERING"></a>
3182 <div class="header">
3183 <p>
3184 Next: <a href="#BATCH-RENDERING" accesskey="n" rel="next">BATCH RENDERING</a>, Up: <a href="#RENDERING-FILES" accesskey="u" rel="up">RENDERING FILES</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
3185 </div>
3186 <a name="SINGLE-FILE-RENDERING-1"></a>
3187 <h4 class="subsection">7.5.1 SINGLE FILE RENDERING</h4>
3188
3189 <p>The fastest way to get media to disk is to use the single file
3190 rendering function.
3191 </p>
3192 <p>Go to <b>File-&gt;render</b> to bring up the render dialog.  Select the
3193 magnifying glass <img src="magnify.png" alt="magnify"> to bring up a file selection dialog.  This determines
3194 the filename to write the rendered file to and the encoding parameters.
3195 </p>
3196 <p>In the render dialog select a format from the <b>File Format</b> menu. 
3197 The format of the file determines whether you can render audio or video
3198 or both.  Select the <b>Render audio tracks</b> toggle to generate
3199 audio tracks and <b>Render video tracks</b> to generate video tracks.
3200 </p>
3201
3202 <p>Select the wrench <img src="wrench.png" alt="wrench"> next to each toggle to set compression
3203 parameters.  If the file format can&rsquo;t store audio or video the
3204 compression parameters will be blank.  If <b>Render audio tracks</b> or
3205 <b>Render video tracks</b> is selected and the file format doesn&rsquo;t
3206 support it, trying to render will pop up an error.
3207 </p>
3208 <p>The <b>Create new file at each label</b> option causes a new file to be
3209 created when every label in the timeline is encountered.  This is
3210 useful for dividing long audio recordings into individual tracks.  When
3211 using the renderfarm, <b>Create new file at each label</b> causes one
3212 renderfarm job to be created at every label instead of using the
3213 internal load balancing algorithm to space jobs.
3214 </p>
3215 <p>When <b>Create new file at each label</b> is selected, a new filename
3216 is created for every output file.  If the filename given in the render
3217 dialog has a 2 digit number in it, the 2 digit number is overwritten
3218 with a different incremental number for every output file.  If no 2
3219 digit number is given, Cinelerra automatically concatenates a number to
3220 the end of the given filename for every output file.
3221 </p>
3222 <p>In the filename <b>/hmov/track01.wav</b> the <b>01</b> would be
3223 overwritten for every output file.  The filename
3224 <b>/hmov/track.wav</b>; however, would become <b>/hmov/track.wav001</b>
3225 and so on and so forth.  Filename regeneration is only used when either
3226 renderfarm mode is active or creating new files for every label is
3227 active.
3228 </p>
3229 <p>Finally the render dialog lets you select an insertion mode.  The
3230 insertion modes are the same as with loading files.  In this case if
3231 you select <b>insert nothing</b> the file will be written out to disk
3232 without changing the current project.  For other insertion strategies
3233 be sure to prepare the timeline to have the output inserted at the
3234 right position before the rendering operation is finished. 
3235 See <a href="#EDITING">EDITING</a>.  Editing describes how to cause output to be inserted
3236 at the right position.
3237 </p>
3238 <p>It should be noted that even if you only have audio or only have video
3239 rendered, a <b>paste</b> insertion strategy will behave like a normal
3240 paste operation, erasing any selected region of the timeline and
3241 pasting just the data that was rendered.  If you render only audio and
3242 have some video tracks armed, the video tracks will get truncated while
3243 the audio output is pasted into the audio tracks.
3244 </p>
3245
3246
3247 <hr>
3248 <a name="BATCH-RENDERING"></a>
3249 <div class="header">
3250 <p>
3251 Next: <a href="#THE-RENDER-FARM" accesskey="n" rel="next">THE RENDER FARM</a>, Previous: <a href="#SINGLE-FILE-RENDERING" accesskey="p" rel="prev">SINGLE FILE RENDERING</a>, Up: <a href="#RENDERING-FILES" accesskey="u" rel="up">RENDERING FILES</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
3252 </div>
3253 <a name="BATCH-RENDERING-1"></a>
3254 <h4 class="subsection">7.5.2 BATCH RENDERING</h4>
3255
3256
3257
3258 <p>If you want to render many projects to media files without having to
3259 repeatedly attend to the <b>Render</b> dialog, <b>batch rendering</b> is the
3260 function to use.  In this function, you specify many EDL files to
3261 render and the unique output files for each.  Then Cinelerra loads each
3262 EDL file and renders it automatically, without any user intervention. 
3263 Each EDL file and its output to be rendered is called a <b>batch</b>. 
3264 This allows a huge amount of media to be processed and greatly
3265 increases the value of an expensive computer.
3266 </p>
3267 <p>The first thing to do when preparing to do batch rendering is define
3268 projects to be rendered.  The batch renderer requires a separate EDL
3269 file for every batch to be rendered.  Set up a project and define the
3270 region to be rendered either by highlighting it, setting in/out points
3271 around it, or positioning the insertion point before it.  Then save the
3272 project as an EDL.  Define as many projects as needed this way.  The
3273 batch renderer takes the active region from the EDL file for rendering.
3274 </p>
3275 <p>With all the EDL files prepared with active regions, go to
3276 <b>File-&gt;batch render</b>.  This brings up the batch rendering dialog. 
3277 The interface for batch rendering is a bit more complex than for single
3278 file rendering.
3279 </p>
3280
3281 <p>A list of batches must be defined before starting a batch rendering
3282 operation.  The table of batches appears on the bottom of the batch
3283 render dialog and is called <b>batches to render</b>.  Above this are
3284 the configuration parameters for a single batch.
3285 </p>
3286 <p>Set the <b>output path</b>, <b>file format</b>, <b>Audio</b>, <b>Video</b>, and
3287 <b>Create new file at each label</b> parameters as if it was a single
3288 file.  These parameters apply to only one batch.  In addition to the
3289 standard rendering parameters, you must select the source EDL to use in
3290 the batch.  Do this by setting the <b>EDL path</b>.
3291 </p>
3292 <p>If the <b>batches to render</b> list is empty or nothing is highlighted,
3293 click <b>New</b> to create a new batch.  The new batch will contain all
3294 the parameters you just set.
3295 </p>
3296 <p>Repeatedly press the <b>New</b> button to create more batches with the
3297 same parameters.  Highlight any batch and edit the configuration on the
3298 top of the batch render window.  The highlighted batch is always
3299 synchronized to the information displayed.
3300 </p>
3301 <p>Click and drag batches to change the order in which they&rsquo;re rendered. 
3302 Hit <b>delete</b> to permanently remove the highlighted batch.
3303 </p>
3304 <p>In the list box is a column which enables or disables the batch.  This
3305 way batches can be skipped without being deleted.  Click on the
3306 <b>Enabled</b> column in the list box to enable or disable a batch.  If it
3307 is checked, the batch is rendered.  If it is blank, the batch is
3308 skipped.
3309 </p>
3310 <p>The other columns in the batch list are informative.
3311 </p>
3312 <ul>
3313 <li> <b>Output</b> The output path of the batch.
3314 </li><li> <b>EDL</b> The source EDL of the batch.
3315 </li><li> <b>Elapsed</b> The amount of time taken to render the batch if it is finished.
3316
3317 </li></ul>
3318
3319 <p>To start rendering from the first enabled batch, hit <b>Start</b>.
3320 </p>
3321 <p>Once rendering, the main window shows the progress of the batch.  Once
3322 the batch finishes, the elapsed column in the batch list is updated and
3323 the next batch is rendered until all the enabled batches are finished.
3324 The currently rendering batch is always highlighted red.
3325 </p>
3326
3327 <p>To stop rendering before the batches are finished without closing the
3328 batch render dialog, hit <b>Stop</b>.
3329 </p>
3330 <p>To stop rendering before the batches are finished and close the batch
3331 render dialog, hit <b>Cancel</b>.
3332 </p>
3333 <p>To exit the batch render dialog whether or not anything is being
3334 rendered, hit <b>Cancel</b>.
3335 </p>
3336
3337
3338
3339
3340
3341
3342 <hr>
3343 <a name="THE-RENDER-FARM"></a>
3344 <div class="header">
3345 <p>
3346 Next: <a href="#COMMAND-LINE-RENDERING" accesskey="n" rel="next">COMMAND LINE RENDERING</a>, Previous: <a href="#BATCH-RENDERING" accesskey="p" rel="prev">BATCH RENDERING</a>, Up: <a href="#RENDERING-FILES" accesskey="u" rel="up">RENDERING FILES</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
3347 </div>
3348 <a name="THE-RENDER-FARM-1"></a>
3349 <h4 class="subsection">7.5.3 THE RENDER FARM</h4>
3350
3351 <p>When bicubic interpolation and HDTV was first done on Cinelerra, the
3352 time needed to produce the simplest output became unbearable even on
3353 the fastest dual 1.7Ghz Xeon of the time.  Renderfarm support even in
3354 the simplest form brings HDTV times back in line with SD while making
3355 SD faster than realtime.
3356 </p>
3357 <p>While the renderfarm interface isn&rsquo;t spectacular, it&rsquo;s simple enough to
3358 use inside an editing suite with less than a dozen nodes without going
3359 through the same amount of hassle you would with a several hundred node
3360 farm.  Renderfarm is invoked transparently for all file-&gt;render
3361 operations when it is enabled in the preferences.
3362 </p>
3363 <p>Cinelerra divides the selected region of the timeline into a certain
3364 number of jobs which are then dispatched to the different nodes
3365 depending on the load balance.  The nodes process the jobs and write
3366 their output to individual files on the filesystem.  The output files
3367 are not concatenated.  It&rsquo;s important for all the nodes to have access
3368 to the same filesystem on the same mount point for assets.
3369 </p>
3370 <p>If a node can&rsquo;t access an input asset it&rsquo;ll display error messages to
3371 its console but probably not die.  If it can&rsquo;t access an output asset
3372 it&rsquo;ll cause the rendering to abort.
3373 </p>
3374 <p>It should be noted that in the render dialog, the <b>Create new file at
3375 each label</b> option causes a new renderfarm job to be created at each
3376 label instead of by the load balancer.  If this option is selected when
3377 no labels exist, only one job will be created.
3378 </p>
3379 <p>A Cinelerra renderfarm is organized into a master node and any number
3380 of slave nodes.  The master node is the computer which is running the
3381 GUI.  The slave nodes are anywhere else on the network and are run from
3382 the command line.  Run a slave node from the command line with 
3383 </p>
3384 <p><b>cinelerra -d</b>
3385 </p>
3386 <p>That is the simplest configuration.  Type <b>cinelerra -h</b> to see more
3387 options.  The default port number may be overridden by passing a port
3388 number after the -d.
3389 </p>
3390
3391 <p>Most of the time you&rsquo;ll want to bring in the rendered output and fine
3392 tune the timing on the timeline.  Also some file formats like MPEG
3393 can&rsquo;t be direct copied.  Because of this, the jobs are left in
3394 individual files.
3395 </p>
3396 <p>You can load these by creating a new track and specifying
3397 <b>concatenate to existing tracks</b> in the load dialog.  Files which
3398 support direct copy can be concatenated into a single file by rendering
3399 to the same file format with renderfarm disabled.  Also to get direct
3400 copy, the track dimensions, output dimensions, and asset dimensions
3401 must be equal.
3402 </p>
3403 <p>MPEG files or files which don&rsquo;t support direct copy have to be
3404 concatenated with a command line utility.  MPEG files can be
3405 concatenated with <b>cat</b>.
3406 </p>
3407 <p>Configuration of the renderfarm is described in the configuration
3408 chapter See <a href="#RENDERFARM">RENDERFARM</a>.  The slave nodes traditionally read and
3409 write data to a common filesystem over a network, thus they don&rsquo;t need
3410 hard drives.
3411 </p>
3412 <p>Ideally all the nodes on the renderfarm have similar CPU performance. 
3413 Cinelerra load balances on a first come first serve basis.  If the last
3414 segment is dispatched to the slowest node, all the fastest nodes may
3415 end up waiting for the slowest node to finish while they themselves
3416 could have rendered it faster.
3417 </p>
3418
3419
3420
3421
3422 <hr>
3423 <a name="COMMAND-LINE-RENDERING"></a>
3424 <div class="header">
3425 <p>
3426 Previous: <a href="#THE-RENDER-FARM" accesskey="p" rel="prev">THE RENDER FARM</a>, Up: <a href="#RENDERING-FILES" accesskey="u" rel="up">RENDERING FILES</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
3427 </div>
3428 <a name="COMMAND-LINE-RENDERING-1"></a>
3429 <h4 class="subsection">7.5.4 COMMAND LINE RENDERING</h4>
3430
3431 <p>The command line rendering facility consists of a way to load the
3432 current set of batch rendering jobs and process them without a GUI. 
3433 This is useful if you&rsquo;re planning on crashing X repeatedly or want to
3434 do rendering on the other side of a low bandwidth network.  You might
3435 have access to a supercomputer in India but still be stuck in America,
3436 exhiled you might say.  A command line interface is ideal for this.
3437 </p>
3438 <p>To perform rendering from the command line, first run Cinelerra in
3439 graphical mode.  Go to <b>file-&gt;batch render</b>.  Create the batches you
3440 intend to render in the batch window and close the window.  This saves
3441 the batches in a file.  Set up the desired renderfarm attributes in
3442 <b>settings-&gt;preferences</b> and exit Cinelerra.  These settings are used
3443 the next time command line rendering is used.
3444 </p>
3445 <p>On the command line run 
3446 </p>
3447 <p><b>cinelerra -r</b>
3448 </p>
3449 <p>to processes the current batch jobs without a GUI.  Setting up all the
3450 parameters for this operation is hard.  That&rsquo;s why the command line
3451 aborts if any output files already exist.
3452 </p>
3453 <p>Other parameters exist for specifying alternative files for the
3454 preferences and the batches.  Attempting to use anything but the
3455 defaults is very involved so it hasn&rsquo;t been tested.
3456 </p>
3457
3458
3459
3460
3461 <hr>
3462 <a name="NAVIGATING-THE-PROJECT"></a>
3463 <div class="header">
3464 <p>
3465 Next: <a href="#EDITING" accesskey="n" rel="next">EDITING</a>, Previous: <a href="#LOADING-AND-SAVING-FILES" accesskey="p" rel="prev">LOADING AND SAVING FILES</a>, Up: <a href="#Top" accesskey="u" rel="up">TOP</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
3466 </div>
3467 <a name="NAVIGATING-THE-PROJECT-1"></a>
3468 <h2 class="chapter">8 NAVIGATING THE PROJECT</h2>
3469
3470 <p>The thing you want to do most of the time is get to a certain time and
3471 place in the media.  Internally the media is organized into tracks. 
3472 Each track extends across time.  Navigation involves both getting to a
3473 track and getting to a certain time in the track.
3474 </p>
3475
3476
3477 <table class="menu" border="0" cellspacing="0">
3478 <tr><td align="left" valign="top">&bull; <a href="#NAVIGATING-THE-PROGRAM-WINDOW" accesskey="1">NAVIGATING THE PROGRAM WINDOW</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
3479 </td></tr>
3480 <tr><td align="left" valign="top">&bull; <a href="#NAVIGATING-THE-VIEWER-AND-COMPOSITOR" accesskey="2">NAVIGATING THE VIEWER AND COMPOSITOR</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
3481 </td></tr>
3482 <tr><td align="left" valign="top">&bull; <a href="#NAVIGATING-THE-RESOURCES" accesskey="3">NAVIGATING THE RESOURCES</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
3483 </td></tr>
3484 <tr><td align="left" valign="top">&bull; <a href="#USING-THE-TRANSPORT-CONTROLS" accesskey="4">USING THE TRANSPORT CONTROLS</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
3485 </td></tr>
3486 <tr><td align="left" valign="top">&bull; <a href="#USING-BACKGROUND-RENDERING" accesskey="5">USING BACKGROUND RENDERING</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
3487 </td></tr>
3488 </table>
3489
3490
3491
3492 <hr>
3493 <a name="NAVIGATING-THE-PROGRAM-WINDOW"></a>
3494 <div class="header">
3495 <p>
3496 Next: <a href="#NAVIGATING-THE-VIEWER-AND-COMPOSITOR" accesskey="n" rel="next">NAVIGATING THE VIEWER AND COMPOSITOR</a>, Up: <a href="#NAVIGATING-THE-PROJECT" accesskey="u" rel="up">NAVIGATING THE PROJECT</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
3497 </div>
3498 <a name="NAVIGATING-THE-PROGRAM-WINDOW-1"></a>
3499 <h3 class="section">8.1 NAVIGATING THE PROGRAM WINDOW</h3>
3500
3501 <p>The program window contains many features for navigation and displays
3502 the timeline as it is structured in memory: tracks stacked vertically
3503 and extending across time horizontall.  The horizontal scroll bar
3504 allows you to scan across time.  The vertical scroll bar allows you to
3505 scan across tracks.
3506 </p>
3507 <p>Below the timeline you&rsquo;ll find the zoom panel.  The zoom panel contains
3508 values for <b>sample zoom</b>, <b>amplitude</b>, <b>track zoom</b>, and
3509 <b>curve zoom</b>.  These values in addition to the scrollbars are the
3510 main tools for positioning the timeline.
3511 </p>
3512
3513
3514
3515
3516
3517
3518
3519 <br>
3520
3521 <img src="zoompanel.png" alt="zoompanel">
3522
3523
3524 <p>Changing the <b>sample zoom</b> causes the amount of time visible to
3525 change.  <b>If your mouse has a wheel and it works in X11 go over
3526 the tumblers and use the wheel to zoom in and out.</b>
3527 </p>
3528 <p>The <b>amplitude</b> only affects audio.  It determines how big the
3529 waveform is if the waveform is drawn.
3530 </p>
3531 <p>The <b>track zoom</b> affects all tracks.  It determines the height of
3532 each track.  If you change the track zoom the amplitude zoom
3533 compensates so  audio waveforms look proportional.
3534 </p>
3535 <p>The <b>curve zoom</b> affects the curves in all the tracks.  It
3536 determines the amplitude and offset of the curves.  The tumbler affects
3537 curve amplitude but the only way to change curve offset is to use the
3538 <b>fit curves</b> button.  <img src="fit_curves.png" alt="fit_curves">
3539 </p>
3540
3541 <p>In addition to the graphical tools, you&rsquo;ll probably more often use the
3542 keyboard to navigate.  Use <b>PAGE UP</b> and <b>PAGE DOWN</b> to
3543 scroll up and down the tracks.
3544 </p>
3545 <p>Use the <b>LEFT</b> and <b>RIGHT</b> arrows to move across time in
3546 small increments.  You&rsquo;ll often need to scroll beyond the end of the
3547 timeline but scrollbars won&rsquo;t let you do it.  Instead use the
3548 <b>RIGHT</b> arrow to scroll past the end of timeline.
3549 </p>
3550 <p>Use the <b>HOME</b> and <b>END</b> keys to instantly go to the
3551 beginning or end of the timeline.  In <b>I-beam</b> mode, hold down
3552 shift while pressing <b>HOME</b> or <b>END</b> to select the region of
3553 the timeline between the insertion point and the key pressed.
3554 </p>
3555 <p>Use the <b>UP</b> and <b>DOWN</b> arrows to change the sample zoom by a
3556 power of 2.
3557 </p>
3558 <p><b>CTRL-UP</b> and <b>CTRL-DOWN</b> cause the amplitude zoom to change.
3559 </p>
3560 <p><b>CTRL-PGUP</b> and <b>CTRL-PGDOWN</b> cause the track zoom to change.
3561 </p>
3562 <p><b>ALT-UP</b> and <b>ALT-DOWN</b> cause the curve amplitude to change.
3563 </p>
3564
3565
3566 <table class="menu" border="0" cellspacing="0">
3567 <tr><td align="left" valign="top">&bull; <a href="#THE-INSERTION-POINT" accesskey="1">THE INSERTION POINT</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
3568 </td></tr>
3569 <tr><td align="left" valign="top">&bull; <a href="#THE-IN_002fOUT-POINTS" accesskey="2">THE IN/OUT POINTS</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
3570 </td></tr>
3571 <tr><td align="left" valign="top">&bull; <a href="#USING-LABELS-IN-THE-PROGRAM-WINDOW" accesskey="3">USING LABELS IN THE PROGRAM WINDOW</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
3572 </td></tr>
3573 </table>
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587 <hr>
3588 <a name="THE-INSERTION-POINT"></a>
3589 <div class="header">
3590 <p>
3591 Next: <a href="#THE-IN_002fOUT-POINTS" accesskey="n" rel="next">THE IN/OUT POINTS</a>, Up: <a href="#NAVIGATING-THE-PROGRAM-WINDOW" accesskey="u" rel="up">NAVIGATING THE PROGRAM WINDOW</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
3592 </div>
3593 <a name="THE-INSERTION-POINT-1"></a>
3594 <h4 class="subsection">8.1.1 THE INSERTION POINT</h4>
3595
3596 <p>By default you&rsquo;ll see a flashing insertion point in the program window
3597 the first time you boot it up.  This is where new media is pasted onto
3598 the timeline.  It&rsquo;s also the starting point of all playback
3599 operations.  When rendering, it defines the region of the timeline to
3600 be rendered.
3601 </p>
3602 <p>The insertion point is normally moved by clicking inside the timebar. 
3603 Any region of the timebar not obscured by labels and in/out points is a
3604 hotspot for repositioning the insertion point.
3605 </p>
3606 <br>
3607 <img src="main_timebar.png" alt="main_timebar">
3608 <p><b>The main timebar</b>
3609 </p>
3610 <p>The insertion point also can be moved by clicking in the timeline
3611 itself, but not always.  The insertion point has two modes of
3612 operation: 
3613 </p>
3614 <ul>
3615 <li> drag and drop mode 
3616
3617 </li><li> cut and paste mode
3618
3619 </li></ul>
3620
3621 <p>The mode of operation is determined by selecting the arrow or the
3622 i-beam in the buttonbar.
3623 </p>
3624 <br>
3625 <img src="editing_mode.png" alt="editing_mode">
3626 <p><b>The editing mode buttons</b>
3627 </p>
3628 <p>If the arrow is highlighted it enables <b>drag and drop</b> mode.  In
3629 drag and drop mode, clicking in the timeline doesn&rsquo;t reposition the
3630 insertion point.  Instead it selects an entire edit.  Dragging in the
3631 timeline repositions the edit, snapping it to other edit boundaries. 
3632 This is normally useful for reordering audio playlists and moving
3633 effects around.
3634 </p>
3635 <p>If the i-beam is highlighted it enables <b>cut and paste mode</b>.  In
3636 cut and paste mode clicking in the timeline repositions the insertion
3637 point.  Dragging in the timeline highlights a region.  The highlighted
3638 region becomes the playback range during the next playback operation,
3639 the rendered range during the next render operation, and the region
3640 affected by cut and paste operations.
3641 </p>
3642 <p><b>Shift-clicking</b> in the timeline extends the highlighted region.
3643 </p>
3644 <p><b>Double-clicking</b> in the timeline selects the entire edit the
3645 cursor is over.
3646 </p>
3647 <p>It should be noted that when moving the insertion point and selecting
3648 regions, the positions are either aligned to frames or aligned to
3649 samples.  When editing video you&rsquo;ll want to align to frames.  When
3650 editing audio you&rsquo;ll want to align to samples.  This is set in
3651 <b>settings-&gt;align cursor on frames</b>.
3652 </p>
3653 <p>If the highlighted region is the region affected by cut and paste
3654 operations, how do I cut and paste in <b>drag and drop</b> mode?  In
3655 this case you need to set <b>in/out points</b> to define an affected region.
3656 </p>
3657
3658
3659
3660
3661 <hr>
3662 <a name="THE-IN_002fOUT-POINTS"></a>
3663 <div class="header">
3664 <p>
3665 Next: <a href="#USING-LABELS-IN-THE-PROGRAM-WINDOW" accesskey="n" rel="next">USING LABELS IN THE PROGRAM WINDOW</a>, Previous: <a href="#THE-INSERTION-POINT" accesskey="p" rel="prev">THE INSERTION POINT</a>, Up: <a href="#NAVIGATING-THE-PROGRAM-WINDOW" accesskey="u" rel="up">NAVIGATING THE PROGRAM WINDOW</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
3666 </div>
3667 <a name="THE-IN_002fOUT-POINTS-1"></a>
3668 <h4 class="subsection">8.1.2 THE IN/OUT POINTS</h4>
3669
3670 <p>In both editing modes you can set in/out points.  The in/out points
3671 define the affected region.  In drag and drop mode they are the only
3672 way to define an affected region.  In both cut and paste mode and drag
3673 and drop mode the highlighted area overrides the in/out points.  If a
3674 highlighted area and in/out points are set, the highlighted area is
3675 affected by editing operations and the in/out points are ignored.  If
3676 no region is highlighted, the in/out points are used.
3677 </p>
3678 <p>Normally, in/out points do not affect the playback region.  Only if you
3679 hold down CTRL while issuing a playback command do the in/out points
3680 determine the playback region.
3681 </p>
3682 <p>To set in/out points go to the timebar and position the insertion point
3683 somewhere.  Hit the <img src="in_point_button.png" alt="in_point_button"> <b>in point button</b>.  Go
3684 to a position after the in point and hit the <img src="out_point_button.png" alt="out_point_button">
3685 <b>out point button</b>.
3686 </p>
3687 <br>
3688 <img src="inout_points.png" alt="inout_points"> <p><b>Timebar with in/out points set</b>.
3689 </p>
3690 <p>Select either the in point or the out point and the insertion point
3691 jumps to that location.  After selecting an in point, if you hit the
3692 <b>in point button</b> the in point will be deleted.  After selecting
3693 an out point, if you hit the <b>out point button</b> the out point will
3694 be deleted.
3695 </p>
3696 <p>If you select a region somewhere else while in/out points already
3697 exist, the existing points will be repositioned when you hit the in/out
3698 buttons.
3699 </p>
3700 <p><b>Shift-clicking</b> on an in/out point extends the highlighted region
3701 to that point.
3702 </p>
3703 <p>Instead of using the button bar you can use the <b>[</b> and <b>]</b>
3704 keys to toggle in/out points.
3705 </p>
3706 <p>The insertion point and the in/out points allow you to define an
3707 affected region but they don&rsquo;t let you jump to exact points on the
3708 timeline very easily.  For this purpose there are labels.
3709 </p>
3710
3711
3712
3713
3714 <hr>
3715 <a name="USING-LABELS-IN-THE-PROGRAM-WINDOW"></a>
3716 <div class="header">
3717 <p>
3718 Previous: <a href="#THE-IN_002fOUT-POINTS" accesskey="p" rel="prev">THE IN/OUT POINTS</a>, Up: <a href="#NAVIGATING-THE-PROGRAM-WINDOW" accesskey="u" rel="up">NAVIGATING THE PROGRAM WINDOW</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
3719 </div>
3720 <a name="USING-LABELS-IN-THE-PROGRAM-WINDOW-1"></a>
3721 <h4 class="subsection">8.1.3 USING LABELS IN THE PROGRAM WINDOW</h4>
3722
3723 <p>Labels are an easy way to set exact locations on the timeline you want
3724 to jump to.  When you position the insertion point somewhere and hit
3725 the <img src="label_button.png" alt="label_button"> <b>label button</b> a new label appears on the
3726 timeline.  
3727 </p>
3728 <br>
3729 <img src="timebar_label.png" alt="timebar_label"> <p><b>Timebar with a label on it</b>
3730 </p>
3731 <p>No matter what the zoom settings are, clicking on the label positions
3732 the insertion point exactly where you set it.  Hitting the label button
3733 again when a label is selected deletes it.
3734 </p>
3735 <p><b>Shift-clicking</b> on a label extends the highlighted region.
3736 </p>
3737 <p><b>Double-clicking</b> between two labels highlights the region between
3738 the labels.
3739 </p>
3740 <p>Hitting the <b>l</b> key has the same effect as the label button.
3741 </p>
3742 <p>If you hit the label button when a region is highlighted, two labels
3743 are toggled at each end of the highlighted region.  If one end already
3744 has a label, then the existing label is deleted and a label is created
3745 at the opposite end.
3746 </p>
3747 <p>Labels can reposition the insertion point when they are selected but
3748 they can also be traversed with the <img src="label_traversal.png" alt="label_traversal"> <b>label
3749 traversal</b> buttons.  When a label is out of view, the label traversal
3750 buttons reposition the timeline so the label is visible.  There are
3751 keyboard shortcuts for label traversal, too.
3752 </p>
3753 <p><b>CTRL-LEFT</b> repositions the insertion point on the previous label.
3754 </p>
3755 <p><b>CTRL-RIGHT</b> repositions the insertion point on the next label.
3756 </p>
3757 <p>With label traversal you can quickly seek back and forth on the
3758 timeline but you can also select regions.
3759 </p>
3760 <p><b>SHIFT-CTRL-LEFT</b> extends the highlighted region to the previous
3761 label.
3762 </p>
3763 <p><b>SHIFT-CTRL-RIGHT</b> extends the highlighted region to the next label.
3764 </p>
3765 <p>Manually hitting the label button or <b>l</b> key over and over again
3766 to delete a series of labels can get tedious.  For deleting a set of
3767 labels, first highlight a region and second use the <b>Edit-&gt;Clear
3768 labels</b> function.  If in/out points exist, the labels between the
3769 in/out points are cleared and the highlighted region ignored.
3770 </p>
3771
3772
3773
3774
3775
3776
3777
3778 <hr>
3779 <a name="NAVIGATING-THE-VIEWER-AND-COMPOSITOR"></a>
3780 <div class="header">
3781 <p>
3782 Next: <a href="#NAVIGATING-THE-RESOURCES" accesskey="n" rel="next">NAVIGATING THE RESOURCES</a>, Previous: <a href="#NAVIGATING-THE-PROGRAM-WINDOW" accesskey="p" rel="prev">NAVIGATING THE PROGRAM WINDOW</a>, Up: <a href="#NAVIGATING-THE-PROJECT" accesskey="u" rel="up">NAVIGATING THE PROJECT</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
3783 </div>
3784 <a name="NAVIGATING-THE-VIEWER-AND-COMPOSITOR-1"></a>
3785 <h3 class="section">8.2 NAVIGATING THE VIEWER AND COMPOSITOR</h3>
3786
3787 <p>The navigation features of the Viewer and Compositor behave very
3788 similarly.  Each has a timebar and slider below the video output.  The
3789 timebar and slider are critical for navigation.
3790 </p>
3791 <br>
3792
3793 <img src="timebarslider.png" alt="timebarslider">
3794
3795 <p>The timebar represents the entire time covered by the program.  When
3796 you define labels and in/out points it defines those, too.  Finally the
3797 timebar defines a region known as the <b>preview region</b>.
3798 </p>
3799 <p>The <b>preview region</b> is the region of the timeline which the
3800 slider effects.  The slider only covers the time covered by the preview
3801 region.  By using a preview region inside the entire program and using
3802 the slider inside the preview region you can quickly and precisely seek
3803 in the compositor and viewer.
3804 </p>
3805 <p>When you replace the current project with a file the preview region
3806 automatically resizes to cover the entire file.  When you append data
3807 or change the size of the current project, the preview region stays the
3808 same size and shrinks.  Therefore, you need to resize the preview
3809 region.
3810 </p>
3811 <p>Load a file and then slide around it using the compositor slider.  The
3812 insertion point in the main window follows the compositor.  Move the
3813 pointer over the compositor&rsquo;s timebar until it turns into a left resize
3814 pointer.  The click and drag right.  The preview region should have
3815 changed and the slider resized proportionally.
3816 </p>
3817 <p>Go to the right of the timebar until a right resize pointer appears. 
3818 Drag left so the preview region shrinks.
3819 </p>
3820 <p>Go to the center of the preview region in the timebar and drag it
3821 around to convince yourself if can be moved.
3822 </p>
3823
3824 <br>
3825
3826 <img src="previewregion.png" alt="previewregion">
3827
3828 <p><b>Preview region in compositor</b>
3829 </p>
3830 <p>If you go to the slider and slide it around with the preview region
3831 shrunk, you&rsquo;ll see the slider only affects the preview region.  The
3832 timebar and slider in the viewer window work exactly the same.
3833 </p>
3834 <p>Labels and in/out points are fully supported in the viewer and
3835 compositor.  The only difference between the viewer and compositor is
3836 the compositor reflects the state of the program while the viewer
3837 reflects the state of a clip but not the program.
3838 </p>
3839 <p>When you hit the <b>label button</b> in the compositor, the label
3840 appears both in the compositor timebar and the program timebar.
3841 </p>
3842 <p>When you select a label or in/out point in the compositor, the program
3843 window jumps to that position.
3844 </p>
3845 <br>
3846 <img src="viewer_labels.png" alt="viewer_labels"> <p><b>Labels and in/out points in the viewer</b>.
3847 </p>
3848 <p>In the viewer and compositor, labels and in/out points are displayed in
3849 the timebar.  Instead of displaying just a region of the program, the
3850 timebar displays the entire program here.
3851 </p>
3852
3853
3854 <p>Like the Program window, the Compositor has a zoom capability.  First,
3855 the pulldown menu on the bottom of the compositor window has a number
3856 of zoom options.  When set to <b>Auto</b> the video is zoomed to match
3857 the compositor window size as closely as possible.  When set to any
3858 other percentage, the video is zoomed a power of 2 and scrollbars can
3859 be used to scroll around the output.  When the video is zoomed bigger
3860 than the window size, not only do scrollbars scan around it but
3861 <b>middle mouse button</b> dragging in the video output scans around
3862 it.  This is exactly when The Gimp does.
3863 </p>
3864 <p>Furthermore, the zoom <img src="magnify.png" alt="magnify"> toggle causes the Compositor
3865 window to enter zoom mode.  In zoom mode, clicking in the video output
3866 zooms in while <b>ctrl-clicking</b> in the video output zooms out.  If
3867 you have a wheel mouse, rotating the wheel zooms in or out too.
3868 </p>
3869 <p>Zooming in or out with the zoom tool does not change the rendered
3870 output, mind you.  It&rsquo;s merely for scrutinizing video or fitting it in
3871 the desktop.
3872 </p>
3873
3874
3875
3876
3877
3878 <hr>
3879 <a name="NAVIGATING-THE-RESOURCES"></a>
3880 <div class="header">
3881 <p>
3882 Next: <a href="#USING-THE-TRANSPORT-CONTROLS" accesskey="n" rel="next">USING THE TRANSPORT CONTROLS</a>, Previous: <a href="#NAVIGATING-THE-VIEWER-AND-COMPOSITOR" accesskey="p" rel="prev">NAVIGATING THE VIEWER AND COMPOSITOR</a>, Up: <a href="#NAVIGATING-THE-PROJECT" accesskey="u" rel="up">NAVIGATING THE PROJECT</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
3883 </div>
3884 <a name="NAVIGATING-THE-RESOURCES-1"></a>
3885 <h3 class="section">8.3 NAVIGATING THE RESOURCES</h3>
3886
3887 <p>The resource window is divided into two areas.  One area lists folders
3888 and another area lists folder contents.  Going into the folder list and
3889 clicking on a folder updates the contents area with the contents of
3890 that folder.
3891 </p>
3892 <p>The folder and contents can be displayed as icons or text.
3893 </p>
3894 <p><b>Right clicking</b> in the folder or contents area brings up a menu
3895 containing formatting options.  Select <b>Display text</b> to display a
3896 text listing.  Select <b>Sort items</b> to sort the contents of the
3897 folder alphabetically.
3898 </p>
3899
3900
3901
3902
3903
3904
3905
3906 <hr>
3907 <a name="USING-THE-TRANSPORT-CONTROLS"></a>
3908 <div class="header">
3909 <p>
3910 Next: <a href="#USING-BACKGROUND-RENDERING" accesskey="n" rel="next">USING BACKGROUND RENDERING</a>, Previous: <a href="#NAVIGATING-THE-RESOURCES" accesskey="p" rel="prev">NAVIGATING THE RESOURCES</a>, Up: <a href="#NAVIGATING-THE-PROJECT" accesskey="u" rel="up">NAVIGATING THE PROJECT</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
3911 </div>
3912 <a name="USING-THE-TRANSPORT-CONTROLS-1"></a>
3913 <h3 class="section">8.4 USING THE TRANSPORT CONTROLS</h3>
3914
3915 <p>Transport controls are just as useful in navigation as they are in
3916 playing back footage, hence they are described here in the navigation
3917 section.  Each of the Viewer, Compositor, and Program windows has a
3918 transport panel.
3919 </p>
3920 <br>
3921 <img src="transport_panel.png" alt="transport_panel"> <p><b>The transport panel</b>.
3922 </p>
3923 <p>The transport panel is controlled by the keyboard as well as the
3924 graphical interface.  For each of the operations it performs, the
3925 starting position is the position of the insertion point in the Program
3926 window and the slider in the Compositor window.  The ending position is
3927 either the end or start of the timeline or the end or start of the
3928 selected region if there is one.
3929 </p>
3930 <p>The orientation of the end or start depends on the direction of
3931 playback.  If it&rsquo;s forward the end position is the end of the selected
3932 region.  If it&rsquo;s backward the end position is the start of the selected
3933 region.
3934 </p>
3935 <p>The insertion point moves to track playback.  When playback stops, the
3936 insertion point stays where playback stopped.  Thus, by playing back
3937 you change the position of the insertion point.
3938 </p>
3939 <p>The keyboard interface is usually the fastest and has more speeds.  The
3940 transport keys are arranged in a sideways <b>T</b> on the number pad.
3941 </p>
3942 <ul>
3943 <li> <b>+</b> Fast reverse
3944 </li><li> <b>6</b> Normal reverse
3945 </li><li> <b>5</b> Slow reverse
3946 </li><li> <b>4</b> Frame reverse
3947 </li><li> <b>1</b> Frame forward
3948 </li><li> <b>2</b> Slow forward
3949 </li><li> <b>3</b> Normal forward
3950 </li><li> <b>Enter</b> Fast forward
3951 </li><li> <b>0</b> Stop
3952 </li><li> <b>Spacebar</b> Normal forward
3953 </li></ul>
3954
3955 <p>Hitting any key on the keyboard twice pauses it.
3956 </p>
3957 <p>When using frame advance functions the behavior may seem odd.  If you
3958 frame advance forward and then frame advance backward, the displayed
3959 frame doesn&rsquo;t change.  This is because the playback position isn&rsquo;t the
3960 frame but the time between two frames.  The rendered frame is the area
3961 that the playback position crosses.  When you increment the time
3962 between two frames by one and decrement it by one, you cross the same
3963 frame both times and so the same frame is displayed.
3964 </p>
3965 <p>The transport behavior changes if you hold down CTRL when issuing any
3966 of the transport commands.  This causes the starting point to be the in
3967 point if playing forward and the out point if playing backward.  If
3968 playing forward, the out point becomes the ending point and if playing
3969 backward, the in point becomes the ending point.  If no in/out points
3970 are specified, the behavior falls back to using the insertion point and
3971 track boundaries as the starting and ending points.
3972 </p>
3973
3974
3975 <hr>
3976 <a name="USING-BACKGROUND-RENDERING"></a>
3977 <div class="header">
3978 <p>
3979 Previous: <a href="#USING-THE-TRANSPORT-CONTROLS" accesskey="p" rel="prev">USING THE TRANSPORT CONTROLS</a>, Up: <a href="#NAVIGATING-THE-PROJECT" accesskey="u" rel="up">NAVIGATING THE PROJECT</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
3980 </div>
3981 <a name="USING-BACKGROUND-RENDERING-1"></a>
3982 <h3 class="section">8.5 USING BACKGROUND RENDERING</h3>
3983
3984
3985
3986 <p>Background rendering allows impossibly slow effects to play back in
3987 realtime shortly after the effect is pasted in the timeline.  It
3988 continuously renders temporary output.  When renderfarm is enabled,
3989 background rendering uses the renderfarm continuously.  This way, any
3990 size video can be seen in realtime merely by creating a fast enough
3991 network with enough nodes.
3992 </p>
3993 <p>Background rendering is enabled in settings-&gt;preferences-&gt;performance. 
3994 It has one interactive function: <b>settings-&gt;set background render</b>.  This
3995 sets the point where background rendering begins to where the in point
3996 is.  If any video exists, a red bar appears in the time bar showing
3997 what has been background rendered.
3998 </p>
3999 <p>It&rsquo;s often useful to insert an effect or a transition and then select
4000 settings-&gt;set background render right before the effect to preview it
4001 in full framerates.
4002 </p>
4003
4004
4005 <hr>
4006 <a name="EDITING"></a>
4007 <div class="header">
4008 <p>
4009 Next: <a href="#USING-EFFECTS" accesskey="n" rel="next">USING EFFECTS</a>, Previous: <a href="#NAVIGATING-THE-PROJECT" accesskey="p" rel="prev">NAVIGATING THE PROJECT</a>, Up: <a href="#Top" accesskey="u" rel="up">TOP</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
4010 </div>
4011 <a name="EDITING-1"></a>
4012 <h2 class="chapter">9 EDITING</h2>
4013
4014
4015 <p>Editing comprises both the time domain and the track domain.  Since the
4016 timeline consists of a stack of tracks, you need to worry about how to
4017 sort and create tracks in addition to what time certain media appears
4018 on a track.
4019 </p>
4020 <p>In the time domain, Cinelerra offers many ways to approach the editing
4021 process.  The three main methods are two screen editing, drag and drop
4022 editing, and cut and paste editing.
4023 </p>
4024 <p>There are several concepts Cinelerra uses when editing which apply to
4025 all the methods.  The <b>timeline</b> is where all editing decisions are
4026 represented.  This is a stack of tracks in the center of the main
4027 window.  It can be scrolled up, down, left and right with the
4028 scrollbars on the right and bottom of it.  It can also be scrolled up
4029 and down with a mouse wheel.
4030 </p>
4031 <p>The <b>active region</b> is the range of time which is affected by editing
4032 commands on the timeline.  The active region is determined first by the
4033 presence of in/out points in the timeline.  If those don&rsquo;t exist the
4034 highlighted region is used.  If no highlighted region exists the
4035 insertion point is used as the start of the active region.  Some
4036 commands treat all the space to the right of the insertion point as
4037 active, like <b>Render</b>, while others treat the active length as 0 if no
4038 end point for the active region is defined.
4039 </p>
4040 <p>Finally, editing decisions never affect source material.  This is
4041 <b>non destructive editing</b> and it became popular with audio because it
4042 was much faster than if you had to copy all the media affected by an
4043 edit.  Editing only affects pointers to source material, so if you want
4044 to have a media file at the end of your editing session which
4045 represents the editing decisions, you need to <b>render</b> it.
4046 See <a href="#RENDERING-FILES">RENDERING FILES</a>.
4047 </p>
4048 <p>Every track on the timeline has a set of attributes on
4049 the left, the most important of which is the <b>arm track</b>
4050 attribute.
4051 </p>
4052
4053
4054 <table class="menu" border="0" cellspacing="0">
4055 <tr><td align="left" valign="top">&bull; <a href="#THE-PATCHBAY" accesskey="1">THE PATCHBAY</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Enabling different features on different tracks
4056 </td></tr>
4057 <tr><td align="left" valign="top">&bull; <a href="#NUDGING-TRACKS" accesskey="2">NUDGING TRACKS</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Move entire tracks horizontally
4058 </td></tr>
4059 <tr><td align="left" valign="top">&bull; <a href="#PANNING-TRACKS" accesskey="3">PANNING TRACKS</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Changing the audio output channels
4060 </td></tr>
4061 <tr><td align="left" valign="top">&bull; <a href="#AUTOMATIC-TRACK-PANNING" accesskey="4">AUTOMATIC TRACK PANNING</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Panning tracks to common speaker arrangements
4062 </td></tr>
4063 <tr><td align="left" valign="top">&bull; <a href="#STANDARD-AUDIO-MAPPINGS" accesskey="5">STANDARD AUDIO MAPPINGS</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Making audio panning that works on other players.
4064 </td></tr>
4065 <tr><td align="left" valign="top">&bull; <a href="#MANIPULATING-TRACKS" accesskey="6">MANIPULATING TRACKS</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Moving whole tracks around
4066 </td></tr>
4067 <tr><td align="left" valign="top">&bull; <a href="#TWO-SCREEN-EDITING" accesskey="7">TWO SCREEN EDITING</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Using two video windows to edit
4068 </td></tr>
4069 <tr><td align="left" valign="top">&bull; <a href="#DRAG-AND-DROP-EDITING" accesskey="8">DRAG AND DROP EDITING</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Dragging objects to edit
4070 </td></tr>
4071 <tr><td align="left" valign="top">&bull; <a href="#CUT-AND-PASTE-EDITING" accesskey="9">CUT AND PASTE EDITING</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Editing media like text
4072 </td></tr>
4073 <tr><td align="left" valign="top">&bull; <a href="#TRIMMING">TRIMMING</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Changing in and out points
4074 </td></tr>
4075 </table>
4076
4077
4078 <hr>
4079 <a name="THE-PATCHBAY"></a>
4080 <div class="header">
4081 <p>
4082 Next: <a href="#NUDGING-TRACKS" accesskey="n" rel="next">NUDGING TRACKS</a>, Up: <a href="#EDITING" accesskey="u" rel="up">EDITING</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
4083 </div>
4084 <a name="THE-PATCHBAY-1"></a>
4085 <h3 class="section">9.1 THE PATCHBAY</h3>
4086
4087
4088 <p>On the left of the timeline is a region affectionately known as the
4089 patchbay.  The patchbay enables features specific to each track.  All
4090 tracks have a text area for naming the track.
4091 </p>
4092 <p>All tracks have an <b>expander</b> <img src="expandpatch_checked.png" alt="expandpatch_checked"> for viewing
4093 more options and for viewing the effects on the track.  Click on the
4094 expander to expand or collapse the track.  If it&rsquo;s pointing sideways,
4095 the track is collapsed.  If it&rsquo;s pointing down, the track is expanded. 
4096 The effects appear below the media for the track if they exist.
4097 </p>
4098 <p>All tracks have the following row of toggles for several features.
4099 </p>
4100 <br>
4101 <img src="track_attributes.png" alt="track_attributes">
4102 <p><b>Track attributes</b>
4103 </p>
4104
4105 <p>If the toggle is colored, it is enabled.  If the toggle is the
4106 background color of most of the windows, it is disabled.  Click on the
4107 toggle to enable or disable the feature.  Several mouse operations
4108 speed up the configuration of several tracks at a time.
4109 </p>
4110 <p>Click on an attribute and drag across adjacent tracks to copy the same
4111 attribute to those tracks.
4112 </p>
4113 <p>Hold down <b>shift</b> while clicking a track&rsquo;s attribute to enable the
4114 attribute in the current track and toggle the attribute in all the
4115 other tracks.
4116 </p>
4117 <p>Hold down <b>shift</b> while clicking an attribute.  Click until all the
4118 tracks except the selected one are disabled.  Then drag the cursor over
4119 the adjacent track to enable the attribute in the adjacent track.
4120 </p>
4121
4122 <p>The other attributes affect the output of the track.
4123 </p>
4124 <ul>
4125 <li> 
4126 <b>Play track</b> determines whether the track is rendered or not.  If
4127 it&rsquo;s off, the track is not rendered.  However, if the track is chained
4128 to any other tracks, the other tracks perform all the effects in the
4129 chained track, regardless of play status.
4130 <br>
4131
4132 </li><li> 
4133 <b>Arm track</b> determines whether the track is armed or not.   Only the
4134 <b>armed tracks</b> are affected by editing operations.  Make sure you
4135 have enough armed destination tracks when you paste or splice material
4136 or some tracks in the material will get left out.
4137
4138 <p>In addition to restricting editing operations, the armed tracks in
4139 combination with the active region determine where material is inserted
4140 when loading files.  If the files are loaded with one of the insertion
4141 strategies which doesn&rsquo;t delete the existing project, the armed tracks
4142 will be used as destination tracks.
4143 </p>
4144 <p>Press <b>Tab</b> while the cursor is anywhere over a track to toggle the
4145 track arming status.
4146 </p>
4147 <p>Press <b>Shift-Tab</b> while the cursor is over a track to toggle the
4148 arming status of every other track.
4149 </p>
4150 </li><li> 
4151 <b>Gang fader</b> causes the fader to track the movement of whatever other
4152 fader you&rsquo;re adjusting.  A fader is only ganged if the <b>arm track</b> is
4153 also on.  This is normally used to adjust audio levels on all the
4154 tracks simultaneously.  Gang also causes <b>Nudge</b> parameters to
4155 synchronise across all the ganged tracks.
4156
4157
4158 <br>
4159
4160 </li><li> 
4161 <b>Draw media</b> determines if picons or waveforms are drawn on the
4162 track.  By default, some file formats load with this off while other
4163 file formats load with it on.  This depends on whether the file format
4164 takes a long time to draw on the timeline.  Merely set it to on if you
4165 want to see picons for any file format.
4166 <br>
4167
4168 </li><li> 
4169 <b>Mute track</b> causes the output to be thrown away once the track is
4170 completely rendered.  This happens whether or not <b>play track</b> is
4171 on.  If the track is part of an effect chain, the output of the effect
4172 chain track is overlayed on the final output even though it&rsquo;s routed
4173 back to another track.  Mute track is used to keep the effect chain
4174 track from overlapping the output of the source track.
4175 <br>
4176
4177 </li><li> 
4178 <b>Fader</b> All tracks have a fader, but the units of each fader depend
4179 on whether it&rsquo;s audio or video.  Click and drag the fader to fade the
4180 track in and out.  If it is ganged to other tracks of the same media
4181 type, with the <b>arm</b> option enabled, the other faders should follow.
4182
4183 <p>Hold down <b>shift</b> and drag a fader to center it on 0.
4184 </p>
4185 </li></ul>
4186
4187
4188
4189 <hr>
4190 <a name="NUDGING-TRACKS"></a>
4191 <div class="header">
4192 <p>
4193 Next: <a href="#PANNING-TRACKS" accesskey="n" rel="next">PANNING TRACKS</a>, Previous: <a href="#THE-PATCHBAY" accesskey="p" rel="prev">THE PATCHBAY</a>, Up: <a href="#EDITING" accesskey="u" rel="up">EDITING</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
4194 </div>
4195 <a name="NUDGING-TRACKS-1"></a>
4196 <h3 class="section">9.2 NUDGING TRACKS</h3>
4197
4198 <p>Each track has a nudge textbox in its patchbay.  You may have to expand
4199 the track to see it.  These are views of the patchbays when expanded.
4200 </p>
4201 <img src="apatches.png" alt="apatches">
4202
4203 <p>Pan and nudge for an audio track.
4204 </p>
4205 <img src="vpatches.png" alt="vpatches">
4206
4207 <p>Overlay mode and nudge for a video track.
4208 </p>
4209
4210 <p>The nudge is the amount the track is shifted left or right during
4211 playback.  The track is not displayed shifted on the timeline, but it
4212 is shifted when it&rsquo;s played back.  This is useful for synchronizing
4213 audio with video, creating fake stereo, or compensating for an effect
4214 which shifts time, all without tampering with any edits.
4215 </p>
4216 <p>Merely enter in the amount of time to shift by to instantly shift the
4217 track.  Negative numbers make the track play later.  Positive numbers
4218 make the track play sooner.  The nudge units are either <b>seconds</b> or
4219 the native units for the track.  Select the units by <b>right clicking</b>
4220 on the nudge textbox and using the context sensitive menu.
4221 </p>
4222 <p>Nudge settings are ganged with the <b>Gang faders</b> toggle and the
4223 <b>Arm track</b> toggle.
4224 </p>
4225 <p>Use the mouse wheel over the nudge textbox to increment and decriment
4226 it.
4227 </p>
4228
4229
4230
4231
4232 <hr>
4233 <a name="PANNING-TRACKS"></a>
4234 <div class="header">
4235 <p>
4236 Next: <a href="#AUTOMATIC-TRACK-PANNING" accesskey="n" rel="next">AUTOMATIC TRACK PANNING</a>, Previous: <a href="#NUDGING-TRACKS" accesskey="p" rel="prev">NUDGING TRACKS</a>, Up: <a href="#EDITING" accesskey="u" rel="up">EDITING</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
4237 </div>
4238 <a name="PANNING-TRACKS-1"></a>
4239 <h3 class="section">9.3 PANNING TRACKS</h3>
4240
4241 <p>Audio tracks have a panning box in their patchbay.  It may have to be
4242 expanded to see it.  The panning box is shown here.
4243 </p>
4244 <img src="apatches.png" alt="apatches">
4245
4246 <p>Pan and nudge for an audio track.
4247 </p>
4248 <p>Position the pointer in the panning box and click/drag to reposition
4249 the audio output among the speaker arrangement.  The loudness of each
4250 speaker is printed during the dragging operation.  The panning box uses
4251 a special algorithm to try to allow audio to be focused through one
4252 speaker or branched between the nearest speakers when more than 2
4253 speakers are used.
4254 </p>
4255
4256
4257 <hr>
4258 <a name="AUTOMATIC-TRACK-PANNING"></a>
4259 <div class="header">
4260 <p>
4261 Next: <a href="#STANDARD-AUDIO-MAPPINGS" accesskey="n" rel="next">STANDARD AUDIO MAPPINGS</a>, Previous: <a href="#PANNING-TRACKS" accesskey="p" rel="prev">PANNING TRACKS</a>, Up: <a href="#EDITING" accesskey="u" rel="up">EDITING</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
4262 </div>
4263 <a name="AUTOMATIC-TRACK-PANNING-1"></a>
4264 <h3 class="section">9.4 AUTOMATIC TRACK PANNING</h3>
4265
4266
4267 <p>Several convenience functions are provided for automatically setting
4268 the panning to several common standards.  They are listed in the
4269 <b>Audio</b> menu.  These functions only affect audio tracks with
4270 <b>recording</b> enabled.
4271 </p>
4272 <p><b>Audio-&gt;Map 1:1</b> - This maps every track to its own channel and wraps
4273 around when all the channels are allocated.  It&rsquo;s most useful for
4274 making 2 tracks with 2 channels map to stereo and for making 6 tracks
4275 with 6 channels map to a 6 channel soundcard.
4276 </p>
4277 <p><b>Audio-&gt;Map 5.1:2</b> - This maps 6 tracks to 2 channels.  The project
4278 should have 2 channels when using this function.  Go to
4279 <b>Settings-&gt;format</b> to set the output channels to 2.  This is most
4280 useful for downmixing 5.1 audio to stereo.
4281 </p>
4282
4283
4284
4285
4286 <hr>
4287 <a name="STANDARD-AUDIO-MAPPINGS"></a>
4288 <div class="header">
4289 <p>
4290 Next: <a href="#MANIPULATING-TRACKS" accesskey="n" rel="next">MANIPULATING TRACKS</a>, Previous: <a href="#AUTOMATIC-TRACK-PANNING" accesskey="p" rel="prev">AUTOMATIC TRACK PANNING</a>, Up: <a href="#EDITING" accesskey="u" rel="up">EDITING</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
4291 </div>
4292 <a name="STANDARD-AUDIO-MAPPINGS-1"></a>
4293 <h3 class="section">9.5 STANDARD AUDIO MAPPINGS</h3>
4294
4295 <p>Although Cinelerra lets you map any audio track to any speaker, there
4296 are standard mappings you should use to ensure the media can be played
4297 back elsewhere.  Also, most audio encoders require the audio tracks to
4298 be mapped to standard speaker numbers or they won&rsquo;t work.
4299 </p>
4300 <p>In the <b>channel position</b> widget See <a href="#SETTING-PROJECT-ATTRIBUTES">SETTING PROJECT ATTRIBUTES</a>,
4301 the channels are numbered to correspond to the output tracks they are
4302 rendered to.  For stereo, the source of channel 1 needs to be the left
4303 track and the source of channel 2 needs to be the right track.
4304 </p>
4305 <p>For 5.1 surround sound, the sources of the 6 channels need to be in the
4306 order of center, front left, front right, back left, back right, low
4307 frequency effects.  If the right tracks aren&rsquo;t mapped to the right
4308 speakers, most audio encoders won&rsquo;t encode the right information if
4309 they encode anything at all.  The low frequency effects track
4310 specifically can&rsquo;t store high frequencies in most cases.
4311 </p>
4312
4313
4314
4315
4316 <hr>
4317 <a name="MANIPULATING-TRACKS"></a>
4318 <div class="header">
4319 <p>
4320 Next: <a href="#TWO-SCREEN-EDITING" accesskey="n" rel="next">TWO SCREEN EDITING</a>, Previous: <a href="#STANDARD-AUDIO-MAPPINGS" accesskey="p" rel="prev">STANDARD AUDIO MAPPINGS</a>, Up: <a href="#EDITING" accesskey="u" rel="up">EDITING</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
4321 </div>
4322 <a name="MANIPULATING-TRACKS-1"></a>
4323 <h3 class="section">9.6 MANIPULATING TRACKS</h3>
4324
4325 <p>Tracks in Cinelerra either contain audio or video.  There is no special
4326 designation for tracks other than the type of media they contain.  When
4327 you create a new project, it contains a certain mumber of default
4328 tracks.  You can still add or delete tracks from a number of menus. 
4329 The <b>Tracks</b> menu contains a number of options for dealing with
4330 multiple tracks simultaneously.  Each track itself has a popup menu
4331 which affects one track.
4332 </p>
4333 <p>Bring up the popup menu by moving over a track and right clicking.  The
4334 popup menu affects the track whether it&rsquo;s armed or not.
4335 </p>
4336 <p><b>Move up</b> and <b>move down</b> moves the one track up or down in
4337 the stack.  <b>Delete track</b> deletes the track.
4338 </p>
4339 <p>Operations in the <b>Tracks</b> menu affect only tracks which are
4340 armed.
4341 </p>
4342 <p><b>Move tracks up</b> and <b>Move tracks down</b> shift all the armed
4343 tracks up or down the stack.
4344 </p>
4345 <p><b>Delete tracks</b> deletes the armed tracks.
4346 </p>
4347 <p><b>Delete last track</b> deletes the last track, whether it&rsquo;s armed or
4348 not.  Holding down the <b>d</b> key quickly deletes all the tracks.
4349 </p>
4350 <p><b>Concatenate tracks</b> is more complicated.  It takes every
4351 <b>playable</b> track and concatenates it to the end of the first
4352 <b>armed tracks</b>.  If there are two armed tracks followed by two
4353 playable tracks, the concatenate operation puts the two playable tracks
4354 after the two armed tracks.  If there are three playable tracks
4355 instead, two tracks are put after the armed tracks and a third track is
4356 put on the end of the first armed track.  The destination track wraps
4357 around until all the playable tracks are concatenated.
4358 </p>
4359 <p>Finally, you&rsquo;ll want to create new tracks.  The <b>Audio</b> and
4360 <b>Video</b> menus each contain an option to add a track of their
4361 specific type.  In the case of audio, the new track is put on the
4362 bottom of the timeline and the output channel of the audio track is
4363 incremented by one.  In the case of video, the new track is put on the
4364 top of the timeline.  This way, video has a natural compositing order. 
4365 New video tracks are overlayed on top of old tracks.
4366 </p>
4367
4368
4369
4370
4371
4372
4373
4374
4375 <hr>
4376 <a name="TWO-SCREEN-EDITING"></a>
4377 <div class="header">
4378 <p>
4379 Next: <a href="#DRAG-AND-DROP-EDITING" accesskey="n" rel="next">DRAG AND DROP EDITING</a>, Previous: <a href="#MANIPULATING-TRACKS" accesskey="p" rel="prev">MANIPULATING TRACKS</a>, Up: <a href="#EDITING" accesskey="u" rel="up">EDITING</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
4380 </div>
4381 <a name="TWO-SCREEN-EDITING-1"></a>
4382 <h3 class="section">9.7 TWO SCREEN EDITING</h3>
4383
4384 <p>This is the fastest way to construct a program out of movie files.  The
4385 idea consists of viewing a movie file in one window and viewing the
4386 program in another window.  Sections of the movie file are defined in
4387 one window and transferred to the end of the program in the other
4388 window.
4389 </p>
4390 <p>The way to begin a two screen editing session is to load some
4391 resources.  In <b>file-&gt;load</b> load some movies with the insertion
4392 mode <b>create new resources</b>.  You want the timeline to stay
4393 unchanged while new resources are brought in.  Go to the Resource
4394 Window and select the <b>media</b> folder.  The newly loaded resources
4395 should appear.  Drag a resource from the media side of the window over
4396 the Viewer window.
4397 </p>
4398 <p>There should be enough armed tracks on the timeline to put the sections
4399 of source material that you want.  If there aren&rsquo;t, create new tracks
4400 or arm more tracks.
4401 </p>
4402 <p>In the viewer window seek to the starting point of a clip you want to
4403 use.  Use either the <b>slider</b> or the <b>transport controls</b>. 
4404 Use the <b>preview region</b> to narrow down the search.  Set the
4405 starting point with the <img src="in_point_button.png" alt="in_point_button"> <b>in point button</b>.
4406 </p>
4407 <p>Seek to the ending point of the clip you want to use.  Set the ending
4408 point with the <img src="out_point_button.png" alt="out_point_button"> <b>out point button</b>.  The
4409 two points should now appear on the timebar and define a clip.
4410 </p>
4411 <p>There are several things you can do with the clip now.
4412 </p>
4413 <ul>
4414 <li> 
4415 Splice <img src="splice_button.png" alt="splice_button"> inserts the clip in the timeline, pushing
4416 everything back.  If an <b>in point</b> or <b>out point</b> exists on
4417 the timeline it&rsquo;s inserted there, otherwise it&rsquo;s inserted after the
4418 insertion point.  After that, the insertion point moves to the end of
4419 the clip.  If there is no in/out point, the insertion point will be
4420 used as the next splice location.  This way you can continuously build
4421 up the program by splicing.
4422
4423 </li><li> 
4424 Overwrite <img src="overwrite_button.png" alt="overwrite_button"> overwrites the region of the
4425 timeline with the clip.  If an <b>in point</b> or <b>out point</b>
4426 exists on the timeline it&rsquo;s overwritten there, otherwise it&rsquo;s
4427 overwritten after the insertion point.  If a region is highlighted or
4428 both in and out points exist the difference between the active region
4429 and the clip length is deleted.
4430
4431
4432
4433 </li><li> 
4434 Create a clip <img src="toclip_button.png" alt="toclip_button"> generates a new clip for the
4435 resource window containing the affected region but doesn&rsquo;t change the
4436 timeline.  Every clip has a title and a description.  These are
4437 optional.
4438
4439 </li><li> 
4440 Copy behaves the same as in cut and paste editing.
4441
4442 </li></ul>
4443
4444 <p>Two screen editing can be done purely by keybard shortcuts.  When you
4445 move the pointer over any button a tooltip should appear, showing what
4446 key is bound to that button.  In the Viewer window, the number pad keys
4447 control the transport and the <b>[ ] v</b> keys perform in/out points
4448 and splicing.
4449 </p>
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460 <hr>
4461 <a name="DRAG-AND-DROP-EDITING"></a>
4462 <div class="header">
4463 <p>
4464 Next: <a href="#CUT-AND-PASTE-EDITING" accesskey="n" rel="next">CUT AND PASTE EDITING</a>, Previous: <a href="#TWO-SCREEN-EDITING" accesskey="p" rel="prev">TWO SCREEN EDITING</a>, Up: <a href="#EDITING" accesskey="u" rel="up">EDITING</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
4465 </div>
4466 <a name="DRAG-AND-DROP-EDITING-1"></a>
4467 <h3 class="section">9.8 DRAG AND DROP EDITING</h3>
4468
4469 <p>The answer is yes, you can you create a bunch of clips and drag them on
4470 the timeline.  You can also drag edits around the timeline.
4471 </p>
4472 <p>Load some files using <b>file-&gt;load</b>.  Set the insertion mode to
4473 <b>Create new resources</b>.  This loads the files into the Resource
4474 Window.  Create some audio and video tracks on the timeline using the
4475 video and audio menus.
4476 </p>
4477 <p>Open the <b>Media</b> folder in the resource window.  Drag a media file
4478 from the resource window to the timeline.  If the media has video, drag
4479 it onto a video track.  If the media is pure audio, drag it onto an
4480 audio track.
4481 </p>
4482 <p>Cinelerra fills out the audio and video tracks below the dragging
4483 cursor with data from the file.  This affects what tracks you should
4484 create initially and which track to drag the media onto.  If the media
4485 has one video track and two audio tracks, you&rsquo;ll need one video track
4486 and two audio tracks on the timeline and the media should be dragged
4487 over the first video track.  If the media has audio only you&rsquo;ll need
4488 one audio track on the timeline for every audio track in the media and
4489 the media should be dragged over the first audio track.
4490 </p>
4491 <p>When dragging, the media snaps to the start of track if the track is
4492 empty.  If there are edits on the track, the media snaps to the nearest
4493 edit boundary.
4494 </p>
4495 <p>You can also drag multiple files from the resource window.  Either draw
4496 a box around the files, use SHIFT, or use CTRL when selecting files. 
4497 When you drop the files in the timeline, they are concatenated.  The
4498 behavior of SHIFT and CTRL changes depending on if the resources are in
4499 text or icons.
4500 </p>
4501 <p>To display the resources as text or icons, right click inside the media
4502 list.  Select either <b>display icons</b> or <b>display text</b> to
4503 change the list format.
4504 </p>
4505 <p>When displaying text in the resource window <b>SHIFT-clicking</b> on
4506 media files extends the number of highlighted selections. 
4507 <b>CTRL-clicking</b> on media files in text mode selects additional
4508 files one at a time.
4509 </p>
4510 <p>When displaying icons in the resource window <b>SHIFT-clicking</b> or
4511 <b>CTRL-clicking</b> selects media files one at a time.
4512 </p>
4513 <p>In addition to dragging media files, if you create clips and open the
4514 <b>clip</b> folder you can drag clips on the timeline.
4515 </p>
4516 <p>In the timeline there is further dragging functionality.  To enable the
4517 dragging functionality of the timeline, select the arrow toggle
4518 <img src="arrow.png" alt="arrow">.  Move over an edit and drag it.  If more than one
4519 track is armed, Cinelerra will drag any edits which start on the same
4520 position as the edit the cursur is currently over.  During a dragging
4521 operation the edit snaps to the nearest boundary.
4522 </p>
4523 <p>Dragging edits around the timeline allows you to sort music playlists,
4524 sort movie scenes, and give better NAB demos but not much else.
4525 </p>
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536 <hr>
4537 <a name="CUT-AND-PASTE-EDITING"></a>
4538 <div class="header">
4539 <p>
4540 Next: <a href="#TRIMMING" accesskey="n" rel="next">TRIMMING</a>, Previous: <a href="#DRAG-AND-DROP-EDITING" accesskey="p" rel="prev">DRAG AND DROP EDITING</a>, Up: <a href="#EDITING" accesskey="u" rel="up">EDITING</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
4541 </div>
4542 <a name="CUT-AND-PASTE-EDITING-1"></a>
4543 <h3 class="section">9.9 CUT AND PASTE EDITING</h3>
4544
4545 <p>This is the traditional method of editing in audio editors.  In the
4546 case of Cinelerra, you either need to start a second copy of Cinelerra
4547 and copy from one copy to the other, copy from different tracks in the
4548 same copy, or load a media file into the Viewer and copy from there.
4549 </p>
4550 <p>Load some files onto the timeline.  To perform cut and paste editing
4551 select the <img src="ibeam.png" alt="ibeam"> i-beam toggle.  Select a region of the
4552 timeline and select the <img src="cut.png" alt="cut"> cut button to cut it.  Move the
4553 insertion point to another point in the timeline and select the
4554 <img src="paste.png" alt="paste"> paste button.  Assuming no in/out points are defined on
4555 the timeline this performs a cut and paste operation.
4556 </p>
4557 <p>If in/out points are defined, the insertion point and highlighted
4558 region are overridden by the in/out points for clipboard operations. 
4559 Thus, with in/out points you can perform cut and paste in drag and drop
4560 mode as well as cut and paste mode.
4561 </p>
4562 <p>When editing audio, it is customary to cut from one part of a waveform
4563 into the same part of another waveform.  The start and stop points of
4564 the cut are identical in each waveform and might be offset slightly,
4565 while the wave data is different.  It would be very hard to highlight
4566 one waveform to cut it and highlight the second waveform to paste it
4567 without changing the relative start and stop positions.
4568 </p>
4569 <p>One option for simplifying this is to open a second copy of Cinelerra,
4570 cutting and pasting to transport media between the two copies.  This
4571 way two highlighed regions can exist simultanously.
4572 </p>
4573 <p>Another option is to set in/out points for the source region of the
4574 source waveform and set labels for the destination region of the
4575 destination waveform.  Perform a cut, clear the in/out points, select
4576 the region between the labels, and perform a paste.
4577 </p>
4578
4579
4580 <p>A final operation in cut and paste editing is the <b>edit-&gt;clear</b>
4581 operation.  If a region is highlighted or in/out points exist, the
4582 affected region is cleared by <b>edit-&gt;clear</b>.  But if the insertion
4583 point is over an edit boundary and the edits on each side of the edit
4584 boundary are the same resource, the edits are combined into one edit
4585 comprised by the resource.  The start of this one edit is the start of
4586 the first edit and the end of this one edit is the end of the second
4587 edit.  This either results in the edit expanding or shrinking.
4588 </p>
4589
4590
4591
4592
4593 <hr>
4594 <a name="TRIMMING"></a>
4595 <div class="header">
4596 <p>
4597 Previous: <a href="#CUT-AND-PASTE-EDITING" accesskey="p" rel="prev">CUT AND PASTE EDITING</a>, Up: <a href="#EDITING" accesskey="u" rel="up">EDITING</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
4598 </div>
4599 <a name="TRIMMING-1"></a>
4600 <h3 class="section">9.10 TRIMMING</h3>
4601
4602 <p>With some edits on the timeline it&rsquo;s possible to do trimming.  By
4603 trimming you shrink or grow the edit boundaries by dragging them.  In
4604 either drag and drop mode or cut and paste mode, move the cursor over
4605 an edit boundary until it changes shape.  The cursor will either be an
4606 expand left or an expand right.  If the cursor is an expand left, the
4607 dragging operation affects the beginning of the edit.  If the cursor is
4608 an expand right, the dragging operation affects the end of the edit.
4609 </p>
4610 <p>When you click on an edit boundary to start dragging, the mouse button
4611 number determines which dragging behavior is going to be followed.  3
4612 possible behaviors are bound to mouse buttons in the interface
4613 preferences. See <a href="#INTERFACE">INTERFACE</a>.
4614 </p>
4615 <p>The effect of each drag operation not only depends on the behavior
4616 button but whether the beginning or end of the edit is being dragged.
4617 When you release the mouse button, the trimming operation is performed.
4618 </p>
4619 <p>In a <b>Drag all following edits</b> operation, the beginning of the
4620 edit either cuts data from the edit if you move it forward or pastes
4621 new data from before the edit if you move it backward.  The end of the
4622 edit pastes data into the edit if you move it forward or cuts data from
4623 the end of the edit if you move it backward.  All the edits thereafter
4624 shift.  Finally, if you drag the end of the edit past the start of the
4625 edit, the edit is deleted.
4626 </p>
4627 <p>In a <b>Drag only one edit</b> operation, the behavior is the same when
4628 you drag the beginning or end of an edit.  The only difference is none
4629 of the other edits in the track shift.  Instead, anything adjacent to
4630 the current edit expands or shrinks to fill gaps left by the drag
4631 operation.
4632 </p>
4633 <p>In a <b>Drag source only</b> operation, nothing is cut or pasted.  If
4634 you move the beginning or end of the edit forward, the source reference
4635 in the edit shifts forward.  If you move the beginning or end of the
4636 edit backward, the source reference shifts backward.  Where the edit
4637 appears in the timeline remains the same but the source shifts.
4638 </p>
4639 <p>For all file formats besides still images, the extent of the trimming
4640 operation is clamped to the source file length.  Attempting to drag the
4641 start of the edit beyond the start of the source clamps it to the
4642 source start.
4643 </p>
4644 <p>In all trimming operations, all edits which start on the same position
4645 as the cursor when the drag operation begins are affected.  Unarm
4646 tracks to prevent edits from getting affected.
4647 </p>
4648
4649
4650
4651
4652
4653
4654
4655 <hr>
4656 <a name="USING-EFFECTS"></a>
4657 <div class="header">
4658 <p>
4659 Next: <a href="#SETTING-PROJECT-ATTRIBUTES" accesskey="n" rel="next">SETTING PROJECT ATTRIBUTES</a>, Previous: <a href="#EDITING" accesskey="p" rel="prev">EDITING</a>, Up: <a href="#Top" accesskey="u" rel="up">TOP</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
4660 </div>
4661 <a name="USING-EFFECTS-1"></a>
4662 <h2 class="chapter">10 USING EFFECTS</h2>
4663
4664 <p>It would be sufficient to perform all changes to the timeline using
4665 editing operations, but this isn&rsquo;t very extensible.  Certain timeline
4666 changes should produce a different effect in the output without
4667 involving a unique procedure to apply each change.  This is why we have
4668 effects.
4669 </p>
4670 <p>Effects fall into three categories, and each effect in a category is
4671 applied using the same procedure.
4672 </p>
4673
4674 <table class="menu" border="0" cellspacing="0">
4675 <tr><td align="left" valign="top">&bull; <a href="#REALTIME-EFFECTS" accesskey="1">REALTIME EFFECTS</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
4676 </td></tr>
4677 <tr><td align="left" valign="top">&bull; <a href="#RENDERED-EFFECTS" accesskey="2">RENDERED EFFECTS</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
4678 </td></tr>
4679 <tr><td align="left" valign="top">&bull; <a href="#TRANSITIONS" accesskey="3">TRANSITIONS</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
4680 </td></tr>
4681 <tr><td align="left" valign="top">&bull; <a href="#LADSPA-EFFECTS" accesskey="4">LADSPA EFFECTS</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
4682 </td></tr>
4683 <tr><td align="left" valign="top">&bull; <a href="#EFFECT-PRESETS" accesskey="5">EFFECT PRESETS</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
4684 </td></tr>
4685 </table>
4686
4687
4688
4689 <hr>
4690 <a name="REALTIME-EFFECTS"></a>
4691 <div class="header">
4692 <p>
4693 Next: <a href="#RENDERED-EFFECTS" accesskey="n" rel="next">RENDERED EFFECTS</a>, Up: <a href="#USING-EFFECTS" accesskey="u" rel="up">USING EFFECTS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
4694 </div>
4695 <a name="REALTIME-EFFECTS-1"></a>
4696 <h3 class="section">10.1 REALTIME EFFECTS</h3>
4697
4698 <p>These are layered under the track they apply to.  They process the
4699 track when the track is played back, with no permanent storage of the
4700 output except when the project is rendered.
4701 </p>
4702 <p><b>APPLYING REALTIME EFFECTS</b>
4703 </p>
4704 <p>All the realtime effects are listed in the resource window, divided
4705 into two groups: audio effects and video effects.  Audio effects should
4706 be dragged from the resource window onto audio tracks.  Video effects
4707 should be dragged onto video tracks.
4708 </p>
4709 <p>If there is data on the destination track, the effect is applied to the
4710 entire track.  If there is no data on the track the effect is deleted. 
4711 Finally, if a region of the track is selected the effect is pasted into
4712 the region, regardless of whether there is data.
4713 </p>
4714 <p>Some of the effects don&rsquo;t process data but synthesize data.  In the
4715 case of a synthesis effect, you&rsquo;ll want to select a region of the
4716 track so the dragging operation pastes it without deleting it.
4717 </p>
4718 <p>When dragging more than one effect onto a track, you&rsquo;ll see the effects
4719 layering from top to bottom, on the bottom of the track.   When the
4720 track is played back, effects are processed from top to bottom.  The
4721 output of the top effect becomes the input of the bottom effect and so
4722 on and so forth.
4723 </p>
4724 <p>In addition to dragging from the resource window, there are 2 other
4725 methods of applying them:
4726 </p>
4727 <ul>
4728 <li> <b>APPLYING FROM THE TRACK POPUP MENU:</b>
4729
4730 <p>Right click on a track and select <b>Attach effect</b> from the popup.  The attach effect
4731 dialog gives you more control than pure dragging and dropping.  For one
4732 thing, the attach effect dialog lets you attach two more types of
4733 effects: shared effects and shared tracks.  Select a plugin from the
4734 <b>Plugins</b> column and hit <b>Attach</b> under the plugins column to attach
4735 it.  The effect is the same as if the effect was dragged from the
4736 resource window.
4737 </p>
4738 </li><li> <b>APPLYING FROM THE AUDIO AND VIDEO MENUS:</b>
4739
4740 <p>Select <b>Audio-&gt;Attach effect...</b> or <b>Video-&gt;Attach effect</b> to attach
4741 a realtime effect to all the recordable tracks simultaneously.  The
4742 advantage with this is most of the time you want to attach the same
4743 effect to all the audio tracks and the other two methods require
4744 repeating the same work for every track.
4745 </p>
4746 <p>The menu interface has an option called  <b>Attach single standalone and
4747 share others</b>.  Enable this to make the first track get a standalone
4748 effect and to have the other tracks share the standalone effect.  Most
4749 of the time, you want this to be on.
4750 </p>
4751 </li></ul>
4752
4753
4754 <p>When an effect exists under a track, it most often needs to be
4755 configured.  Go to the effect and right click on it to bring up the
4756 effect popup.  In the effect popup is a <b>show</b> option.  The show
4757 option causes the GUI for the effect to appear under the cursor.  Most
4758 effects have GUI&rsquo;s but some don&rsquo;t.  If the effect doesn&rsquo;t have a GUI,
4759 nothing pops up when the <b>show</b> option is selected.  When you
4760 tweek parameters in the effect GUI, the parameters normally effect the
4761 entire duration of the effect.
4762 </p>
4763
4764 <table class="menu" border="0" cellspacing="0">
4765 <tr><td align="left" valign="top">&bull; <a href="#REALTIME-EFFECT-TYPES" accesskey="1">REALTIME EFFECT TYPES</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
4766 </td></tr>
4767 <tr><td align="left" valign="top">&bull; <a href="#EDITING-REALTIME-EFFECTS" accesskey="2">EDITING REALTIME EFFECTS</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
4768 </td></tr>
4769 </table>
4770
4771
4772
4773 <hr>
4774 <a name="REALTIME-EFFECT-TYPES"></a>
4775 <div class="header">
4776 <p>
4777 Next: <a href="#EDITING-REALTIME-EFFECTS" accesskey="n" rel="next">EDITING REALTIME EFFECTS</a>, Up: <a href="#REALTIME-EFFECTS" accesskey="u" rel="up">REALTIME EFFECTS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
4778 </div>
4779 <a name="REALTIME-EFFECT-TYPES-1"></a>
4780 <h4 class="subsection">10.1.1 REALTIME EFFECT TYPES</h4>
4781
4782 <p>The two other effect types supported by the Attach Effect dialog are
4783 recycled effects.  In order to use a recycled effect, three requiremenets
4784 must be met:
4785 </p>
4786 <ul>
4787 <li> There must be other effects in the timeline.
4788
4789 </li><li> 
4790 The other effects must be of the same type as the track you&rsquo;re
4791 attaching an effect to.  If the track is an audio track, the effects
4792 must be audio effects.  If the track is a video track, the effects must
4793 be video effects.
4794
4795 </li><li> 
4796 The insertion point or selected region must start inside the other effects.
4797
4798 </li></ul>
4799
4800 <p>In the case of a shared effect, these conditions must be true.  In the
4801 case of a shared track, there merely must be another track on the
4802 timeline of the same type as the track you&rsquo;re applying an effect to. 
4803 If you right clicked on a video track to attach an effect, there won&rsquo;t
4804 be anything in the <b>shared tracks</b> column if no other video track
4805 exists.  If you right clicked on an audio track there won&rsquo;t be anything
4806 in the shared track column if no other audio track exists.
4807 </p>
4808 <p>If shared effects or shared tracks are available, they appear in the
4809 <b>shared effects</b> and <b>shared tracks</b> columns.  The
4810 <b>attach</b> button under each column causes anything highlighted in
4811 the column to be attached under the current track.
4812 </p>
4813 <p>Shared effects and shared tracks allow very unique things to be done. 
4814 In the case of a shared effect, the shared effect is treated like a
4815 copy of the original effect except in the shared effect the GUI can&rsquo;t
4816 be brought up.  All configuration of the shared effect is determined by
4817 the GUI of the original effect and only the GUI of the original effect
4818 can be brought up.
4819 </p>
4820 <p>When a shared effect is played back, it&rsquo;s processed just like a normal
4821 effect except the configuration is copied from the original effect. 
4822 Some effects detect when they are being shared, like the reverb effects
4823 and the compressor.  These effects determine what tracks are sharing
4824 them and either mix the two tracks together or use one track to stage
4825 some value.  The reverb mixes tracks together to simulate ambience. 
4826 The compressor uses one of the sharing tracks as the trigger.
4827 </p>
4828 <p>When an original track has a <b>shared track</b> as one of its effects,
4829 the shared track itself is used as a realtime effect.  This is more
4830 commonly known as <b>bouncing tracks</b> but Cinelerra achieves the
4831 same operation by attaching shared tracks.  The fade and any effects in
4832 the shared track are applied to the original track.  Once the shared
4833 track has processed the data, the original track performs any effects
4834 which come below the shared track and then composites it on the output.
4835 </p>
4836 <p>In addition, once the shared track has processed the output of the
4837 original track like a realtime effect, the shared track mixes itself
4838 into the output with it&rsquo;s settings for pan, mode, and projector.  Thus,
4839 two tracks are mixing the same data on the output.  Most of the time
4840 you don&rsquo;t want the shared track to mix the same data as the original
4841 track on the output.  You want it to stop right before the mixing stage
4842 and give the data back to the original track.  Do this by enabling the
4843 <img src="mutepatch_up.png" alt="mutepatch_up"> mute toggle next to each track for whom you don&rsquo;t
4844 want to mix on the output.
4845 </p>
4846 <p>Suppose you were making video and you did want the shared track to
4847 composite the original track&rsquo;s data on the output a second time.  In
4848 the case of video, the video from the shared track would always appear
4849 under the video from the original track, regardless of whether it was
4850 on top of the original track.  This is because shared tracks are
4851 composited in order of their attachment.  Since it&rsquo;s part of the original
4852 track it has to be composited before the original track is composited.
4853 </p>
4854
4855
4856
4857
4858
4859
4860 <hr>
4861 <a name="EDITING-REALTIME-EFFECTS"></a>
4862 <div class="header">
4863 <p>
4864 Previous: <a href="#REALTIME-EFFECT-TYPES" accesskey="p" rel="prev">REALTIME EFFECT TYPES</a>, Up: <a href="#REALTIME-EFFECTS" accesskey="u" rel="up">REALTIME EFFECTS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
4865 </div>
4866 <a name="EDITING-REALTIME-EFFECTS-1"></a>
4867 <h4 class="subsection">10.1.2 EDITING REALTIME EFFECTS</h4>
4868
4869 <p>Many operations exist for manipulating effects once they are in the
4870 timeline.  Because mixing effects and media is such complex business,
4871 the methods used in editing effects aren&rsquo;t as concise as cutting and
4872 pasting.  Some of the editing happens by dragging in/out points, some
4873 of the editing happens through popup menus, and some of it happens by
4874 dragging effects.
4875 </p>
4876 <p>Normally when you edit tracks, the effects follow the editing
4877 decisions.  If you cut from a track, the effect shrinks.  If you drag
4878 edit in/out points, the effect changes length.  This behavior can be
4879 disabled by selecting <b>Settings-&gt;edit effects</b> in the project
4880 window.  This decouples effects from editing operations, but what if
4881 you just want to edit the effects?
4882 </p>
4883 <p>Move the timeline cursor over the effect borders until it changes to a
4884 resize left or resize right icon.  In this state, if you drag the end
4885 of the effect, it performs an edit just like dragging the end of a
4886 track does.  
4887 </p>
4888 <p>The three editing behaviors of track trimming apply to effect trimming
4889 and they are bound to the mouse buttons that you set in <b>interface
4890 preferences</b>. See <a href="#INTERFACE">INTERFACE</a>.  When you perform a trim edit on an
4891 effect, the effect boundary is moved by dragging on it.  Unlike track
4892 editing, the effect has no source length.  You can extend the end of an
4893 effect as much as desired without being limited.
4894 </p>
4895 <p>Also unlike track editing, the starting position of the drag operation
4896 doesn&rsquo;t bind the edit decision to media.  The media the effect is bound
4897 to doesn&rsquo;t follow effect edits.  Other effects; however, do follow
4898 editing decisions made on an effect.  If you drag the end of an effect
4899 which is lined up to effects on other tracks, the effects on the other
4900 tracks will be edited while the media stays the same.
4901 </p>
4902 <p>What happens if you trim the end of an effect in, leaving a lot of
4903 unaffected time near the end of the track?  When you drag an effect in
4904 from the Resource Window you can insert the effect in the portion of
4905 the row unoccupied by the trimming operation.  Realtime effects are
4906 organized into rows under the track.  Each row can have multiple
4907 effects.
4908 </p>
4909 <p>In some cases you&rsquo;ll want a trimming operation to change only one row
4910 of effects.  This can be achieved by first positioning the insertion
4911 point on the start or end of the effect.  Then press <b>shift</b> while
4912 beginning the trimming operation.  This causes the operation to change
4913 only one row of effects.
4914 </p>
4915 <p>In addition to trimming, you can move effects up or down.  Every track
4916 can have a stack of effects under it.  By moving an effect up or down
4917 you change the order in which effects are processed in the stack.  Go
4918 to an effect and right click to bring up the effect menu.  The
4919 <b>Move up</b> and <b>Move down</b> options move the effect up or down.
4920 </p>
4921 <p>When you&rsquo;re moving effects up or down, be aware that if they&rsquo;re shared
4922 as <b>shared effects</b>, any references will be pointing to a
4923 different effect after the move operation.
4924 </p>
4925 <p>Finally, there&rsquo;s dragging of effects.  Dragging effects works just like
4926 dragging edits.  You must select the <img src="arrow.png" alt="arrow"> arrow to enter drag and
4927 drop mode before dragging effects.  The effects snap to media
4928 boundaries, effect boundaries, and tracks.  Be aware if you drag a
4929 reference to a shared effect, the reference will usually point to the
4930 wrong effect afterwards.
4931 </p>
4932 <p>Right click on an effect to bring up a menu for the effect.  Select
4933 <b>attach...</b> to change the effect or change the reference if it is
4934 a shared effect.
4935 </p>
4936
4937
4938
4939
4940
4941
4942
4943 <hr>
4944 <a name="RENDERED-EFFECTS"></a>
4945 <div class="header">
4946 <p>
4947 Next: <a href="#TRANSITIONS" accesskey="n" rel="next">TRANSITIONS</a>, Previous: <a href="#REALTIME-EFFECTS" accesskey="p" rel="prev">REALTIME EFFECTS</a>, Up: <a href="#USING-EFFECTS" accesskey="u" rel="up">USING EFFECTS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
4948 </div>
4949 <a name="RENDERED-EFFECTS-1"></a>
4950 <h3 class="section">10.2 RENDERED EFFECTS</h3>
4951
4952
4953 <p>Another type of effect is performed on a section of the track and the
4954 result stored somewhere before it is played back.  The result is
4955 usually pasted into the track to replace the original data.
4956 </p>
4957 <p>In 15 years, the only effect we actually ever rendered with this feature
4958 was <b>normalize</b>.  We&rsquo;ve never rendered an effect which could be
4959 applied on the timeline, even though this feature supports rendering
4960 realtime effects.
4961 </p>
4962 <p>This feature was implemented back when computers were too slow to play
4963 back anything in realtime.  Decent sounding reverb took a long time &amp;
4964 was considered major number crunching.
4965 </p>
4966 <p>The rendered effects are not listed in the resource window but instead
4967 are accessed through the <b>Audio-&gt;Render effect</b> and
4968 <b>Video-&gt;Render effect</b> menu options.  Each of these menu options
4969 brings up a dialog for the rendered effect.  Rendered effects apply to
4970 only one type of track, either audio or video.  If no tracks of the
4971 type exist, an error pops up.
4972 </p>
4973 <p>A region of the timeline to apply the effect to must be defined before
4974 selecting <b>Render effect...</b>.  If no in/out points and no
4975 highlighted region exists, the entire region after the insertion point
4976 is treated as the affected region.  Otherwise, the region between the
4977 in/out points or the highlighted region is the affected region.
4978 </p>
4979 <p>Secondly, the tracks to apply the rendered affect to need to be
4980 <b>armed</b>.  All other tracks are ignored.
4981 </p>
4982 <p>Finally, the rendered affect processes certain track attributes when it
4983 reads its input data but not others.  Transitions in the affected track
4984 are applied.  Nudge is not and effects are not.  This allows the new
4985 data to be pasted into the existing position without changing the nudge
4986 value.
4987 </p>
4988 <p>In the render effect dialog is a list of all the realtime and all the
4989 rendered effects.  The difference here is that the realtime effects are
4990 rendered to disk and not applied under the track.  Highlight an effect
4991 in the list to designate it as the one being performed.
4992 </p>
4993 <p>Define a file to render the effect to in the <b>Select a file to
4994 render to</b> box.  The <img src="magnify.png" alt="magnify"> magnifying glass allows file
4995 selection from a list.
4996 </p>
4997 <p>Select a file format which can handle the track type.  The
4998 <img src="wrench.png" alt="wrench"> wrench allows configuration specific to the file format.
4999 </p>
5000 <p>There is also an option for creating a new file at each label.  If you
5001 have a CD rip on the timeline which you want to divide into different
5002 files, the labels would become dividing points between the files if
5003 this option were selected.  When the timeline is divided by labels, the
5004 effect is re-initialized at every label.  Normalize operations take the
5005 peak in the current file and not in the entire timeline.
5006 </p>
5007 <p>Finally there is an insertion strategy just like in the render dialog. 
5008 It should be noted that even though the effect applies only to audio or
5009 video, the insertion strategy applies to all tracks just like a
5010 clipboard operation.
5011 </p>
5012 <p>When you click <b>OK</b> in the effect dialog, it calls the GUI of the
5013 effect.  If the effect is also a realtime effect, a second GUI appears
5014 to prompt for acceptance or rejection of the current settings.  After
5015 accepting the settings, the effect is processed.
5016 </p>
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030 <hr>
5031 <a name="TRANSITIONS"></a>
5032 <div class="header">
5033 <p>
5034 Next: <a href="#LADSPA-EFFECTS" accesskey="n" rel="next">LADSPA EFFECTS</a>, Previous: <a href="#RENDERED-EFFECTS" accesskey="p" rel="prev">RENDERED EFFECTS</a>, Up: <a href="#USING-EFFECTS" accesskey="u" rel="up">USING EFFECTS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
5035 </div>
5036 <a name="TRANSITIONS-1"></a>
5037 <h3 class="section">10.3 TRANSITIONS</h3>
5038
5039 <p>When one edit ends and another edit begins, the default behaviour is to
5040 have the first edit&rsquo;s output immediately become the output of the
5041 second edit when played back.  Transitions are a way for the first
5042 edit&rsquo;s output to become the second edit&rsquo;s output with different
5043 variations.
5044 </p>
5045 <p>Cinelerra supports audio and video transitions, all of which are listed
5046 in the resource window.  Transitions may only apply to the matching
5047 track type.  Transitions under <b>audio transitions</b> can only apply
5048 to audio tracks.  Transitions under <b>video transitions</b> can only
5049 apply to video tracks.
5050 </p>
5051 <p>Load a video file and cut a section from the center so the edit point
5052 is visible on the timeline.  Go the resource window and click on the
5053 <b>Video transitions</b> folder.  Drag a transition from the transition
5054 list onto the second video edit on the timeline.  A box highlights over
5055 where the transition will appear.  Releasing it over the second edit
5056 applies the transition between the first and second edit.
5057 </p>
5058 <p>You can now scrub over the transition with the transport controls and
5059 watch the output in the <b>Compositor window</b>.  Scrubbing with the
5060 insertion point doesn&rsquo;t normally show transitions because the
5061 transition durations are usually too short.  The exact point in time
5062 when the transition takes effect isn&rsquo;t straightforward.  It starts when
5063 the second edit begins and lasts a certain amount of time into the
5064 second edit.  Therefore, the first asset needs to have enough data
5065 after the edit point to fill the transition into the second edit.
5066 </p>
5067 <p>Once the transition is in place, it can be edited similarly to an
5068 effect.  Move the pointer over the transition and right click to bring
5069 up the transition menu.  The <b>show</b> option brings up specific
5070 parameters for the transition in question if there are any.  The
5071 <b>length</b> option adjusts the length of the transition in seconds. 
5072 Once these two parameters are set, they are applied to future
5073 transitions until they are changed again.  Finally, the <b>detach</b>
5074 option removes the transition from the timeline.
5075 </p>
5076 <p>Dragging and dropping transitions from the Resource window to the
5077 Program window can be really slow and tiring.  Fortunately, once you
5078 drag a transition from the Resource window, the <b>U</b> and <b>u</b>
5079 keys will paste the same transition.  The <b>U</b> key pastes the last
5080 video transition and the <b>u</b> key pastes the last audio transition
5081 on all the recordable tracks.  If the insertion point or in point is
5082 over an edit, the beginning of the edit is covered by the transition.  
5083 </p>
5084 <p>It should be noted that when playing transitions from the timeline to a
5085 hardware accelerated video device, the hardware acceleration will
5086 usually be turned off momentarily during the transition and on after
5087 the transition in order to render the transition.  Using an
5088 unaccelerated video device for the entire timeline normally removes the
5089 disturbance.
5090 </p>
5091
5092
5093
5094
5095 <hr>
5096 <a name="LADSPA-EFFECTS"></a>
5097 <div class="header">
5098 <p>
5099 Next: <a href="#EFFECT-PRESETS" accesskey="n" rel="next">EFFECT PRESETS</a>, Previous: <a href="#TRANSITIONS" accesskey="p" rel="prev">TRANSITIONS</a>, Up: <a href="#USING-EFFECTS" accesskey="u" rel="up">USING EFFECTS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
5100 </div>
5101 <a name="LADSPA-EFFECTS-1"></a>
5102 <h3 class="section">10.4 LADSPA EFFECTS</h3>
5103
5104
5105 <p>LADSPA effects are supported in realtime and rendered mode for audio. 
5106 The LADSPA plugins you get from the internet vary in quality.  Most
5107 can&rsquo;t be tweeked in realtime very easily and work better when
5108 rendered.  Some crash and some can only be applied to one track due to
5109 a lack of reentrancy.  Although Cinelerra implements the LADSPA
5110 interface as accurately as possible, multiple tracks of realtime,
5111 simultaneous processing go beyond the majority of LADSPA users.  LADSPA
5112 effects appear in the audio folder as the hammer and screwdriver, to
5113 signify that they are Plugins for Linux Audio Developers.
5114 </p>
5115 <p>LADSPA Effects are enabled merely by setting the <b>LADSPA_PATH</b>
5116 environment variable to the location of your LADSPA plugins or putting
5117 them in the <b>/usr/lib/cinelerra</b> directory.
5118 </p>
5119
5120
5121
5122
5123 <hr>
5124 <a name="EFFECT-PRESETS"></a>
5125 <div class="header">
5126 <p>
5127 Previous: <a href="#LADSPA-EFFECTS" accesskey="p" rel="prev">LADSPA EFFECTS</a>, Up: <a href="#USING-EFFECTS" accesskey="u" rel="up">USING EFFECTS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
5128 </div>
5129 <a name="EFFECT-PRESETS-1"></a>
5130 <h3 class="section">10.5 EFFECT PRESETS</h3>
5131
5132 <p>Save and recall all the settings for an effect by using the <b>presets</b>
5133 window.  Bring up the effect context menu by right clicking on the
5134 effect on the timeline.  Go to <b>Presets...</b> to bring up the window. 
5135 Save all the settings to a preset by entering a title in <b>Preset
5136 title</b> and clicking <b>save</b>.  Recall the settings in a preset by
5137 highlighting it and clicking <b>Apply</b>.  Delete a preset by highlighting
5138 it and clicking <b>Delete</b>.
5139 </p>
5140
5141
5142
5143
5144
5145
5146 <hr>
5147 <a name="SETTING-PROJECT-ATTRIBUTES"></a>
5148 <div class="header">
5149 <p>
5150 Next: <a href="#COMPOSITING" accesskey="n" rel="next">COMPOSITING</a>, Previous: <a href="#USING-EFFECTS" accesskey="p" rel="prev">USING EFFECTS</a>, Up: <a href="#Top" accesskey="u" rel="up">TOP</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
5151 </div>
5152 <a name="SETTING-PROJECT-ATTRIBUTES-1"></a>
5153 <h2 class="chapter">11 SETTING PROJECT ATTRIBUTES</h2>
5154
5155 <p>When you play media files in Cinelerra, the media files have a certain
5156 number of tracks, a certain frame size, a certain sample size, and so
5157 on and so forth.  No matter what the media file has; however, it is
5158 still played back according to the project attributes.  If an audio
5159 file&rsquo;s samplerate is different than the project attributes, it is
5160 resampled.  If a video file&rsquo;s frame size is different than the project
5161 attributes, it is composited on a black frame, either cropped or
5162 bordered with black.
5163 </p>
5164 <p>The project attributes are adjusted in <b>Settings-&gt;Set Format</b> and in
5165 to a more limited extent in <b>File-&gt;New</b>.  When you adjust project
5166 settings in <b>file-&gt;new</b> a new timeline is created with no data. 
5167 Every timeline created from this point uses the same settings.  When
5168 you adjust settings in <b>settings-&gt;format</b>, the timeline is not
5169 recreated with no data but every timeline created from this point uses
5170 the same settings.
5171 </p>
5172 <p>In addition to the traditional settings for sample rate, frame rate,
5173 frame size, Cinelerra uses some unusual settings like <b>channel
5174 positions, color model, and aspect ratio.</b>
5175 </p>
5176
5177
5178 <table class="menu" border="0" cellspacing="0">
5179 <tr><td align="left" valign="top">&bull; <a href="#AUDIO-CHANNEL-POSITIONS" accesskey="1">AUDIO CHANNEL POSITIONS</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
5180 </td></tr>
5181 <tr><td align="left" valign="top">&bull; <a href="#COLOR-MODEL" accesskey="2">COLOR MODEL</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
5182 </td></tr>
5183 <tr><td align="left" valign="top">&bull; <a href="#ASPECT-RATIO" accesskey="3">ASPECT RATIO</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
5184 </td></tr>
5185 </table>
5186
5187
5188
5189
5190
5191 <hr>
5192 <a name="AUDIO-CHANNEL-POSITIONS"></a>
5193 <div class="header">
5194 <p>
5195 Next: <a href="#COLOR-MODEL" accesskey="n" rel="next">COLOR MODEL</a>, Up: <a href="#SETTING-PROJECT-ATTRIBUTES" accesskey="u" rel="up">SETTING PROJECT ATTRIBUTES</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
5196 </div>
5197 <a name="AUDIO-CHANNEL-POSITIONS-1"></a>
5198 <h3 class="section">11.1 AUDIO CHANNEL POSITIONS</h3>
5199
5200 <p>The currently enabled audio channels and their positions in the user
5201 interface boxes are displayed in the channel position widget.
5202 </p>
5203 <br>
5204 <br>
5205 <img src="channelpositions.png" alt="channelpositions">
5206 <br>
5207 <br>
5208
5209
5210 <p>The channels are numbered.  When rendered, the output from channel 1 is
5211 rendered to the first output track in the file or the first soundcard
5212 channel of the soundcard.  Later channels are rendered to their
5213 successively numbered output tracks.
5214 </p>
5215 <p>The audio channel locations correspond to where in the panning widgets
5216 each of the audio outputs is.  The closer the panning position is to
5217 one of the audio outputs, the more signal that speaker gets.  Click on
5218 a speaker icon and drag to change the audio channel location.
5219 </p>
5220 <p>The speakers can be in any orientation.  A different speaker
5221 arrangement is stored for every number of audio channels since normally
5222 you don&rsquo;t want the same speaker arrangement for different numbers of
5223 channels.
5224 </p>
5225 <p>Channel positions is the only setting which doesn&rsquo;t affect the output
5226 necessarily.  Click on a speaker icon and drag to change the position
5227 of a channel.  It is merely a convenience so when more than 2 channels
5228 are used, the pan controls on the timeline can distinguish between
5229 them.  It has nothing to do with the actual arrangement of speakers.
5230 </p>
5231
5232 <p>But different channels can be positioned very close together to make
5233 them have the same output.
5234 </p>
5235
5236
5237
5238 <hr>
5239 <a name="COLOR-MODEL"></a>
5240 <div class="header">
5241 <p>
5242 Next: <a href="#ASPECT-RATIO" accesskey="n" rel="next">ASPECT RATIO</a>, Previous: <a href="#AUDIO-CHANNEL-POSITIONS" accesskey="p" rel="prev">AUDIO CHANNEL POSITIONS</a>, Up: <a href="#SETTING-PROJECT-ATTRIBUTES" accesskey="u" rel="up">SETTING PROJECT ATTRIBUTES</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
5243 </div>
5244 <a name="COLOR-MODEL-1"></a>
5245 <h3 class="section">11.2 COLOR MODEL</h3>
5246
5247 <p>Color model is very important for video playback because video has the
5248 disadvantage of being very slow.  Although it isn&rsquo;t noticable, audio
5249 intermediates contain much more information than the audio on disk and
5250 the audio which is played.  Audio always uses the highest bandwidth
5251 intermediate because it&rsquo;s fast.
5252 </p>
5253 <p>Video intermediates must use the least amount of data for the required
5254 quality because it&rsquo;s slow, but video intermediates still use a higher
5255 bandwidth color model than video which is stored and video which is
5256 played.  This allows more processing to be done with less destruction
5257 of the original data.   
5258 </p>
5259 <p>The video is stored on disk in one colormodel, normally compressed
5260 using a YUV derivative.  When played back, Cinelerra decompresses it
5261 from the file format directly into the format of the output device.  If
5262 effects are processed, the decompression is into an intermediate
5263 colormodel first and the intermediate colormodel is then converted to
5264 the format of the output device.  The selection of intermediate
5265 colormodel determines how accurate and fast the effects are.
5266 </p>
5267 <p>Cinelerra colormodels are described using a certain packing order of
5268 components and a certain number of bits for each component.  The
5269 packing order is printed on the left and the bit allocation is printed
5270 on the right.
5271 </p>
5272 <ul>
5273 <li> 
5274 <b>RGB-888</b> 
5275
5276 <p>This allocates 8 bits for the R, G, and B channels and no alpha. This
5277 is normally used for uncompressed media with low dynamic range.
5278 </p>
5279 </li><li> 
5280 <b>RGBA-8888</b> 
5281
5282 <p>This allocates an alpha channel to the 8 bit RGB colormodel.  It&rsquo;s used
5283 for overlaying multiple tracks.
5284 </p>
5285 </li><li> 
5286 <b>YUV-888</b> 
5287
5288 <p>This allocates 8 bits for Y, U, and V.  This is used for low dynamic
5289 range operations in which the media is compressed in the YUV color
5290 space.  Most compressed media is in YUV and this allows it to be
5291 processed fast with the least color degradation. 
5292 </p>
5293 </li><li> 
5294 <b>YUVA-8888</b> 
5295
5296 <p>This allocates an alpha channel to the 8 bit YUV colormodel for
5297 transparency.
5298 </p>
5299 </li><li> 
5300 <b>RGB-Float</b> 
5301
5302 <p>This allocates a 32 bit float for the R, G, and B channels and no
5303 alpha.  This is used for high dynamic range processing with no
5304 transparency.
5305 </p>
5306 </li><li> 
5307 <b>RGBA-Float</b> This adds a 32 bit float for alpha to RGB-Float.  This
5308 is used for high dynamic range processing with transparency.
5309
5310 </li></ul>
5311
5312
5313
5314 <p>In order to do effects which involve alpha channels, a colormodel with
5315 an alpha channel must be selected.  These are RGBA8888, YUVA8888, and
5316 RGBA Float.  The 4 channel colormodels are notoriously slower than 3
5317 channel colormodels, with the slowest being RGBA Float.  Some effects,
5318 like fade, work around the need for alpha channels while other effects,
5319 like chromakey, require an alpha channel to do anything, so it&rsquo;s a good
5320 idea to try the effect without alpha channels to see if it works before
5321 settling on an alpha channel and slowing it down.
5322 </p>
5323 <p>The YUV colormodels are usually faster than RGB colormodels when using
5324 compressed footage.  They also destroy fewer colors than RGB
5325 colormodels.  If footage stored as JPEG or MPEG is processed many times
5326 in RGB, the colors will fade while they won&rsquo;t if processed in YUV.
5327 </p>
5328 <p>Years of working with high dynamic range footage have shown floating
5329 point RGB to be the best format for high dynamic range.  While 16 bit
5330 integers were used in the past, these were too lossy and slow for the
5331 amount of improvement.
5332 </p>
5333 <p>RGB float doesn&rsquo;t destroy information when used with YUV source
5334 footage.  It also supports brightness above 100%.  Be aware that some
5335 effects, like Histogram, still clip above 100% when in floating point.
5336 </p>
5337 <hr>
5338 <a name="ASPECT-RATIO"></a>
5339 <div class="header">
5340 <p>
5341 Previous: <a href="#COLOR-MODEL" accesskey="p" rel="prev">COLOR MODEL</a>, Up: <a href="#SETTING-PROJECT-ATTRIBUTES" accesskey="u" rel="up">SETTING PROJECT ATTRIBUTES</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
5342 </div>
5343 <a name="ASPECT-RATIO-1"></a>
5344 <h3 class="section">11.3 ASPECT RATIO</h3>
5345
5346 <p>Aspect ratio determines the shape of the video output when using the
5347 X11 video output.  The numbers in each direction can be any floating
5348 point number.  When drawn on the screen, video pixels are stretched to
5349 match the aspect ratio.
5350 </p>
5351 <p>Some file formats, like MPEG video, write the project aspect ratio to
5352 the file.
5353 </p>
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363 <hr>
5364 <a name="COMPOSITING"></a>
5365 <div class="header">
5366 <p>
5367 Next: <a href="#KEYFRAMES" accesskey="n" rel="next">KEYFRAMES</a>, Previous: <a href="#SETTING-PROJECT-ATTRIBUTES" accesskey="p" rel="prev">SETTING PROJECT ATTRIBUTES</a>, Up: <a href="#Top" accesskey="u" rel="up">TOP</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
5368 </div>
5369 <a name="COMPOSITING-1"></a>
5370 <h2 class="chapter">12 COMPOSITING</h2>
5371
5372
5373 <p>A large amount of Cinelerra&rsquo;s binary size is directed towards
5374 compositing.  When you remove the letterboxing from a widescreen show,
5375 you&rsquo;re compositing.  Changing the resolution of a show, making a split
5376 screen, and fading in and out among other things are all compositing
5377 operations in Cinelerra.  Cinelerra detects when it&rsquo;s in a compositing
5378 operation and plays back through the compositing engine only then. 
5379 Otherwise, it uses the fastest decoder available in the hardware.
5380 </p>
5381 <p>Compositing operations are done on the timeline and in the Compositor
5382 window.  Shortcuts exist in the Resource window for changing some
5383 compositing attributes.  Once some video files are on the timeline, the
5384 compositor window is a good place to try compositing.
5385 </p>
5386
5387
5388 <table class="menu" border="0" cellspacing="0">
5389 <tr><td align="left" valign="top">&bull; <a href="#THE-CAMERA-AND-PROJECTOR" accesskey="1">THE CAMERA AND PROJECTOR</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
5390 </td></tr>
5391 <tr><td align="left" valign="top">&bull; <a href="#MASKS" accesskey="2">MASKS</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
5392 </td></tr>
5393 <tr><td align="left" valign="top">&bull; <a href="#CROPPING" accesskey="3">CROPPING</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
5394 </td></tr>
5395 <tr><td align="left" valign="top">&bull; <a href="#SAFE-REGIONS" accesskey="4">SAFE REGIONS</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
5396 </td></tr>
5397 <tr><td align="left" valign="top">&bull; <a href="#OVERLAY-MODES" accesskey="5">OVERLAY MODES</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
5398 </td></tr>
5399 <tr><td align="left" valign="top">&bull; <a href="#TRACK-AND-OUTPUT-SIZES" accesskey="6">TRACK AND OUTPUT SIZES</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
5400 </td></tr>
5401 </table>
5402
5403
5404
5405 <hr>
5406 <a name="THE-CAMERA-AND-PROJECTOR"></a>
5407 <div class="header">
5408 <p>
5409 Next: <a href="#MASKS" accesskey="n" rel="next">MASKS</a>, Up: <a href="#COMPOSITING" accesskey="u" rel="up">COMPOSITING</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
5410 </div>
5411 <a name="THE-CAMERA-AND-PROJECTOR-1"></a>
5412 <h3 class="section">12.1 THE CAMERA AND PROJECTOR</h3>
5413
5414 <p>In the compositor window, the most important functions are the
5415 <img src="camera.png" alt="camera"> camera button and the <img src="projector.png" alt="projector"> projector
5416 button.  These control operation of the camera and projector.  Inside
5417 Cinelerra&rsquo;s compositing pipeline, the camera determines where in the
5418 source video the temporary is copied from.  The projector determines
5419 where in the output the temporary is copied to.  The temporary is a
5420 frame of video in Cinelerra&rsquo;s memory where all graphics processing is
5421 done.  Each track has a different temporary which is defined by the
5422 track size.  By resizing the tracks you can create splitscreens, pans,
5423 and zooms.
5424 </p>
5425 <br>
5426 <br>
5427 <img src="compositing_pipeline.png" alt="compositing_pipeline">
5428 <br>
5429 <br>
5430 <p><b>Visual representation of the compositing pipeline</b>.
5431 </p>
5432 <p>When editing the camera and projector in the compositing window, the
5433 first track with <b>record</b> enabled is the track affected.  Even if
5434 the track is completely transparent, it&rsquo;s still the affected track.  If
5435 multiple video tracks exist, the easiest way to select one track for
5436 editing is to <b>shift-click</b> on the record icon of the track.  This
5437 solos the track.
5438 </p>
5439 <p>When the <b>projector</b> button is enabled in the compositor window,
5440 you&rsquo;re in projector editing mode.  A guide box appears in the video
5441 window.  Dragging anywhere in the video window causes the guide box to
5442 move, hopefully along with the video.  <b>shift-dragging</b> anywhere
5443 in the video window causes the guide box to shrink and grow along with
5444 the video.  Once you&rsquo;ve positioned the video with the projector, you&rsquo;re
5445 ready to master the camera.
5446 </p>
5447 <p>Select the <img src="camera.png" alt="camera"> camera button to enable camera editing mode. 
5448 In this mode, the guide box shows where the camera position is in
5449 relation to past and future camera positions but not where it is in
5450 relation to the source video.  Dragging the camera box in the
5451 compositor window doesn&rsquo;t move the box but instead moves the location
5452 of the video inside the box.
5453 </p>
5454 <p>For example, when you drag the camera left, the video moves right. 
5455 When you drag the camera up, the video moves down.  When you shift-drag
5456 the camera, the effect is the same as if you zoomed in or out of the
5457 source.  The intention of the camera is to produce still photo panning,
5458 while the intention of the projector is to composite several sources in
5459 the same scene.
5460 </p>
5461 <p>In the compositing window, there is a popup menu of options for the
5462 camera and projector.  Right click over the video portion of the
5463 compositing window to bring up the menu.
5464 </p>
5465 <ul>
5466 <li> Reset Camera causes the camera to return to the center position.
5467
5468 </li><li> Reset Projector causes the projector to return to the center.
5469
5470 </li></ul>
5471
5472
5473 <p>The camera and projector have shortcut operations neither in the popup
5474 menu or represented in video overlays.  These are accessed in the
5475 <b>Tool window</b>.  Most operations in the Compositor window have a
5476 tool window which is enabled by activating the <img src="toolwindow.png" alt="toolwindow">
5477 question mark.
5478 </p>
5479 <p>In the case of the camera and projector, the tool window shows x, y,
5480 and z coordinates.  By either tumbling or entering text directly, the
5481 camera and projector can be precisely positioned.  9 justification
5482 types are also defined for easy access.  A popular justification
5483 operation is upper left projection after image reduction.  This is used
5484 when reducing the size of video with aspect ratio adjustment.
5485 </p>
5486 <p>The translation effect allows simultaneous aspect ratio conversion and
5487 reduction but is easier to use if the reduced video is put in the upper
5488 left of the temporary instead of in the center.  The track size is set
5489 to the original size of the video and the camera is centered.  The
5490 output size is set to the reduced size of the video.  Without any
5491 effects, this produces just the cropped center portion of the video in
5492 the output.
5493 </p>
5494 <p>The translation effect is dropped onto the video track.  The input
5495 dimensions of the translation effect are set to the original size and
5496 the output dimensions are set to the reduced size.  To put the reduced
5497 video in the center section that the projector shows would require
5498 offsetting <b>out x and out y</b> by a complicated calculation. 
5499 Instead, we leave <b>out x and out y</b> at 0 and use the projector&rsquo;s
5500 tool window.
5501 </p>
5502 <p>Merely by selecting <img src="left_justify.png" alt="left_justify"> left justify and
5503 <img src="top_justify.png" alt="top_justify"> top justify, the projector displays the reduced
5504 image from the top left corner of the temporary in the center of the
5505 output.
5506 </p>
5507
5508
5509
5510
5511
5512 <hr>
5513 <a name="MASKS"></a>
5514 <div class="header">
5515 <p>
5516 Next: <a href="#CROPPING" accesskey="n" rel="next">CROPPING</a>, Previous: <a href="#THE-CAMERA-AND-PROJECTOR" accesskey="p" rel="prev">THE CAMERA AND PROJECTOR</a>, Up: <a href="#COMPOSITING" accesskey="u" rel="up">COMPOSITING</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
5517 </div>
5518 <a name="MASKS-1"></a>
5519 <h3 class="section">12.2 MASKS</h3>
5520
5521 <p>Masks select a region of the video for either displaying or hiding. 
5522 Masks are also used in conjunction with another effect to isolate the
5523 effect to a certain region of the frame.  A copy of one video track may
5524 be delayed slightly and unmasked in locations where the one copy has
5525 interference but the other copy doesn&rsquo;t.  Color correction may be
5526 needed in one section of a frame but not another.  A mask can be
5527 applied to just a section of the color corrected track while the
5528 vanilla track shows through.  Removal of boom microphones, airplanes,
5529 and housewives are other mask uses.
5530 </p>
5531 <p>The order of the compositing pipeline affects what can be done with
5532 masks.  Mainly, masks are performed on the temporary after effects and
5533 before the projector.  This means multiple tracks can be bounced to a
5534 masked track and projected with the same mask.
5535 </p>
5536 <p>Our compositing pipeline graph now has a masking stage.  There are 8
5537 possible masks per track.  Each mask is defined separately, although
5538 they each perform the same operation, whether it&rsquo;s addition or
5539 subtraction.
5540 </p>
5541 <br>
5542 <br>
5543 <img src="compositing_pipeline2.png" alt="compositing_pipeline2">
5544 <br>
5545 <br>
5546 <p><b>Compositing pipeline with masks</b>
5547 </p>
5548 <p>To define a mask, go into the Compositor window and enable the
5549 <img src="mask.png" alt="mask"> <b>mask</b> toggle.  Now go over the video and
5550 click-drag.  Click-drag again in another part of the image to create
5551 each new point of the mask.  While it isn&rsquo;t the conventional bezier
5552 curve behavior, this masking interface performs in realtime what the
5553 effect of the mask is going to be.  Creating each point of the mask
5554 expands a rubber band curve.  
5555 </p>
5556 <p>Once points are defined, they can be moved by <b>ctrl-dragging</b> in
5557 the vicinity of the corner.  This; however, doesn&rsquo;t smooth out the
5558 curve.  The in-out points of the bezier curve are accessed by
5559 <b>shift-dragging</b> in the vicinity of the corner.  Then
5560 <b>shift-dragging</b> near the in or out point causes the point to
5561 move.
5562 </p>
5563 <p>Finally, once you have a mask, the mask can be translated in one piece
5564 by <b>alt-dragging</b> the mask.  Mask editing in Cinelerra is
5565 identical to how The Gimp edits masks except in this case the effect of
5566 the mask is always on.
5567 </p>
5568 <p>The masks have many more parameters which couldn&rsquo;t be represented with
5569 video overlays.  These are represented in the tool window for masks. 
5570 Selecting the <img src="toolwindow.png" alt="toolwindow"> question mark when the <img src="mask.png" alt="mask">
5571 mask toggle is highlighted brings up the mask options.
5572 </p>
5573 <p>The <b>mode</b> of the mask determines if the mask removes data or
5574 makes data visible.  If the mode is subtractive, the mask causes video
5575 to disappear.  If the mode is additive, the mask causes video to appear
5576 and everything outside the mask to disappear.
5577 </p>
5578 <p>The <b>value</b> of the mask determines how extreme the addition or
5579 subtraction is.  In the subtractive mode, higher values subtract more
5580 alpha.  In the additive mode, higher values make the region in the mask
5581 brighter while the region outside the mask is always hidden.
5582 </p>
5583 <p>The mask number determines which one of the 8 possible masks we&rsquo;re
5584 editing.  Each track has 8 possible masks.  When you click-drag in the
5585 compositor window, you&rsquo;re only editing one of the masks.  Change the
5586 value of <b>mask number</b> to cause another mask to be edited.  The
5587 previous mask is still active but only the curve overlay for the
5588 currently selected mask is visible.
5589 </p>
5590 <p>When multiple masks are used, their effects are ORed together.  Every
5591 mask in a single track uses the same value and mode.
5592 </p>
5593 <p>The edges of a mask are hard by default but this rarely is desired. 
5594 The <b>feather</b> parameter determines how many pixels to feather the
5595 mask.  This creates softer edges but takes longer to render.
5596 </p>
5597 <p>Finally, there are parameters which affect one point on the current
5598 mask instead of the whole mask.  These are <b>Delete, x, y</b>.  The
5599 active point is defined as the last point dragged in the compositor
5600 window.  Any point can be activated merely by <b>ctrl-clicking</b> near
5601 it without moving the pointer.  Once a point is activated,
5602 <b>Delete</b> deletes it and <b>x, y</b> allow repositioning by numeric
5603 entry.
5604 </p>
5605
5606
5607
5608 <hr>
5609 <a name="CROPPING"></a>
5610 <div class="header">
5611 <p>
5612 Next: <a href="#SAFE-REGIONS" accesskey="n" rel="next">SAFE REGIONS</a>, Previous: <a href="#MASKS" accesskey="p" rel="prev">MASKS</a>, Up: <a href="#COMPOSITING" accesskey="u" rel="up">COMPOSITING</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
5613 </div>
5614 <a name="CROPPING-1"></a>
5615 <h3 class="section">12.3 CROPPING</h3>
5616
5617
5618
5619 <p>Cropping changes the value of the output dimensions and the projector
5620 to reduce the visible picture area.  Enable the <img src="crop.png" alt="crop"> crop
5621 toggle and the <img src="toolwindow.png" alt="toolwindow"> tool window in the <b>compositing
5622 window</b> to perform cropping.
5623 </p>
5624 <p>This draws a rectangle over the video.  Click-drag anywhere in the
5625 video to start a new rectangle.  Click-drag over any corner of the
5626 rectangle to reposition the corner.
5627 </p>
5628 <p>Alt-click in the cropping rectangle to translate the rectangle to any
5629 position without resizing it.
5630 </p>
5631 <p>The tool window allows text entry of the coordinates and executes the
5632 cropping operation.  When the rectangle is positioned, hit the <b>do
5633 it</b> button in the tool window to execute the cropping operation.
5634 </p>
5635
5636
5637
5638
5639
5640 <hr>
5641 <a name="SAFE-REGIONS"></a>
5642 <div class="header">
5643 <p>
5644 Next: <a href="#OVERLAY-MODES" accesskey="n" rel="next">OVERLAY MODES</a>, Previous: <a href="#CROPPING" accesskey="p" rel="prev">CROPPING</a>, Up: <a href="#COMPOSITING" accesskey="u" rel="up">COMPOSITING</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
5645 </div>
5646 <a name="SAFE-REGIONS-1"></a>
5647 <h3 class="section">12.4 SAFE REGIONS</h3>
5648
5649 <p>On consumer displays the borders of the image are cut off and within
5650 the cutoff point is a region which isn&rsquo;t always square like it is in
5651 the compositor window.  The borders are intended for scratch room and
5652 vertical blanking data.  You can show where these borders are by
5653 enabling the <img src="titlesafe.png" alt="titlesafe"> safe regions toggle.  Keep titles inside
5654 the inner rectangle and keep action inside the outer rectangle.
5655 </p>
5656
5657
5658
5659
5660
5661
5662
5663 <hr>
5664 <a name="OVERLAY-MODES"></a>
5665 <div class="header">
5666 <p>
5667 Next: <a href="#TRACK-AND-OUTPUT-SIZES" accesskey="n" rel="next">TRACK AND OUTPUT SIZES</a>, Previous: <a href="#SAFE-REGIONS" accesskey="p" rel="prev">SAFE REGIONS</a>, Up: <a href="#COMPOSITING" accesskey="u" rel="up">COMPOSITING</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
5668 </div>
5669 <a name="OVERLAY-MODES-1"></a>
5670 <h3 class="section">12.5 OVERLAY MODES</h3>
5671
5672 <p>Every video track has an overlay mode, accessible by expanding the
5673 track.  The overlay mode is a pulldown menu on the left under the
5674 fader.  When collapsed, it displays an icon representing the current
5675 overlay mode.
5676 </p>
5677 <p>Select the <img src="expandpatch_checked.png" alt="expandpatch_checked"> expand track toggle to view all
5678 the options for a video track if you can&rsquo;t see the overlay mode.  The
5679 overlay mode of video tracks is <b>normal</b> by default.  Select other
5680 modes by clicking the overlay button and selecting an item from the
5681 popup menu.
5682 </p>
5683 <p>Overlay modes are processed inside the projector stage of compositing. 
5684 The different modes are summarized below.
5685 </p>
5686 <ul>
5687 <li> 
5688 <b>Normal</b> uses a traditional Porter-Diff equation to blend tracks with
5689 alpha.  When no alpha exists in the project color model, the new track
5690 always replaces the output.
5691
5692 </li><li> 
5693 <b>Addition</b>  In this mode, whatever is in the output is added to the
5694 current track.  The result is blended based on the current track&rsquo;s
5695 alpha onto the output.
5696
5697 </li><li> 
5698 <b>Subtraction</b> In this mode, the current track is subtracted from the
5699 output and the result is alpha blended onto the output.
5700
5701 </li><li> 
5702 <b>Multiply</b> is the most useful operation.  The current track is multiplied
5703 by the output and the result blended onto the output.  Usually a black
5704 and white image with no alpha channel or a white title on a black image
5705 is used as the current track.  With the multiply operation, only the
5706 output portions under the white area show.
5707
5708 </li><li> 
5709 <b>Divide</b> divides the current track by the output and the result is
5710 blended into the output.  It usually results in overloaded levels.
5711
5712 </li><li> 
5713 <b>Replace</b> does no blending and overwrites the output with the current
5714 track.
5715
5716 </li></ul>
5717
5718
5719
5720
5721
5722 <hr>
5723 <a name="TRACK-AND-OUTPUT-SIZES"></a>
5724 <div class="header">
5725 <p>
5726 Previous: <a href="#OVERLAY-MODES" accesskey="p" rel="prev">OVERLAY MODES</a>, Up: <a href="#COMPOSITING" accesskey="u" rel="up">COMPOSITING</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
5727 </div>
5728 <a name="TRACK-AND-OUTPUT-SIZES-1"></a>
5729 <h3 class="section">12.6 TRACK AND OUTPUT SIZES</h3>
5730
5731 <p>The size of the temporary and the size of the output in our compositing
5732 pipeline are independant and variable.  This fits into everything
5733 covered so far.  The camera&rsquo;s viewport is the temporary size.  Effects
5734 are processed in the temporary and are affected by the temporary size. 
5735 Projectors are rendered to the output and are affected by the output
5736 size.  If the temporary is smaller than the output, the temporary is
5737 bordered by blank regions in the output.  If the temporary is bigger
5738 than the output, the temporary is cropped.
5739 </p>
5740 <p>The temporary size is defined as the track size.  Each track has a
5741 different size.  Right click on a track to bring up the track&rsquo;s menu. 
5742 Select <b>Resize Track</b> to resize the track to any arbitrary size. 
5743 Alternatively you can select <b>Match output size</b> to make the track
5744 the same size as the output.
5745 </p>
5746 <p>The output size is set in either <b>New</b> when creating a new project
5747 or <b>Settings-&gt;Format</b>.  In the Resource window there is another
5748 way to change the output size.  Right click on a video asset and select
5749 <b>Match project size</b> to conform the output to the asset.  When new
5750 tracks are created, the track size always conforms to the output size
5751 specified by these methods.
5752 </p>
5753
5754
5755
5756
5757
5758 <hr>
5759 <a name="KEYFRAMES"></a>
5760 <div class="header">
5761 <p>
5762 Next: <a href="#CAPTURING-MEDIA" accesskey="n" rel="next">CAPTURING MEDIA</a>, Previous: <a href="#COMPOSITING" accesskey="p" rel="prev">COMPOSITING</a>, Up: <a href="#Top" accesskey="u" rel="up">TOP</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
5763 </div>
5764 <a name="KEYFRAMES-1"></a>
5765 <h2 class="chapter">13 KEYFRAMES</h2>
5766
5767
5768 <p>When you change the fade, camera, projector, or other parameters for a
5769 track, they stay by default the same for the entire durection of the
5770 timeline.   Setting static parameters isn&rsquo;t very useful sometimes. 
5771 Normally you need to move the camera around over time or change mask
5772 positions.  Masks need to follow objects.  We create dymanic changes by
5773 defining keyframes.  A keyframe is a certain point in time when the
5774 settings for one operation change.  In Cinelerra, there are keyframes
5775 for almost every compositing parameter and effect parameter.
5776 </p>
5777 <p>Whenever you adjust any parameter, the value is stored in a keyframe. 
5778 If the value is stored in a keyframe, why doesn&rsquo;t it always change? 
5779 The keyframe it is stored in by default is known as the <b>default
5780 keyframe</b>.  The default keyframe applies to the entire duration if no
5781 other keyframes are present.  The default keyframe is not drawn
5782 anywhere because it always exists.  The only way change occurs over
5783 time is if non-default keyframes are created.
5784 </p>
5785 <p>Display keyframes for any parameter by using the <b>view</b> menu.  A
5786 faster way to toggle multiple keyframe types is to bring up
5787 <b>window-&gt;overlays</b>.  This window allows toggling of every parameter
5788 in the view menu.  When keyframes are selected, they are drawn on the
5789 timeline over the tracks they apply to.
5790 </p>
5791 <p>Keyframes come in many forms: curves, toggles, modes, and so on. 
5792 How to handle the different types of keyframes is described here.
5793 </p>
5794 <table class="menu" border="0" cellspacing="0">
5795 <tr><td align="left" valign="top">&bull; <a href="#CURVE-KEYFRAMES" accesskey="1">CURVE KEYFRAMES</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Using rubber band curves
5796 </td></tr>
5797 <tr><td align="left" valign="top">&bull; <a href="#CHANGING-BEZIER-_0026-LINEAR-MODE" accesskey="2">CHANGING BEZIER &amp; LINEAR MODE</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Change curves from linear to curved
5798 </td></tr>
5799 <tr><td align="left" valign="top">&bull; <a href="#SNAPPING-TO-NEIGHBOR-KEYFRAMES" accesskey="3">SNAPPING TO NEIGHBOR KEYFRAMES</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
5800 </td></tr>
5801 <tr><td align="left" valign="top">&bull; <a href="#NAVIGATING-CURVE-KEYFRAMES" accesskey="4">NAVIGATING CURVE KEYFRAMES</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
5802 </td></tr>
5803 <tr><td align="left" valign="top">&bull; <a href="#TOGGLE-KEYFRAMES" accesskey="5">TOGGLE KEYFRAMES</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
5804 </td></tr>
5805 <tr><td align="left" valign="top">&bull; <a href="#AUTOMATIC-KEYFRAMES" accesskey="6">AUTOMATIC KEYFRAMES</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
5806 </td></tr>
5807 <tr><td align="left" valign="top">&bull; <a href="#COMPOSITOR-KEYFRAMES" accesskey="7">COMPOSITOR KEYFRAMES</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
5808 </td></tr>
5809 <tr><td align="left" valign="top">&bull; <a href="#EDITING-KEYFRAMES" accesskey="8">EDITING KEYFRAMES</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Moving keyframes around
5810 </td></tr>
5811 <tr><td align="left" valign="top">&bull; <a href="#KEYFRAME-SPANNING" accesskey="9">KEYFRAME SPANNING</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">How to change 1 parameter in many keyframes simultaneously
5812 </td></tr>
5813 </table>
5814
5815
5816
5817 <hr>
5818 <a name="CURVE-KEYFRAMES"></a>
5819 <div class="header">
5820 <p>
5821 Next: <a href="#CHANGING-BEZIER-_0026-LINEAR-MODE" accesskey="n" rel="next">CHANGING BEZIER &amp; LINEAR MODE</a>, Up: <a href="#KEYFRAMES" accesskey="u" rel="up">KEYFRAMES</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
5822 </div>
5823 <a name="CURVE-KEYFRAMES-1"></a>
5824 <h3 class="section">13.1 CURVE KEYFRAMES</h3>
5825
5826 <p>Many parameters are stored in rubber band curves.  Go to <b>view-&gt;fade</b> or
5827 <b>view-&gt;...zoom</b> to show curves on the timeline for those parameters. 
5828 In either arrow editing mode or i-beam editing mode, move the cursor
5829 over the curves in the timeline until it changes shape.  Then merely by
5830 clicking and dragging on the curve you can create a keyframe at the
5831 position.
5832 </p>
5833 <p>After the keyframe is created, click drag on it again to reposition
5834 it.  When you click-drag a second keyframe on the curve, it creates a
5835 smooth ramp.
5836 </p>
5837 <hr>
5838 <a name="CHANGING-BEZIER-_0026-LINEAR-MODE"></a>
5839 <div class="header">
5840 <p>
5841 Next: <a href="#SNAPPING-TO-NEIGHBOR-KEYFRAMES" accesskey="n" rel="next">SNAPPING TO NEIGHBOR KEYFRAMES</a>, Previous: <a href="#CURVE-KEYFRAMES" accesskey="p" rel="prev">CURVE KEYFRAMES</a>, Up: <a href="#KEYFRAMES" accesskey="u" rel="up">KEYFRAMES</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
5842 </div>
5843 <a name="CHANGING-BEZIER-_0026-LINEAR-MODE-1"></a>
5844 <h3 class="section">13.2 CHANGING BEZIER &amp; LINEAR MODE</h3>
5845
5846 <p>The curve keyframes have bezier and linear modes.  In linear mode, the
5847 keyframe looks like a square and the lines emanating from it are
5848 straight.  In bezier mode, the keyframe is rounded and has 2 control
5849 lines in addition to the rubber band curve lines.
5850 </p>
5851 <p>These are keyframes in linear mode.
5852 </p>
5853 <img src="linear.png" alt="linear">
5854
5855 <p>These are keyframes in bezier mode.
5856 </p>
5857 <img src="bezier.png" alt="bezier">
5858
5859 <p>Change the mode of an existing keyframe by right clicking on it to bring
5860 up the context menu and selecting <b>make linear</b> or <b>make bezier</b>.
5861 </p>
5862
5863 <p>Change the mode of several keyframes by highlighting the entire region of the
5864 timeline and selecting <b>Keyframes-&gt;change to linear</b> or
5865 <b>Keyframes-&gt;change to bezier</b>.
5866 </p>
5867 <p>When keyframes are created, they can be linear or bezier by default. 
5868 Change the default mode by checking or unchecking <b>Keyframes-&gt;create
5869 bezier</b>.
5870 </p>
5871
5872 <p>For bezier keyframes, <b>ctrl-dragging</b> on the control lines of a
5873 keyframe changes the value of either the input control or the output
5874 control.  Without <b>ctrl</b> the cursor only affects the central
5875 keyframe.  This affects the sharpness of the curve.  The input and
5876 output controls can only be moved vertically.
5877 </p>
5878 <p>If the control lines aren&rsquo;t visible, <b>ctrl-drag</b> on the left or right
5879 of the keyframe.
5880 </p>
5881 <hr>
5882 <a name="SNAPPING-TO-NEIGHBOR-KEYFRAMES"></a>
5883 <div class="header">
5884 <p>
5885 Next: <a href="#NAVIGATING-CURVE-KEYFRAMES" accesskey="n" rel="next">NAVIGATING CURVE KEYFRAMES</a>, Previous: <a href="#CHANGING-BEZIER-_0026-LINEAR-MODE" accesskey="p" rel="prev">CHANGING BEZIER &amp; LINEAR MODE</a>, Up: <a href="#KEYFRAMES" accesskey="u" rel="up">KEYFRAMES</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
5886 </div>
5887 <a name="SNAPPING-TO-NEIGHBOR-KEYFRAMES-1"></a>
5888 <h3 class="section">13.3 SNAPPING TO NEIGHBOR KEYFRAMES</h3>
5889
5890 <p><b>shift-drag</b> on a curve keyframe to make the keyframe snap to the
5891 value of either the next or previous keyframe, depending on which
5892 exists.  This lets you set a constant curve value without having to copy
5893 the next or previous keyframe.
5894 </p>
5895
5896
5897 <hr>
5898 <a name="NAVIGATING-CURVE-KEYFRAMES"></a>
5899 <div class="header">
5900 <p>
5901 Next: <a href="#TOGGLE-KEYFRAMES" accesskey="n" rel="next">TOGGLE KEYFRAMES</a>, Previous: <a href="#SNAPPING-TO-NEIGHBOR-KEYFRAMES" accesskey="p" rel="prev">SNAPPING TO NEIGHBOR KEYFRAMES</a>, Up: <a href="#KEYFRAMES" accesskey="u" rel="up">KEYFRAMES</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
5902 </div>
5903 <a name="NAVIGATING-CURVE-KEYFRAMES-1"></a>
5904 <h3 class="section">13.4 NAVIGATING CURVE KEYFRAMES</h3>
5905
5906 <p>There isn&rsquo;t much room on the timeline for a wide range of curve
5907 values.  You need to zoom the curves in and out vertically to have any
5908 variability.  This is done by 2 tools: the automation fit button
5909 <img src="fitautos.png" alt="fitautos"> and automation zoom menu <img src="autozoom.png" alt="autozoom">.
5910 </p>
5911 <p>The automation fit button scales and offsets the vertical range so the
5912 selected curve area appears in the timeline.  If a region of the
5913 timeline is highlighted by the cursor, only that region is scaled. 
5914 In/out points don&rsquo;t affect the zoomed region.  <b>Alt-f</b> also performs
5915 automation fitting.
5916 </p>
5917 <p>The automation zoom menu manually changes the vertical scaling of the
5918 curves in multiples of 2.  Click on its tumbler to change the zoom. 
5919 <b>Alt-Up and Alt-Dn</b> change the automation zoom from the keyboard.
5920 </p>
5921
5922 <hr>
5923 <a name="TOGGLE-KEYFRAMES"></a>
5924 <div class="header">
5925 <p>
5926 Next: <a href="#AUTOMATIC-KEYFRAMES" accesskey="n" rel="next">AUTOMATIC KEYFRAMES</a>, Previous: <a href="#NAVIGATING-CURVE-KEYFRAMES" accesskey="p" rel="prev">NAVIGATING CURVE KEYFRAMES</a>, Up: <a href="#KEYFRAMES" accesskey="u" rel="up">KEYFRAMES</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
5927 </div>
5928 <a name="TOGGLE-KEYFRAMES-1"></a>
5929 <h3 class="section">13.5 TOGGLE KEYFRAMES</h3>
5930
5931 <p>Mute is the only toggle keyframe.  Mute keyframes determine where the
5932 track is processed but not rendered to the output.  Click-drag on these
5933 curves to create a keyframe.  Unlike curves, the toggle keyframe has
5934 only two values: on or off.  Ctrl and shift do nothing on toggle
5935 keyframes.
5936 </p>
5937
5938
5939
5940
5941
5942 <hr>
5943 <a name="AUTOMATIC-KEYFRAMES"></a>
5944 <div class="header">
5945 <p>
5946 Next: <a href="#COMPOSITOR-KEYFRAMES" accesskey="n" rel="next">COMPOSITOR KEYFRAMES</a>, Previous: <a href="#TOGGLE-KEYFRAMES" accesskey="p" rel="prev">TOGGLE KEYFRAMES</a>, Up: <a href="#KEYFRAMES" accesskey="u" rel="up">KEYFRAMES</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
5947 </div>
5948 <a name="AUTOMATIC-KEYFRAMES-1"></a>
5949 <h3 class="section">13.6 AUTOMATIC KEYFRAMES</h3>
5950
5951 <p>You may have noticed when a few fade curves are set up, moving the
5952 insertion point around the curves causes the faders to reflect the
5953 curve value under the insertion point.  This isn&rsquo;t just to look cool. 
5954 The faders themselves can set keyframes in automatic keyframe mode. 
5955 Automatic keyframe mode is usually more useful than dragging curves.
5956 </p>
5957 <p>Enable automatic keyframe mode by enabling the automatic keyframe
5958 toggle <img src="autokeyframe.png" alt="autokeyframe">.  In automatic keyframe mode, every time
5959 you tweek a keyframeable parameter it creates a keyframe on the
5960 timeline.  Since automatic keyframes affect many parameters, it&rsquo;s best
5961 enabled just before you need a keyframe and disabled immediately
5962 thereafter.
5963 </p>
5964 <p>It&rsquo;s useful to go into the <b>View</b> menu and make the desired
5965 parameter visible before performing a change.  The location where the
5966 automatic keyframe is generated is under the insertion point.  If the
5967 timeline is playing back during a tweek, several automatic keyframes
5968 will be generated as you change the parameter.
5969 </p>
5970 <p>When automatic keyframe mode is disabled, a similarly strange thing
5971 happens.  Adjusting a parameter adjusts the keyframe immediately
5972 preceeding the insertion point.  If two fade keyframes exist and the
5973 insertion point is between them, changing the fader changes the first
5974 keyframe.
5975 </p>
5976 <p>There are many parameters which can only be keyframed in automatic
5977 keyframe mode.  These are parameters for which curves would take up too
5978 much space on the track or which can&rsquo;t be represented easily by a
5979 curve.
5980 </p>
5981 <p>Effects are only keyframable in automatic mode because of the number of
5982 parameters in each individual effect.  
5983 </p>
5984 <p>Camera and projector translation can only be keyframed in automatic
5985 keyframe mode while camera and projector zoom can be keyframed with
5986 curves.  It is here that we conclude the discussion of compositing,
5987 since compositing is highly dependant on the ability to change over
5988 time.
5989 </p>
5990
5991
5992 <hr>
5993 <a name="COMPOSITOR-KEYFRAMES"></a>
5994 <div class="header">
5995 <p>
5996 Next: <a href="#EDITING-KEYFRAMES" accesskey="n" rel="next">EDITING KEYFRAMES</a>, Previous: <a href="#AUTOMATIC-KEYFRAMES" accesskey="p" rel="prev">AUTOMATIC KEYFRAMES</a>, Up: <a href="#KEYFRAMES" accesskey="u" rel="up">KEYFRAMES</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
5997 </div>
5998 <a name="COMPOSITOR-KEYFRAMES-1"></a>
5999 <h3 class="section">13.7 COMPOSITOR KEYFRAMES</h3>
6000
6001 <p>Camera and projector translation is represented by two parameters: x
6002 and y.  Therefore it is cumbersome to adjust with curves.  Cinelerra
6003 solves this problem by relying on automatic keyframes.  With a video
6004 track loaded, move the insertion point to the beginning of the track
6005 and enable automatic keyframe mode.
6006 </p>
6007 <p>Move the projector slightly in the compositor window to create a
6008 keyframe.  Then go forward several seconds.  Move the projector a long
6009 distance to create another keyframe and emphasize motion.  This creates
6010 a second projector box in the compositor, with a line joining the two
6011 boxes.  The joining line is the motion path.  If you create more
6012 keyframes, more boxes are created.  Once all the desired keyframes are
6013 created, disable automatic keyframe mode.
6014 </p>
6015 <p>Now when scrubbing around with the compositor window&rsquo;s slider, the
6016 video projection moves over time.  At any point between two keyframes,
6017 the motion path is read for all time before the insertion point and
6018 green for all time after the insertion point.  It&rsquo;s debatable if this
6019 is a very useful feature but it makes you feel good to know what
6020 keyframe is going to be affected by the next projector tweek.
6021 </p>
6022 <p>Click-drag when automatic keyframes are off to adjust the preceeding
6023 keyframe.  If you&rsquo;re halfway between two keyframes, the first projector
6024 box is adjusted while the second one stays the same.  Furthermore, the
6025 video doesn&rsquo;t appear to move in step with the first keyframe.  This is
6026 because, halfway between two keyframes the projector translation is
6027 interpolated.  In order to set the second keyframe you&rsquo;ll need to scrub
6028 after the second keyframe.
6029 </p>
6030 <p>By default the motion path is a straight line, but it can be curved
6031 with control points.  <b>Ctrl-drag</b> to set either the in or out
6032 control point of the preceeding keyframe.  Once again, we depart from
6033 The Gimp because <b>shift</b> is already used for zoom.  After the in
6034 or out control points are extrapolated from the keyframe,
6035 <b>Ctrl-dragging</b> anywhere in the video adjusts the nearest control
6036 point.  A control point can be out of view entirely yet still
6037 controllable.
6038 </p>
6039 <p>When editing the camera translation, the behavior of the camera boxes
6040 is slightly different.  Camera automation is normally used for still
6041 photo panning.  The current camera box doesn&rsquo;t move during a drag, but
6042 if multiple keyframes are set, every camera box except the current
6043 keyframe appears to move.  This is because the camera display shows
6044 every other camera position relative to the current one.
6045 </p>
6046 <p>The situation becomes more intuitive if you bend the motion path
6047 between two keyframes and scrub between the two keyframes.  The
6048 division between red and green, the current position between the
6049 keyframes, is always centered while the camera boxes move.
6050 </p>
6051
6052
6053
6054
6055
6056 <hr>
6057 <a name="EDITING-KEYFRAMES"></a>
6058 <div class="header">
6059 <p>
6060 Next: <a href="#KEYFRAME-SPANNING" accesskey="n" rel="next">KEYFRAME SPANNING</a>, Previous: <a href="#COMPOSITOR-KEYFRAMES" accesskey="p" rel="prev">COMPOSITOR KEYFRAMES</a>, Up: <a href="#KEYFRAMES" accesskey="u" rel="up">KEYFRAMES</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
6061 </div>
6062 <a name="EDITING-KEYFRAMES-1"></a>
6063 <h3 class="section">13.8 EDITING KEYFRAMES</h3>
6064
6065 <p>Keyframes can be shifted around and moved between tracks on the
6066 timeline using similar cut and paste operations to editing media.  Only
6067 the keyframes selected in the <b>view</b> menu are affected by keyframe
6068 editing operations, however.
6069 </p>
6070 <p>The most popular keyframe editing operation is replication of some
6071 curve from one track to the other, to make a stereo pair.  The first
6072 step is to solo the source track&rsquo;s record <img src="recordpatch.png" alt="recordpatch"> patch
6073 by <b>shift-clicking</b> on it.  Then either set in/out points or
6074 highlight the desired region of keyframes.  Go to <b>keyframes-&gt;copy
6075 keyframes</b> to copy them to the clipboard.  Solo the destination track&rsquo;s
6076 record <img src="recordpatch.png" alt="recordpatch"> patch by <b>shift-clicking</b> on it and
6077 go to <b>keyframes-&gt;paste keyframes</b> to paste the clipboard.
6078 </p>
6079 <p>The media editing commands are mapped to the keyframe editing commands
6080 by using the <b>shift</b> key instead of just the keyboard shortcut.  
6081 </p>
6082 <p>This leads to the most complicated part of keyframe editing, the
6083 default keyframe.  Remember that when no keyframes are set at all,
6084 there is still a default keyframe which stores a global parameter for
6085 the entire duration.  The default keyframe isn&rsquo;t drawn because it
6086 always exists.  What if the default keyframe is a good value which you
6087 want to transpose between other non-default keyframes?  The
6088 <b>keyframes-&gt;copy default keyframe</b> and <b>keyframes-&gt;paste
6089 default keyframe</b> allow conversion of the default keyframe to a
6090 non-default keyframe.
6091 </p>
6092 <p><b>Keyframes-&gt;copy default keyframe</b> copies the default keyframe to
6093 the clipboard, no matter what region of the timeline is selected.  The
6094 <b>keyframes-&gt;paste keyframes</b> function may then be used to paste
6095 the clipboard as a non-default keyframe.
6096 </p>
6097 <p>If you&rsquo;ve copied a non-default keyframe, it can be stored as the
6098 default keyframe by calling <b>keyframes-&gt;paste default keyframe</b>. 
6099 After using paste default keyframe to convert a non-default keyframe
6100 into a default keyframe, you won&rsquo;t see the value of the default
6101 keyframe reflected until all the non-default keyframes are removed.
6102 </p>
6103 <p>Finally, there is a convenient way to delete keyframes besides
6104 selecting a region and calling <b>keyframes-&gt;clear keyframes</b>. 
6105 Merely click-drag a keyframe before its preceeding keyframe or after
6106 its following keyframe on the track.
6107 </p>
6108
6109
6110 <hr>
6111 <a name="KEYFRAME-SPANNING"></a>
6112 <div class="header">
6113 <p>
6114 Previous: <a href="#EDITING-KEYFRAMES" accesskey="p" rel="prev">EDITING KEYFRAMES</a>, Up: <a href="#KEYFRAMES" accesskey="u" rel="up">KEYFRAMES</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
6115 </div>
6116 <a name="KEYFRAME-SPANNING-1"></a>
6117 <h3 class="section">13.9 KEYFRAME SPANNING</h3>
6118
6119
6120
6121 <p>To change a single parameter in multiple keyframes without changing the
6122 other parameters, highlight a region on the timeline and adjust the
6123 parameter.  Instead of a new keyframe being created, the existing
6124 keyframes are modified and only the changed parameter is modified.
6125 </p>
6126 <p>It doesn&rsquo;t matter if <img src="autokeyframe.png" alt="autokeyframe"> auto keyframe is enabled.  It
6127 only works when the keyframe stores multiple parameters.  Only mask and
6128 effect keyframes do this.  Other types of keyframes are generated as usual.
6129 </p>
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140 <hr>
6141 <a name="CAPTURING-MEDIA"></a>
6142 <div class="header">
6143 <p>
6144 Next: <a href="#IMPROVING-PERFORMANCE" accesskey="n" rel="next">IMPROVING PERFORMANCE</a>, Previous: <a href="#KEYFRAMES" accesskey="p" rel="prev">KEYFRAMES</a>, Up: <a href="#Top" accesskey="u" rel="up">TOP</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
6145 </div>
6146 <a name="CAPTURING-MEDIA-1"></a>
6147 <h2 class="chapter">14 CAPTURING MEDIA</h2>
6148
6149 <p>Ideally, all media would be stored on hard drives, CD-ROM, flash, or
6150 DVD and loading it into Cinelerra would be a matter of loading a file. 
6151 In reality, very few sources of media can be accessed like a filesystem
6152 but instead rely on tape transport mechanisms and dumb I/O mechanisms
6153 to transfer the data to computers.  These media types are imported into
6154 Cinelerra through the Record dialog.
6155 </p>
6156 <p>The first step in recording is to configure the input device.  In
6157 <b>Settings-&gt;preferences</b> are a number of recording parameters
6158 described in configuration See <a href="#RECORDING">RECORDING</a>.  These parameters apply to
6159 recording no matter what the project settings are, because the
6160 recording parameters are usually the maximum capability of the
6161 recording hardware while project settings come and go.
6162 </p>
6163 <p>Go to <b>File-&gt;record</b> to record a dumb I/O source.  This prompts
6164 for an output format much like rendering does.  Once that&rsquo;s done, the
6165 record window and the record monitor pop up.
6166 </p>
6167 <p>The record window has discrete sections.  While many parameters change
6168 depending on if the file has audio or video, the discrete sections are
6169 always the same.
6170 </p>
6171 <ul>
6172 <li> 
6173 The output format area describes the format of the output file and the
6174 current position within it.
6175
6176
6177 </li><li> 
6178 The edit batch area lets you change parameters in the current batch.
6179
6180 </li><li> 
6181 The transport controls start and stop recording different ways.
6182
6183 </li><li> 
6184 The batch list displays all the defined batches.
6185
6186 </li><li> 
6187 The confirmation area lets you determine how the output files are
6188 imported into the timeline and quit.
6189
6190 </li></ul>
6191
6192 <img src="recording.png" alt="recording">
6193 <br>
6194 <br>
6195 <p><b>Recording window areas</b>
6196 </p>
6197
6198 <p>Recording in Cinelerra is organized around batches.  A batch
6199 essentially defines a distinct output file for the recording.  For now
6200 you can ignore the batch concept entirely and record merely by hitting
6201 the record button <img src="record.png" alt="record">.
6202 </p>
6203 <p>The record button opens the current output file if it isn&rsquo;t opened and
6204 writes captured data to it.  Use the stop button to stop the
6205 recording.  Recording can be resumed with the record button without
6206 erasing the file at this point.  In the case of a video file, there is
6207 a single frame record button <img src="singleframe.png" alt="singleframe"> which records a single
6208 frame.
6209 </p>
6210 <p>When enough media is recorded, choose an insertion method from the
6211 <b>Insertion Strategy</b> menu and hit <b>close</b>.
6212 </p>
6213
6214
6215
6216 <table class="menu" border="0" cellspacing="0">
6217 <tr><td align="left" valign="top">&bull; <a href="#BATCHES" accesskey="1">BATCHES</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
6218 </td></tr>
6219 <tr><td align="left" valign="top">&bull; <a href="#EDITING-TUNER-INFORMATION" accesskey="2">EDITING TUNER INFORMATION</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
6220 </td></tr>
6221 </table>
6222
6223
6224
6225
6226 <hr>
6227 <a name="BATCHES"></a>
6228 <div class="header">
6229 <p>
6230 Next: <a href="#EDITING-TUNER-INFORMATION" accesskey="n" rel="next">EDITING TUNER INFORMATION</a>, Up: <a href="#CAPTURING-MEDIA" accesskey="u" rel="up">CAPTURING MEDIA</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
6231 </div>
6232 <a name="BATCHES-1"></a>
6233 <h3 class="section">14.1 BATCHES</h3>
6234
6235 <p>Now we come to the concept of batches.  Batches try to make the dumb
6236 I/O look more like a filesystem.  Batches are traditionally used to
6237 divide tape into different programs and save the different programs as
6238 different files instead of recording straight through an entire tape. 
6239 Because of the high cost of developing frame-accurate deck control
6240 mechanisms, the only use of batches now is recording different programs
6241 during different times of day.  This is still useful for recording TV
6242 shows or time lapse movies as anyone who can&rsquo;t afford proper appliances
6243 knows.
6244 </p>
6245 <p>The record window supports a list of batches and two recording modes:
6246 interactive and batch recording.  Interactive recording happens when
6247 the record button is pressed.  Interactive recording starts immediately
6248 and uses the current batch to determine everything except start time. 
6249 By default, the current batch is configured to behave like tape.
6250 </p>
6251 <p>Batch recording happens when the <b>start</b> button is pressed.  In
6252 batch recording, the <b>start time</b> is the time the batch starts
6253 recording.
6254 </p>
6255 <p>First, you&rsquo;ll want to create some batches.  Each batch has certain
6256 parameters and methods of adjustment.  
6257 </p>
6258
6259
6260
6261 <ul>
6262 <li> 
6263 <b>On</b> determines whether the batch is included in batch recording
6264 operations.  Click the list row under <b>On</b> to enable or disable
6265 batches.
6266
6267
6268 </li><li> 
6269 <b>Path</b> is the file the batch is going to be recorded to.  The
6270 filename specified in the record dialog is the name of the first batch,
6271 to simplify interactive recording, but the filename may be changed in
6272 the record window for any batch in the <b>edit batch</b> area.
6273
6274
6275 </li><li> 
6276 <b>News</b> shows whether the file exists or not.  This is a very
6277 important attribute since there is no confirmation dialog if the file
6278 exists.  The first time you hit record, the file is opened.  If the
6279 file exists at this point it&rsquo;s erased.  News says <b>File exists</b> if
6280 it exists and <b>OK</b> if it doesn&rsquo;t.  Every time you resume recording
6281 in the same batch, the news should say <b>Open</b>, indicating the file
6282 is already opened and won&rsquo;t be erased in the next record button press.
6283
6284 <p>If you change out of the current batch after recording, the file is
6285 closed.  Next time you change into the batch, the file will be erased.
6286 </p>
6287 </li><li> 
6288 <b>Start time</b> is the 24 hour time of day the batch will start
6289 recording if in batch mode.  The start time may become a time of tape
6290 and reel number if deck control is implemented but for now it&rsquo;s a time
6291 of day.
6292
6293 </li><li> 
6294 <b>Duration</b> is the length of the batch.  It only has meaning if the
6295 <b>Mode</b> of the batch is <b>Timed</b>.  Once the recording length
6296 reaches <b>duration</b> the recording stops, whether in interactive or
6297 batch mode.
6298
6299 </li><li> 
6300 <b>Source</b> has meaning only when the capturing hardware has multiple
6301 sources.  Usually the source is a tuner channel or input.  When the
6302 current batch finishes and the next batch begins recording, the source
6303 is changed to what the next batch is set to.  This way multiple TV
6304 stations can be recorded at different times.
6305
6306
6307 </li></ul>
6308
6309 <p>The record window has a notion of the <b>current batch</b>.  The
6310 current batch is not the same as the batch which is highlighted in the
6311 batch list.  The current batch text is colored red in the batch list. 
6312 The highlighted batch is merely displayed in the edit batch section for
6313 editing.
6314 </p>
6315 <p>By coloring the current batch red, any batch can be edited by
6316 highlighting it, without changing the batch to be recorded.
6317 </p>
6318 <p>All recording operations take place in the current batch.   If there
6319 are multiple batches, highlight the desired batch and hit
6320 <b>activate</b> to make it the current batch.  If the <b>start</b>
6321 button is pressed, the current batch flashes to indicate it&rsquo;s waiting
6322 for the start time in batch mode.  If the <b>record</b> button is
6323 pressed, the current batch is recorded immediately in interactive mode.
6324 </p>
6325 <p>In batch and interactive recording modes, when the current batch
6326 finishes recording the next batch is activated and performed.  All
6327 future recording is done in batch mode.  When the first batch finishes,
6328 the next batch flashes until its start time is reached.
6329 </p>
6330 <p>Interrupt either the batch or the interactive operation by hitting the
6331 stop button.
6332 </p>
6333 <p>Finally there is the <img src="rewind.png" alt="rewind"> rewind button.  In either
6334 interactive or batch recording, the rewind button causes the current
6335 batch to close its file.  The next recording operation in the current
6336 batch deletes the file.
6337 </p>
6338
6339
6340
6341
6342
6343 <hr>
6344 <a name="EDITING-TUNER-INFORMATION"></a>
6345 <div class="header">
6346 <p>
6347 Previous: <a href="#BATCHES" accesskey="p" rel="prev">BATCHES</a>, Up: <a href="#CAPTURING-MEDIA" accesskey="u" rel="up">CAPTURING MEDIA</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
6348 </div>
6349 <a name="EDITING-TUNER-INFORMATION-1"></a>
6350 <h3 class="section">14.2 EDITING TUNER INFORMATION</h3>
6351
6352
6353 <p>Sometimes in the recording process and the configuration process,
6354 you&rsquo;ll need to define and select tuner channels to either record or
6355 play back to.  In the case of the Video4Linux and Buz recording
6356 drivers, tuner channels define the source.  When the Buz driver is also
6357 used for playback, tuner channels define the destination.  
6358 </p>
6359 <p>Defining tuner channels is accomplished by pushing the <img src="channel.png" alt="channel">
6360 channel button.  This brings up the channel editing window.  In this
6361 window you add, edit, and sort channels.  Also, for certain video
6362 drivers, you can adjust the picture quality.
6363 </p>
6364 <p>The <b>add</b> operation brings up a channel editing box.  The title of
6365 the channel appears in the channel list.  The source of the channel is
6366 the entry in the physical tuner&rsquo;s frequency table corresponding to the
6367 title.  
6368 </p>
6369 <p>Fine tuning in the channel edit dialog adjusts the physical frequency
6370 slightly if the driver supports it.  The norm and frequency table
6371 together define which frequency table is selected for defining
6372 sources.  If the device supports multiple inputs, the input menu
6373 selects these.
6374 </p>
6375 <p>To sort channels, highlight the channel in the list and push <b>move
6376 up</b> or <b>move down</b> to move it.
6377 </p>
6378 <p>Once channels are defined, the <b>source</b> item in the record window
6379 can be used to select channels for recording.  The same channel
6380 selecting ability also exists in the record monitor window.  Be aware
6381 channel selections in the record monitor window and the record window
6382 are stored in the current batch.
6383 </p>
6384 <p>For some drivers an option to <b>swap fields</b> may be visible.  These
6385 drivers don&rsquo;t get the field order right every time without human
6386 intervention.  Toggle this to get the odd and even lines to record in
6387 the right order.
6388 </p>
6389
6390
6391
6392 <hr>
6393 <a name="IMPROVING-PERFORMANCE"></a>
6394 <div class="header">
6395 <p>
6396 Next: <a href="#TROUBLESHOOTING" accesskey="n" rel="next">TROUBLESHOOTING</a>, Previous: <a href="#CAPTURING-MEDIA" accesskey="p" rel="prev">CAPTURING MEDIA</a>, Up: <a href="#Top" accesskey="u" rel="up">TOP</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
6397 </div>
6398 <a name="IMPROVING-PERFORMANCE-1"></a>
6399 <h2 class="chapter">15 IMPROVING PERFORMANCE</h2>
6400
6401
6402 <p>Let&rsquo;s get one thing perfectly clear.  Linux is not a very good
6403 desktop.  It&rsquo;s a server.  Most of what you&rsquo;ll find on modern Linux
6404 distributions are faceless, network-only programs strategicly designed
6405 to counteract one Microsoft server feature or another and not to
6406 perform very well at user interaction.  There are a number of
6407 parameters on Linux, which ordinary people can adjust to make it behave
6408 more like a thoroughbred in desktop usage.
6409 </p>
6410
6411 <table class="menu" border="0" cellspacing="0">
6412 <tr><td align="left" valign="top">&bull; <a href="#DISABLING-SWAP-SPACE" accesskey="1">DISABLING SWAP SPACE</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
6413 </td></tr>
6414 <tr><td align="left" valign="top">&bull; <a href="#ENLARGING-SOUND-BUFFERS" accesskey="2">ENLARGING SOUND BUFFERS</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
6415 </td></tr>
6416 <tr><td align="left" valign="top">&bull; <a href="#FREEING-MORE-SHARED-MEMORY" accesskey="3">FREEING MORE SHARED MEMORY</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
6417 </td></tr>
6418 <tr><td align="left" valign="top">&bull; <a href="#SPEEDING-UP-THE-HARD-DRIVE" accesskey="4">SPEEDING UP THE HARD DRIVE</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
6419 </td></tr>
6420 <tr><td align="left" valign="top">&bull; <a href="#DISABLING-CRON" accesskey="5">DISABLING CRON</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
6421 </td></tr>
6422 <tr><td align="left" valign="top">&bull; <a href="#REDUCING-USB-MOUSE-SENSITIVITY" accesskey="6">REDUCING USB MOUSE SENSITIVITY</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
6423 </td></tr>
6424 <tr><td align="left" valign="top">&bull; <a href="#ASSORTED-X-TWEEKS" accesskey="7">ASSORTED X TWEEKS</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
6425 </td></tr>
6426 <tr><td align="left" valign="top">&bull; <a href="#SPEEDING-UP-THE-FILE-SYSTEM" accesskey="8">SPEEDING UP THE FILE SYSTEM</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
6427 </td></tr>
6428 <tr><td align="left" valign="top">&bull; <a href="#IMPROVING-ZORAN-VIDEO" accesskey="9">IMPROVING ZORAN VIDEO</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
6429 </td></tr>
6430 </table>
6431
6432 <hr>
6433 <a name="DISABLING-SWAP-SPACE"></a>
6434 <div class="header">
6435 <p>
6436 Next: <a href="#ENLARGING-SOUND-BUFFERS" accesskey="n" rel="next">ENLARGING SOUND BUFFERS</a>, Up: <a href="#IMPROVING-PERFORMANCE" accesskey="u" rel="up">IMPROVING PERFORMANCE</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
6437 </div>
6438 <a name="DISABLING-SWAP-SPACE-1"></a>
6439 <h3 class="section">15.1 DISABLING SWAP SPACE</h3>
6440
6441 <p>On systems with lots of memory, Cinelerra sometimes runs better without
6442 a swap space.  If you have 4 GB of RAM, you&rsquo;re probably better off
6443 without a swap space.  If you have 512MB of RAM, you should keep the
6444 swap.  If you want to do recording, you should probably disable swap
6445 space in any case.  There&rsquo;s a reason for this.  Linux only allows half
6446 the available memory to be used.  Beyond that, it starts searching for
6447 free pages to swap, in order to cache more disk access.  In a 4 GB
6448 system, you start waiting for page swaps after using only 2 GB.  
6449 </p>
6450 <p>The question then is how to make Linux run without a swap space. 
6451 Theoretically it should be a matter of running
6452 </p>
6453 <div class="example">
6454 <pre class="example">swapoff -a
6455 </pre></div>
6456
6457 <p>Unfortunately, without a swap space the <b>kswapd</b> tasklet normally
6458 spins at 100%.  To eliminate this problem, edit <b>linux/mm/vmscan.c</b>.
6459 In this file, put a line saying <b>return 0;</b> before it says 
6460 </p>
6461 <div class="example">
6462 <pre class="example">   /*
6463          * Kswapd main loop.
6464          */
6465 </pre></div>
6466
6467 <p>Then recompile the kernel.
6468 </p>
6469
6470
6471
6472 <hr>
6473 <a name="ENLARGING-SOUND-BUFFERS"></a>
6474 <div class="header">
6475 <p>
6476 Next: <a href="#FREEING-MORE-SHARED-MEMORY" accesskey="n" rel="next">FREEING MORE SHARED MEMORY</a>, Previous: <a href="#DISABLING-SWAP-SPACE" accesskey="p" rel="prev">DISABLING SWAP SPACE</a>, Up: <a href="#IMPROVING-PERFORMANCE" accesskey="u" rel="up">IMPROVING PERFORMANCE</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
6477 </div>
6478 <a name="ENLARGING-SOUND-BUFFERS-1"></a>
6479 <h3 class="section">15.2 ENLARGING SOUND BUFFERS</h3>
6480
6481 <p>In order to improve realtime performance, the audio buffers for all the
6482 Linux sound drivers were limited from 128k to 64k.  For recording audio
6483 and video simultaneously and for most audio recording this causes
6484 dropouts.  Application of low latency and preemtible kernel patches
6485 make it possible to record more audio recordings but it doesn&rsquo;t improve
6486 recording video with audio.  This is where you need to hack the kernel.
6487 </p>
6488 <p>To see if your sound buffers are suitable, run the included
6489 <b>soundtest</b> program with nothing playing or recording.  This
6490 allocates the largest possible buffers and displays them.  If the
6491 <b>TOTAL BYTES AVAILABLE</b> is under 131072, you need to see about
6492 getting the buffers enlarged in the driver.  While many drivers differ,
6493 we have a hack for at least one driver.
6494 </p>
6495 <p>This only applies to the OSS version of the Soundblaster Live driver. 
6496 Since every sound card and every sound driver derivative has a
6497 different implementation you&rsquo;ll need to do some searching for other
6498 sound cards.  Edit <b>linux/drivers/sound/emu10k1/audio.c</b>
6499 </p>
6500 <p>Where is says
6501 </p>
6502 <div class="example">
6503 <pre class="example">if (bufsize &gt;= 0x10000)
6504 </pre></div>
6505
6506 <p>change it to say
6507 </p>
6508 <div class="example">
6509 <pre class="example">if (bufsize &gt; 0x40000)
6510 </pre></div>
6511
6512
6513
6514 <p>Where is says
6515 </p>
6516 <div class="example">
6517 <pre class="example">           for (i = 0; i &lt; 8; i++)
6518                         for (j = 0; j &lt; 4; j++)
6519 </pre></div>
6520
6521 <p>change it to say
6522 </p>
6523 <div class="example">
6524 <pre class="example">           for (i = 0; i &lt; 16; i++)
6525                         for (j = 0; j &lt; 4; j++)
6526 </pre></div>
6527
6528
6529
6530 <p>In <b>linux/drivers/sound/emu10k1/hwaccess.h</b>
6531 </p>
6532 <p>Change
6533 </p>
6534 <p><b>#define MAXBUFSIZE        65536</b> 
6535 </p>
6536 <p>to 
6537 </p>
6538 <p><b>#define MAXBUFSIZE        262144</b> 
6539 </p>
6540 <p>Finally, in <b>linux/drivers/sound/emu10k1/cardwi.h</b>
6541 </p>
6542 <p><b>#define WAVEIN_MAXBUFSIZE         65536</b>
6543 </p>
6544 <p>to
6545 </p>
6546 <p><b>#define WAVEIN_MAXBUFSIZE         262144</b>
6547 </p>
6548 <p>Then recompile the kernel modules.
6549 </p>
6550
6551
6552
6553
6554
6555 <hr>
6556 <a name="FREEING-MORE-SHARED-MEMORY"></a>
6557 <div class="header">
6558 <p>
6559 Next: <a href="#SPEEDING-UP-THE-HARD-DRIVE" accesskey="n" rel="next">SPEEDING UP THE HARD DRIVE</a>, Previous: <a href="#ENLARGING-SOUND-BUFFERS" accesskey="p" rel="prev">ENLARGING SOUND BUFFERS</a>, Up: <a href="#IMPROVING-PERFORMANCE" accesskey="u" rel="up">IMPROVING PERFORMANCE</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
6560 </div>
6561 <a name="FREEING-MORE-SHARED-MEMORY-1"></a>
6562 <h3 class="section">15.3 FREEING MORE SHARED MEMORY</h3>
6563
6564 <p>The Linux kernel only allows 32MB of shared memory to be allocated by
6565 default.  This needs to be increased to do anything useful.  Run the
6566 following command:
6567 </p>
6568 <p><b>echo &quot;0x7fffffff&quot; &gt; /proc/sys/kernel/shmmax</b>
6569 </p>
6570
6571
6572
6573
6574 <hr>
6575 <a name="SPEEDING-UP-THE-HARD-DRIVE"></a>
6576 <div class="header">
6577 <p>
6578 Next: <a href="#DISABLING-CRON" accesskey="n" rel="next">DISABLING CRON</a>, Previous: <a href="#FREEING-MORE-SHARED-MEMORY" accesskey="p" rel="prev">FREEING MORE SHARED MEMORY</a>, Up: <a href="#IMPROVING-PERFORMANCE" accesskey="u" rel="up">IMPROVING PERFORMANCE</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
6579 </div>
6580 <a name="SPEEDING-UP-THE-HARD-DRIVE-1"></a>
6581 <h3 class="section">15.4 SPEEDING UP THE HARD DRIVE</h3>
6582
6583 <p>This is a very popular command sequence among Linux gurus, which is not
6584 done by default on Linux distributions.
6585 </p>
6586 <p><b>hdparm -c3 -d1 -u1 -k1 /dev/hda</b>
6587 </p>
6588 <p><b>-c3</b> puts the hard drive into 32 bit I/O with sync.  This normally
6589 doesn&rsquo;t work due to inept kernel support for most IDE controllers.  If
6590 you get lost interrupt or SeekComplete errors, quickly use <b>-c0</b>
6591 instead of <b>-c3</b> in your command.
6592 </p>
6593 <p><b>-d1</b> enables DMA of course.  This frees up the CPU partially during
6594 data transfers.
6595 </p>
6596 <p><b>-u1</b> allows multiple interrupts to be handled during hard drive
6597 transactions.  This frees up even more CPU time.
6598 </p>
6599 <p><b>-k1</b> prevents Linux from resetting your settings in case of a
6600 glitch.
6601 </p>
6602
6603
6604
6605
6606 <hr>
6607 <a name="DISABLING-CRON"></a>
6608 <div class="header">
6609 <p>
6610 Next: <a href="#REDUCING-USB-MOUSE-SENSITIVITY" accesskey="n" rel="next">REDUCING USB MOUSE SENSITIVITY</a>, Previous: <a href="#SPEEDING-UP-THE-HARD-DRIVE" accesskey="p" rel="prev">SPEEDING UP THE HARD DRIVE</a>, Up: <a href="#IMPROVING-PERFORMANCE" accesskey="u" rel="up">IMPROVING PERFORMANCE</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
6611 </div>
6612 <a name="DISABLING-CRON-1"></a>
6613 <h3 class="section">15.5 DISABLING CRON</h3>
6614
6615 <p>Linux runs some daily operations like compressing man pages.  These may
6616 be acceptable background tasks while compiling or word processing but
6617 not while playing video.  Disable these operations by editing
6618 <b>/etc/rc.d/init.d/anacron</b>.
6619 </p>
6620 <p>Put <b>exit</b> before the first line not beginning in <b>#</b>.
6621 </p>
6622 <p>In <b>/etc/rc.d/init.d/crond</b> put <b>exit</b> before the first line not
6623 beginning in <b>#</b>.  Then make like Win 2000 and reboot.
6624 </p>
6625 <p>You can&rsquo;t use the <b>at</b> command anymore, but who uses that command
6626 anyways?
6627 </p>
6628
6629
6630
6631
6632
6633
6634
6635
6636 <hr>
6637 <a name="REDUCING-USB-MOUSE-SENSITIVITY"></a>
6638 <div class="header">
6639 <p>
6640 Next: <a href="#ASSORTED-X-TWEEKS" accesskey="n" rel="next">ASSORTED X TWEEKS</a>, Previous: <a href="#DISABLING-CRON" accesskey="p" rel="prev">DISABLING CRON</a>, Up: <a href="#IMPROVING-PERFORMANCE" accesskey="u" rel="up">IMPROVING PERFORMANCE</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
6641 </div>
6642 <a name="REDUCING-USB-MOUSE-SENSITIVITY-1"></a>
6643 <h3 class="section">15.6 REDUCING USB MOUSE SENSITIVITY</h3>
6644
6645 <p>Gamers like high resolution mice, but this can be painful for precisely
6646 positioning the mouse on a timeline or video screen.  XFree86 once
6647 allowed you to reduce PS/2 mouse sensitivity using commands like
6648 <b>xset m 1 1</b> but you&rsquo;re out of luck with USB mice or KVM&rsquo;s.
6649 </p>
6650 <p>We have a way to reduce USB mouse sensitivity but it requires editing
6651 the kernel source code.  Even though USB mice have been supported for
6652 years, the kernel source code for USB mice is constantly being
6653 rewritten.  These instructions were relevant for 2.6.12.3.  Edit
6654 <b>/usr/src/linux/drivers/input/mousedev.c</b>.  
6655 </p>
6656 <p>After the line saying 
6657 </p>
6658 <div class="example">
6659 <pre class="example">struct mousedev_hw_data {
6660 </pre></div>
6661
6662
6663 <p>put
6664 </p>
6665 <div class="example">
6666 <pre class="example">#define DOWNSAMPLE_N 100
6667 #define DOWNSAMPLE_D 350
6668 int x_accum, y_accum;
6669 </pre></div>
6670
6671 <p>Next, the section which says something like:
6672 </p>
6673 <div class="example">
6674 <pre class="example">switch (code) {
6675         case REL_X:     mousedev-&gt;packet.dx += value; break;
6676         case REL_Y:     mousedev-&gt;packet.dy -= value; break;
6677         case REL_WHEEL: mousedev-&gt;packet.dz -= value; break;
6678 }
6679 </pre></div>
6680
6681 <p>must be replaced by
6682 </p>
6683 <div class="example">
6684 <pre class="example">
6685         switch (code) {
6686                 case REL_X:
6687                         mousedev-&gt;packet.x_accum += value * DOWNSAMPLE_N;
6688                         mousedev-&gt;packet.dx += (int)mousedev-&gt;packet.x_accum / (int)DOWNSAMPLE_D;
6689                         mousedev-&gt;packet.x_accum -= ((int)mousedev-&gt;packet.x_accum / (int)DOWNSAMPLE_D) * (int)DOWNSAMPLE_D;
6690                         break;
6691                 case REL_Y:
6692                         mousedev-&gt;packet.y_accum += value * DOWNSAMPLE_N;
6693                         mousedev-&gt;packet.dy -= (int)mousedev-&gt;packet.y_accum / (int)DOWNSAMPLE_D;
6694                         mousedev-&gt;packet.y_accum -= ((int)mousedev-&gt;packet.y_accum / (int)DOWNSAMPLE_D) * (int)DOWNSAMPLE_D;
6695                         break;
6696                 case REL_WHEEL: mousedev-&gt;packet.dz -= value; break;
6697         }
6698
6699
6700
6701 </pre></div>
6702
6703 <p>Change the value of <b>DOWNSAMPLE_N</b> to change the mouse sensitivity.
6704 </p>
6705
6706
6707
6708
6709
6710
6711
6712 <hr>
6713 <a name="ASSORTED-X-TWEEKS"></a>
6714 <div class="header">
6715 <p>
6716 Next: <a href="#SPEEDING-UP-THE-FILE-SYSTEM" accesskey="n" rel="next">SPEEDING UP THE FILE SYSTEM</a>, Previous: <a href="#REDUCING-USB-MOUSE-SENSITIVITY" accesskey="p" rel="prev">REDUCING USB MOUSE SENSITIVITY</a>, Up: <a href="#IMPROVING-PERFORMANCE" accesskey="u" rel="up">IMPROVING PERFORMANCE</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
6717 </div>
6718 <a name="ASSORTED-X-TWEEKS-1"></a>
6719 <h3 class="section">15.7 ASSORTED X TWEEKS</h3>
6720
6721
6722 <p>XFree86 by default can&rsquo;t display Cinelerra&rsquo;s advanced pixmap rendering
6723 very fast.  The X server stalls during list box drawing.  Fix this by
6724 adding a line to your XF86Config* files.
6725 </p>
6726 <p>In the <b>Section &quot;Device&quot;</b> area, add a line saying:
6727 </p>
6728 <p><b>Option &quot;XaaNoOffscreenPixmaps&quot;</b>
6729 </p>
6730 <p>and restart the X server.
6731 </p>
6732
6733
6734 <p>Screen blanking is really annoying, unless you&rsquo;re fabulously rich and
6735 can afford to leave your monitor on 24 hours a day without power saving
6736 mode.  In <b>/etc/X11/xinit/xinitrc</b> put 
6737 </p>
6738 <div class="example">
6739 <pre class="example">xset s off
6740 xset s noblank
6741 </pre></div>
6742
6743 <p>before the first <b>if</b> statement.
6744 </p>
6745 <p>How about those windows keys which no Linux distribution even thinks to
6746 use.  You can make the window keys provide ALT functionality by editing
6747 <b>/etc/X11/Xmodmap</b>.  Append the following to it.
6748 </p>
6749 <div class="example">
6750 <pre class="example">keycode 115 = Hyper_L
6751 keycode 116 = Hyper_R
6752 add mod4 = Hyper_L
6753 add mod5 = Hyper_R
6754 </pre></div>
6755
6756 <p>The actual changes to a window manager to make it recognize window keys
6757 for ALT are complex.  In <b>FVWM</b> at least, you can edit
6758 <b>/etc/X11/fvwm/system.fvwm2rc</b> and put
6759 </p>
6760 <div class="example">
6761 <pre class="example">Mouse 0 T A move-and-raise-or-raiselower
6762 #Mouse 0 W M move
6763 Mouse 0 W 4 move
6764 Mouse 0 W 5 move
6765 Mouse 0 F A resize-or-raiselower
6766 Mouse 0 S A resize-or-raiselower
6767 </pre></div>
6768
6769 <p>in place of the default section for moving and resizing.  Your best
6770 performance is going to be on FVWM.  Other window managers seem to slow
6771 down video with extra event trapping and aren&rsquo;t as efficient in layout.
6772 </p>
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783 <hr>
6784 <a name="SPEEDING-UP-THE-FILE-SYSTEM"></a>
6785 <div class="header">
6786 <p>
6787 Next: <a href="#IMPROVING-ZORAN-VIDEO" accesskey="n" rel="next">IMPROVING ZORAN VIDEO</a>, Previous: <a href="#ASSORTED-X-TWEEKS" accesskey="p" rel="prev">ASSORTED X TWEEKS</a>, Up: <a href="#IMPROVING-PERFORMANCE" accesskey="u" rel="up">IMPROVING PERFORMANCE</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
6788 </div>
6789 <a name="SPEEDING-UP-THE-FILE-SYSTEM-1"></a>
6790 <h3 class="section">15.8 SPEEDING UP THE FILE SYSTEM</h3>
6791
6792 <p>You&rsquo;ll often store video on an expensive, gigantic disk array separate
6793 from your boot disk.  You&rsquo;ll thus have to manually install an EXT
6794 filesystem on this disk array, using the <b>mke2fs</b> command.  By far
6795 the fastest file system is 
6796 </p>
6797 <div class="example">
6798 <pre class="example">
6799 mke2fs -i 65536 -b 4096 my_device
6800 tune2fs -r0 -c10000 my_device
6801
6802 </pre></div>
6803
6804 <p>This has no journaling, reserves as few blocks as possible for
6805 filenames, and accesses the largest amount of data per block possible.
6806 A slightly slower file system, which is easier to recover after power
6807 failures is
6808 </p>
6809 <div class="example">
6810 <pre class="example">
6811 mke2fs -j -i 65536 -b 4096 my_device
6812 tune2fs -r0 -c10000 my_device
6813
6814 </pre></div>
6815
6816 <p>This adds a journal which slows down the writes but makes us immune to
6817 power failures.
6818 </p>
6819
6820
6821
6822
6823
6824
6825 <hr>
6826 <a name="IMPROVING-ZORAN-VIDEO"></a>
6827 <div class="header">
6828 <p>
6829 Previous: <a href="#SPEEDING-UP-THE-FILE-SYSTEM" accesskey="p" rel="prev">SPEEDING UP THE FILE SYSTEM</a>, Up: <a href="#IMPROVING-PERFORMANCE" accesskey="u" rel="up">IMPROVING PERFORMANCE</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
6830 </div>
6831 <a name="IMPROVING-ZORAN-VIDEO-1"></a>
6832 <h3 class="section">15.9 IMPROVING ZORAN VIDEO</h3>
6833
6834 <p>Video recorded from the ZORAN inputs is normally unaligned or not
6835 completely encoded on the right.  This can be slightly compensated by
6836 adjusting parameters in the driver sourcecode.
6837 </p>
6838 <p>In <b>/usr/src/linux/drivers/media/video/zr36067.c</b> the structures
6839 defined near line 623 affect alignment.  At least for NTSC, the 2.4.20
6840 version of the driver could be improved by changing 
6841 </p>
6842 <div class="example">
6843 <pre class="example">static struct tvnorm f60ccir601 = { 858, 720, 57, 788, 525, 480, 16 };
6844 </pre></div>
6845
6846 <p>to
6847 </p>
6848 <div class="example">
6849 <pre class="example">static struct tvnorm f60ccir601 = { 858, 720, 57, 788, 525, 480, 17 };
6850 </pre></div>
6851
6852
6853 <p>In <b>/usr/src/linux/drivers/media/video/bt819.c</b> more structures near
6854 line 76 affect alignment and encoding.
6855 </p>
6856 <p>For NTSC 
6857 </p>
6858 <div class="example">
6859 <pre class="example">{858 - 24, 2, 523, 1, 0x00f8, 0x0000},
6860 </pre></div>
6861
6862 <p>could be changed to 
6863 </p><div class="example">
6864 <pre class="example">{868 - 24, 2, 523, 1, 0x00f8, 0x0000},
6865 </pre></div>
6866
6867 <p>Adjusting these parameters may or may not move your picture closer to
6868 the center.  More of the time, they&rsquo;ll cause the driver to lock up
6869 before capturing the first frame.
6870 </p>
6871
6872 <a name="NEW-IN-2_002e6_002e5"></a>
6873 <h4 class="subsection">15.9.1 NEW IN 2.6.5</h4>
6874
6875 <p>In the 2.6 kernels, the video subsystem was rewritten again from
6876 scratch.  To adjust the Zoran parameters go to
6877 <b>drivers/media/video/zoran_card.c</b> and look for a group of lines like
6878 </p>
6879 <div class="example">
6880 <pre class="example">static struct tvnorm f50sqpixel = { 944, 768, 83, 880, 625, 576, 16 };
6881 static struct tvnorm f60sqpixel = { 780, 640, 51, 716, 525, 480, 12 };
6882 static struct tvnorm f50ccir601 = { 864, 720, 75, 804, 625, 576, 18 };
6883 static struct tvnorm f60ccir601 = { 858, 720, 57, 788, 525, 480, 16 };
6884
6885 static struct tvnorm f50ccir601_lml33 = { 864, 720, 75+34, 804, 625, 576, 18 };
6886 static struct tvnorm f60ccir601_lml33 = { 858, 720, 57+34, 788, 525, 480, 16 };
6887
6888 /* The DC10 (57/16/50) uses VActive as HSync, so HStart must be 0 */
6889 static struct tvnorm f50sqpixel_dc10 = { 944, 768, 0, 880, 625, 576, 0 };
6890 static struct tvnorm f60sqpixel_dc10 = { 780, 640, 0, 716, 525, 480, 12 };
6891
6892 /* FIXME: I cannot swap U and V in saa7114, so i do one
6893  * pixel left shift in zoran (75 -&gt; 74)
6894  * (Maxim Yevtyushkin &lt;max@linuxmedialabs.com&gt;) */
6895 static struct tvnorm f50ccir601_lm33r10 = { 864, 720, 74+54, 804, 625, 576, 18 };
6896 static struct tvnorm f60ccir601_lm33r10 = { 858, 720, 56+54, 788, 525, 480, 16 };
6897 </pre></div>
6898
6899 <p>These seem to control the image position.  At least for the LML33 the
6900 following definition for <b>f60ccir601_lml33</b> does the trick.
6901 </p>
6902 <div class="example">
6903 <pre class="example">static struct tvnorm f60ccir601_lml33 = { 858, 720, 67+34, 788, 525, 480, 13 };
6904 </pre></div>
6905
6906
6907
6908
6909
6910
6911 <hr>
6912 <a name="TROUBLESHOOTING"></a>
6913 <div class="header">
6914 <p>
6915 Next: <a href="#SECRETS-OF-CINELERRA" accesskey="n" rel="next">SECRETS OF CINELERRA</a>, Previous: <a href="#IMPROVING-PERFORMANCE" accesskey="p" rel="prev">IMPROVING PERFORMANCE</a>, Up: <a href="#Top" accesskey="u" rel="up">TOP</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
6916 </div>
6917 <a name="TROUBLESHOOTING-1"></a>
6918 <h2 class="chapter">16 TROUBLESHOOTING</h2>
6919
6920
6921 <table class="menu" border="0" cellspacing="0">
6922 <tr><td align="left" valign="top">&bull; <a href="#BUZ-DRIVER-CRASHES" accesskey="1">BUZ DRIVER CRASHES</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
6923 </td></tr>
6924 <tr><td align="left" valign="top">&bull; <a href="#DRAGGING-IN-AND-OUT-POINTS-DOESN_0027T-WORK" accesskey="2">DRAGGING IN AND OUT POINTS DOESN'T WORK</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
6925 </td></tr>
6926 <tr><td align="left" valign="top">&bull; <a href="#LOCKING-UP-WHEN-LOADING-FILES" accesskey="3">LOCKING UP WHEN LOADING FILES</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
6927 </td></tr>
6928 <tr><td align="left" valign="top">&bull; <a href="#SYNCHRONIZATION-LOST-WHILE-RECORDING" accesskey="4">SYNCHRONIZATION LOST WHILE RECORDING</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
6929 </td></tr>
6930 <tr><td align="left" valign="top">&bull; <a href="#APPLYING-LINEARIZE-FOLLOWED-BY-BLUR-DOESN_0027T-WORK" accesskey="5">APPLYING LINEARIZE FOLLOWED BY BLUR DOESN'T WORK</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
6931 </td></tr>
6932 </table>
6933
6934 <hr>
6935 <a name="BUZ-DRIVER-CRASHES"></a>
6936 <div class="header">
6937 <p>
6938 Next: <a href="#DRAGGING-IN-AND-OUT-POINTS-DOESN_0027T-WORK" accesskey="n" rel="next">DRAGGING IN AND OUT POINTS DOESN'T WORK</a>, Up: <a href="#TROUBLESHOOTING" accesskey="u" rel="up">TROUBLESHOOTING</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
6939 </div>
6940 <a name="BUZ-DRIVER-CRASHES-1"></a>
6941 <h3 class="section">16.1 BUZ DRIVER CRASHES</h3>
6942
6943 <p>First, Zoran capture boards must be accessed using the <b>Buz</b> video
6944 driver in <b>Preferences-&gt;Recording</b> and <b>Preferences-&gt;Playback</b>. 
6945 Some performance tweeks are available in another section. 
6946 See <a href="#IMPROVING-PERFORMANCE">IMPROVING PERFORMANCE</a>.
6947 </p>
6948 <p>Once tweeked, the Buz driver seems to crash if the number of recording
6949 buffers is too high.  Make sure <b>Preferences-&gt;Recording-&gt;Frames to
6950 buffer in device</b> is below 10.
6951 </p>
6952
6953 <hr>
6954 <a name="DRAGGING-IN-AND-OUT-POINTS-DOESN_0027T-WORK"></a>
6955 <div class="header">
6956 <p>
6957 Next: <a href="#LOCKING-UP-WHEN-LOADING-FILES" accesskey="n" rel="next">LOCKING UP WHEN LOADING FILES</a>, Previous: <a href="#BUZ-DRIVER-CRASHES" accesskey="p" rel="prev">BUZ DRIVER CRASHES</a>, Up: <a href="#TROUBLESHOOTING" accesskey="u" rel="up">TROUBLESHOOTING</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
6958 </div>
6959 <a name="DRAGGING-IN-AND-OUT-POINTS-DOESN_0027T-WORK-1"></a>
6960 <h3 class="section">16.2 DRAGGING IN AND OUT POINTS DOESN&rsquo;T WORK</h3>
6961
6962
6963 <p>Sometimes there will be two edits really close together.  The point
6964 selected for dragging may be next to the indended edit on an edit too
6965 small to see at the current zoom level.  Zoom in horizontally.
6966 </p>
6967
6968
6969 <hr>
6970 <a name="LOCKING-UP-WHEN-LOADING-FILES"></a>
6971 <div class="header">
6972 <p>
6973 Next: <a href="#SYNCHRONIZATION-LOST-WHILE-RECORDING" accesskey="n" rel="next">SYNCHRONIZATION LOST WHILE RECORDING</a>, Previous: <a href="#DRAGGING-IN-AND-OUT-POINTS-DOESN_0027T-WORK" accesskey="p" rel="prev">DRAGGING IN AND OUT POINTS DOESN'T WORK</a>, Up: <a href="#TROUBLESHOOTING" accesskey="u" rel="up">TROUBLESHOOTING</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
6974 </div>
6975 <a name="LOCKING-UP-WHEN-LOADING-FILES-1"></a>
6976 <h3 class="section">16.3 LOCKING UP WHEN LOADING FILES</h3>
6977
6978
6979 <p>The most common reason loading files locks up is because the codec
6980 isn&rsquo;t supported.  Another reason is because Cinelerra is building
6981 picons for the Resources window.  If you load a large number of images,
6982 it needs to decompress every single image to build a picon.  Go into
6983 settings-&gt;preferences-&gt;interface and disable <b>Use thumbnails in
6984 resource window</b> to skip this process.
6985 </p>
6986
6987
6988
6989
6990 <hr>
6991 <a name="SYNCHRONIZATION-LOST-WHILE-RECORDING"></a>
6992 <div class="header">
6993 <p>
6994 Next: <a href="#APPLYING-LINEARIZE-FOLLOWED-BY-BLUR-DOESN_0027T-WORK" accesskey="n" rel="next">APPLYING LINEARIZE FOLLOWED BY BLUR DOESN'T WORK</a>, Previous: <a href="#LOCKING-UP-WHEN-LOADING-FILES" accesskey="p" rel="prev">LOCKING UP WHEN LOADING FILES</a>, Up: <a href="#TROUBLESHOOTING" accesskey="u" rel="up">TROUBLESHOOTING</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
6995 </div>
6996 <a name="SYNCHRONIZATION-LOST-WHILE-RECORDING-1"></a>
6997 <h3 class="section">16.4 SYNCHRONIZATION LOST WHILE RECORDING</h3>
6998
6999 <p>If the framerate of the recording is much lower than the framerate of
7000 the source, the video will accumulate in the recording buffers over
7001 time while the audio and video are well out of sync.  Decrease the
7002 <b>number of frames to buffer in the device</b> in
7003 <b>preferences-&gt;recording</b> so the excess frames are dropped instead of
7004 buffered.
7005 </p>
7006 <hr>
7007 <a name="APPLYING-LINEARIZE-FOLLOWED-BY-BLUR-DOESN_0027T-WORK"></a>
7008 <div class="header">
7009 <p>
7010 Previous: <a href="#SYNCHRONIZATION-LOST-WHILE-RECORDING" accesskey="p" rel="prev">SYNCHRONIZATION LOST WHILE RECORDING</a>, Up: <a href="#TROUBLESHOOTING" accesskey="u" rel="up">TROUBLESHOOTING</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
7011 </div>
7012 <a name="APPLYING-LINEARIZE-FOLLOWED-BY-BLUR-DOESN_0027T-WORK-1"></a>
7013 <h3 class="section">16.5 APPLYING LINEARIZE FOLLOWED BY BLUR DOESN&rsquo;T WORK</h3>
7014
7015 <p>The linearize effect uses the pow function while the blur effect uses a
7016 number of exp functions in the math library.  For some reason, using
7017 the pow function breaks later calls to the exp functions in the math
7018 library.  You need to apply linearize after blur to get it to work.
7019 </p>
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029 <hr>
7030 <a name="SECRETS-OF-CINELERRA"></a>
7031 <div class="header">
7032 <p>
7033 Next: <a href="#SECRETS-OF-CINELERRA-EFFECTS" accesskey="n" rel="next">SECRETS OF CINELERRA EFFECTS</a>, Previous: <a href="#TROUBLESHOOTING" accesskey="p" rel="prev">TROUBLESHOOTING</a>, Up: <a href="#Top" accesskey="u" rel="up">TOP</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
7034 </div>
7035 <a name="SECRETS-OF-CINELERRA-1"></a>
7036 <h2 class="chapter">17 SECRETS OF CINELERRA</h2>
7037
7038 <p>In this section, you&rsquo;ll find ways to apply Cinelerra to common
7039 problems.  Other sections are arranged in order of the tools and what
7040 the tools are used for.  This section is arranged in order of the
7041 problems and what tools are used to solve the problems.
7042 </p>
7043 <table class="menu" border="0" cellspacing="0">
7044 <tr><td align="left" valign="top">&bull; <a href="#DOLBY-PRO-LOGIC-ENCODING" accesskey="1">DOLBY PRO LOGIC ENCODING</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
7045 </td></tr>
7046 <tr><td align="left" valign="top">&bull; <a href="#ANALOG-TV-CLEANING" accesskey="2">ANALOG TV CLEANING</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
7047 </td></tr>
7048 <tr><td align="left" valign="top">&bull; <a href="#DEFEATING-INTERLACING" accesskey="3">DEFEATING INTERLACING</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
7049 </td></tr>
7050 <tr><td align="left" valign="top">&bull; <a href="#MAKING-VIDEO-LOOK-LIKE-FILM" accesskey="4">MAKING VIDEO LOOK LIKE FILM</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
7051 </td></tr>
7052 <tr><td align="left" valign="top">&bull; <a href="#CLEARING-OUT-HAZE" accesskey="5">CLEARING OUT HAZE</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
7053 </td></tr>
7054 <tr><td align="left" valign="top">&bull; <a href="#MAKING-A-DVD" accesskey="6">MAKING A DVD</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
7055 </td></tr>
7056 <tr><td align="left" valign="top">&bull; <a href="#MAKING-A-RINGTONE" accesskey="7">MAKING A RINGTONE</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
7057 </td></tr>
7058 <tr><td align="left" valign="top">&bull; <a href="#TIME-STRETCHING-AUDIO" accesskey="8">TIME STRETCHING AUDIO</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
7059 </td></tr>
7060 <tr><td align="left" valign="top">&bull; <a href="#PITCH-SHIFTING-AUDIO" accesskey="9">PITCH SHIFTING AUDIO</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
7061 </td></tr>
7062 <tr><td align="left" valign="top">&bull; <a href="#TEXT-TO-MOVIE">TEXT TO MOVIE</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
7063 </td></tr>
7064 </table>
7065
7066
7067 <hr>
7068 <a name="DOLBY-PRO-LOGIC-ENCODING"></a>
7069 <div class="header">
7070 <p>
7071 Next: <a href="#ANALOG-TV-CLEANING" accesskey="n" rel="next">ANALOG TV CLEANING</a>, Up: <a href="#SECRETS-OF-CINELERRA" accesskey="u" rel="up">SECRETS OF CINELERRA</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
7072 </div>
7073 <a name="DOLBY-PRO-LOGIC-ENCODING-1"></a>
7074 <h3 class="section">17.1 DOLBY PRO LOGIC ENCODING</h3>
7075
7076 <p>Dolby pro logic is an easy way to output 6 channel audio from a 2
7077 channel soundcard with degraded but useful results.  Rudimentary Dolby
7078 pro logic encoding can be achieved with clever usage of the effects.
7079 </p>
7080 <p>Create 2 audio tracks with the same audio.  Apply <b>invert audio</b> to
7081 one track.  The signal comes out of the back speakers.
7082 </p>
7083 <p>Create a single audio track with monaural audio of a different source. 
7084 Center it in the <b>pan</b> control.  The signal comes out of the center
7085 speaker.
7086 </p>
7087 <p>Create other tracks with different signals and pan them left or right
7088 to put signals in the front left or right speaker.
7089 </p>
7090 <p>Finally, if a copy of the signal in the back speakers is desired in any
7091 single front speaker, the signal in the back speakers must be delayed
7092 by at least 0.05 seconds and a single new track should be created.  Pan
7093 the new track to orient the signal in the front speakers.
7094 </p>
7095 <p>If the same signal is desired in all the speakers except the center
7096 speaker, delay the back speakers by 0.5 seconds and delay either the
7097 front left or front right by 0.2 seconds.
7098 </p>
7099 <p>If you want to hear something from the subwoofer, create a new track,
7100 select a range, drop a synthesizer effect, and set the frequency below
7101 60 Hz.  The subwoofer merely plays anything below around 60Hz.
7102 </p>
7103 <p>Other tricks you can perform to separate the speakers are parametric
7104 equalization to play only selected ranges of frequencies through
7105 different speakers and lowpass filtering to play signals through the
7106 subwoofer.
7107 </p>
7108
7109
7110
7111 <hr>
7112 <a name="ANALOG-TV-CLEANING"></a>
7113 <div class="header">
7114 <p>
7115 Next: <a href="#DEFEATING-INTERLACING" accesskey="n" rel="next">DEFEATING INTERLACING</a>, Previous: <a href="#DOLBY-PRO-LOGIC-ENCODING" accesskey="p" rel="prev">DOLBY PRO LOGIC ENCODING</a>, Up: <a href="#SECRETS-OF-CINELERRA" accesskey="u" rel="up">SECRETS OF CINELERRA</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
7116 </div>
7117 <a name="ANALOG-TV-CLEANING-1"></a>
7118 <h3 class="section">17.2 ANALOG TV CLEANING</h3>
7119
7120
7121 <p>Unless you live in a rich nation like China or are a terrorist, you
7122 probably record analog TV more than you record digital TV.  The picture
7123 quality on analog TV is horrible but you can do things in Cinelerra to
7124 make it look more like it did in the studio.
7125 </p>
7126 <p>First, when capturing the video, capture it in the highest resolution
7127 possible.  For Europeans it&rsquo;s 720x576 and for Americans it&rsquo;s 720x480. 
7128 Don&rsquo;t bother adjusting the brightness or contrast in the recording
7129 monitor, although maxing out the color is useful.  Capture it using
7130 MJPEG or uncompressed Component Video if possible.  If those are too
7131 demanding, then capture it using JPEG.  RGB should be a last resort.
7132 </p>
7133 <p>Now on the timeline use <b>Settings-&gt;Format</b> to set a YUV colorspace. 
7134 Drop a <b>Downsample</b> effect on the footage.  Set it for 
7135 </p>
7136 <div class="example">
7137 <pre class="example">Horizontal:        2
7138 Horizontal offset: 0
7139 Vertical:          2
7140 Vertical offset:   0
7141
7142       red
7143   x   green
7144   x   blue
7145       alpha
7146 </pre></div>
7147
7148 <p>Use the camera tool to shift the picture up or down a line to remove
7149 the most color interference from the image.  This is the difference
7150 we&rsquo;re looking for:
7151 </p>
7152 <br>
7153
7154 <img src="cleaning1.png" alt="cleaning1">
7155
7156 <p>If you have vertical blanking information or crawls which constantly
7157 change in each frame, block them out with the <b>Mask</b> tool.  This
7158 improves compression ratios.
7159 </p>
7160 <p>This is about all you can do without destroying more data than you
7161 would naturally lose in compression.  The more invasive cleaning
7162 techniques involve deinterlacing.
7163 </p>
7164
7165
7166
7167
7168 <hr>
7169 <a name="DEFEATING-INTERLACING"></a>
7170 <div class="header">
7171 <p>
7172 Next: <a href="#MAKING-VIDEO-LOOK-LIKE-FILM" accesskey="n" rel="next">MAKING VIDEO LOOK LIKE FILM</a>, Previous: <a href="#ANALOG-TV-CLEANING" accesskey="p" rel="prev">ANALOG TV CLEANING</a>, Up: <a href="#SECRETS-OF-CINELERRA" accesskey="u" rel="up">SECRETS OF CINELERRA</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
7173 </div>
7174 <a name="DEFEATING-INTERLACING-1"></a>
7175 <h3 class="section">17.3 DEFEATING INTERLACING</h3>
7176
7177
7178 <p>Interlacing is done on most video sources because it costs too much to
7179 build progressive scanning cameras and progressive scanning CRT&rsquo;s. 
7180 Many a consumer has been dissapointed to spend 5 paychecks on a
7181 camcorder and discover what horrible jagged images it produces on a
7182 computer monitor.
7183 </p>
7184 <p>As for progressive scanning camcorders, forget it.  Cost factors are
7185 probably going to keep progressive scanning cameras from ever equalling
7186 the spatial resolution of interlaced cameras.  Interlacing is here to
7187 stay.  That&rsquo;s why they made deinterlacing effects in Cinelerra.
7188 </p>
7189 <p>We don&rsquo;t believe there has ever been a perfect deinterlacing effect. 
7190 They&rsquo;re either irreversible or don&rsquo;t work.  Cinelerra cuts down the
7191 middle by providing deinterlacing tools that are irreversible sometimes
7192 and don&rsquo;t work sometimes but are neither one or the other.
7193 </p>
7194 <p><b>Line Doubling</b>
7195 </p>
7196 <p>This one is done by the <b>Deinterlace</b> effect when set to <b>Odd
7197 lines</b> or <b>Even lines</b>.  When applied to a track it reduces the
7198 vertical resolution by 1/2 and gives you progressive frames with
7199 stairstepping.  This is only useful when followed by a scale effect
7200 which reduces the image to half its size.
7201 </p>
7202 <p><b>Line averaging</b>
7203 </p>
7204 <p>The <b>Deinterlace</b> effect when set to <b>Average even lines</b> or
7205 <b>Average odd lines</b> does exactly what line doubling does except
7206 instead of making straight copies of the lines it makes averages of the
7207 lines.  This is actually useful for all scaling.
7208 </p>
7209 <p>There&rsquo;s an option for adaptive line averaging which selects which lines
7210 to line average and which lines to leave interlaced based on the
7211 difference between the lines.  It doesn&rsquo;t work.
7212 </p>
7213 <p><b>Inverse Telecine</b>
7214 </p>
7215 <p>This is the most effective deinterlacing tool when the footage is an
7216 NTSC TV broadcast of a film.  See <a href="#INVERSE-TELECINE">INVERSE TELECINE</a>.
7217 </p>
7218
7219 <p><b>Time base correction</b>
7220 </p>
7221 <p>The first three tools either destroy footage irreversibly or don&rsquo;t work
7222 sometimes.  <b>Time base correction</b> is last because it&rsquo;s the perfect
7223 deinterlacing tool.  It leaves the footage intact.  It doesn&rsquo;t reduce
7224 resolution, perceptually at least.  It doesn&rsquo;t cause jittery timing.
7225 </p>
7226 <p>The <b>Frames to Fields</b> effect converts each frame to two frames, so
7227 it must be used on a timeline whose project frame rate is twice the
7228 footage&rsquo;s frame rate.  In the first frame it puts a line averaged copy
7229 of the even lines.  In the second frame it puts a line averaged copy of
7230 the odd lines.  When played back at full framerates it gives the
7231 illusion of progressive video with no loss of detail.
7232 </p>
7233 <p>Best of all, this effect can be reversed with the <b>Fields to frames</b>
7234 effect.  That one combines two frames of footage back into the one
7235 original interlaced frame of half the framerate.
7236 </p>
7237 <p>Be aware that frames to fields inputs frames at half the framerate as
7238 the project.  Effects before frames to fields process at the reduced
7239 framerate.
7240 </p>
7241 <p>Unfortunately, the output of <b>Frames to Fields</b> can&rsquo;t be compressed
7242 as efficiently as the original because it introduces vertical twitter
7243 and a super high framerate.
7244 </p>
7245 <p>Interlaced 29.97fps footage can be made to look like film by applying
7246 <b>Frames to Fields</b> and then reducing the project frame rate of the
7247 resulting 59.94fps footage to 23.97fps.  This produces no timing jitter
7248 and the occasional odd field gives the illusion of more detail than
7249 there would be if you just line averaged the original.
7250 </p>
7251
7252 <p><b>HDTV exceptions</b>
7253 </p>
7254 <p>1920x1080 HDTV is encoded a special way.  If it&rsquo;s a broadcast of
7255 original HDTV film, an inverse telecine works fine.  If it&rsquo;s a
7256 rebroadcast of a 720x480 source, you need to use a time base and line
7257 doubling algorithm to deinterlace it, See <a href="#g_t1080-TO-480">1080 TO 480</a>.
7258 </p>
7259
7260
7261
7262 <hr>
7263 <a name="MAKING-VIDEO-LOOK-LIKE-FILM"></a>
7264 <div class="header">
7265 <p>
7266 Next: <a href="#CLEARING-OUT-HAZE" accesskey="n" rel="next">CLEARING OUT HAZE</a>, Previous: <a href="#DEFEATING-INTERLACING" accesskey="p" rel="prev">DEFEATING INTERLACING</a>, Up: <a href="#SECRETS-OF-CINELERRA" accesskey="u" rel="up">SECRETS OF CINELERRA</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
7267 </div>
7268 <a name="MAKING-VIDEO-LOOK-LIKE-FILM-1"></a>
7269 <h3 class="section">17.4 MAKING VIDEO LOOK LIKE FILM</h3>
7270
7271
7272
7273
7274 <p>Video sweetening is constantly getting better.  Lately the best thing
7275 you can do for dirt cheap consumer camcorder video is to turn it into
7276 progressive 24fps output.  While you can&rsquo;t really do that, you can get
7277 pretty close for the money.  Mind you, this procedure can degrade high
7278 quality video just as easily as it improves low quality video.  It
7279 should only be used for low quality video.
7280 </p>
7281 <ul>
7282 <li> 
7283 Step 1 - Set project framerate to twice the video framerate.
7284
7285 </li><li> 
7286 Step 2 - Apply a <b>Sharpen</b> effect.  Set it to sharpness: 25, no
7287 interlacing, and horizontal only.
7288
7289 </li><li> 
7290 Step 3 - Drop a <b>Frame to Fields</b> effect on the same track.  Set
7291 Average Empty Rows on and play through the video a few times to figure
7292 out which field is first.  If the wrong field is first, the motion is
7293 shaky.  Secondly, any editing in the doubled frame rate may now screw
7294 up the field order.  We&rsquo;re still figuring out the easiest way to
7295 support warnings for field glitches but for now you need to go back to
7296 the normal framerate to do editing or play test to make sure the fields
7297 are right.
7298
7299
7300 </li><li> 
7301 Step 4 - Render just the video to the highest quality file possible.
7302
7303 </li><li> 
7304 Step 5 - Import the video back to a new track.  Set the project
7305 framerate to 24.  The new track should now display more filmish and
7306 sharper images than the original footage.
7307
7308 </li></ul>
7309
7310 <p>This entire procedure could be implemented in one nonrealtime effect,
7311 but the biggest problem with that is you&rsquo;ll most often want to keep the
7312 field based output and the 24fps output for posterity.  A nonrealtime
7313 effect would require all that processing just for the 24fps copy. 
7314 Still debating that one.
7315 </p>
7316
7317
7318
7319
7320
7321
7322
7323
7324 <hr>
7325 <a name="CLEARING-OUT-HAZE"></a>
7326 <div class="header">
7327 <p>
7328 Next: <a href="#MAKING-A-DVD" accesskey="n" rel="next">MAKING A DVD</a>, Previous: <a href="#MAKING-VIDEO-LOOK-LIKE-FILM" accesskey="p" rel="prev">MAKING VIDEO LOOK LIKE FILM</a>, Up: <a href="#SECRETS-OF-CINELERRA" accesskey="u" rel="up">SECRETS OF CINELERRA</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
7329 </div>
7330 <a name="CLEARING-OUT-HAZE-1"></a>
7331 <h3 class="section">17.5 CLEARING OUT HAZE</h3>
7332
7333 <p>Let&rsquo;s face it, if you&rsquo;re employed you live in Silicon Valley.  As such
7334 you probably photograph a lot of haze and never see blue sky ever. 
7335 Even if you can afford to briefly go somewhere where there is blue sky,
7336 horizon shots usually can stand for more depth.  This is what the
7337 <b>gradient effect</b> is for.
7338 </p>
7339 <p>Drop the gradient effect on hazy tracks.  Set the following parameters:
7340 </p>
7341 <div class="example">
7342 <pre class="example">Angle: 0
7343 Inner radius: 0
7344 Outer radius: 40
7345 Inner color: blue 100% alpha
7346 Outer color: blue 0% alpha
7347 </pre></div>
7348
7349 <p>It&rsquo;s important to set the 0% alpha color to blue even though it&rsquo;s 0%
7350 alpha.  The color of the outer alpha is still interpolated with the
7351 inner color.  This is a generally applicable setting for the gradient. 
7352 Some scenes may work better with orange or brown for an evening feel.
7353 </p>
7354
7355
7356
7357
7358
7359
7360 <hr>
7361 <a name="MAKING-A-DVD"></a>
7362 <div class="header">
7363 <p>
7364 Next: <a href="#MAKING-A-RINGTONE" accesskey="n" rel="next">MAKING A RINGTONE</a>, Previous: <a href="#CLEARING-OUT-HAZE" accesskey="p" rel="prev">CLEARING OUT HAZE</a>, Up: <a href="#SECRETS-OF-CINELERRA" accesskey="u" rel="up">SECRETS OF CINELERRA</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
7365 </div>
7366 <a name="MAKING-A-DVD-1"></a>
7367 <h3 class="section">17.6 MAKING A DVD</h3>
7368
7369 <p><b>A single chapter DVD</b>
7370 </p>
7371 <p>Make a single chapter DVD by rendering video to an MPEG video file. 
7372 The video should be 720x480, 29.97fps.  The aspect ratio should be 16x9
7373 or 4x3.
7374 </p>
7375 <p>Use the YUV 4:2:0 color model and DVD preset.  Set the bitrate to the
7376 desired bitrate.  It&rsquo;s not clear exactly what other parameters the MPEG
7377 encoder uses in the DVD preset but we&rsquo;ve enabled the following:
7378 </p>
7379 <div class="example">
7380 <pre class="example">Derivative: MPEG-2
7381 Fixed bitrate
7382 I frame distance: 15
7383 P frame distance: 0
7384 Sequence start codes in every GOP
7385 </pre></div>
7386
7387 <p>Render the audio to an AC3 audio file.  Any bitrate can be used.
7388 </p>
7389 <p><b>Dvdrtools</b> must be downloaded to generate the actual DVD
7390 filesystem.  The actual usage of dvdrtools changes frequently but
7391 currently it involves the mkisofs and ifogen programs.  Mkisofs is
7392 built automatically in dvdrtools but ifogen may have to be built
7393 manually by entering the <b>video</b> directory and running <b>make
7394 ifogen</b>.  Mkisofs and ifogen must be put into /usr/bin manually.
7395 </p>
7396 <p>Also, the <b>mplex</b> program from <b>mjpegtools</b> must be installed.  The
7397 mjpegtools package is built in the hvirtual distribution and the mplex
7398 utility may be extracted from there.
7399 </p>
7400 <p>Given the files audio.ac3 and video.m2v, rendered by Cinelerra, the
7401 following commands pack them into a dvd readable by commercial
7402 appliances.
7403 </p>
7404 <div class="example">
7405 <pre class="example">mplex -M -f 8 -o final.mpg audio.ac3 video.m2v
7406 mkdir -p dvd/VIDEO_TS
7407 ifogen final.mpg -o dvd
7408 ifogen -T -o dvd
7409 mkisofs -dvd-video -udf -o dvd.iso dvd/
7410 </pre></div>
7411
7412 <p>Chapters may be set with the following.  The units are seconds.  Version
7413 0.3.1 ignores the 1st chapter, so it has to be specified as 0.
7414 </p>
7415 <div class="example">
7416 <pre class="example">ifogen -o dvd --chapters=0,0021.788,0047.447,0077.043 final.mpg
7417 </pre></div>
7418
7419 <p>Replace the chapter times.
7420 </p>
7421 <p>dvd.iso can be burned directly to a DVD with the following:
7422 </p>
7423 <div class="example">
7424 <pre class="example">dvdrecord -ignsize -dao -v dev=/dev/hdc fs=67108864 dvd.iso
7425 </pre></div>
7426
7427 <p>The argument to dev= is the IDE device of the DVD drive.  Burning DVD&rsquo;s
7428 through SCSI is currently not supported.
7429 </p>
7430
7431
7432
7433
7434
7435
7436
7437 <hr>
7438 <a name="MAKING-A-RINGTONE"></a>
7439 <div class="header">
7440 <p>
7441 Next: <a href="#TIME-STRETCHING-AUDIO" accesskey="n" rel="next">TIME STRETCHING AUDIO</a>, Previous: <a href="#MAKING-A-DVD" accesskey="p" rel="prev">MAKING A DVD</a>, Up: <a href="#SECRETS-OF-CINELERRA" accesskey="u" rel="up">SECRETS OF CINELERRA</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
7442 </div>
7443 <a name="MAKING-A-RINGTONE-1"></a>
7444 <h3 class="section">17.7 MAKING A RINGTONE</h3>
7445
7446 <p>This is how we made ringtones for the low end Motorola V180&rsquo;s and it&rsquo;ll
7447 probably work with any new phone.  Go to <b>File-&gt;Load files...</b> and
7448 load a sound file with Insertion strategy: <b>Replace current
7449 project</b>.  Go to <b>Settings-&gt;Format</b> change <b>Channels</b> to 1 and
7450 <b>Samplerate</b> to 16000 or 22050.
7451 </p>
7452 <p>Either highlight a region of the timeline or set in/out points to use
7453 for the ringtone.  To improve sound quality on the cell phone, you need
7454 the maximum amplitude in as many parts of the sound as possible.  Right
7455 click on track Audio 1 and select <b>Attach effect..</b>.  Highlight the
7456 <b>Compressor</b> effect and hit <b>Attach</b> in the attachment popup.
7457 </p>
7458 <p>Make sure the insertion point or highlighted area is in the region with
7459 the Compressor effect. Right click on track Audio 2 and select
7460 <b>Attach effect..</b>.  Highlight <b>Audio 1: Compressor</b> and hit
7461 <b>Attach</b>.  Click the Audio1 Compressor&rsquo;s magnifying glass
7462 <img src="magnify.png" alt="magnify"> to bring up the compressor GUI.
7463 </p>
7464 <p>Set the following parameters:
7465 </p>
7466 <div class="example">
7467 <pre class="example">Reaction secs: <b>-0.1</b>
7468 Decay secs: <b>0.1</b>
7469 Trigger Type: <b>Total</b>
7470 Trigger: <b>0</b>
7471 Smooth only: <b>No</b>
7472 </pre></div>
7473
7474
7475 <p>Click <b>Clear</b> to clear the graph.  Click anywhere in the
7476 grid area and drag a new point to 0 Output and -50 Input.  The graph
7477 should look like this.
7478 </p>
7479 <br>
7480 <img src="compress.png" alt="compress">
7481
7482 <p>Go to <b>File-&gt;Render</b>.  Specify the name of an mp3 file to output to. 
7483 Set the file format to <b>MPEG Audio</b>.  Click the wrench <img src="wrench.png" alt="wrench">
7484 for Audio and set <b>Layer</b> to <b>III</b> and <b>Kbits per second</b> to
7485 <b>24</b> or <b>32</b>.  Check <b>Render audio tracks</b> and uncheck <b>Render
7486 video tracks</b>.  Hit OK to render the file.
7487 </p>
7488 <p>The resulting .mp3 file must be uploaded to a web server.  Then, the
7489 phone&rsquo;s web browser must download the .mp3 file directly from the URL.
7490 There also may be a size limit on the file.
7491 </p>
7492
7493
7494
7495
7496
7497
7498 <hr>
7499 <a name="TIME-STRETCHING-AUDIO"></a>
7500 <div class="header">
7501 <p>
7502 Next: <a href="#PITCH-SHIFTING-AUDIO" accesskey="n" rel="next">PITCH SHIFTING AUDIO</a>, Previous: <a href="#MAKING-A-RINGTONE" accesskey="p" rel="prev">MAKING A RINGTONE</a>, Up: <a href="#SECRETS-OF-CINELERRA" accesskey="u" rel="up">SECRETS OF CINELERRA</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
7503 </div>
7504 <a name="TIME-STRETCHING-AUDIO-1"></a>
7505 <h3 class="section">17.8 TIME STRETCHING AUDIO</h3>
7506
7507 <p>It may appear that time stretching audio is a matter of selecting a
7508 region of the audio tracks, enabling recording for the desired tracks,
7509 going to <b>Audio-&gt;Render Effect</b>, and applying <b>Time Stretch</b>.  In
7510 actuality there are 3 audio effects for time stretching: <b>Time
7511 Stretch</b>, <b>Resample</b>, and <b>Asset info dialog</b>.
7512 </p>
7513 <p>Time Stretch applies a fast fourier transform to try to change the
7514 duration without changing the pitch, but this introduces windowing
7515 artifacts to the audio.  It&rsquo;s only useful for large changes in time
7516 because obvious changes in duration make windowing artifacts less
7517 obtrusive.
7518 </p>
7519 <p>For smaller changes in duration, in the range of 5%, <b>Resample</b>
7520 should be used.  This changes the pitch of the audio but small enough
7521 changes aren&rsquo;t noticable.  Resample doesn&rsquo;t introduce any windowing
7522 artifacts, so this is most useful for slight duration changes where the
7523 listener isn&rsquo;t supposed to know what&rsquo;s going on.
7524 </p>
7525 <p>Another way to change duration slightly is to go to the <b>Resources</b>
7526 window, highlight the <b>media</b> folder, right click on an audio file,
7527 click on <b>Info</b>.  Adjust the sample rate in the <b>Info</b> dialog to
7528 adjust the duration.  This method also requires left clicking on the
7529 right boundary of the audio tracks and dragging left or right to
7530 correspond to the length changes.
7531 </p>
7532
7533 <hr>
7534 <a name="PITCH-SHIFTING-AUDIO"></a>
7535 <div class="header">
7536 <p>
7537 Next: <a href="#TEXT-TO-MOVIE" accesskey="n" rel="next">TEXT TO MOVIE</a>, Previous: <a href="#TIME-STRETCHING-AUDIO" accesskey="p" rel="prev">TIME STRETCHING AUDIO</a>, Up: <a href="#SECRETS-OF-CINELERRA" accesskey="u" rel="up">SECRETS OF CINELERRA</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
7538 </div>
7539 <a name="PITCH-SHIFTING-AUDIO-1"></a>
7540 <h3 class="section">17.9 PITCH SHIFTING AUDIO</h3>
7541
7542 <p>Like the time stretching methods, there are three pitch shifting
7543 methods: <b>Pitch shift</b>, <b>Resample</b>, and <b>Asset info dialog</b>. 
7544 Pitch shift is a realtime effect which can be dragged and dropped onto
7545 recordable audio tracks.  Pitch shift uses a fast fourier transform to
7546 try to change the pitch without changing the duration, but this
7547 introduces windowing artifacts.
7548 </p>
7549 <p>Because the windowing artifacts are less obtrusive in audio which is
7550 obvously pitch shifted, Pitch shift is mainly useful for extreme pitch
7551 changes.  For mild pitch changes, use <b>Resample</b> from the
7552 <b>Audio-&gt;Render Effect</b> interface.  Resample can change the pitch
7553 within 5% without a noticable change in duration.
7554 </p>
7555 <p>Another way to change pitch slightly is to go to the <b>Resources</b>
7556 window, highlight the <b>media</b> folder, right click on an audio file,
7557 click on <b>Info</b>.  Adjust the sample rate in the <b>Info</b> dialog to
7558 adjust the pitch.  This method also requires left clicking on the right
7559 boundary of the audio tracks and dragging left or right to correspond
7560 to the length changes.
7561 </p>
7562
7563 <hr>
7564 <a name="TEXT-TO-MOVIE"></a>
7565 <div class="header">
7566 <p>
7567 Previous: <a href="#PITCH-SHIFTING-AUDIO" accesskey="p" rel="prev">PITCH SHIFTING AUDIO</a>, Up: <a href="#SECRETS-OF-CINELERRA" accesskey="u" rel="up">SECRETS OF CINELERRA</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
7568 </div>
7569 <a name="TEXT-TO-MOVIE-1"></a>
7570 <h3 class="section">17.10 TEXT TO MOVIE</h3>
7571
7572
7573
7574 <p>Text to movie was added when another one of those startups whose name
7575 was an unmemorable combination of farting noises that the venture
7576 capitalist heard, started charging money for a ridulously simple program
7577 that converted scripts directly to movies.  It was such a simple
7578 program, we decided to add most of the functionality to Cinelerra.
7579 </p>
7580 <p>The easiest way to make a movie is to copy <b>tests/text2movie</b> and
7581 <b>tests/text2movie.xml</b> as a starting point.  Load the
7582 <b>text2movie.xml</b> file to see the movie.
7583 </p>
7584 <p>The <b>text2movie</b> file acts like a normal asset, except changes to it
7585 are immediately reflected on the timeline, without reloading.  Also, the
7586 length is infiinite.  Edit the <b>text2movie</b> file to change the
7587 script.  If the length of the movie increases, drag the right edit
7588 handle to extend the edit or use <b>edit-&gt;edit length</b>.
7589 </p>
7590 <p>1 audio channel is created for every character.  The frame rate, sample
7591 rate, and frame size are fixed.  Get it from the <b>asset window</b>. 
7592 Right click on the asset and go to <b>Asset info...</b>  Camera angles are
7593 fixed.
7594 </p>
7595 <p>Since its only use was to show dialog between 2 people, that&rsquo;s the
7596 functionality we focused on.  The character model and voice is selected
7597 separately in the script, because that was how it was done with the fee
7598 service.  The models are defined in model files, in the Cinelerra
7599 executable directory.  Usually <b>/opt/cinelerra/models</b>.
7600 </p>
7601 <p>There is a search path for models, starting with the directory the
7602 script is in.  You can define new models for the script, without
7603 affecting the entire system.  The model files are the exact name that
7604 appears in the script.  They define the total size of the model and the
7605 images used in the model.
7606 </p>
7607 <p>The models are 2D png images, because all the animations are baked.  No
7608 custom movement is currently supported, that would require a 3D
7609 renderer.  
7610 </p>
7611 <p>Some actions are implemented.  Character2 can cut off character1 if
7612 character1&rsquo;s dialog ends in <b>...</b>
7613 </p>
7614 <p>Inserting <b>[pause]</b> anywhere causes the character to pause.  Useful
7615 for adjusting the timing of dialog.
7616 </p>
7617 <p>Speech synthesis is pretty lousy.  Punctuation and spelling needs to be
7618 adjusted based on the sound.  The dialog is rendered on-demand, so there
7619 is a delay when each character starts to speak.  Split dialog into
7620 shorter blocks to reduce the delay.
7621 </p>
7622
7623
7624
7625
7626
7627 <hr>
7628 <a name="SECRETS-OF-CINELERRA-EFFECTS"></a>
7629 <div class="header">
7630 <p>
7631 Next: <a href="#PLUGIN-AUTHORING" accesskey="n" rel="next">PLUGIN AUTHORING</a>, Previous: <a href="#SECRETS-OF-CINELERRA" accesskey="p" rel="prev">SECRETS OF CINELERRA</a>, Up: <a href="#Top" accesskey="u" rel="up">TOP</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
7632 </div>
7633 <a name="SECRETS-OF-CINELERRA-EFFECTS-1"></a>
7634 <h2 class="chapter">18 SECRETS OF CINELERRA EFFECTS</h2>
7635
7636 <p>Most effects in Cinelerra can be figured out just by using them and
7637 tweeking.  Here are brief descriptions of effects which you might not
7638 utilize fully by mere experimentation.
7639 </p>
7640
7641 <table class="menu" border="0" cellspacing="0">
7642 <tr><td align="left" valign="top">&bull; <a href="#g_t1080-TO-480" accesskey="1">1080 TO 480</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">How to convert HDTV into SD
7643 </td></tr>
7644 <tr><td align="left" valign="top">&bull; <a href="#CHROMA-KEY" accesskey="2">CHROMA KEY</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Create transparency based on color similarities.
7645 </td></tr>
7646 <tr><td align="left" valign="top">&bull; <a href="#COMPRESSOR" accesskey="3">COMPRESSOR</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">How to reduce the dynamic range of audio.
7647 </td></tr>
7648 <tr><td align="left" valign="top">&bull; <a href="#DECIMATE" accesskey="4">DECIMATE</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">How to reduce frame rates by eliminating similar frames.
7649 </td></tr>
7650 <tr><td align="left" valign="top">&bull; <a href="#DEINTERLACE" accesskey="5">DEINTERLACE</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">How to convert interlaced video to progressive video.
7651 </td></tr>
7652 <tr><td align="left" valign="top">&bull; <a href="#DIFFERENCE-KEY" accesskey="6">DIFFERENCE KEY</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Create transparency based on color differences.
7653 </td></tr>
7654 <tr><td align="left" valign="top">&bull; <a href="#FIELDS-TO-FRAMES" accesskey="7">FIELDS TO FRAMES</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">How to recover interlaced video from bobbed video
7655 </td></tr>
7656 <tr><td align="left" valign="top">&bull; <a href="#FREEZE-FRAME" accesskey="8">FREEZE FRAME</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">How to stop action in the timeline.
7657 </td></tr>
7658 <tr><td align="left" valign="top">&bull; <a href="#HISTOGRAM" accesskey="9">HISTOGRAM</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">How to change the mapping of different brightness values.
7659 </td></tr>
7660 <tr><td align="left" valign="top">&bull; <a href="#INVERSE-TELECINE">INVERSE TELECINE</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">How to convert pulled down frames to progressive frames.
7661 </td></tr>
7662 <tr><td align="left" valign="top">&bull; <a href="#INTERPOLATE-VIDEO">INTERPOLATE VIDEO</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">How to create the illusion of higher framerates.
7663 </td></tr>
7664 <tr><td align="left" valign="top">&bull; <a href="#LENS">LENS</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Correcting spherical aberration
7665 </td></tr>
7666 <tr><td align="left" valign="top">&bull; <a href="#LINEARIZE">LINEARIZE</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Fix gamma in raw camera images
7667 </td></tr>
7668 <tr><td align="left" valign="top">&bull; <a href="#LIVE-AUDIO">LIVE AUDIO</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Pass audio from the soundcard directly to the timeline.
7669 </td></tr>
7670 <tr><td align="left" valign="top">&bull; <a href="#LIVE-VIDEO">LIVE VIDEO</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Pass video from the capture card directly to the timeline.
7671 </td></tr>
7672 <tr><td align="left" valign="top">&bull; <a href="#LOOP">LOOP</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">How to loop regions of the timeline.
7673 </td></tr>
7674 <tr><td align="left" valign="top">&bull; <a href="#MOTION">MOTION</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Motion tracking with rotation.
7675 </td></tr>
7676 <tr><td align="left" valign="top">&bull; <a href="#MOTION-2-POINT">MOTION 2 POINT</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Motion and rotation tracking from translation only.
7677 </td></tr>
7678 <tr><td align="left" valign="top">&bull; <a href="#REFRAMERT">REFRAMERT</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Changing the number of frames in a sequence.
7679 </td></tr>
7680 <tr><td align="left" valign="top">&bull; <a href="#REFRAME">REFRAME</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Changing the number of frames in a sequence with rendering.
7681 </td></tr>
7682 <tr><td align="left" valign="top">&bull; <a href="#RESAMPLE">RESAMPLE</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Change the number of samples in a sequence with rendering.
7683 </td></tr>
7684 <tr><td align="left" valign="top">&bull; <a href="#REVERSE-VIDEO_002fAUDIO">REVERSE VIDEO/AUDIO</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">How to play regions in reverse.
7685 </td></tr>
7686 <tr><td align="left" valign="top">&bull; <a href="#SWAP-FRAMES">SWAP FRAMES</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Fixing temporal field order
7687 </td></tr>
7688 <tr><td align="left" valign="top">&bull; <a href="#THRESHOLD">THRESHOLD</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">How to get monochrome out of a region of the image.
7689 </td></tr>
7690 <tr><td align="left" valign="top">&bull; <a href="#TIME-AVERAGE">TIME AVERAGE</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">How to stack images.
7691 </td></tr>
7692 <tr><td align="left" valign="top">&bull; <a href="#TITLER">TITLER</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">How to add text to a track from inside Cinelerra.
7693 </td></tr>
7694 <tr><td align="left" valign="top">&bull; <a href="#VIDEO-SCOPE">VIDEO SCOPE</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">How to view the dynamic range of intensity and hue.
7695 </td></tr>
7696 </table>
7697
7698
7699
7700
7701 <hr>
7702 <a name="g_t1080-TO-480"></a>
7703 <div class="header">
7704 <p>
7705 Next: <a href="#CHROMA-KEY" accesskey="n" rel="next">CHROMA KEY</a>, Up: <a href="#SECRETS-OF-CINELERRA-EFFECTS" accesskey="u" rel="up">SECRETS OF CINELERRA EFFECTS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
7706 </div>
7707 <a name="g_t1080-TO-480-1"></a>
7708 <h3 class="section">18.1 1080 TO 480</h3>
7709
7710
7711 <p>Most TV broadcasts are recieved with a 1920x1080 resolution but
7712 originate from a 720x480 source at the studio.  It&rsquo;s a waste of space
7713 to compress the entire 1920x1080 if the only resolvable details are
7714 720x480.  Unfortunately resizing 1920x1080 video to 720x480 isn&rsquo;t as
7715 simple as shrinking it.
7716 </p>
7717 <p>At the TV station the original 720x480 footage was first converted to
7718 fields of 720x240.  Each field was then scaled up to 1920x540.  The two
7719 1920x540 fields were finally combined with interlacing to form the
7720 1920x1080 image.  This technique allows a consumer TV to display the
7721 resampled image without extra circuitry to handle 720x480 interlacing
7722 in a 1920x1080 image.
7723 </p>
7724 <p>If you merely deinterlaced the 1920x1080 images, you would end up with
7725 resolution of 720x240.  The <b>1080 to 480</b> effect properly extracts
7726 two 1920x540 size fields from the image, resizes them separately, and
7727 combines them again to restore a 1920x480 interlaced image.  The
7728 <b>scale</b> effect must then be applied to reduce the horizontal size to
7729 960 or 720 depending on the original aspect ratio.
7730 </p>
7731 <p>The tracks to which <b>1080 to 480</b> is applied need to be at 1920x1080
7732 resolution.  The project settings in <b>settings-&gt;format</b> should be at
7733 least 720x480 resolution.
7734 </p>
7735 <p>The effect doesn&rsquo;t know if the first row in the 1920x1080 image belongs
7736 to the first row of the 720x480 original.  You have to specify what the
7737 first row is in the effect configuration.
7738 </p>
7739 <p>The output of this effect is a small image in the middle of the
7740 original 1920x1080 frame.  Use the projector to center the output image
7741 in the playback.
7742 </p>
7743 <p>Finally, once you have 720x480 interlaced video you can either apply
7744 <b>frames to fields</b> of <b>inverse telecine</b> to further recover original
7745 progressive frames.
7746 </p>
7747
7748
7749
7750
7751
7752
7753 <hr>
7754 <a name="CHROMA-KEY"></a>
7755 <div class="header">
7756 <p>
7757 Next: <a href="#COMPRESSOR" accesskey="n" rel="next">COMPRESSOR</a>, Previous: <a href="#g_t1080-TO-480" accesskey="p" rel="prev">1080 TO 480</a>, Up: <a href="#SECRETS-OF-CINELERRA-EFFECTS" accesskey="u" rel="up">SECRETS OF CINELERRA EFFECTS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
7758 </div>
7759 <a name="CHROMA-KEY-1"></a>
7760 <h3 class="section">18.2 CHROMA KEY</h3>
7761
7762
7763 <p>This effect erases pixels which match the selected color.  They are
7764 replaced with black if there is no alpha channel and transparency if
7765 there is an alpha channel.  The selection of color model is important
7766 to determine the behavior.
7767 </p>
7768 <p>Chroma key uses either the lightness or the hue to determine what is
7769 erased.  <b>Use value</b> singles out only the lightness to determine
7770 transparency.  Select a center color to erase using the <b>Color</b>
7771 button.  Alternatively a color can be picked directly from the output
7772 frame by first using the <b>color picker</b> in the compositor window and
7773 then selecting the <b>Use color picker</b> button.  This sets the chroma
7774 key color to the current color picker color.
7775 </p>
7776 <p>Be aware that the output of the chroma key is fed back to the
7777 compositor, so selecting a color again from the compositor will use the
7778 output of the chroma key effect.  The chroma key should be disabled
7779 when selecting colors with the color picker.
7780 </p>
7781
7782 <p>If the lightness or hue is within a certain threshold it&rsquo;s erased. 
7783 Increasing the threshold determines the range of colors to be erased. 
7784 It&rsquo;s not a simple on/off switch, however.  As the color approaches the
7785 edge of the threshold, it gradually gets erased if the slope is high or
7786 is rapidly erased if the slope is low.  The slope as defined here is
7787 the number of extra values flanking the threshold required to go from
7788 opaque to transparent.
7789 </p>
7790 <p>Normally threshold is very low when using a high slope.  The two
7791 parameters tend to be exclusive because slope fills in extra threshold.
7792 </p>
7793 <p>The slope tries to soften the edges of the chroma key but it doesn&rsquo;t
7794 work well for compressed sources.  A popular softening technique is to
7795 use a maximum slope and chain a blur effect below the chroma key effect
7796 to blur just the alpha.
7797 </p>
7798
7799
7800
7801
7802
7803
7804
7805
7806 <hr>
7807 <a name="COMPRESSOR"></a>
7808 <div class="header">
7809 <p>
7810 Next: <a href="#DECIMATE" accesskey="n" rel="next">DECIMATE</a>, Previous: <a href="#CHROMA-KEY" accesskey="p" rel="prev">CHROMA KEY</a>, Up: <a href="#SECRETS-OF-CINELERRA-EFFECTS" accesskey="u" rel="up">SECRETS OF CINELERRA EFFECTS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
7811 </div>
7812 <a name="COMPRESSOR-1"></a>
7813 <h3 class="section">18.3 COMPRESSOR</h3>
7814
7815 <p>Contrary to computer science experience, the audio compressor does not
7816 reduce the amount of data required to store the audio.  The audio
7817 compressor reduces the dynamic range of the audio.  In Cinelerra the
7818 compressor actually performs the function of an expander and
7819 compressor.
7820 </p>
7821 <p>The compressor works by calculating the maximum sound level within a
7822 certain time period of the current position.  The maximum sound level
7823 is taken as the input sound level.  For every input sound level there
7824 is an output sound level specified by the user.  The gain at the
7825 current position is adjusted so the maximum sound level in the time
7826 range is the user specified value.
7827 </p>
7828 <p>The compressor has a graph which correlates every input sound level to
7829 an output level.  The horizontal direction is the input sound level in
7830 dB.  The vertical direction is the ouptut sound level in dB.  The user
7831 specifies output sound levels by creating points on the graph.  Click
7832 in the graph to create a point.  If 2 points exist, drag one point
7833 across another point to delete it.  The most recent point selected has
7834 its vales displayed in textboxes for more precise adjustment.
7835 </p>
7836 <p>To make the compressor reduce the dynamic range of the audio, make all
7837 the output values greater than the input values except 0 db.  To make
7838 the compressor expand the dynamic range of the audio, make all the
7839 output values except 0 db less than the input values.  The algorithm
7840 currently limits all sound levels above 0 db to 0 db so to get an
7841 overloaded effect put a gain effect before the compressor to reduce all
7842 the levels and follow it with another gain effect to amplify all the
7843 levels back over 0 db.
7844 </p>
7845 <p><b>Reaction secs:</b> This determines where in relation to the current
7846 position the maximum sound level is taken and how fast the gain is
7847 adjusted to reach that peak.  It&rsquo;s notated in seconds.  If it&rsquo;s
7848 negative the compressor reads ahead of the current position to get the
7849 future peak.  The gain is ramped to that peak over one reaction time. 
7850 This allows it to hit the desired output level exactly when the input
7851 peak occurs at the current position.
7852 </p>
7853 <p>If the reaction time is positive the compressor scans only the current
7854 position for the gain and ramps gain over one reaction time to hit the
7855 desired output level.  It hits the output level exactly one reaction
7856 time after detecting the input peak.
7857 </p>
7858 <p><b>Decay secs:</b> If the peak is higher than the current level, the
7859 compressor ramps the gain up to the peak value.  Then if a future peak
7860 is less than the current peak it ramps the gain down.  The time taken
7861 to ramp the gain down can be greater than the time taken to ramp the
7862 gain up.  This ramping down time is the decay seconds.
7863 </p>
7864 <p><b>Trigger type:</b>  The compressor is a multichannel effect.  Several
7865 tracks can share one compressor.  How the signal from many tracks is
7866 interpreted is determined by the trigger type.
7867 </p>
7868 <p>The <b>Trigger</b> trigger type uses the value supplied in the <b>Trigger</b>
7869 textbox as the number of the track to use as input for the compressor. 
7870 This allows a track which isn&rsquo;t even heard to determine the loudness of
7871 the other tracks.
7872 </p>
7873 <p>The <b>Maximum</b> trigger takes the loudest track and uses it as the
7874 input for the compressor.
7875 </p>
7876 <p>The <b>Total</b> trigger type adds the signals from all the tracks and
7877 uses the total as the input for the compressor.  This is the most
7878 natural sounding compression and is ideal when multiple tracks are
7879 averaged into single speakers.
7880 </p>
7881
7882
7883 <p><b>Trigger:</b> The compressor is a multichannel effect.  Several tracks
7884 can share one compressor.  Normally only one track is scanned for the
7885 input peak.  This track is specified by the <b>Trigger</b>.  By sharing
7886 several tracks and playing with the trigger value, you can make a sine
7887 wave on one track follow the amplitude of a drum on another track for
7888 example.
7889 </p>
7890 <p><b>Smooth only:</b> For visualizing what the compressor is doing to the
7891 soundlevel, this option causes it to replace the soundwave with just
7892 the current peak value.  It makes it very easy to see how <b>reaction
7893 secs</b> affects the detected peak values.
7894 </p>
7895
7896
7897
7898
7899
7900
7901 <hr>
7902 <a name="DECIMATE"></a>
7903 <div class="header">
7904 <p>
7905 Next: <a href="#DEINTERLACE" accesskey="n" rel="next">DEINTERLACE</a>, Previous: <a href="#COMPRESSOR" accesskey="p" rel="prev">COMPRESSOR</a>, Up: <a href="#SECRETS-OF-CINELERRA-EFFECTS" accesskey="u" rel="up">SECRETS OF CINELERRA EFFECTS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
7906 </div>
7907 <a name="DECIMATE-1"></a>
7908 <h3 class="section">18.4 DECIMATE</h3>
7909
7910 <p>This effect drops frames from a track which are most similar in order
7911 to reduce the frame rate.  This is usually applied to a DVD to convert
7912 the 29.97 fps video to the 23.97 fps film rate but this decimate effect
7913 can take any input rate and convert it to any lower output rate.
7914 </p>
7915 <p>The output rate of <b>decimate</b> is the project frame rate.  The input
7916 rate is set in the <b>decimate</b> user interface.  To convert 29.97fps
7917 progressive video to 23.97fps film, apply a decimate effect to the
7918 track.  Set the decimate input rate to 29.97 and the project rate to
7919 23.97.
7920 </p>
7921 <p>Be aware every effect layered before decimate processes video at the
7922 decimate input rate and every effect layered after decimate processes
7923 video at the project frame rate.  Computationally intensive effects
7924 should come below decimate.
7925 </p>
7926
7927
7928
7929
7930
7931
7932
7933 <hr>
7934 <a name="DEINTERLACE"></a>
7935 <div class="header">
7936 <p>
7937 Next: <a href="#DIFFERENCE-KEY" accesskey="n" rel="next">DIFFERENCE KEY</a>, Previous: <a href="#DECIMATE" accesskey="p" rel="prev">DECIMATE</a>, Up: <a href="#SECRETS-OF-CINELERRA-EFFECTS" accesskey="u" rel="up">SECRETS OF CINELERRA EFFECTS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
7938 </div>
7939 <a name="DEINTERLACE-1"></a>
7940 <h3 class="section">18.5 DEINTERLACE</h3>
7941
7942 <p>The deinterlace effect has evolved over the years to deinterlacing and
7943 a whole lot more.  In fact two of the deinterlacing methods, <b>Inverse
7944 Telecine</b> and <b>Frames to Fields</b>, are separate effects.  The
7945 deinterlace effect offers several variations of line replication to
7946 eliminate comb artifacts in interlaced video.  It also has some line
7947 swapping tools to fix improperly captured video or make the result of a
7948 reverse effect display fields in the right order.
7949 </p>
7950
7951
7952
7953
7954
7955
7956
7957 <hr>
7958 <a name="DIFFERENCE-KEY"></a>
7959 <div class="header">
7960 <p>
7961 Next: <a href="#FIELDS-TO-FRAMES" accesskey="n" rel="next">FIELDS TO FRAMES</a>, Previous: <a href="#DEINTERLACE" accesskey="p" rel="prev">DEINTERLACE</a>, Up: <a href="#SECRETS-OF-CINELERRA-EFFECTS" accesskey="u" rel="up">SECRETS OF CINELERRA EFFECTS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
7962 </div>
7963 <a name="DIFFERENCE-KEY-1"></a>
7964 <h3 class="section">18.6 DIFFERENCE KEY</h3>
7965
7966 <p>The differency key creates transparency in areas which are similar
7967 between 2 frames.  The Difference key effect must be applied to 2
7968 tracks.  One track contains the action in front of a constant
7969 background and another track contains the background with nothing in
7970 front of it.  Apply the difference key to the track with the action and
7971 apply a shared copy of it to the track with the background.  The track
7972 with the background should be muted and underneath the track with the
7973 action and the colormodel should have an alpha channel.
7974 </p>
7975 <p>Pixels which are different between the background and action track are
7976 treated as opaque.  Pixels which are similar are treated as
7977 transparent.  Change <b>threshold</b> in the differency key window to make
7978 more pixels which aren&rsquo;t the same color transparent. Change <b>slope</b>
7979 to change the rate at which the transparency tapers off as pixels get
7980 more different.
7981 </p>
7982 <p>The slope as defined here is the number of extra values flanking the
7983 threshold required to go from opaque to transparent.  A high slope is
7984 more useful with a low threshold because slope fills in extra
7985 threshold.
7986 </p>
7987 <p><b>Use value</b> causes the intensity of pixels to be compared instead of
7988 the color.
7989 </p>
7990 <p>Applying a blur to the top track with just the alpha channel blurred
7991 can soften the transparency border.
7992 </p>
7993
7994
7995
7996
7997 <hr>
7998 <a name="FIELDS-TO-FRAMES"></a>
7999 <div class="header">
8000 <p>
8001 Next: <a href="#FREEZE-FRAME" accesskey="n" rel="next">FREEZE FRAME</a>, Previous: <a href="#DIFFERENCE-KEY" accesskey="p" rel="prev">DIFFERENCE KEY</a>, Up: <a href="#SECRETS-OF-CINELERRA-EFFECTS" accesskey="u" rel="up">SECRETS OF CINELERRA EFFECTS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
8002 </div>
8003 <a name="FIELDS-TO-FRAMES-1"></a>
8004 <h3 class="section">18.7 FIELDS TO FRAMES</h3>
8005
8006 <p>This effects reads frames at twice the project framerate, combining 2
8007 input frames into a single interlaced output frame.  Effects preceeding
8008 <b>fields to frames</b> process frames at twice the project frame rate. 
8009 Each input frame is called a field.
8010 </p>
8011 <p><b>Fields to frames</b> needs to know what field corresponds to what lines
8012 in the output frame.  The easiest way to figure it out is to try both
8013 options in the window.  If the input fields are the result of a line
8014 doubling process like <b>frames to fields</b>, the wrong setting results
8015 in blurrier output.  If the input fields are the result of a standards
8016 conversion process like <b>1080 to 480</b>, the wrong setting won&rsquo;t make
8017 any difference.
8018 </p>
8019 <p>The debobber which converts 720x480 interlaced into 1920x1080
8020 interlaced or 1280x720 progressive seems to degrade the vertical
8021 resolution to the point that it can&rsquo;t be recovered.
8022 </p>
8023
8024
8025
8026
8027
8028
8029 <hr>
8030 <a name="FREEZE-FRAME"></a>
8031 <div class="header">
8032 <p>
8033 Next: <a href="#HISTOGRAM" accesskey="n" rel="next">HISTOGRAM</a>, Previous: <a href="#FIELDS-TO-FRAMES" accesskey="p" rel="prev">FIELDS TO FRAMES</a>, Up: <a href="#SECRETS-OF-CINELERRA-EFFECTS" accesskey="u" rel="up">SECRETS OF CINELERRA EFFECTS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
8034 </div>
8035 <a name="FREEZE-FRAME-1"></a>
8036 <h3 class="section">18.8 FREEZE FRAME</h3>
8037
8038 <p>In its simplest form, highlight a region of the track to freeze, drop
8039 the freeze frame effect on the highlighted region, and the lowest
8040 numbered frame in the affected area will play throughout the entire
8041 region.  
8042 </p>
8043 <p>Freezeframe has an <b>enabled</b> option which can be keyframed.  Regions
8044 of a freeze frame effect which are enabled repeat the lowest numbered
8045 frame since the last keyframe.  This has unique possibilities.
8046 </p>
8047 <p>If a freeze frame effect has a keyframe in the middle of it set to
8048 <b>enabled</b>, the frame in the middle is repeated in the entire effect.
8049 </p>
8050 <p>If a freeze frame effect has several keyframes, each set to
8051 <b>enabled</b>, every time a keyframe is encountered the frame under it
8052 becomes the frozen one.
8053 </p>
8054 <p>If a freeze frame effect alternates between <b>enabled</b> and
8055 <b>disabled</b>, each time an <b>enabled</b> keyframe is encountered the
8056 frame under it is replicated until the next <b>disabled</b> keyframe.  The
8057 disabled regions play through.
8058 </p>
8059
8060
8061
8062
8063
8064 <hr>
8065 <a name="HISTOGRAM"></a>
8066 <div class="header">
8067 <p>
8068 Next: <a href="#INVERSE-TELECINE" accesskey="n" rel="next">INVERSE TELECINE</a>, Previous: <a href="#FREEZE-FRAME" accesskey="p" rel="prev">FREEZE FRAME</a>, Up: <a href="#SECRETS-OF-CINELERRA-EFFECTS" accesskey="u" rel="up">SECRETS OF CINELERRA EFFECTS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
8069 </div>
8070 <a name="HISTOGRAM-1"></a>
8071 <h3 class="section">18.9 HISTOGRAM</h3>
8072
8073
8074 <p>This shows the number of occurances of each color on a histogram plot.
8075 </p>
8076 <p>It is always performed in floating point RGB regardless of
8077 the project colorspace.  The histogram has two sets of transfer
8078 parameters: the input transfer and the output transfer.
8079 </p>
8080 <p>4 histograms are possible in the histogram viewer.  The red, green,
8081 blue histograms show the input histograms for red, green, blue and
8082 multiply them by an input transfer to get the output red, green, blue. 
8083 Then the output red, green, blue is scaled by an output transfer.  The
8084 scaled red, green, blue is converted into a value and plotted on the
8085 value histogram.  The value histogram thus changes depending on the
8086 settings for red, green, blue.  The value transfers are applied
8087 uniformly to R, G, B after their color transfers are applied.
8088 </p>
8089 <p>Select which transfer to view by selecting one of the channels on the
8090 top of the histogram.
8091 </p>
8092
8093 <p>The input transfer is defined by a graph overlaid on the histogram. 
8094 The horizontal direction corresponds to every possible input color. 
8095 The vertical direction corresponds to the output color for every input
8096 color.  Video entering the histogram is first plotted on the histogram
8097 plot, then it is translated so output values now equal the output
8098 values for each input value on the input graph.
8099 </p>
8100 <p>The input graph is edited by adding and removing any number of points. 
8101 Click and drag anywhere in the input graph to create a point and move
8102 it.  Click on an existing point to make it active and move it.  The
8103 active point is always indicated by being filled in.  The active
8104 point&rsquo;s input and output color are given in text boxes on top of the
8105 window.  The input and output color of the point can be changed through
8106 these text boxes.
8107 </p>
8108 <p>Points can be deleted by first selecting a point and then dragging it
8109 to the other side of an adjacent point.  They can also be deleted by
8110 selecting them and hitting <b>delete</b>.
8111 </p>
8112
8113 <p>After the input transfer, the image is processed by the output
8114 transfer.  The output transfer is simply a minimum and maximum to scale
8115 the input colors to.  Input values of 100% are scaled down to the
8116 output&rsquo;s maximum.  Input values of 0% are scaled up to the output
8117 minimum.
8118 </p>
8119
8120 <p>Input values below 0 are always clamped to 0 and input values above
8121 100% are always clamped to 100%.  Click and drag on the output
8122 gradient&rsquo;s triangles to change it.  It also has textboxes to enter
8123 values into.
8124 </p>
8125 <p>Enable the <b>automatic</b> toggle to have the histogram calculate an
8126 automatic input transfer for the red, green, blue but not the value. 
8127 It does this by scaling the middle 99% of the pixels to take 100% of
8128 the histogram width.  The number of pixels permitted to pass through is
8129 set by the <b>Threshold</b> textbox.  A threshold of 0.99 scales the input
8130 so 99% of the pixels pass through.  Smaller thresholds permit fewer
8131 pixels to pass through and make the output look more contrasty.
8132 </p>
8133 <p>Automatic input transfer is calculated for the R, G, and B channels but
8134 not the value.
8135 </p>
8136
8137 <p><b>PLOT HISTOGRAM</b>
8138 </p>
8139 <p><b>SPLIT OUTPUT</b>
8140 </p>
8141
8142
8143
8144
8145
8146
8147
8148 <hr>
8149 <a name="INVERSE-TELECINE"></a>
8150 <div class="header">
8151 <p>
8152 Next: <a href="#INTERPOLATE-VIDEO" accesskey="n" rel="next">INTERPOLATE VIDEO</a>, Previous: <a href="#HISTOGRAM" accesskey="p" rel="prev">HISTOGRAM</a>, Up: <a href="#SECRETS-OF-CINELERRA-EFFECTS" accesskey="u" rel="up">SECRETS OF CINELERRA EFFECTS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
8153 </div>
8154 <a name="INVERSE-TELECINE-1"></a>
8155 <h3 class="section">18.10 INVERSE TELECINE</h3>
8156
8157 <p>This is the most effective deinterlacing tool when the footage is a
8158 video transfer of a film.  Here the film was converted from 24fps to
8159 60fps.  Then the 60fps was downsampled to 30fps by extracting odd and
8160 even lines and interlacing the lines.  The IVTC effect is primarily a
8161 way to convert interlaced video to progressive video.  It undoes three
8162 patterns of interlacing.
8163 </p>
8164 <div class="example">
8165 <pre class="example">  A AB BC CD D
8166   AB CD CD DE EF
8167   Automatic
8168 </pre></div>
8169
8170 <p>The first two options are fixed patterns and affected by the <b>pattern
8171 offset</b> and <b>odd field first</b> parameters.  The last option creates
8172 several combinations of lines for each frame and picks the most
8173 progressive combination.  It&rsquo;s a brute force algorithm.
8174 </p>
8175 <p>This technique doesn&rsquo;t rely on a pattern like other techniques and is
8176 less destructive but the timing is going to be jittery because of the
8177 lack of a frame rate reduction.  In order to smooth out the timing, you
8178 need to follow inverse telecine with a decimate effect.
8179 </p>
8180
8181
8182
8183
8184 <hr>
8185 <a name="INTERPOLATE-VIDEO"></a>
8186 <div class="header">
8187 <p>
8188 Next: <a href="#LENS" accesskey="n" rel="next">LENS</a>, Previous: <a href="#INVERSE-TELECINE" accesskey="p" rel="prev">INVERSE TELECINE</a>, Up: <a href="#SECRETS-OF-CINELERRA-EFFECTS" accesskey="u" rel="up">SECRETS OF CINELERRA EFFECTS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
8189 </div>
8190 <a name="INTERPOLATE-VIDEO-1"></a>
8191 <h3 class="section">18.11 INTERPOLATE VIDEO</h3>
8192
8193
8194 <p>The interpolate video effect tries to create the illusion of a higher
8195 frame rate from source footage of very low framerates by averaging
8196 frames over time.  It averages two input frames for each output frame. 
8197 The input frames are at different times, resulting in a dissolve for
8198 all output frames between the input frames.  There are two ways of
8199 specifying the input frames.  You can specify an input frame rate which
8200 is lower than the project frame rate.  This causes input frames to be
8201 taken at even intervals,
8202 </p>
8203 <p>You can also specify keyframe locations as the positions of the input
8204 frames.  In this mode the output frame rate is used as the input frame
8205 rate and you just create keyframes wherever you want to specify an
8206 input frame.
8207 </p>
8208
8209 <hr>
8210 <a name="LENS"></a>
8211 <div class="header">
8212 <p>
8213 Next: <a href="#LINEARIZE" accesskey="n" rel="next">LINEARIZE</a>, Previous: <a href="#INTERPOLATE-VIDEO" accesskey="p" rel="prev">INTERPOLATE VIDEO</a>, Up: <a href="#SECRETS-OF-CINELERRA-EFFECTS" accesskey="u" rel="up">SECRETS OF CINELERRA EFFECTS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
8214 </div>
8215 <a name="LENS-1"></a>
8216 <h3 class="section">18.12 LENS</h3>
8217
8218 <p>The lens affect stretches or shrinks to convert lens distorted images to
8219 rectilinear images.  The most common use is converting fish eye lenses
8220 to rectilinear lenses.  It is also useful for star tracking.
8221 </p>
8222 <p><b>R, G, B, A Field of view:</b> These determine how much the image is
8223 stretched in each channel.
8224 </p>
8225 <p><b>Lock:</b> This causes changes to 1 channel to affect all the channels. 
8226 This is normally the desired behavior.
8227 </p>
8228 <p><b>Aspect Ratio:</b> This changes the amount of stretching done in the X
8229 axis vs the Y axis.  To crop less data from stretched images, this
8230 allows more stretching to be done on 1 axis without creating black
8231 borders in the other axis.
8232 </p>
8233 <p><b>Radius:</b> This determines the size of the stretched region.  While
8234 adjusting the <b>field of view</b>, black borders may appear.  Adjust the
8235 <b>radius</b> to shrink or expand the output so black borders are out of
8236 frame.
8237 </p>
8238 <p><b>Center X, Y:</b> The center of the stretched region.  This is only
8239 useful if the image was previously translated by the software so the
8240 center of the lens is now off center.
8241 </p>
8242 <p><b>Draw center:</b> This is a visual aid when adjusting the <b>Center X, Y</b>
8243 but doesn&rsquo;t affect the results.
8244 </p>
8245 <p><b>Mode:</b> The type of stretching algorithm.
8246 </p>
8247 <ul>
8248 <li> <b>Sphere shrink:</b> This is for making an image look like it&rsquo;s mapped to a sphere.
8249
8250 </li><li> <b>Sphere expand:</b> This is for unmapping an image mapped to a sphere and
8251 flattening it.
8252
8253 </li><li> <b>Rectilinear Stretch:</b> This is for flattening a fish eye lens.
8254
8255 </li><li> <b>Rectilinear Shrink:</b> This is for making something flat look like it
8256 was taken by a fish eye lens.
8257
8258
8259 </li></ul>
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271 <hr>
8272 <a name="LINEARIZE"></a>
8273 <div class="header">
8274 <p>
8275 Next: <a href="#LIVE-AUDIO" accesskey="n" rel="next">LIVE AUDIO</a>, Previous: <a href="#LENS" accesskey="p" rel="prev">LENS</a>, Up: <a href="#SECRETS-OF-CINELERRA-EFFECTS" accesskey="u" rel="up">SECRETS OF CINELERRA EFFECTS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
8276 </div>
8277 <a name="LINEARIZE-1"></a>
8278 <h3 class="section">18.13 LINEARIZE</h3>
8279
8280
8281 <p>Raw camera images store colors in a logarithmic scale.  The blacks in
8282 these images are nearly 0 and the whites are supposed to be infinity. 
8283 The graphics card and most video codecs store colors in a linear scale
8284 but Cinelerra keeps raw camera images in their original logarithmic
8285 scale when it renders them.  This is necessary because the raw image
8286 parser can&rsquo;t always decode the proper gamma values for the images.  It
8287 also does its processing in 16 bit integers, which takes away a lot of
8288 information.
8289 </p>
8290 <p>The linearize effect converts the logarithmic colors to linear colors
8291 through a gamma value and a maximum value.  The gamma value determines
8292 how steep the output curve is and the maximum value is where 1.0 in the
8293 output corresponds to maximum brightness in the input.
8294 </p>
8295 <p>The linearize effect has 2 more parameters to simplify gamma
8296 correction.  The <b>automatic</b> option causes it to calculate <b>max</b>
8297 from the histogram of the image.  Use this when making a preview of a
8298 long list of images since it changes for every image.
8299 </p>
8300 <p>The <b>use color picker</b> option uses the value currently in the color
8301 picker to set the <b>max</b> value.  Note that every time you pick a color
8302 from the compositor window, you need to hit <b>use color picker</b> to
8303 apply the new value.
8304 </p>
8305
8306
8307
8308
8309
8310
8311
8312 <hr>
8313 <a name="LIVE-AUDIO"></a>
8314 <div class="header">
8315 <p>
8316 Next: <a href="#LIVE-VIDEO" accesskey="n" rel="next">LIVE VIDEO</a>, Previous: <a href="#LINEARIZE" accesskey="p" rel="prev">LINEARIZE</a>, Up: <a href="#SECRETS-OF-CINELERRA-EFFECTS" accesskey="u" rel="up">SECRETS OF CINELERRA EFFECTS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
8317 </div>
8318 <a name="LIVE-AUDIO-1"></a>
8319 <h3 class="section">18.14 LIVE AUDIO</h3>
8320
8321 <p>This effect reads audio directly from the soundcard input.  It replaces
8322 any audio on the track so it&rsquo;s normally applied to an empty track. 
8323 </p>
8324
8325 <p>To use Live Audio, highlight a horizontal region of an audio track or
8326 define in and out points.  Then drop the Live Audio effect into it. 
8327 Create extra tracks and attach shared copies of the first Live Audio
8328 effect to the other tracks to have extra channels recorded.
8329 </p>
8330 <p>Live Audio uses the sound driver selected in
8331 <b>Settings-&gt;Preferences-&gt;Playback-&gt;Audio Out</b> for recording, but
8332 unlike recording it uses the <b>playback buffer size</b> as the recording
8333 buffer size and it uses the <b>project sample rate</b> as the sampling
8334 rate.
8335 </p>
8336 <p>These settings are critical since some sound drivers can&rsquo;t record in
8337 the same sized buffer they play back in.  Live audio has been most
8338 reliable when ALSA is the recording driver and the playback fragment
8339 size is 2048.
8340 </p>
8341 <p>Drop other effects after Live Audio to process soundcard input in
8342 realtime.  
8343 </p>
8344 <p>Now the bad news.  With live audio there is no readahead so effects
8345 like compressor will either delay if they have readahead enabled or
8346 playback will underrun.  
8347 </p>
8348 <p>Another problem is sometimes the recording clock on the soundcard is
8349 slightly slower than the playback clock.  The recording eventually
8350 falls behind and playback sounds choppy.
8351 </p>
8352 <p>Finally, live audio doesn&rsquo;t work in reverse.
8353 </p>
8354
8355
8356
8357
8358 <hr>
8359 <a name="LIVE-VIDEO"></a>
8360 <div class="header">
8361 <p>
8362 Next: <a href="#LOOP" accesskey="n" rel="next">LOOP</a>, Previous: <a href="#LIVE-AUDIO" accesskey="p" rel="prev">LIVE AUDIO</a>, Up: <a href="#SECRETS-OF-CINELERRA-EFFECTS" accesskey="u" rel="up">SECRETS OF CINELERRA EFFECTS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
8363 </div>
8364 <a name="LIVE-VIDEO-1"></a>
8365 <h3 class="section">18.15 LIVE VIDEO</h3>
8366
8367 <p>This effect reads video directly from the capture card input.  It
8368 replaces any video on the track so it&rsquo;s normally applied to an empty
8369 track.  The configuration for the capture card is taken from the
8370 recording preferences.  Go to <b>Settings-&gt;Preferences-&gt;Recording</b> to
8371 set up the capture card.
8372 </p>
8373 <p>Go to the <b>Video In</b> section where it says <b>Record driver</b>.  It
8374 must be set to either <b>Video4Linux2</b> or <b>IEC 61883</b>.  Other video
8375 drivers haven&rsquo;t been tested with Live Video and probably won&rsquo;t work.
8376 </p>
8377 <p>For live video, the selection for <b>File Format</b> and <b>Video</b> needs
8378 to be set to a format the timeline can use.  The file format must be
8379 <b>Quicktime for Linux</b> and video recording must be enabled for it. 
8380 Click on the wrench <img src="wrench.png" alt="wrench"> to set the video compression.
8381 </p>
8382 <p>The video compression depends on the recording driver.  For the
8383 <b>Video4Linux2</b> recording driver, the compression must be <b>Motion
8384 JPEG A</b>.  For the <b>IEC 61883</b> driver, the compression must be
8385 <b>DV</b>.  This gets the driver to generate output in a colormodel that
8386 the timeline can use.
8387 </p>
8388 <p>Some cards provide color and channel settings.  Live video takes the
8389 color settings from the values set in the <b>Video In</b> window.  Go to
8390 <b>File-&gt;Record</b> to bring up the recording interface and the Video In
8391 window.  Values set in the <b>Video in</b> window are used by <b>Live
8392 Video</b>.  Any channels the capture card supports need to be configured
8393 in the <b>Video in</b> interface since the same channels are used by the
8394 <b>Live Video</b> effect.
8395 </p>
8396 <p>With the video recording configured, highlight a horizontal region of a
8397 video track or define in and out points.  Then drop the Live Video
8398 effect into it.  Drop other effects after Live Video to process the
8399 live video in realtime.  For best results, you should use OpenGL and a
8400 video card which supports GL shading language.  Go to
8401 <b>Settings-&gt;Preferences-&gt;Playback-&gt;Video Out</b> to enable the OpenGL
8402 driver.
8403 </p>
8404 <p>Only one Live Video effect can exist at any time on the timeline.  It
8405 can&rsquo;t be shared by more than one track.
8406 </p>
8407
8408
8409
8410
8411
8412
8413
8414 <hr>
8415 <a name="LOOP"></a>
8416 <div class="header">
8417 <p>
8418 Next: <a href="#MOTION" accesskey="n" rel="next">MOTION</a>, Previous: <a href="#LIVE-VIDEO" accesskey="p" rel="prev">LIVE VIDEO</a>, Up: <a href="#SECRETS-OF-CINELERRA-EFFECTS" accesskey="u" rel="up">SECRETS OF CINELERRA EFFECTS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
8419 </div>
8420 <a name="LOOP-1"></a>
8421 <h3 class="section">18.16 LOOP</h3>
8422
8423 <p>Sections of audio or video can be looped by dropping a <b>loop</b> effect
8424 on them.  Contrary to the the <b>settings-&gt;loop playback</b> option, the
8425 loop effects can be rendered where the <b>settings-&gt;loop playback</b>
8426 option can not be.  The loop effects are also convenient for short
8427 regions.
8428 </p>
8429 <p>The loop effects have one option: the number of <b>frames</b> or
8430 <b>samples</b> to loop.  This specifies the length of the region to loop
8431 starting from either the beginning of the effect or the latest
8432 keyframe.  The region is replicated for the entire effect.
8433 </p>
8434 <p>Every time a keyframe is set in a loop effect, the keyframe becomes the
8435 beginning of the region to loop.  Setting several keyframes in
8436 succession causes several regions to loop.  Setting a single keyframe
8437 causes the region after the keyframe to be looped throughout the
8438 effect, no matter where the keyframe is.  The end of an effect can be
8439 looped from the beginning by setting the keyframe near the end.
8440 </p>
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450 <hr>
8451 <a name="MOTION"></a>
8452 <div class="header">
8453 <p>
8454 Next: <a href="#MOTION-2-POINT" accesskey="n" rel="next">MOTION 2 POINT</a>, Previous: <a href="#LOOP" accesskey="p" rel="prev">LOOP</a>, Up: <a href="#SECRETS-OF-CINELERRA-EFFECTS" accesskey="u" rel="up">SECRETS OF CINELERRA EFFECTS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
8455 </div>
8456 <a name="MOTION-1"></a>
8457 <h3 class="section">18.17 MOTION</h3>
8458
8459 <p>The motion tracker is almost a complete application in itself.  The
8460 motion tracker tracks two types of motion: translation and rotation. 
8461 It can track both simultaneously or one only.  It can do 1/4 pixel
8462 tracking or single pixel tracking.  It can stabilize motion or cause
8463 one track to follow the motion of another track.
8464 </p>
8465 <p>Although the motion tracker is applied as a realtime effect, it usually
8466 must be rendered to see useful results.  The effect takes a long time
8467 to precisely detect motion.
8468 </p>
8469 <p>The motion tracker works by using one region of the frame as the region
8470 to track.  It compares this region between 2 frames to calculate the
8471 motion.  This region can be defined anywhere on the screen.  Once the
8472 motion between 2 frames has been calculated, a number of things can be
8473 done with that motion vector.  It can be scaled by a user value and
8474 clamped to a maximum range.  It can be thrown away or accumulated with
8475 all the motion vectors leading up to the current position.
8476 </p>
8477 <p>To save time the motion result can be saved for later reuse, recalled
8478 from a previous calculation, or discarded.
8479 </p>
8480 <p>The motion tracker has a notion of 2 tracks, the master layer and the
8481 target layer.  The master layer is where the comparison between 2
8482 frames takes place.  The target layer is where motion is applied either
8483 to track or compensate for the motion in the master layer.
8484 </p>
8485 <p>The intricacies of motion tracking are enough to sustain entire
8486 companies and build careers around.  The motion tracker in Cinelerra
8487 isn&rsquo;t as sophisticated as some world class motion trackers but it&rsquo;s
8488 enough to sweeten some camcorder footage.
8489 </p>
8490 <p>Here is a brief description of the motion tracking parameters:
8491 </p>
8492 <ul>
8493 <li> <b>Track translation:</b> Enables translation operations.  
8494 The motion tracker tracks X and Y motion in the master layer and 
8495 adjusts X and Y motion in the target layer.
8496
8497 </li><li> 
8498 <b>Translation block size:</b> For the translation operations, a block is
8499 compared to a number of neighboring blocks to find the one with the
8500 least difference.  The size of the block to search for is given by this
8501 parameter.
8502
8503 </li><li> 
8504 <b>Translation search radius:</b> The size of the area to scan for the
8505 translation block.
8506
8507 </li><li> 
8508 <b>Translation search steps:</b> Ideally the search operation would
8509 compare the  translation block with every other pixel in the
8510 translation search radius.  To  speed this operation up, a subset of
8511 the total positions is searched.   Then the search area is narrowed and
8512 rescanned by the same number of search steps until the motion is known
8513 to 1/4 pixel accuracy.
8514
8515 </li><li> 
8516 <b>Block X, Y:</b> These coordinates determine the center of the
8517 translation  block based on percentages of the width and height of the
8518 image.  The center of the block should be part of the image which is
8519 visible at all times.
8520
8521 </li><li> 
8522 <b>Maximum absolute offset:</b> In <b>track previous frame</b> and <b>previous
8523 frame same block</b> modes, the motion detected between every frame is
8524 accumulated to form an absolute motion vector for the entire sequence. 
8525 The amount of motion detected by the motion tracker is unlimited if this
8526 is 100.  If it&rsquo;s under 100 the amount of motion is limited to that
8527 percentage of the image size.  The value must be smaller for larger
8528 <b>translation block sizes</b> so there is enough area under the block to
8529 sense motion with.
8530
8531 </li><li> 
8532 <b>Settling speed</b> In <b>track previous frame</b> and <b>previous frame
8533 same block</b> modes, the motion detected between every frame is
8534 accumulated to form an absolute motion vector for the entire sequence. 
8535 To keep the absolute motion from exceeding limits, it can be
8536 automatically reset over time by the settling speed.  If the settling
8537 speed is 100 the absolute vector resets to 0 after every frame.  If the
8538 settling speed is less than 100 the absolute vector is reduced slightly
8539 before the next frame is added.
8540
8541 </li><li> 
8542 <b>Track rotation:</b> Enables rotation operations.  The motion tracker
8543 tracks rotation in the master layer and adjusts rotation in the target
8544 layer.
8545
8546 </li><li> 
8547 <b>Rotation block size:</b> For rotation operations a single block is
8548 compared to equally sized blocks, each rotated by a different amount. 
8549 This is the size of the rotation block.
8550
8551 </li><li> 
8552 <b>Rotation search radius:</b> This is the maximum angle of rotation from
8553 the starting frame the rotation scanner can detect.  The rotation scan
8554 is from this angle counterclockwise to this angle clockwise.  Thus the
8555 rotation search radius is half the total range scanned.
8556
8557 </li><li> 
8558 <b>Rotation search steps:</b> Ideally every possible angle would be tested
8559 to get the rotation.  To speed up the rotation search, the rotation
8560 search radius is divided into a finite number of angles and only those
8561 angles compared to the starting frame.  Then the search radius is
8562 narrowed and an equal number of angles is compared in the smaller
8563 radius until the highest possible accuracy is achieved.
8564
8565 <p>Normally you need one search step for every degree scanned.  Since the
8566 rotation scanner scans the rotation search radius in two directions,
8567 you need two steps for every degree in the search radius to search the
8568 complete range.
8569 </p>
8570 </li><li> 
8571 <b>Draw vectors:</b> When translation is enabled, 2 boxes are drawn on the
8572 frame.  One box represents the translation block.  Another box outside
8573 the translation block represents the extent of the translation search
8574 radius.  In the center of these boxes is an arrow showing the
8575 translation between the 2 master frames.
8576
8577 <p>When rotation is enabled a single box the size of the rotation block is
8578 drawn rotated by the amount of rotation detected.
8579 </p>
8580 </li><li> 
8581 <b>Track single frame:</b> When this option is used the motion between a
8582 single starting frame and the frame currently under the insertion point
8583 is calculated.  The starting frame is specified in the <b>Frame number</b>
8584 blank.  The motion calculated this way is taken as the absolute motion
8585 vector.  The absolute motion vector for each frame replaces the
8586 absolute motion vector for the previous frame.  Settling speed has no
8587 effect on it since it doesn&rsquo;t contain any previous motion vectors. 
8588 Playback can start anywhere on the timeline since there is no
8589 dependance on previous results.
8590
8591 </li><li> 
8592 <b>Track previous frame:</b> Causes only the motion between the previous
8593 frame and the current frame to be calculated.  This is added to an
8594 absolute motion vector to get the new motion from the start of the
8595 sequence to the current position.  After every frame processed this
8596 way, the block position is shifted to always cover the same region of
8597 the image.  Playback must be started from the start of the motion
8598 effect in order to accumulate all the necessary motion vectors.
8599
8600 </li><li> 
8601 <b>Previous frame same block:</b> This is useful for stabilizing jerky
8602 camcorder footage.  In this mode the motion between the previous frame
8603 and the current frame is calculated.  Instead of adjusting the block
8604 position to reflect the new location of the image, like Track Previous
8605 Frame does, the block position is unchanged between each frame.  Thus a
8606 new region is compared for each frame.
8607
8608 </li><li> 
8609 <b>Master layer:</b> This determines the track which supplies the starting
8610 frame and ending frame for the motion calculation.  If it&rsquo;s <b>Bottom</b>
8611 the bottom track of all the tracks sharing this effect is the master
8612 layer.  The top track of all the tracks is the target layer.
8613
8614 </li><li> 
8615 <b>Calculation:</b> This determines whether to calculate the motion at all
8616 and whether to save it to disk.  If it&rsquo;s <b>Don&rsquo;t Calculate</b> the motion
8617 calculation is skipped.  If it&rsquo;s <b>Recalculate</b> the motion calculation
8618 is performed every time each frame is rendered.  If it&rsquo;s <b>Save</b> the
8619 motion calculation is always performed but a copy is also saved.  If
8620 it&rsquo;s <b>Load</b>, the motion calculation is loaded from a previous save
8621 calculation.  If there is no previous save calculation on disk, a new
8622 motion calculation is performed.
8623
8624 </li><li> 
8625 <b>Action:</b> Once the motion vector is known this determines whether to
8626 move the target layer opposing the motion vector or following the
8627 motion vector.  If it&rsquo;s <b>Do Nothing</b> the target layer is untouched. 
8628 If it&rsquo;s <b>Track...</b> the target layer is moved by the same amount as
8629 the master layer.  This is useful for matching titles to objects in the
8630 frame.  If it&rsquo;s <b>Stabilize...</b> the target layer is moved opposite to
8631 the motion vector.  This is useful for stabilizing an object in the
8632 frame.  The motion operations can be accurate to single pixels or
8633 subpixels by changing the action setting.
8634
8635
8636
8637
8638
8639 </li></ul>
8640
8641
8642
8643 <table class="menu" border="0" cellspacing="0">
8644 <tr><td align="left" valign="top">&bull; <a href="#SECRETS-OF-MOTION-TRACKING" accesskey="1">SECRETS OF MOTION TRACKING</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
8645 </td></tr>
8646 <tr><td align="left" valign="top">&bull; <a href="#g_t2-PASS-MOTION-TRACKING" accesskey="2">2 PASS MOTION TRACKING</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
8647 </td></tr>
8648 <tr><td align="left" valign="top">&bull; <a href="#USING-BLUR-TO-IMPROVE-MOTION-TRACKING" accesskey="3">USING BLUR TO IMPROVE MOTION TRACKING</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
8649 </td></tr>
8650 <tr><td align="left" valign="top">&bull; <a href="#USING-HISTOGRAM-TO-IMPROVE-MOTION-TRACKING" accesskey="4">USING HISTOGRAM TO IMPROVE MOTION TRACKING</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
8651 </td></tr>
8652 <tr><td align="left" valign="top">&bull; <a href="#INTERPOLATING-MOTION-BETWEEN-FRAMES" accesskey="5">INTERPOLATING MOTION BETWEEN FRAMES</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
8653 </td></tr>
8654 <tr><td align="left" valign="top">&bull; <a href="#FILLING-IN-THE-BLACK-AREAS" accesskey="6">FILLING IN THE BLACK AREAS</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
8655 </td></tr>
8656 </table>
8657
8658
8659 <hr>
8660 <a name="SECRETS-OF-MOTION-TRACKING"></a>
8661 <div class="header">
8662 <p>
8663 Next: <a href="#g_t2-PASS-MOTION-TRACKING" accesskey="n" rel="next">2 PASS MOTION TRACKING</a>, Up: <a href="#MOTION" accesskey="u" rel="up">MOTION</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
8664 </div>
8665 <a name="SECRETS-OF-MOTION-TRACKING-1"></a>
8666 <h4 class="subsection">18.17.1 SECRETS OF MOTION TRACKING</h4>
8667
8668 <p>Since it is a very slow effect, there is a method to applying the
8669 motion tracker to get the most out of it.  First disable playback for
8670 the track to do motion tracking on.  Then drop the effect on a region
8671 of video with some motion to track.  Then rewind the insertion point to
8672 the start of the region.  Set <b>Action</b> -&gt; <b>Do Nothing</b>.  Set
8673 <b>Calculation</b> -&gt; <b>Don&rsquo;t calculate</b>.  Enable <b>Draw vectors</b>. Then
8674 enable playback of the track to see the motion tracking areas.
8675 </p>
8676 <p>Enable which of <b>translation motion</b> or <b>rotation motion</b> vectors
8677 you want to track.  By watching the compositor window and adjusting the
8678 <b>Block x,y</b> settings, center the block on the part of the image you
8679 want to track.  Then set search radius, block size, and block
8680 coordinates for translation and rotation.
8681 </p>
8682 <p>Once this is configured, set the calculation to <b>Save coords</b> and do
8683 test runs through the sequence to see if the motion tracker works and
8684 to save the motion vectors.  Once this is done, disable playback for
8685 the track, disable <b>Draw vectors</b>, set the motion action to perform
8686 on the target layer and change the calculation to <b>Load coords</b>. 
8687 Finally enable playback for the track.
8688 </p>
8689 <p>When using a single starting frame to calculate the motion of a
8690 sequence, the starting frame should be a single frame with the least
8691 motion to any of the other frames.  This is rarely frame 0.  Usually
8692 it&rsquo;s a frame near the middle of the sequence.  This way the search
8693 radius need only reach halfway to the full extent of the motion in the
8694 sequence.
8695 </p>
8696 <p>If the motion tracker is used on a render farm, <b>Save coords</b> and
8697 <b>previous frame</b> mode won&rsquo;t work.  The results of the save coords
8698 operation are saved to the hard drives on the render nodes, not the
8699 master node.  Future rendering operations on these nodes will process
8700 different frames and read the wrong coordinates from the node
8701 filesystems.  The fact that render nodes only visualize a portion of
8702 the timeline also prevents <b>previous frame</b> from working since it
8703 depends on calculating an absolute motion vector starting on frame 0.
8704 </p>
8705 <hr>
8706 <a name="g_t2-PASS-MOTION-TRACKING"></a>
8707 <div class="header">
8708 <p>
8709 Next: <a href="#USING-BLUR-TO-IMPROVE-MOTION-TRACKING" accesskey="n" rel="next">USING BLUR TO IMPROVE MOTION TRACKING</a>, Previous: <a href="#SECRETS-OF-MOTION-TRACKING" accesskey="p" rel="prev">SECRETS OF MOTION TRACKING</a>, Up: <a href="#MOTION" accesskey="u" rel="up">MOTION</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
8710 </div>
8711 <a name="g_t2-PASS-MOTION-TRACKING-1"></a>
8712 <h4 class="subsection">18.17.2 2 PASS MOTION TRACKING</h4>
8713
8714 <p>The method described above is 2 pass motion tracking.  One pass is used
8715 just to calculate the motion vectors.  A second pass is used to apply
8716 the motion vectors to the footage.  This is faster than a single pass
8717 because errors in the motion vector calculation can be discovered
8718 quickly.
8719 </p>
8720 <p>This also allows the motion tracking to use a less demanding colormodel
8721 like RGB888 in the scanning step and a more demanding colormodel like
8722 RGB Float in the action step.  The scanning step takes much longer than
8723 action.
8724 </p>
8725 <p>This suffers the disadvantage of not being practical for extremely long
8726 sequences where some error is acceptable and the picture quality is
8727 lousy to begin with, like stabilizing camcorder footage.
8728 </p>
8729 <p>The slower method is to calculate the motion vectors and apply them
8730 simultaneously.  This method can use one track as the motion vector
8731 calculation track and another track as the target track for motion
8732 vector actions.  This is useful for long sequences where some error is
8733 acceptable.
8734 </p>
8735
8736 <hr>
8737 <a name="USING-BLUR-TO-IMPROVE-MOTION-TRACKING"></a>
8738 <div class="header">
8739 <p>
8740 Next: <a href="#USING-HISTOGRAM-TO-IMPROVE-MOTION-TRACKING" accesskey="n" rel="next">USING HISTOGRAM TO IMPROVE MOTION TRACKING</a>, Previous: <a href="#g_t2-PASS-MOTION-TRACKING" accesskey="p" rel="prev">2 PASS MOTION TRACKING</a>, Up: <a href="#MOTION" accesskey="u" rel="up">MOTION</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
8741 </div>
8742 <a name="USING-BLUR-TO-IMPROVE-MOTION-TRACKING-1"></a>
8743 <h4 class="subsection">18.17.3 USING BLUR TO IMPROVE MOTION TRACKING</h4>
8744
8745 <p>With extremely noisy or interlaced footage, applying a blur effect
8746 before the motion tracking can improve accuracy.  Either save the
8747 motion vectors in a <b>tracking pass</b> and disable the blur for the
8748 <b>action pass</b> or apply the blur just to the <b>master layer</b>.
8749 </p>
8750
8751 <hr>
8752 <a name="USING-HISTOGRAM-TO-IMPROVE-MOTION-TRACKING"></a>
8753 <div class="header">
8754 <p>
8755 Next: <a href="#INTERPOLATING-MOTION-BETWEEN-FRAMES" accesskey="n" rel="next">INTERPOLATING MOTION BETWEEN FRAMES</a>, Previous: <a href="#USING-BLUR-TO-IMPROVE-MOTION-TRACKING" accesskey="p" rel="prev">USING BLUR TO IMPROVE MOTION TRACKING</a>, Up: <a href="#MOTION" accesskey="u" rel="up">MOTION</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
8756 </div>
8757 <a name="USING-HISTOGRAM-TO-IMPROVE-MOTION-TRACKING-1"></a>
8758 <h4 class="subsection">18.17.4 USING HISTOGRAM TO IMPROVE MOTION TRACKING</h4>
8759
8760 <p>A histogram is almost always applied before motion tracking to clamp
8761 out noise in the darker pixels.  Either save the motion vectors in a
8762 <b>tracking pass</b> and disable the histogram for the <b>action pass</b> or
8763 apply the histogram just to the <b>master layer</b>.
8764 </p>
8765
8766
8767
8768 <hr>
8769 <a name="INTERPOLATING-MOTION-BETWEEN-FRAMES"></a>
8770 <div class="header">
8771 <p>
8772 Next: <a href="#FILLING-IN-THE-BLACK-AREAS" accesskey="n" rel="next">FILLING IN THE BLACK AREAS</a>, Previous: <a href="#USING-HISTOGRAM-TO-IMPROVE-MOTION-TRACKING" accesskey="p" rel="prev">USING HISTOGRAM TO IMPROVE MOTION TRACKING</a>, Up: <a href="#MOTION" accesskey="u" rel="up">MOTION</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
8773 </div>
8774 <a name="INTERPOLATING-MOTION-BETWEEN-FRAMES-1"></a>
8775 <h4 class="subsection">18.17.5 INTERPOLATING MOTION BETWEEN FRAMES</h4>
8776
8777 <p>The motion tracker can simulate higher frame rates than the media frame
8778 rate by interpolating the motion.  Interpolation is enabled with the
8779 <b>maximum absolute offset</b> and <b>settling speed</b> options.
8780 </p>
8781 <p>First, go to <b>Settings-&gt;Format</b> in the main window and set the
8782 <b>video frame rate</b> to a number higher than the media frame rate.
8783 </p>
8784 <p>In the <b>Motion</b> window, select a tracking option which accumulates
8785 motion.  This is either <b>Track previous frame</b> or <b>Previous frame
8786 same block</b>.  These cause the <b>maximum absolute offset</b> and
8787 <b>settling speed</b> options to take effect.
8788 </p>
8789 <p><b>maximum absolute offset</b> must be set to the maximum motion to be
8790 accumulated as a percentage of the video size.  A value of 50 limits the
8791 motion to 50% of the video size.  50 works well.  The value must be
8792 smaller for larger <b>translation block sizes</b> so there is enough area
8793 under the block to sense motion with.
8794 </p>
8795 <p><b>settling speed</b> must be set to the rate at which the accumulated
8796 motion resets to 0 over time.  The reset happens whether or not any
8797 motion was detected, so when the project frame rate is higher than the
8798 media frame rate, the frames between media frames regress towards the
8799 center.  For interpolated motion, the <b>settling speed</b> value should be
8800 small, so the movement is smooth.  3 works well.
8801 </p>
8802
8803
8804
8805
8806
8807
8808
8809
8810 <hr>
8811 <a name="FILLING-IN-THE-BLACK-AREAS"></a>
8812 <div class="header">
8813 <p>
8814 Previous: <a href="#INTERPOLATING-MOTION-BETWEEN-FRAMES" accesskey="p" rel="prev">INTERPOLATING MOTION BETWEEN FRAMES</a>, Up: <a href="#MOTION" accesskey="u" rel="up">MOTION</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
8815 </div>
8816 <a name="FILLING-IN-THE-BLACK-AREAS-1"></a>
8817 <h4 class="subsection">18.17.6 FILLING IN THE BLACK AREAS</h4>
8818
8819 <p>Stabilization always creates black borders in the track resolution.  One
8820 solution is to shrink the project resolution so the borders are always
8821 cropped off the output.  Another solution is to apply a <b>Time Average</b>
8822 effect after stabilization.
8823 </p>
8824 <p>Configure <b>Time Average</b> the following way:
8825 </p>
8826 <ul>
8827 <li> <b>Frame count:</b> 1
8828 </li><li> <b>Accumulate sequence again:</b> No
8829 </li><li> <b>Replace:</b> Yes
8830 </li><li> <b>Threshold:</b> 1
8831 </li><li> <b>Border:</b> 4
8832 </li></ul>
8833
8834 <p>This makes new frames replace only the pixels in the previous frames
8835 where there is new data.  The black areas in new frames don&rsquo;t replace
8836 previous data so the previous data shows through and fills them in.
8837 </p>
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849 <hr>
8850 <a name="MOTION-2-POINT"></a>
8851 <div class="header">
8852 <p>
8853 Next: <a href="#REFRAMERT" accesskey="n" rel="next">REFRAMERT</a>, Previous: <a href="#MOTION" accesskey="p" rel="prev">MOTION</a>, Up: <a href="#SECRETS-OF-CINELERRA-EFFECTS" accesskey="u" rel="up">SECRETS OF CINELERRA EFFECTS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
8854 </div>
8855 <a name="MOTION-2-POINT-1"></a>
8856 <h3 class="section">18.18 MOTION 2 POINT</h3>
8857
8858
8859 <p>The 2 point motion tracker is the same as using 2 of the translation
8860 motion trackers to track 2 points.  It doesn&rsquo;t have a rotation tracker. 
8861 Instead, it uses the angle between the 2 translation points to
8862 determine  rotation.  The 2 points can be enabled separately.
8863 </p>
8864 <p>If 1 point is enabled, only translation is tracked.  
8865 </p>
8866 <p>If 2 points are enabled, translation is tracked by point 1 and rotation
8867 is tracked by point 2.  Stabilization is performed with point 1 as the center.
8868 </p>
8869 <p>The other parameters for the 2 point tracker are the same as the single
8870 point tracker.  In addition, the 2 point tracker supports <b>TRANSLATION
8871 SEARCH OFFSET</b>.
8872 </p>
8873 <p><b>TRANSLATION SEARCH OFFSET</b> forces the motion search to look in a
8874 region other than directly next to the translation block position.  The
8875 <b>translation search offset</b> is added to the new search result, giving
8876 contiguous motion results throughout any changes in translation search area.
8877 </p>
8878 <p>This is useful if the camera position changed in the middle of a
8879 sequence of images but the subject stayed the same.  Offset the
8880 translation search area when the camera position changes and the
8881 detected motion stays contiguous through the entire sequence.
8882 </p>
8883 <p>2 point tracking works best if the points don&rsquo;t change shape between
8884 frames.  It is more prone to rotation errors than single point motion
8885 tracking if the points change shape.  2 point tracking is mainly used
8886 for tracking stars.
8887 </p>
8888 <p>Use the smallest search blocks possible since larger blocks are harder
8889 to compare when they&rsquo;re rotated.
8890 </p>
8891
8892
8893
8894
8895 <hr>
8896 <a name="REFRAMERT"></a>
8897 <div class="header">
8898 <p>
8899 Next: <a href="#REFRAME" accesskey="n" rel="next">REFRAME</a>, Previous: <a href="#MOTION-2-POINT" accesskey="p" rel="prev">MOTION 2 POINT</a>, Up: <a href="#SECRETS-OF-CINELERRA-EFFECTS" accesskey="u" rel="up">SECRETS OF CINELERRA EFFECTS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
8900 </div>
8901 <a name="REFRAMERT-1"></a>
8902 <h3 class="section">18.19 REFRAMERT</h3>
8903
8904
8905 <p>ReframeRT changes number of frames in a sequence of video directly from
8906 the timeline.  It has 2 modes, selected by the 2 toggles in the GUI.
8907 </p>
8908 <p><b>Stretch</b> mode multiplies the current frame number of its output by
8909 the scale factor to arrive at the frame to read from its input.  If its
8910 current output frame is #55 and the scale factor is 2, frame #110 is
8911 read from its input.  The stretch mode has the effect of changing the
8912 length of output video by the inverse of the scale factor.  If the
8913 scale factor is greater than 1, the output will end before the end of
8914 the sequence on the timeline.  If it&rsquo;s less than 1, the output will end
8915 after the end of the sequence on the timeline.  The ReframeRT effect
8916 must be lengthened to the necessary length to accomodate the scale
8917 factor.  Change the length of the effect by clicking on the endpoint of
8918 the effect and dragging.
8919 </p>
8920 <p>Although stretch mode changes the number of the frame read from its
8921 input, it doesn&rsquo;t change the frame rate of the input.  Effects before
8922 ReframeRT assume the same frame rate as ReframeRT.
8923 </p>
8924 <p><b>Downsample</b> mode doesn&rsquo;t change the length of the output sequence. 
8925 It multiplies the frame rate of the output by the scale factor to
8926 arrive at a frame rate rate to read the input.  This has the effect of
8927 replicating the input frames so that they only change at the scaled
8928 frame rate when sent to the output.  It doesn&rsquo;t change the length of
8929 the sequence.  If the scale factor is 0.5 and the output frame rate is
8930 30 fps, only 15 frames will be shown per second and the input will be
8931 read at 15 fps.  Downsample is only useful for scalefactors below 1,
8932 hence the name downsample.
8933 </p>
8934 <p>Downsample mode changes the frame rate of the input as well as the
8935 number of the frame to read, so effects before ReframeRT see the frame
8936 rate * the scale factor as their frame rate.  If the scale factor is 2
8937 and the output frame rate is 30, the input frame rate will be 60 and
8938 the input frame number will by doubled.  This won&rsquo;t normally do
8939 anything but some input effects may behave differently at the higher
8940 frame rate.
8941 </p>
8942
8943
8944
8945 <hr>
8946 <a name="REFRAME"></a>
8947 <div class="header">
8948 <p>
8949 Next: <a href="#RESAMPLE" accesskey="n" rel="next">RESAMPLE</a>, Previous: <a href="#REFRAMERT" accesskey="p" rel="prev">REFRAMERT</a>, Up: <a href="#SECRETS-OF-CINELERRA-EFFECTS" accesskey="u" rel="up">SECRETS OF CINELERRA EFFECTS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
8950 </div>
8951 <a name="REFRAME-1"></a>
8952 <h3 class="section">18.20 REFRAME</h3>
8953
8954 <p>This does exactly the same thing as <b>ReframeRT</b> in <b>Stretch</b> mode. 
8955 It multiplies the output frame number by the scale factor to arrive at
8956 the input frame number and changes the length of the sequence.  Unlike
8957 ReframeRT, this must run from the <b>Video</b> menu and render its output.
8958 </p>
8959 <p>Be aware <b>Reframe</b> doesn&rsquo;t write the scaled frame rate as the frame
8960 rate of the rendered file.  It produces a file of scaled length and
8961 equal frame rate as the project.  The new length is 1/scale factor as
8962 big as the original sequence.
8963 </p>
8964
8965
8966
8967
8968
8969
8970
8971 <hr>
8972 <a name="RESAMPLE"></a>
8973 <div class="header">
8974 <p>
8975 Next: <a href="#REVERSE-VIDEO_002fAUDIO" accesskey="n" rel="next">REVERSE VIDEO/AUDIO</a>, Previous: <a href="#REFRAME" accesskey="p" rel="prev">REFRAME</a>, Up: <a href="#SECRETS-OF-CINELERRA-EFFECTS" accesskey="u" rel="up">SECRETS OF CINELERRA EFFECTS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
8976 </div>
8977 <a name="RESAMPLE-1"></a>
8978 <h3 class="section">18.21 RESAMPLE</h3>
8979
8980 <p>This multiplies the number of each output sample by a scale factor to
8981 arrive at the number of the input sample.  The output file&rsquo;s sample
8982 rate is set to the project sample rate but its length is changed to
8983 reflect the scaled number of samples.  It also filters the resampled
8984 audio to remove aliasing.
8985 </p>
8986 <p>If the scale factor is 2, every 2 input samples will be reduced to 1
8987 output sample and the output file will have half as many samples as the
8988 input sequence.  If it&rsquo;s 0.5, every 0.5 input samples will be stretched
8989 to 1 output sample and the output file will have twice as many samples
8990 as the input sequence.
8991 </p>
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001 <hr>
9002 <a name="REVERSE-VIDEO_002fAUDIO"></a>
9003 <div class="header">
9004 <p>
9005 Next: <a href="#SWAP-FRAMES" accesskey="n" rel="next">SWAP FRAMES</a>, Previous: <a href="#RESAMPLE" accesskey="p" rel="prev">RESAMPLE</a>, Up: <a href="#SECRETS-OF-CINELERRA-EFFECTS" accesskey="u" rel="up">SECRETS OF CINELERRA EFFECTS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
9006 </div>
9007 <a name="REVERSE-VIDEO_002fAUDIO-1"></a>
9008 <h3 class="section">18.22 REVERSE VIDEO/AUDIO</h3>
9009
9010 <p>Media can be reversed on the timeline in realtime.  This isn&rsquo;t to be
9011 confused with using the reverse playback on the transport.  The reverse
9012 effects reverse the region covered by the effect regardless of the
9013 transport direction.  Apply <b>reverse audio</b> to an audio track and
9014 play it backwards.  The sound plays forward.
9015 </p>
9016 <p>The region to be reversed is first determined by what part of the track
9017 the effect is under and second by the locations of keyframes in the
9018 effect.  The reverse effects have an <b>enabled</b> option which allows
9019 you to set keyframes.  This allows may possibilities.
9020 </p>
9021 <p>Every <b>enabled</b> keyframe is treated as the start of a new reversed
9022 region and the end of a previous reversed region.  Several <b>enabled</b>
9023 keyframes in succession yield several regions reversed independant of
9024 each other.  An <b>enabled</b> keyframe followed by a <b>disabled</b>
9025 keyframe yields one reversed region followed by a forward region.
9026 </p>
9027 <p>Finally, be aware when reversing audio that the waveform on the
9028 timeline doesn&rsquo;t reflect the actual reversed output.
9029 </p>
9030
9031
9032
9033 <hr>
9034 <a name="SWAP-FRAMES"></a>
9035 <div class="header">
9036 <p>
9037 Next: <a href="#THRESHOLD" accesskey="n" rel="next">THRESHOLD</a>, Previous: <a href="#REVERSE-VIDEO_002fAUDIO" accesskey="p" rel="prev">REVERSE VIDEO/AUDIO</a>, Up: <a href="#SECRETS-OF-CINELERRA-EFFECTS" accesskey="u" rel="up">SECRETS OF CINELERRA EFFECTS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
9038 </div>
9039 <a name="SWAP-FRAMES-1"></a>
9040 <h3 class="section">18.23 SWAP FRAMES</h3>
9041
9042 <p>This is normally used on interlaced video which has been converted to
9043 fields.  One set of lines becomes one frame and the other set of lines
9044 becomes the next frame.  Now the frame rate is double and is showing
9045 fields of the original video sequentially.  The fields may be out of
9046 order, which is what <b>SWAP FRAMES</b> can correct.
9047 </p>
9048
9049
9050
9051
9052
9053
9054
9055
9056
9057
9058
9059 <hr>
9060 <a name="THRESHOLD"></a>
9061 <div class="header">
9062 <p>
9063 Next: <a href="#TIME-AVERAGE" accesskey="n" rel="next">TIME AVERAGE</a>, Previous: <a href="#SWAP-FRAMES" accesskey="p" rel="prev">SWAP FRAMES</a>, Up: <a href="#SECRETS-OF-CINELERRA-EFFECTS" accesskey="u" rel="up">SECRETS OF CINELERRA EFFECTS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
9064 </div>
9065 <a name="THRESHOLD-1"></a>
9066 <h3 class="section">18.24 THRESHOLD</h3>
9067
9068 <p>Threshold converts the image to pure luminance.  Then luminance values
9069 below and above the threshold range are converted to black and
9070 luminance values inside the threshold range are converted to white. 
9071 The threshold window shows a histogram of luminance values for the
9072 current frame.  Click dragging inside the histogram creates a range to
9073 convert to white.  Shift-clicking extends one border of this range. 
9074 Values for the threshold range can also be specified in the text boxes.
9075 </p>
9076 <p>This effect is basically a primitive luminance key.  A second track
9077 above the track with the threshold effect can be multiplied, resulting
9078 in only the parts of the second track within the threshold being
9079 displayed.
9080 </p>
9081
9082
9083
9084
9085
9086
9087 <hr>
9088 <a name="TIME-AVERAGE"></a>
9089 <div class="header">
9090 <p>
9091 Next: <a href="#TITLER" accesskey="n" rel="next">TITLER</a>, Previous: <a href="#THRESHOLD" accesskey="p" rel="prev">THRESHOLD</a>, Up: <a href="#SECRETS-OF-CINELERRA-EFFECTS" accesskey="u" rel="up">SECRETS OF CINELERRA EFFECTS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
9092 </div>
9093 <a name="TIME-AVERAGE-1"></a>
9094 <h3 class="section">18.25 TIME AVERAGE</h3>
9095
9096 <p>Time average is one effect which has many uses besides creating nifty
9097 trail patterns of moving objects.  It&rsquo;s main use is reducing noise in
9098 still images.  Merely point a video camera at a stationary subject for
9099 30 frames, capture the frames, and average them using TIME AVERAGE and
9100 you&rsquo;ll have a super high quality print.  In floating point colormodels, time
9101 average can increase the dynamic range of lousy cameras.
9102 </p>
9103 <p>Inside the time average effect is an accumulation buffer and a
9104 divisor.  A number of frames are accumulated in the accumulation buffer
9105 and divided by the divisor to get the average.
9106 </p>
9107 <p>Because the time average can consume enourmous amounts of memory, it is
9108 best applied by first disabling playback for the track, dropping the
9109 time average in it, configuring time average for the desired number of
9110 frames, and re-enabling playback for the track.
9111 </p>
9112 <p><b>Frames count:</b> This determines the number of frames to be accumulated
9113 in the accumulation buffer.  For extremely large integrations it&rsquo;s
9114 easier to edit the EDL in a text editor and put in the number of frames.
9115 </p>
9116 <p><b>Accumulate sequence again:</b> If an effect before the time average is
9117 adjusted the time average normally doesn&rsquo;t reread the accumulation
9118 buffer to get the change.  This forces it to reread the accumulation
9119 buffer when any other effects change.
9120 </p>
9121
9122 <p><b>Average:</b> This causes the accumulation buffer to be divided before
9123 being output.  The result is the average of all the frames.
9124 </p>
9125 <p><b>Accumulate:</b> This outputs the accumulation buffer without dividing
9126 it.  The result is the sum of all the frames.
9127 </p>
9128 <p><b>Accumulate only:</b>
9129 </p>
9130 <p>In order to accumulate only the specified number of frames, the time
9131 average retains all the previous frames in memory and subtracts them out
9132 as it plays forward.  <b>Accumulate only:</b> causes the history buffer to
9133 not be used in <b>averaging</b> and <b>accumulating</b>.  Without the history
9134 buffer, frames are added endlessly without ever being subtracted.  It&rsquo;s
9135 the same as an infinitely long accumulation buffer.  The only difference
9136 is for <b>Average</b> mode, the output is still divided by the <b>Frame
9137 count</b>.  <b>Accumulate only</b> is used where the number of frames in the
9138 accumulation would be too big to fit in memory.
9139 </p>
9140 <p><b>Replace:</b> This causes the accumulation buffer to be replaced by only
9141 pixels which aren&rsquo;t transparent.  This allows black borders from motion
9142 tracking to be filled in.
9143 </p>
9144 <p><b>Threshold:</b> The value a pixel must be before it replaces the previous
9145 pixel.  If alpha channels are enabled, the alpha is the value compared. 
9146 If there is no alpha channel, the brightness is the value compared.
9147 </p>
9148 <p><b>Border:</b> The number of pixels on the border of the image to never
9149 replace.  This hides errors in the replacement operation from the
9150 output, since errors occur at the transition between the replaced area
9151 and the ignored area.
9152 </p>
9153 <p><b>Greater:</b> Pixels are replaced if their value is greater than the
9154 previous pixel.  Use this to create star trails in stacks of many night
9155 sky photos or paint many copies of an object from its motion if it is
9156 lighter than the background.
9157 </p>
9158 <p><b>Less:</b> Pixels are replaced if their value is less than the previous
9159 pixel.  Use this to paint copies of an object from its motion if it is
9160 darker than the background.
9161 </p>
9162
9163
9164
9165
9166
9167
9168 <hr>
9169 <a name="TITLER"></a>
9170 <div class="header">
9171 <p>
9172 Next: <a href="#VIDEO-SCOPE" accesskey="n" rel="next">VIDEO SCOPE</a>, Previous: <a href="#TIME-AVERAGE" accesskey="p" rel="prev">TIME AVERAGE</a>, Up: <a href="#SECRETS-OF-CINELERRA-EFFECTS" accesskey="u" rel="up">SECRETS OF CINELERRA EFFECTS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
9173 </div>
9174 <a name="TITLER-1"></a>
9175 <h3 class="section">18.26 TITLER</h3>
9176
9177 <p>While it is possible to add text to movies by importing still images
9178 from The Gimp and compositing them, the Titler allows you to add text
9179 from within Cinelerra.  
9180 </p>
9181 <p>The titler has standard options for <b>font, size, and style</b>.  The
9182 best font is a generic, normal font like Arial in a large size.
9183 </p>
9184 <p>The titler also has options you&rsquo;ll only find in moving pictures.  The
9185 <b>Justify</b> operation justifies the text relative to the entire frame. 
9186 Once justified, the <b>X and Y</b> offset is applied.  This allows text to
9187 be justified while at the same time letting you push it within the
9188 title safe region.
9189 </p>
9190 <p>The <b>motion type</b> scrolls the text in any of the four directions. 
9191 When using this, the text may dissappear.  Move the insertion point
9192 along the timeline until the text is far enough along the animation to
9193 reappear.  The text scrolls on and scrolls off.
9194 </p>
9195 <p>Setting <b>loop</b> causes the text to scroll completely off and repeat. 
9196 Without <b>loop</b> the text scrolls off and never reappears.
9197 </p>
9198 <p>The speed of the animation is determined by <b>speed</b>  Set it higher to
9199 speed up the animation.
9200 </p>
9201 <p><b>Drop shadow</b> draws a black copy of the text to the bottom right of
9202 the original text.  Useful when drawing text over changing video to
9203 keep the border always visible.
9204 </p>
9205 <p>In addition to the scrolling, <b>Fade in/Fade out</b> are a second type of
9206 animation.  If the fade seconds are 0, no fading is done.
9207 </p>
9208 <p><b>Outline</b> draws an outline on the characters if it&rsquo;s greater than 0. 
9209 Set the outline size by changing the number.  Set the outline color with
9210 the <b>OUTLINE COLOR</b> button.  If no outline is visible, make sure the
9211 alpha in <b>OUTLINE COLOR</b> is nonzero.  To get pure outline characters,
9212 set <b>COLOR</b> alpha to 0.
9213 </p>
9214 <p><b>COLOR</b> picks the color to draw the text in.  Usually white is the
9215 only practical color.
9216 </p>
9217 <p><b>OUTLINE COLOR</b> picks the color to draw the text outline in.
9218 </p>
9219 <p><b>Stamp timecode</b> replaces the text with the current position on the
9220 timeline in seconds and frames.
9221 </p>
9222 <p><b>SECRETS OF THE TITLER</b>
9223 </p><table class="menu" border="0" cellspacing="0">
9224 <tr><td align="left" valign="top">&bull; <a href="#ADDING-FONTS-TO-THE-TITLER" accesskey="1">ADDING FONTS TO THE TITLER</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">How to add fonts to the titler
9225 </td></tr>
9226 <tr><td align="left" valign="top">&bull; <a href="#THE-TITLE_002dSAFE-REGION" accesskey="2">THE TITLE-SAFE REGION</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">How to keep text visible on output
9227 </td></tr>
9228 <tr><td align="left" valign="top">&bull; <a href="#MAKING-TITLES-LOOK-GOOD" accesskey="3">MAKING TITLES LOOK GOOD</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">How to make your titles look good.
9229 </td></tr>
9230 </table>
9231
9232 <hr>
9233 <a name="ADDING-FONTS-TO-THE-TITLER"></a>
9234 <div class="header">
9235 <p>
9236 Next: <a href="#THE-TITLE_002dSAFE-REGION" accesskey="n" rel="next">THE TITLE-SAFE REGION</a>, Up: <a href="#TITLER" accesskey="u" rel="up">TITLER</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
9237 </div>
9238 <a name="ADDING-FONTS-TO-THE-TITLER-1"></a>
9239 <h4 class="subsection">18.26.1 ADDING FONTS TO THE TITLER</h4>
9240
9241 <p>The X Window system originally didn&rsquo;t have a suitable font renderer for
9242 video.  It also is restricted to the current bit depth.  It doesn&rsquo;t
9243 have a convenient way to know which fonts work with the suitable font
9244 renderer in the desired bit depth.  The easiest way we&rsquo;ve found to
9245 support fonts in the titler is to have a directory for them at
9246 <b>/usr/lib/cinelerra/fonts</b>.
9247 </p>
9248 <p>The titler supports mainly <b>TTF</b>, true type fonts.  It supports
9249 others but TTF are the most reliable.  To add true type fonts, copy the
9250 <b>.TTF</b> files to the <b>/usr/lib/cinelerra/fonts</b> directory.  In that
9251 directory run <b>ttmkfdir &amp;&amp; mv fonts.scale fonts.dir</b> and restart
9252 Cinelerra.  The new fonts should appear.  The usage of ttmkfdir changes
9253 frequently so this technique might not work.
9254 </p>
9255
9256 <hr>
9257 <a name="THE-TITLE_002dSAFE-REGION"></a>
9258 <div class="header">
9259 <p>
9260 Next: <a href="#MAKING-TITLES-LOOK-GOOD" accesskey="n" rel="next">MAKING TITLES LOOK GOOD</a>, Previous: <a href="#ADDING-FONTS-TO-THE-TITLER" accesskey="p" rel="prev">ADDING FONTS TO THE TITLER</a>, Up: <a href="#TITLER" accesskey="u" rel="up">TITLER</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
9261 </div>
9262 <a name="THE-TITLE_002dSAFE-REGION-1"></a>
9263 <h4 class="subsection">18.26.2 THE TITLE-SAFE REGION</h4>
9264
9265 <p>If the video is displayed on a consumer TV, the outer border is going
9266 to be cropped by 5% on each side.  Moreover, text which is too close to
9267 the edge looks sloppy.  Make sure when adding titles to have the
9268 <b>title-safe</b> <img src="titlesafe.png" alt="titlesafe"> tool active in the <b>compositor</b> window.
9269 The text shouldn&rsquo;t cross the inner rectangle.
9270 </p>
9271
9272 <hr>
9273 <a name="MAKING-TITLES-LOOK-GOOD"></a>
9274 <div class="header">
9275 <p>
9276 Previous: <a href="#THE-TITLE_002dSAFE-REGION" accesskey="p" rel="prev">THE TITLE-SAFE REGION</a>, Up: <a href="#TITLER" accesskey="u" rel="up">TITLER</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
9277 </div>
9278 <a name="MAKING-TITLES-LOOK-GOOD-1"></a>
9279 <h4 class="subsection">18.26.3 MAKING TITLES LOOK GOOD</h4>
9280
9281 <p>No-one else is going to tell you this, but to make good looking titles,
9282 ignore most of the features of the titler.  The best settings are:
9283 </p>
9284 <ul>
9285 <li> Font: <b>Arial</b>
9286 </li><li> Italic: <b>off</b>
9287 </li><li> Motion: <b>No motion</b>
9288 </li><li> Bold: <b>on or off</b>
9289 </li><li> Fade in: <b>0</b>
9290 </li><li> Fade out: <b>0</b>
9291 </li><li> Color: <b>white</b>
9292 </li><li> Outline color: <b>black</b>
9293 </li><li> Drop Shadow or outline: <b>use either to improve contrast but not both</b>
9294 </li></ul>
9295
9296
9297 <p>Don&rsquo;t waste the audience&rsquo;s time with fading &amp; crawls.  Use crawls only
9298 if there&rsquo;s too much text to fit on the screen.  The title should be
9299 legible enough to take the least amount of time to read.  You&rsquo;re
9300 supposed to show the story, not write it.  If they wanted to read a
9301 story, they would be reading a book instead of watching video.
9302 </p>
9303
9304
9305
9306
9307
9308
9309
9310
9311
9312
9313
9314
9315
9316 <hr>
9317 <a name="VIDEO-SCOPE"></a>
9318 <div class="header">
9319 <p>
9320 Previous: <a href="#TITLER" accesskey="p" rel="prev">TITLER</a>, Up: <a href="#SECRETS-OF-CINELERRA-EFFECTS" accesskey="u" rel="up">SECRETS OF CINELERRA EFFECTS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
9321 </div>
9322 <a name="VIDEO-SCOPE-1"></a>
9323 <h3 class="section">18.27 VIDEO SCOPE</h3>
9324
9325 <p>The video scope plots two views of the image.  One view plots the
9326 intensity of each pixel against horizontal position.  They call this
9327 the WAVEFORM.  Another view translates hue to angle and saturation to
9328 radius for each pixel.  They call this the VECTORSCOPE.
9329 </p>
9330 <p>The vectorscope is actually very useful for determining if an image is
9331 saturated.  When adjusting saturation, it&rsquo;s important to watch the
9332 vectorscope to make sure pixels don&rsquo;t extend past the 100 radius.
9333 </p>
9334 <p>The waveform allows you to make sure image data extends from complete
9335 black to complete white while adjusting the brightness/contrast.
9336 </p>
9337 <p>Some thought is being given to having a video scope for recording. 
9338 Unfortunately, this would require a lot of variations of the video
9339 scope for all the different video drivers.
9340 </p>
9341
9342
9343
9344
9345 <hr>
9346 <a name="PLUGIN-AUTHORING"></a>
9347 <div class="header">
9348 <p>
9349 Next: <a href="#KEYBOARD-SHORTCUTS" accesskey="n" rel="next">KEYBOARD SHORTCUTS</a>, Previous: <a href="#SECRETS-OF-CINELERRA-EFFECTS" accesskey="p" rel="prev">SECRETS OF CINELERRA EFFECTS</a>, Up: <a href="#Top" accesskey="u" rel="up">TOP</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
9350 </div>
9351 <a name="PLUGIN-AUTHORING-1"></a>
9352 <h2 class="chapter">19 PLUGIN AUTHORING</h2>
9353
9354 <p>The plugin API in Cinelerra dates back to 1997, before the LADSPA and
9355 before VST became popular.  It&rsquo;s fundamentally the same as it was in
9356 1997, with minor modifications to handle keyframes and GUI feedback. 
9357 The GUI is not abstracted from the programmer.  This allows the
9358 programmer to use whatever toolkit they want and allows more
9359 flexibility in appearance but it costs more.
9360 </p>
9361 <p>There are several types of plugins, each with a common method of
9362 implementation and specific changes for that particular type.  The
9363 easiest way to implement a plugin is to take the simplest existing one
9364 out of the group and rename the symbols.  
9365 </p>
9366
9367
9368 <table class="menu" border="0" cellspacing="0">
9369 <tr><td align="left" valign="top">&bull; <a href="#INTRODUCING-THE-PULL-METHOD" accesskey="1">INTRODUCING THE PULL METHOD</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">The current paradigm for plugin writing
9370 </td></tr>
9371 <tr><td align="left" valign="top">&bull; <a href="#COMMON-PLUGIN-FUNCTIONS" accesskey="2">COMMON PLUGIN FUNCTIONS</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">What all effects have to do.
9372 </td></tr>
9373 <tr><td align="left" valign="top">&bull; <a href="#REALTIME-PLUGINS" accesskey="3">REALTIME PLUGINS</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">What realtime effects have to do.
9374 </td></tr>
9375 <tr><td align="left" valign="top">&bull; <a href="#NONREALTIME-PLUGINS" accesskey="4">NONREALTIME PLUGINS</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">What rendered effects have to do.
9376 </td></tr>
9377 <tr><td align="left" valign="top">&bull; <a href="#AUDIO-PLUGINS" accesskey="5">AUDIO PLUGINS</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">What audio effects have to do.
9378 </td></tr>
9379 <tr><td align="left" valign="top">&bull; <a href="#VIDEO-PLUGINS" accesskey="6">VIDEO PLUGINS</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">What video effects have to do.
9380 </td></tr>
9381 <tr><td align="left" valign="top">&bull; <a href="#TRANSITION-PLUGINS" accesskey="7">TRANSITION PLUGINS</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">What transitions have to do.
9382 </td></tr>
9383 <tr><td align="left" valign="top">&bull; <a href="#PLUGIN-GUI_0027S-WHICH-UPDATE-DURING-PLAYBACK" accesskey="8">PLUGIN GUI'S WHICH UPDATE DURING PLAYBACK</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">How to use currently playing data to draw the GUI.
9384 </td></tr>
9385 <tr><td align="left" valign="top">&bull; <a href="#USING-OPENGL" accesskey="9">USING OPENGL</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">How to use hardware to speed up operations.
9386 </td></tr>
9387 <tr><td align="left" valign="top">&bull; <a href="#PLUGIN-QUERIES">PLUGIN QUERIES</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">How plugins get information about the data to be processed.
9388 </td></tr>
9389 </table>
9390
9391
9392
9393
9394 <hr>
9395 <a name="INTRODUCING-THE-PULL-METHOD"></a>
9396 <div class="header">
9397 <p>
9398 Next: <a href="#COMMON-PLUGIN-FUNCTIONS" accesskey="n" rel="next">COMMON PLUGIN FUNCTIONS</a>, Up: <a href="#PLUGIN-AUTHORING" accesskey="u" rel="up">PLUGIN AUTHORING</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
9399 </div>
9400 <a name="INTRODUCING-THE-PULL-METHOD-1"></a>
9401 <h3 class="section">19.1 INTRODUCING THE PULL METHOD</h3>
9402
9403 <p>Originally plugins were designed with the push method.  The push method
9404 is intuitive and simple.  A source pushes data to a plugin, the plugin
9405 does math operations on it, and the plugin pushes it to a destination. 
9406 For 6 years this was the way all realtime plugins were driven
9407 internally but it didn&rsquo;t allow you to reduce the rate of playback in
9408 realtime.  While plugins can still be designed as if they&rsquo;re pushing
9409 data, this is not the way they&rsquo;re processed internally anymore.
9410 </p>
9411 <p>The latest evolution in Cinelerra&rsquo;s plugin design is the pull method. 
9412 The rendering pipeline starts at the final output and the final steps
9413 in the rendering pipeline are reading the data from disk.  Every step
9414 in the rendering chain involves requesting data from the previous
9415 step.  When the rendering pipleline eventually requests data from a
9416 plugin chain, each plugin requests data from the plugin before it.
9417 </p>
9418 <p>This is less intuitive than the push method but is much more powerful. 
9419 Realtime plugins written using the pull method can change the rate data
9420 is presented to the viewer and the direction of playback.  The pull
9421 method allows plugins to take in data at a higher rate than they send
9422 it out.
9423 </p>
9424 <p>To get the power of rate independance, the pull method requires plugins
9425 to know more about the data than they needed to under the push method. 
9426 Plugins need to know what rate the project is at, what rate their
9427 output is supposed to be at and what rate their input is supposed to be
9428 at.  These different data rates have to be correlated for a plugin to
9429 configure itself properly.
9430 </p>
9431 <p>Keyframes for a plugin are stored relative to the project frame rate. 
9432 Queries from a plugin for for the current playback position are given
9433 relative to the project frame rate.  If the plugin&rsquo;s output was
9434 requested to be at twice the project frame rate, the positions need to
9435 be converted to the project rate for keyframes to match up.  Two
9436 classes of data rates were created to handle this problem.
9437 </p>
9438 <p>Rate conversions are done in terms of the <b>project rate</b> and the
9439 <b>requested rate</b>.  The project rate is identical for all plugins.  It
9440 is determined by the <b>settings-&gt;format</b> window.  The requested rate
9441 is determined by the downstream plugin requesting data from the current
9442 plugin.  The requested rate is arbitrary.  Exactly how to use these
9443 rates is described below.
9444 </p>
9445
9446
9447 <hr>
9448 <a name="COMMON-PLUGIN-FUNCTIONS"></a>
9449 <div class="header">
9450 <p>
9451 Next: <a href="#REALTIME-PLUGINS" accesskey="n" rel="next">REALTIME PLUGINS</a>, Previous: <a href="#INTRODUCING-THE-PULL-METHOD" accesskey="p" rel="prev">INTRODUCING THE PULL METHOD</a>, Up: <a href="#PLUGIN-AUTHORING" accesskey="u" rel="up">PLUGIN AUTHORING</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
9452 </div>
9453 <a name="COMMON-PLUGIN-FUNCTIONS-1"></a>
9454 <h3 class="section">19.2 COMMON PLUGIN FUNCTIONS</h3>
9455
9456 <p>All plugins inherit from a derivative of PluginClient.  This
9457 PluginClient derivative implements most of the required methods in
9458 PluginClient, but users must still define methods for PluginClient. 
9459 The most commonly used methods are predefined in macros to reduce the
9460 typing yet still allow flexibility.
9461 </p>
9462 <p>The files they include depend on the plugin type.  Audio plugins
9463 include <b>pluginaclient.h</b> and video plugins include
9464 <b>pluginvclient.h</b>.  They inherit <b>PluginAClient</b> and
9465 <b>PluginVClient</b> respectively.
9466 </p>
9467 <p>Cinelerra instantiates all plugins at least twice when they are used in
9468 a movie.  Once instance is the GUI.  The other instance is the signal
9469 processor.  User input, through a complicated sequence, is propogated
9470 from the GUI instance to the signal processor instance.  If the signal
9471 processor wants to alter the GUI, it propogates data back to the GUI
9472 instance.  There are utility functions for doing all this.
9473 </p>
9474 <p>All plugins define at least three objects:
9475 </p>
9476 <ul>
9477 <li> 
9478 <b>Processing object</b> - Contains pointers to all the other objects and
9479 performs the signal processing.  This object contains a number of
9480 queries to identify itself and is the object you register to register
9481 the plugin.
9482
9483
9484 </li><li> 
9485 <b>User interface object</b> - This is a subclass of
9486 <b>PluginClientWindow</b>.  It shows data on the screen and collects
9487 parameters from the user.
9488
9489 <p>The window has pointers to a number of widgets, a few initialization
9490 methods, and a back pointer to the plugin&rsquo;s processing object.  The GUI
9491 uses Cinelerra&rsquo;s toolkit.  The plugin abstraction layer handles creating
9492 a thread for the GUI.
9493 </p>
9494
9495
9496 </li><li> 
9497 <b>Configuration object</b> - This stores the user parameters and always
9498 needs interpolation, copying, and comparison functions.  Macros for the
9499 plugin client automatically call configuration methods to interpolate
9500 keyframes.
9501
9502 </li></ul>
9503
9504 <table class="menu" border="0" cellspacing="0">
9505 <tr><td align="left" valign="top">&bull; <a href="#THE-PROCESSING-OBJECT" accesskey="1">THE PROCESSING OBJECT</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
9506 </td></tr>
9507 <tr><td align="left" valign="top">&bull; <a href="#THE-CONFIGURATION-OBJECT" accesskey="2">THE CONFIGURATION OBJECT</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
9508 </td></tr>
9509 <tr><td align="left" valign="top">&bull; <a href="#THE-USER-INTERFACE-OBJECT" accesskey="3">THE USER INTERFACE OBJECT</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
9510 </td></tr>
9511 </table>
9512
9513
9514
9515 <hr>
9516 <a name="THE-PROCESSING-OBJECT"></a>
9517 <div class="header">
9518 <p>
9519 Next: <a href="#THE-CONFIGURATION-OBJECT" accesskey="n" rel="next">THE CONFIGURATION OBJECT</a>, Up: <a href="#COMMON-PLUGIN-FUNCTIONS" accesskey="u" rel="up">COMMON PLUGIN FUNCTIONS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
9520 </div>
9521 <a name="THE-PROCESSING-OBJECT-1"></a>
9522 <h4 class="subsection">19.2.1 THE PROCESSING OBJECT</h4>
9523
9524 <p>Load up a simple plugin like gain to see what this object looks like.
9525 The processing object should inherit from the intended PluginClient
9526 derivative.  Its constructor should take a PluginServer argument.
9527 </p>
9528 <div class="example">
9529 <pre class="example">MyPlugin(PluginServer *server);
9530 </pre></div>
9531
9532 <p>In the implementation, the plugin must contain a registration line with
9533 the name of the processing object like
9534 </p>
9535 <div class="example">
9536 <pre class="example">REGISTER_PLUGIN(MyPlugin)
9537 </pre></div>
9538
9539
9540
9541
9542 <p>Another function which is useful but not mandatory is
9543 </p>
9544 <div class="example">
9545 <pre class="example">int is_multichannel();
9546 </pre></div>
9547
9548 <p>It should return 1 if one instance of the plugin handles multiple
9549 tracks simultaneously or 0 if one instance of the plugin only handles
9550 one track.  The default is 0 if it is omitted.
9551 </p>
9552 <p>Multichannel plugins in their processing function should refer to a
9553 function called <b>PluginClient::get_total_buffers()</b> to determine the
9554 number of channels.
9555 </p>
9556
9557
9558
9559 <p>To simplify the implementation of realtime plugins, a macro for
9560 commonly used members has been created for the class header, taking the
9561 configuration object and user interface thread object as arguments. 
9562 The macro definitions apply mainly to realtime plugins and are not
9563 useful in nonrealtime plugins.  Fortunately, nonrealtime plugins are
9564 simpler.
9565 </p>
9566 <div class="example">
9567 <pre class="example">PLUGIN_CLASS_MEMBERS(config_name, thread_name)
9568 </pre></div>
9569
9570 <p>The commonly used members in PLUGIN_CLASS_MEMBERS are described below.
9571 </p>
9572 <ul>
9573 <li> int load_configuration();
9574
9575 <p>Loads the configuration based on surrounding keyframes and current
9576 position.  The class definition for load_configuration should contain 
9577 </p>
9578 <div class="example">
9579 <pre class="example">LOAD_CONFIGURATION_MACRO(plugin_class, config_class)
9580 </pre></div>
9581
9582 <p>to implement the default behavior for load_configuration.  This stores
9583 whatever the current configuration is inside the plugin&rsquo;s configuration
9584 object and returns 1 if the new configuration differs from the previous
9585 configuration.  The return value of load_configuration is used by
9586 another commonly used function, update_gui to determine if the GUI really needs to be updated.
9587 </p>
9588 <p>The plugin&rsquo;s configuration object is always called <b>config</b> inside
9589 PLUGIN_CLASS_MEMBERS.
9590 </p>
9591 </li><li> VFrame* new_picon();
9592
9593 <p>Creates a picon for display in the resource window.  Use
9594 </p>
9595 <div class="example">
9596 <pre class="example">#include &quot;picon_png.h&quot;
9597 NEW_PICON_MACRO(plugin_class)
9598 </pre></div>
9599
9600 <p>to implement new_picon.  In addition, the user should create a
9601 <b>picon_png.h</b> header file from a PNG image using <b>pngtoh</b>. 
9602 <b>pngtoh</b> is compiled in the <b>guicast/ARCH</b> directory.
9603 </p>
9604 <p>The source PNG image should be called picon.png and can be any format
9605 supported by PNG.
9606 </p>
9607 </li><li> char* plugin_title();
9608
9609 <p>Returns a text string identifying the plugin in the resource window. 
9610 The string has to be unique.
9611 </p>
9612
9613 </li><li> void update_gui(); 
9614
9615 <p>Should first load the configuration, test for a return of 1, and then
9616 redraw the GUI with the new parameters.  All the plugins using GuiCast
9617 have a format like
9618 </p>
9619 <div class="example">
9620 <pre class="example">void MyPlugin::update_gui()
9621 {
9622         if(thread)
9623         {
9624                 if(load_configuration())
9625                 {
9626                         thread-&gt;window-&gt;lock_window();
9627 // update widgets here
9628                         thread-&gt;window-&gt;unlock_window();
9629                 }
9630         }
9631 }
9632 </pre></div>
9633
9634 <p>to handle concurrency and conditions of no GUI.
9635 </p>
9636
9637
9638
9639 </li></ul>
9640
9641
9642 <p>Important functions the processing object must define are the
9643 functions which load and save configuration data from keyframes.  These
9644 functions are called by the macros so all you need to worry about is
9645 accessing the keyframe data.
9646 </p>
9647 <div class="example">
9648 <pre class="example">void save_data(KeyFrame *keyframe);
9649 void read_data(KeyFrame *keyframe);
9650 </pre></div>
9651
9652 <p>The read data functions are only used in realtime plugins.  The read
9653 data functions translate the plugin configuration between the KeyFrame
9654 argument and the configuration object for the plugin.  The keyframes
9655 are stored on the timeline and can change for every project.
9656 </p>
9657 <p>Use an object called <b>FileXML</b> to do the translation and some
9658 specific commands to get the data out of the KeyFrame argument.  See
9659 any existing plugin to see the usage of KeyFrame and FileXML.
9660 </p>
9661
9662 <div class="example">
9663 <pre class="example">int load_defaults();
9664 int save_defaults();
9665 </pre></div>
9666
9667 <p>The load defaults functions are used in realtime and non-realtime
9668 plugins.  The load defaults functions translate the plugin
9669 configuration between a BC_Hash object and the plugin&rsquo;s
9670 configuration.  The BC_Hash object stores configurations in a discrete
9671 file on disk for each plugin but doesn&rsquo;t isolate different
9672 configurations for different projects.
9673 </p>
9674 <p>The function overriding <b>load_defaults</b> also needs to call <b>defaults
9675 = new BC_Hash(path);</b> with the configuration path.  See any existing
9676 plugin to see the usage of BC_Hash.   The function overriding
9677 <b>save_defaults</b> does not create <b>defaults</b>.
9678 </p>
9679 <p>Other standard members may be defined in the processing object,
9680 depending on the plugin type.
9681 </p>
9682
9683
9684
9685 <hr>
9686 <a name="THE-CONFIGURATION-OBJECT"></a>
9687 <div class="header">
9688 <p>
9689 Next: <a href="#THE-USER-INTERFACE-OBJECT" accesskey="n" rel="next">THE USER INTERFACE OBJECT</a>, Previous: <a href="#THE-PROCESSING-OBJECT" accesskey="p" rel="prev">THE PROCESSING OBJECT</a>, Up: <a href="#COMMON-PLUGIN-FUNCTIONS" accesskey="u" rel="up">COMMON PLUGIN FUNCTIONS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
9690 </div>
9691 <a name="THE-CONFIGURATION-OBJECT-1"></a>
9692 <h4 class="subsection">19.2.2 THE CONFIGURATION OBJECT</h4>
9693
9694 <p>The configuration object is critical for GUI updates, signal
9695 processing, and default settings in realtime plugins.  Be aware it is
9696 not used in nonrealtime plugins.  The configuration object inherits
9697 from nothing and has no dependancies.  It&rsquo;s merely a class containing
9698 three functions and variables specific to the plugin&rsquo;s parameters.
9699 </p>
9700 <p>Usually the configuration object starts with the name of the plugin
9701 followed by Config.
9702 </p>
9703 <div class="example">
9704 <pre class="example">class MyPluginConfig
9705 {
9706 public:
9707         MyPluginConfig();
9708 </pre></div>
9709
9710
9711 <p>Following the name of the configuration class, we put in three
9712 required functions and the configuration variables.
9713 </p>
9714 <div class="example">
9715 <pre class="example">   int equivalent(MyPluginConfig &amp;that);
9716         void copy_from(MyPluginConfig &amp;that);
9717         void interpolate(MyPluginConfig &amp;prev, 
9718                 MyPluginConfig &amp;next, 
9719                 int64_t prev_position, 
9720                 int64_t next_position, 
9721                 int64_t current_position);
9722
9723
9724
9725         float parameter1;
9726         float parameter2;
9727         int parameter3;
9728 };
9729
9730 </pre></div>
9731
9732
9733 <p>Now you must define the three functions.  <b>Equivalent</b> is called by
9734 LOAD_CONFIGURATION_MACRO to determine if the local configuration
9735 parameters are identical to the configuration parameters in the
9736 arguement.  If equivalent returns 0, the LOAD_CONFIGURATION_MACRO 
9737 causes the GUI to redraw.  If equivalent returns 1, the
9738 LOAD_CONFIGURATION_MACRO doesn&rsquo;t redraw the GUI.
9739 </p>
9740 <p>Then there&rsquo;s <b>copy_from</b> which transfers the configuration values
9741 from the argument to the local variables.  This is once again used in
9742 LOAD_CONFIGURATION_MACRO to store configurations in temporaries.  Once 
9743 LOAD_CONFIGURATION_MACRO has replicated the configuration, it loads a
9744 second configuration.  Then it interpolates the two configurations to
9745 get the current configuration.  The interpolation function performs the
9746 interpolation and stores the result in the local variables.
9747 </p>
9748 <p>Normally the interpolate function calculates a previous and next
9749 fraction, using the arguments.
9750 </p>
9751 <div class="example">
9752 <pre class="example">void MyPluginConfig::interpolate(MyPluginConfig &amp;prev, 
9753                 MyPluginConfig &amp;next, 
9754                 int64_t prev_position, 
9755                 int64_t next_position, 
9756                 int64_t current_position)
9757 {
9758         double next_scale = (double)(current_position - prev_position) / (next_position - prev_position);
9759         double prev_scale = (double)(next_position - current_position) / (next_position - prev_position);
9760 </pre></div>
9761
9762 <p>Then the fractions are applied to the previous and next configuration
9763 variables to yield the current values.
9764 </p>
9765 <div class="example">
9766 <pre class="example">
9767         this-&gt;parameter1 = (float)(prev.parameter1 * prev_scale + next.parameter1 * next_scale);
9768         this-&gt;parameter2 = (float)(prev.parameter2 * prev_scale + next.parameter2 * next_scale);
9769         this-&gt;parameter3 = (int)(prev.parameter3 * prev_scale + next.parameter3 * next_scale);
9770 }
9771
9772 </pre></div>
9773
9774 <p>Alternatively you can copy the values from the previous configuration
9775 argument if no interpolation is desired.
9776 </p>
9777 <p>This usage of the configuration object is the same in audio and video
9778 plugins.  In video playback, the interpolation function is called for
9779 every frame, yielding smooth interpolation.  In audio playback, the
9780 interpolation function is called only once for every console fragment
9781 and once every time the insertion point moves.  This is good enough for
9782 updating the GUI while selecting regions on the timeline but it may not
9783 be accurate enough for really smooth rendering of the effect.
9784 </p>
9785 <p>For really smooth rendering of audio, you can still use
9786 load_configuration when updating the GUI.  For process_buffer; however,
9787 ignore load_configuration and write your own interpolation routine
9788 which loads all the keyframes in a console fragment and interpolates
9789 every sample.  This would be really slow and hard to debug, yielding
9790 improvement which may not be audible.  Then of course, every country
9791 has its own wierdos.
9792 </p>
9793 <p>An easier way to get smoother interpolation is to reduce the console
9794 fragment to 1 sample.  This would have to be rendered and played back
9795 with the console fragment back over 2048 of course.  The Linux sound
9796 drivers can&rsquo;t play fragments of 1 sample.
9797 </p>
9798
9799
9800
9801
9802
9803
9804
9805 <hr>
9806 <a name="THE-USER-INTERFACE-OBJECT"></a>
9807 <div class="header">
9808 <p>
9809 Previous: <a href="#THE-CONFIGURATION-OBJECT" accesskey="p" rel="prev">THE CONFIGURATION OBJECT</a>, Up: <a href="#COMMON-PLUGIN-FUNCTIONS" accesskey="u" rel="up">COMMON PLUGIN FUNCTIONS</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
9810 </div>
9811 <a name="THE-USER-INTERFACE-OBJECT-1"></a>
9812 <h4 class="subsection">19.2.3 THE USER INTERFACE OBJECT</h4>
9813
9814
9815 <p>The user interface object is derived from <b>PluginClientWindow</b>.  The
9816 user must call <b>NEW_WINDOW_MACRO</b> in the processing object to create
9817 the <b>PluginClientWindow</b>.  This system is used in realtime plugins but
9818 not in nonrealtime plugins.
9819 </p>
9820 <p>Nonrealtime plugins create and destroy their own GUI in their
9821 <b>get_parameters</b> function and there&rsquo;s no need for a
9822 <b>PluginClientWindow</b> subclass.
9823 </p>
9824 <p>Now the window class must be declared in the plugin header.  It&rsquo;s
9825 easiest to implement the window by copying an existing plugin and
9826 renaming the symbols.  The following is an outline of what happens. 
9827 The plugin header must declare the window&rsquo;s constructor using the
9828 appropriate arguments.
9829 </p>
9830 <div class="example">
9831 <pre class="example">
9832 #include &quot;guicast.h&quot;
9833
9834 MyWindow::MyWindow(MyPlugin *plugin)
9835  : PluginClientWindow(plugin, 
9836         440, 
9837         500, 
9838         440, 
9839         500, 
9840         0)
9841 {
9842
9843 </pre></div>
9844
9845 <p>This becomes a window on the screen with the size given by the arguments
9846 to <b>PluginClientWindow</b>.
9847 </p>
9848 <p>It needs two methods
9849 </p>
9850 <div class="example">
9851 <pre class="example">   void create_objects();
9852 </pre></div>
9853
9854 <p>and a back pointer to the plugin
9855 </p>
9856 <div class="example">
9857 <pre class="example">   MyPlugin *plugin;
9858 </pre></div>
9859
9860
9861 <p>The create_objects member puts widgets in the window according to
9862 GuiCast&rsquo;s syntax.  A pointer to each widget which you want to
9863 synchronize to a configuration parameter is stored in the window class. 
9864 These are updated in the <b>update_gui</b> function you earlier defined for
9865 the plugin.  The widgets are usually derivatives of a GuiCast widget and
9866 they override functions in GuiCast to handle events.  Finally
9867 create_objects calls 
9868 </p>
9869 <div class="example">
9870 <pre class="example">   show_window();
9871 </pre></div>
9872
9873 <p>to make the window appear all at once.
9874 </p>
9875 <p>Every widget in the GUI needs to detect when its value changes.  In
9876 GuiCast the <b>handle_event</b> method is called whenever the value
9877 changes.  In <b>handle_event</b>, the widget then needs to call
9878 <b>plugin-&gt;send_configure_change()</b> to propogate the change to any
9879 copies of the plugin which are processing data.
9880 </p>
9881
9882
9883
9884
9885
9886
9887
9888
9889 <hr>
9890 <a name="REALTIME-PLUGINS"></a>
9891 <div class="header">
9892 <p>
9893 Next: <a href="#NONREALTIME-PLUGINS" accesskey="n" rel="next">NONREALTIME PLUGINS</a>, Previous: <a href="#COMMON-PLUGIN-FUNCTIONS" accesskey="p" rel="prev">COMMON PLUGIN FUNCTIONS</a>, Up: <a href="#PLUGIN-AUTHORING" accesskey="u" rel="up">PLUGIN AUTHORING</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
9894 </div>
9895 <a name="REALTIME-PLUGINS-1"></a>
9896 <h3 class="section">19.3 REALTIME PLUGINS</h3>
9897
9898 <p>Realtime plugins should use PLUGIN_CLASS_MEMBERS to define the basic
9899 set of members in their headers.  All realtime plugins must define an
9900 </p>
9901 <div class="example">
9902 <pre class="example">int is_realtime()
9903 </pre></div>
9904
9905 <p>member returning 1.  This causes a number of methods to be called
9906 during live playback and the plugin to be usable on the timeline.
9907 </p>
9908 <p>Realtime plugins must override a member called
9909 </p>
9910 <div class="example">
9911 <pre class="example">process_buffer 
9912 </pre></div>
9913
9914 <p>This function takes different arguments depending on if the plugin
9915 handles video or audio.  See an existing plugin to find out which usage
9916 applies.
9917 </p>
9918 <p>The main features of the process_buffer function are a buffer to store
9919 the output, the starting position of the output, and the requested
9920 output rate.  For audio, there&rsquo;s also a size argument for the number of
9921 samples.
9922 </p>
9923 <p>The starting position of the output buffer is the lowest numbered
9924 sample on the timeline if playback is forward and the highest numbered
9925 sample on the timeline if playback is reverse.  The direction of
9926 playback is determined by one of the plugin queries described below.
9927 </p>
9928 <p>The position and size arguments are all relative to the frame rate and
9929 sample rate passed to process_buffer.  This is the requested data rate
9930 and may not be the same as the project data rate.
9931 </p>
9932 <p>The process_realtime function should start by calling
9933 <b>load_configuration</b>.  The LOAD_CONFIGURATION_MACRO returns 1 if the
9934 configuration changed.
9935 </p>
9936 <p>After determining the plugin&rsquo;s configuration, input media has to be
9937 loaded for processing.  Call
9938 </p>
9939 <div class="example">
9940 <pre class="example">read_frame(VFrame *buffer, 
9941                 int channel, 
9942                 int64_t start_position,
9943                 double frame_rate)
9944 </pre></div>
9945
9946 <p>or
9947 </p>
9948 <div class="example">
9949 <pre class="example">read_samples(double *buffer,
9950                 int channel,
9951                 int sample_rate,
9952                 int64_t start_position,
9953                 int64_t len)
9954 </pre></div>
9955
9956 <p>to request input data from the object which comes before this plugin. 
9957 The read function needs a buffer to store the input data in.  This can
9958 either be a temporary you create in the plugin or the output buffer
9959 supplied to process_buffer if you don&rsquo;t need a temporary.
9960 </p>
9961 <p>It also needs a set of position arguments to determine when you want to
9962 read the data from.  The start position, rate, and len passed to a read
9963 function need not be the same as the values recieved by the
9964 process_buffer function.  This way plugins can read data at a different
9965 rate than they output data.
9966 </p>
9967 <p>The channel argument is only meaningful if this is a multichannel
9968 plugin.  They need to read data for each track in the
9969 get_total_buffers() value and process all the tracks.  Single channel
9970 plugins should pass 0 for channel.
9971 </p>
9972
9973 <p>Additional members are implemented to maintain configuration in
9974 realtime plugins.  Some of these are also needed in nonrealtime
9975 plugins.
9976 </p>
9977 <ul>
9978 <li> void read_data(KeyFrame *keyframe);
9979
9980 <p>Loads data from a keyframe into the plugin&rsquo;s configuration.  Inside the
9981 keyframe is an XML string.  It&rsquo;s most easily parsed by creating a
9982 <b>FileXML</b> object.  See an existing plugin to see how the read_data
9983 function is implemented.
9984 </p>
9985 <p>Read data loads data out of the XML object and stores values in the
9986 plugin&rsquo;s configuration object.  Since configuration objects vary from
9987 plugin to plugin, these functions can&rsquo;t be automated.
9988 </p>
9989 </li><li> void save_data(KeyFrame *keyframe);
9990
9991 <p>Saves data from the plugin&rsquo;s configuration to a keyframe.  Inside the
9992 keyframe you&rsquo;ll put an XML string which is normally created by a
9993 FileXML object.  See an existing plugin to see how the save_data
9994 function is implemented.
9995 </p>
9996 <p>Save data saves data from the plugin&rsquo;s configuration object into the
9997 XML object.
9998 </p>
9999 </li><li> int load_defaults();
10000
10001 <p>Another way the plugin gets parameters is from a defaults file.  The
10002 load and save defaults routines use a BC_Hash object to parse the
10003 defaults file.  The defaults object is created in <b>load_defaults</b> and
10004 destroyed in the plugin&rsquo;s destructor.  See an existing plugin to see
10005 how the BC_Hash object is used.
10006 </p>
10007 </li><li> int save_defaults();
10008
10009 <p>Saves the configuration in the defaults object.
10010 </p>
10011 </li></ul>
10012
10013
10014
10015
10016
10017
10018 <hr>
10019 <a name="NONREALTIME-PLUGINS"></a>
10020 <div class="header">
10021 <p>
10022 Next: <a href="#AUDIO-PLUGINS" accesskey="n" rel="next">AUDIO PLUGINS</a>, Previous: <a href="#REALTIME-PLUGINS" accesskey="p" rel="prev">REALTIME PLUGINS</a>, Up: <a href="#PLUGIN-AUTHORING" accesskey="u" rel="up">PLUGIN AUTHORING</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
10023 </div>
10024 <a name="NONREALTIME-PLUGINS-1"></a>
10025 <h3 class="section">19.4 NONREALTIME PLUGINS</h3>
10026
10027 <p>Some references for non-realtime plugins are <b>Normalize</b> for audio
10028 and <b>Reframe</b> for video.
10029 </p>
10030 <p>Like realtime plugins, <b>load_defaults</b> and <b>save_defaults</b> must be
10031 implemented.  In nonrealtime plugins, these are not just used for
10032 default parameters but to transfer values from the user interface to
10033 the signal processor.  There doesn&rsquo;t need to be a configuration class
10034 in nonrealtime plugins.
10035 </p>
10036 <p>Unlike realtime plugins, the LOAD_CONFIGURATION_MACRO can&rsquo;t be used in
10037 the plugin header.  Instead, the following methods must be defined.
10038 </p>
10039 <p>The nonrealtime plugin should contain a pointer to a defaults object.
10040 </p>
10041 <div class="example">
10042 <pre class="example">
10043 BC_Hash *defaults;
10044
10045 </pre></div>
10046
10047 <p>It should also have a pointer to a MainProgressBar.
10048 </p>
10049 <div class="example">
10050 <pre class="example">
10051 MainProgressBar *progress;
10052 </pre></div>
10053
10054 <p>The progress pointer allows nonrealtime plugins to display their
10055 progress in Cinelerra&rsquo;s main window.
10056 </p>
10057 <p>The constructor for a nonrealtime plugin can&rsquo;t use
10058 PLUGIN_CONSTRUCTOR_MACRO but must call <b>load_defaults</b> directly.
10059 </p>
10060 <p>The destructor, likewise, must call <b>save_defaults</b> and <b>delete
10061 defaults</b> directly instead of PLUGIN_DESTRUCTOR_MACRO.
10062 </p>
10063 <ul>
10064 <li> VFrame* new_picon();
10065
10066 <p>char* plugin_title();
10067 </p>
10068 <p>The usage of these is the same as realtime plugins.
10069 </p>
10070 </li><li> int is_realtime();
10071
10072 <p>This function must return 0 to indicate a nonrealtime plugin.
10073 </p>
10074 </li><li> 
10075 int get_parameters();
10076
10077 <p>Here, the user should create a GUI, wait for the user to hit an OK
10078 button or a cancel button, and store the parameters in plugin
10079 variables.  This routine must return 0 for success and 1 for failure. 
10080 This way the user can cancel the effect from the GUI.
10081 </p>
10082 <p>Unlike the realtime plugin, this GUI need not run asynchronously of the
10083 plugin.  It should block the get_parameters function until the user
10084 selects OK or Cancel.
10085 </p>
10086 </li><li> int load_defaults();
10087
10088 <p>This should set the <b>defaults</b> variable to a new <b>Defaults</b> object
10089 and load parameters from the defaults object into plugin variables.
10090 </p>
10091 </li><li> int save_defaults();
10092
10093 <p>This should save plugin variables to the defaults object.  It should not
10094 create the defaults object.
10095 </p>
10096
10097 </li><li> int start_loop();
10098
10099 <p>If <b>get_parameters</b> returned 0 for success, this is called once to
10100 give the plugin a chance to initialize processing.  The plugin should
10101 instantiate the progress object with a line like
10102 </p>
10103 <div class="example">
10104 <pre class="example">
10105 progress = start_progress(&quot;MyPlugin progress...&quot;, 
10106         PluginClient::get_total_len());
10107
10108 </pre></div>
10109
10110 <p>The usage of <b>start_progress</b> depends on whether the plugin is
10111 multichannel or single channel.  If it&rsquo;s multichannel you always call
10112 start_progress.  If it&rsquo;s single channel, you first need to know whether
10113 the progress bar has already started in another instance of the plugin.
10114 </p>
10115 <p>If <b>PluginClient::interactive</b> is 1, you need to start the progress
10116 bar.  If it&rsquo;s 0, the progress bar has already been started.
10117 </p>
10118 <p>The PluginClient defines <b>get_total_len()</b> and <b>get_source_start()</b>
10119 to describe the timeline range to be processed.  The units are either
10120 samples or frames and in the project rate.
10121 </p>
10122 </li><li> int process_loop
10123
10124 <p>This is called repeatedly until the timeline range is processed.  It
10125 has either a samples or frames buffer for output and a reference to
10126 write_length to store the number of samples processed.  If this is an
10127 audio plugin, the user needs to call <b>get_buffer_size()</b> to know how
10128 many samples the output buffer can hold.
10129 </p>
10130 <p>The plugin must use <b>read_samples</b> or <b>read_frame</b> to read the
10131 input.  These functions are a bit different for a non realtime plugin
10132 than they are for a realtime plugin.
10133 </p>
10134 <p>They take a buffer and a position relative to the start of the
10135 timeline, in the timeline&rsquo;s rate.  Then you must process it and put the
10136 output in the buffer argument to process_loop.  write_length should
10137 contain the number of samples generated if it&rsquo;s audio.
10138 </p>
10139 <p>Finally, process_loop must test <b>PluginClient::interactive</b> and
10140 update the progress bar if it&rsquo;s 1.
10141 </p>
10142 <div class="example">
10143 <pre class="example">progress-&gt;update(total_written);
10144 </pre></div>
10145
10146 <p>returns 1 or 0 if the progress bar was cancelled.  If it&rsquo;s 1,
10147 process_loop should return 1 to indicate a cancellation.  In addition
10148 to progress bar cancellation, <b>process_loop</b> should return 1 when the
10149 entire timeline range is processed.
10150 </p>
10151 </li><li> int stop_loop();
10152
10153 <p>This is called after process_loop processes its last buffer.  
10154 </p>
10155 <p>If PluginClient::is_interactive is 1, this should call
10156 <b>stop_progress</b> in the progress bar pointer and delete the pointer. 
10157 Then it should delete any objects it created for processing in
10158 <b>start_loop</b>.
10159 </p>
10160
10161 </li></ul>
10162
10163
10164
10165 <hr>
10166 <a name="AUDIO-PLUGINS"></a>
10167 <div class="header">
10168 <p>
10169 Next: <a href="#VIDEO-PLUGINS" accesskey="n" rel="next">VIDEO PLUGINS</a>, Previous: <a href="#NONREALTIME-PLUGINS" accesskey="p" rel="prev">NONREALTIME PLUGINS</a>, Up: <a href="#PLUGIN-AUTHORING" accesskey="u" rel="up">PLUGIN AUTHORING</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
10170 </div>
10171 <a name="AUDIO-PLUGINS-1"></a>
10172 <h3 class="section">19.5 AUDIO PLUGINS</h3>
10173
10174 <p>The simplest audio plugin is Gain.  The processing object should
10175 include <b>pluginaclient.h</b> and inherit from <b>PluginAClient</b>.  Realtime audio plugins need to
10176 define 
10177 </p>
10178 <div class="example">
10179 <pre class="example">int process_buffer(int64_t size, 
10180                 double **buffer,
10181                 int64_t start_position,
10182                 int sample_rate);
10183 </pre></div>
10184
10185 <p>if it&rsquo;s multichannel or 
10186 </p>
10187 <div class="example">
10188 <pre class="example">int process_buffer(int64_t size, 
10189                 double *buffer,
10190                 int64_t start_position,
10191                 int sample_rate);
10192 </pre></div>
10193
10194 <p>if it&rsquo;s single channel.  These should return 0 on success and 1 on
10195 failure.  In the future, the return value may abort failed rendering.
10196 </p>
10197 <p>The processing function needs to request input samples with 
10198 </p>
10199 <div class="example">
10200 <pre class="example">int read_samples(double *buffer,
10201                 int channel,
10202                 int sample_rate,
10203                 int64_t start_position,
10204                 int64_t len);
10205 </pre></div>
10206
10207 <p>It always returns 0.  The user may specify any desired sample rate and
10208 start position.
10209 </p>
10210 <p>Nonrealtime audio plugins need to define
10211 </p>
10212 <div class="example">
10213 <pre class="example">int process_loop(double *buffer, int64_t &amp;write_length);
10214 </pre></div>
10215
10216 <p>for single channel or
10217 </p>
10218 <div class="example">
10219 <pre class="example">int process_loop(double **buffers, int64_t &amp;write_length);
10220 </pre></div>
10221
10222 <p>for multi channel.  Non realtime plugins use a different set of
10223 read_samples functions to request input data.  These are fixed to the
10224 project sample rate.
10225 </p>
10226
10227
10228 <hr>
10229 <a name="VIDEO-PLUGINS"></a>
10230 <div class="header">
10231 <p>
10232 Next: <a href="#TRANSITION-PLUGINS" accesskey="n" rel="next">TRANSITION PLUGINS</a>, Previous: <a href="#AUDIO-PLUGINS" accesskey="p" rel="prev">AUDIO PLUGINS</a>, Up: <a href="#PLUGIN-AUTHORING" accesskey="u" rel="up">PLUGIN AUTHORING</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
10233 </div>
10234 <a name="VIDEO-PLUGINS-1"></a>
10235 <h3 class="section">19.6 VIDEO PLUGINS</h3>
10236
10237
10238
10239
10240 <p>The simplest video plugin is Flip.  The processing object should
10241 include <b>pluginvclient.h</b> and inherit from <b>PluginVClient</b>. 
10242 Realtime video plugins need to define 
10243 </p>
10244 <div class="example">
10245 <pre class="example">int process_buffer(VFrame **frame,
10246         int64_t start_position,
10247         double frame_rate);
10248 </pre></div>
10249
10250 <p>if it&rsquo;s multichannel or 
10251 </p>
10252 <div class="example">
10253 <pre class="example">int process_buffer(VFrame *frame,
10254         int64_t start_position,
10255         double frame_rate);
10256 </pre></div>
10257
10258 <p>if it&rsquo;s single channel.  
10259 </p>
10260 <p>The nonrealtime video plugins need to define
10261 </p>
10262 <div class="example">
10263 <pre class="example">int process_loop(VFrame *buffer);
10264 </pre></div>
10265
10266 <p>for single channel or
10267 </p>
10268 <div class="example">
10269 <pre class="example">int process_loop(VFrame **buffers);
10270 </pre></div>
10271
10272 <p>for multi channel.  The amount of frames generated in a single
10273 process_loop is always assumed to be 1, hence the lack of a
10274 write_length argument.  Returning 0 causes the rendering to continue. 
10275 Returning 1 causes the rendering to abort.
10276 </p>
10277 <p>A set of read_frame functions exist for requesting input frames in
10278 non-realtime video plugins.  These are fixed to the project frame rate.
10279 </p>
10280
10281 <hr>
10282 <a name="TRANSITION-PLUGINS"></a>
10283 <div class="header">
10284 <p>
10285 Next: <a href="#PLUGIN-GUI_0027S-WHICH-UPDATE-DURING-PLAYBACK" accesskey="n" rel="next">PLUGIN GUI'S WHICH UPDATE DURING PLAYBACK</a>, Previous: <a href="#VIDEO-PLUGINS" accesskey="p" rel="prev">VIDEO PLUGINS</a>, Up: <a href="#PLUGIN-AUTHORING" accesskey="u" rel="up">PLUGIN AUTHORING</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
10286 </div>
10287 <a name="TRANSITION-PLUGINS-1"></a>
10288 <h3 class="section">19.7 TRANSITION PLUGINS</h3>
10289
10290
10291
10292
10293 <p>The simplest video transition is <b>wipe</b> and the simplest audio
10294 transition is <b>crossfade</b>.  These use a subset of the default class
10295 members of realtime plugins, but so far no analogue to
10296 PLUGIN_CLASS_MEMBERS has been done for transitions.
10297 </p>
10298 <p>The processing object for audio transitions still inherits from
10299 PluginAClient and for video transitions it still inherits from
10300 PluginVClient.
10301 </p>
10302 <p>Transitions may or may not have a GUI.  If they have a GUI, they must
10303 also manage a thread like realtime plugins.  Do this with the same
10304 PLUGIN_THREAD_OBJECT and PLUGIN_THREAD_HEADER macros as realtime
10305 plugins.  Since there is only one keyframe in a transition, you don&rsquo;t
10306 need to worry about updating the GUI from the processing object like
10307 you do in a realtime plugin.
10308 </p>
10309 <p>If the transition has a GUI, you can use PLUGIN_CONSTRUCTOR_MACRO and 
10310 PLUGIN_DESTRUCTOR_MACRO to initialize the processing object.  You&rsquo;ll
10311 also need a BC_Hash object and a Thread object for these macros.
10312 </p>
10313 <p>Since the GUI is optional, overwrite a function called <b>uses_gui()</b>
10314 to signifiy whether or not the transition has a GUI.  Return 1 if it
10315 does and 0 if it doesn&rsquo;t.
10316 </p>
10317 <p>Transitions need a <b>load_defaults</b> and <b>save_defaults</b> function so
10318 the first time they&rsquo;re dropped on the timeline they&rsquo;ll have useful
10319 settings.
10320 </p>
10321 <p>A <b>read_data</b> and <b>save_data</b> function takes over after insertion
10322 to access data specific to each instance of the transition.
10323 </p>
10324 <p>The most important difference between transitions and realtime plugins
10325 is the addition of an <b>is_transition</b> method to the processing
10326 object.  <b>is_transition</b> should return 1 to signify the plugin is a
10327 transition.
10328 </p>
10329 <p>Transitions process data in a <b>process_realtime</b> function.
10330 </p>
10331 <div class="example">
10332 <pre class="example">int process_realtime(VFrame *input, 
10333                 VFrame *output);
10334 </pre></div>
10335
10336 <div class="example">
10337 <pre class="example">int process_realtime(int64_t size, 
10338                 double *input_ptr, 
10339                 double *output_ptr);
10340 </pre></div>
10341
10342 <p>The input argument to process_realtime is the data for the next edit. 
10343 The output argument to process_realtime is the data for the previous
10344 edit.
10345 </p>
10346 <p>Routines exist for determining where you are relative to the
10347 transition&rsquo;s start and end.
10348 </p>
10349 <ul>
10350 <li> <b>PluginClient::get_source_position()</b> - returns the current
10351 position since the start of the transition of the lowest sample in the
10352 buffers.
10353
10354 </li><li> <b>PluginClient::get_total_len()</b> - returns the integer length of
10355 the transition.  The units are either samples or frames, in the data
10356 rate requested by the first plugin.
10357
10358 </li></ul>
10359
10360 <p>Users should divide the source position by total length to get the
10361 fraction of the transition the current <b>process_realtime</b> function is
10362 at.
10363 </p>
10364 <p>Transitions run in the data rate requested by the first plugin in the
10365 track.  This may be different than the project data rate.  Since
10366 process_realtime lacks a rate argument, use <b>get_framerate()</b> or
10367 <b>get_samplerate</b> to get the requested rate.
10368 </p>
10369
10370
10371
10372
10373 <hr>
10374 <a name="PLUGIN-GUI_0027S-WHICH-UPDATE-DURING-PLAYBACK"></a>
10375 <div class="header">
10376 <p>
10377 Next: <a href="#PLUGIN-QUERIES" accesskey="n" rel="next">PLUGIN QUERIES</a>, Previous: <a href="#TRANSITION-PLUGINS" accesskey="p" rel="prev">TRANSITION PLUGINS</a>, Up: <a href="#PLUGIN-AUTHORING" accesskey="u" rel="up">PLUGIN AUTHORING</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
10378 </div>
10379 <a name="PLUGIN-GUI_0027S-WHICH-UPDATE-DURING-PLAYBACK-1"></a>
10380 <h3 class="section">19.8 PLUGIN GUI&rsquo;S WHICH UPDATE DURING PLAYBACK</h3>
10381
10382 <p>Effects like <b>Histogram</b> and <b>VideoScope</b> need to update the GUI
10383 during playback to display information about the signal.  This is
10384 achieved with the <b>send_render_gui</b> and <b>render_gui</b> methods. 
10385 Normally in process_buffer, when the processing object wants to update
10386 the GUI it should call <b>send_render_gui</b>.  This should only be called
10387 in process_buffer.  Send_render_gui goes through a search and
10388 eventually calls <b>render_gui</b> in the GUI instance of the plugin.
10389 </p>
10390 <p>Render_gui should have a sequence like
10391 </p>
10392 <div class="example">
10393 <pre class="example">void MyPlugin::render_gui(void *data)
10394 {
10395         if(thread)
10396         {
10397                 thread-&gt;window-&gt;lock_window();
10398
10399 // update GUI here
10400
10401                 thread-&gt;window-&gt;unlock_window();
10402         }
10403 }
10404
10405 </pre></div>
10406
10407
10408 <p>Send_render_gui and render_gui use one argument, a void pointer to
10409 transfer information from the processing object to the GUI.  The user
10410 should typecast this pointer into something useful.
10411 </p>
10412
10413
10414
10415
10416
10417
10418
10419
10420
10421
10422 <hr>
10423 <a name="PLUGIN-QUERIES"></a>
10424 <div class="header">
10425 <p>
10426 Next: <a href="#USING-OPENGL" accesskey="n" rel="next">USING OPENGL</a>, Previous: <a href="#PLUGIN-GUI_0027S-WHICH-UPDATE-DURING-PLAYBACK" accesskey="p" rel="prev">PLUGIN GUI'S WHICH UPDATE DURING PLAYBACK</a>, Up: <a href="#PLUGIN-AUTHORING" accesskey="u" rel="up">PLUGIN AUTHORING</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
10427 </div>
10428 <a name="PLUGIN-QUERIES-1"></a>
10429 <h3 class="section">19.9 PLUGIN QUERIES</h3>
10430
10431
10432 <p>There are several useful queries in PluginClient which can be accessed
10433 from the processing object.  Some of them have different meaning in
10434 realtime and non-realtime mode.  They all give information about the
10435 operating system or the project which can be used to improve the
10436 quality of the processing.
10437 </p>
10438 <table class="menu" border="0" cellspacing="0">
10439 <tr><td align="left" valign="top">&bull; <a href="#SYSTEM-QUERIES" accesskey="1">SYSTEM QUERIES</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Utilities for determining the system resources.
10440 </td></tr>
10441 <tr><td align="left" valign="top">&bull; <a href="#TIMING-QUERIES" accesskey="2">TIMING QUERIES</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Utilities for performing time-dependant processing.
10442 </td></tr>
10443 </table>
10444
10445
10446
10447
10448
10449 <hr>
10450 <a name="SYSTEM-QUERIES"></a>
10451 <div class="header">
10452 <p>
10453 Next: <a href="#TIMING-QUERIES" accesskey="n" rel="next">TIMING QUERIES</a>, Up: <a href="#PLUGIN-QUERIES" accesskey="u" rel="up">PLUGIN QUERIES</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
10454 </div>
10455 <a name="SYSTEM-QUERIES-1"></a>
10456 <h4 class="subsection">19.9.1 SYSTEM QUERIES</h4>
10457
10458
10459 <ul>
10460 <li> 
10461 <b>get_interpolation_type()</b> returns the type of interpolation the user
10462 wants for all scaling operations.  This is a macro from
10463 overlayframe.inc.  It can be applied to any call to the
10464 <b>OverlayFrame</b> object.
10465
10466 </li><li> 
10467 <b>get_project_smp()</b> Gives the number of CPU&rsquo;s on the system minus 1. 
10468 If it&rsquo;s a uniprocessor it&rsquo;s 0.  If it&rsquo;s a dual processor, it&rsquo;s 1.  This
10469 number should be used to gain parallelism.
10470
10471 </li><li> 
10472 <b>get_total_buffers()</b> Gives the number of tracks a multichannel
10473 plugin needs to process.
10474
10475
10476 </li></ul>
10477
10478
10479
10480
10481
10482
10483 <hr>
10484 <a name="TIMING-QUERIES"></a>
10485 <div class="header">
10486 <p>
10487 Previous: <a href="#SYSTEM-QUERIES" accesskey="p" rel="prev">SYSTEM QUERIES</a>, Up: <a href="#PLUGIN-QUERIES" accesskey="u" rel="up">PLUGIN QUERIES</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
10488 </div>
10489 <a name="TIMING-QUERIES-1"></a>
10490 <h4 class="subsection">19.9.2 TIMING QUERIES</h4>
10491
10492
10493 <p>There are two rates for media a realtime plugin has to be aware of: the
10494 project rate and the requested rate.  Functions are provided for
10495 getting the project and requested rate.  In addition, doing time
10496 dependant effects requires using several functions which tell where you
10497 are in the effect.
10498 </p>
10499 <ul>
10500 <li> 
10501 <b>get_project_framerate()</b> Gives the frames per second of the video as
10502 defined by the project settings.
10503
10504
10505 </li><li> 
10506 <b>get_project_samplerate()</b> Gives the samples per second of the audio as
10507 defined by the project settings.
10508
10509 </li><li> 
10510 <b>get_framerate()</b> Gives the frames per second requested by the plugin
10511 after this one.  This is the requested frame rate and is the same as
10512 the frame_rate argument to process_buffer.
10513
10514 </li><li> 
10515 <b>get_samplerate()</b> Gives the samples per second requested by the plugin
10516 after this one.  This is the requested sample rate and is the same as
10517 the sample_rate argument to process_buffer.
10518
10519 </li><li> 
10520 <b>get_total_len()</b> Gives the number of samples or frames in the
10521 range covered by the effect, relative to the requested data rate.
10522
10523 </li><li> 
10524 <b>get_source_start()</b> For realtime plugins it gives the lowest sample
10525 or frame in the effect range in the requested data rate.  For
10526 nonrealtime plugins it&rsquo;s the start of the range of the timeline to
10527 process.
10528
10529 </li><li> 
10530 <b>get_source_position()</b> For realtime plugins it&rsquo;s the lowest numbered
10531 sample in the requested region to process if playing forward and the
10532 highest numbered sample in the region if playing backward.  For video
10533 it&rsquo;s the start of the frame if playing forward and the end of the frame
10534 if playing in reverse.  The position is relative to the start of the
10535 EDL and in the requested data rate.
10536
10537 <p>For transitions this is always the lowest numbered sample of the region
10538 to process relative to the start of the transition.
10539 </p>
10540 </li><li> 
10541 <b>get_direction()</b> Gives the direction of the current playback
10542 operation.  This is a macro defined in transportque.inc.  This is
10543 useful for calling read functions since the read functions position
10544 themselves at the start or end of the region to read, depending on the
10545 playback operation.
10546
10547 </li><li> 
10548 <b>local_to_edl()</b>
10549
10550 </li><li> 
10551 <b>edl_to_local()</b>
10552
10553 <p>These convert between the requested data rate and the project data
10554 rate.  They are used to convert keyframe positions into numbers which
10555 can be interpolated at the requested data rate.  The conversion is
10556 automatically based on frame rate or sample rate depending on the type
10557 of plugin.
10558 </p>
10559 </li><li> <b>get_prev_keyframe(int64_t position, int is_local)</b>
10560
10561 </li><li> <b>get_next_keyframe(int64_t position, int is_local)</b>  
10562
10563 <p>These give the nearest keyframe before or after the position given. 
10564 The macro defined version of load_configuration automatically retrieves
10565 the right keyframes but you may want to do this on your own.
10566 </p>
10567 <p>The position argument can be either in the project rate or the
10568 requested rate.  Set is_local to 1 if it&rsquo;s in the requested rate and 0
10569 if it&rsquo;s in the project rate.
10570 </p>
10571 <p>In each keyframe, another position value tells the keyframe&rsquo;s position
10572 relative to the start of the timeline and in the project rate.
10573 </p>
10574 <p>The only way to get smooth interpolation between keyframes is to
10575 convert the positions in the keyframe objects to the requested rate. 
10576 Do this by using edl_to_local on the keyframe positions.
10577 </p>
10578 </li></ul>
10579
10580
10581
10582
10583
10584 <hr>
10585 <a name="USING-OPENGL"></a>
10586 <div class="header">
10587 <p>
10588 Next: <a href="#PLUGIN-QUERIES" accesskey="n" rel="next">PLUGIN QUERIES</a>, Previous: <a href="#PLUGIN-QUERIES" accesskey="p" rel="prev">PLUGIN QUERIES</a>, Up: <a href="#PLUGIN-AUTHORING" accesskey="u" rel="up">PLUGIN AUTHORING</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
10589 </div>
10590 <a name="USING-OPENGL-1"></a>
10591 <h3 class="section">19.10 USING OPENGL</h3>
10592
10593
10594
10595 <p>Realtime video plugins support OpenGL.  Using OpenGL to do plugin
10596 routines can speed up playback greatly since it does most of the work
10597 in hardware.  Unfortunately, every OpenGL routine needs a software
10598 counterpart for rendering, doubling the amount of software to
10599 maintain.  Fortunately, having an OpenGL routine means the software
10600 version doesn&rsquo;t need to be as optimized as it did when software was the
10601 only way.
10602 </p>
10603 <p>As always, the best way to design a first OpenGL plugin is to copy an
10604 existing one and alter it.  The <b>Brightness</b> plugin is a simple
10605 OpenGL plugin to copy.  There are 3 main points in OpenGL rendering and
10606 1 point for optimizing OpenGL rendering.
10607 </p>
10608 <table class="menu" border="0" cellspacing="0">
10609 <tr><td align="left" valign="top">&bull; <a href="#GETTING-OPENGL-DATA" accesskey="1">GETTING OPENGL DATA</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Getting video data in a form usable by OpenGL
10610 </td></tr>
10611 <tr><td align="left" valign="top">&bull; <a href="#DRAWING-USING-OPENGL" accesskey="2">DRAWING USING OPENGL</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">The method of drawing video in OpenGL
10612 </td></tr>
10613 <tr><td align="left" valign="top">&bull; <a href="#USING-SHADERS" accesskey="3">USING SHADERS</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Routines to simplify shader usage
10614 </td></tr>
10615 <tr><td align="left" valign="top">&bull; <a href="#AGGREGATING-PLUGINS" accesskey="4">AGGREGATING PLUGINS</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Combining OpenGL routines from different plugins into one.
10616 </td></tr>
10617 </table>
10618
10619
10620
10621 <hr>
10622 <a name="GETTING-OPENGL-DATA"></a>
10623 <div class="header">
10624 <p>
10625 Next: <a href="#DRAWING-USING-OPENGL" accesskey="n" rel="next">DRAWING USING OPENGL</a>, Up: <a href="#USING-OPENGL" accesskey="u" rel="up">USING OPENGL</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
10626 </div>
10627 <a name="GETTING-OPENGL-DATA-1"></a>
10628 <h4 class="subsection">19.10.1 GETTING OPENGL DATA</h4>
10629
10630 <p>The first problem is getting OpenGL-enabled plugins to interact with
10631 software-only plugins.  To solve this, all the information required to
10632 do OpenGL playback is stored in the VFrame object which is passed to
10633 <b>process_buffer</b>.  To support 3D, the VFrame contains a PBuffer and a
10634 texture, in addition to VFrame&rsquo;s original rows.
10635 </p>
10636 <p>In OpenGL mode, VFrame has 3 states corresponding to the location of
10637 its video data.  The opengl state is recovered by calling
10638 <b>get_opengl_state</b> and is set by calling <b>set_opengl_state</b>.  The
10639 states are:
10640 </p>
10641 <ul>
10642 <li> 
10643 <b>VFrame::RAM</b> - This means the video data is stored in the
10644 traditional row pointers.  It must be loaded into a texture before
10645 being drawn using OpenGL routines.
10646
10647 </li><li> <b>VFrame::TEXTURE</b> - The video data is stored in texture
10648 memory.  It&rsquo;s ready to be drawn using OpenGL routines.
10649
10650 </li><li> <b>VFrame::SCREEN</b> - The video data is stored in a frame buffer
10651 in the graphics card.  For plugins, the frame buffer is always a
10652 PBuffer.  The image on the frame buffer can&rsquo;t be replicated again
10653 unless it is read back into the texture and the opengl state is reset
10654 to TEXTURE.  The frame buffer is limited to 8 bits per channel.  If an
10655 OpenGL effect is used in a floating point project, it only retains 8
10656 bits.
10657
10658 </li></ul>
10659
10660 <p>In the plugin&rsquo;s <b>process_buffer</b> routine, there is normally a call to
10661 <b>read_frame</b> to get data from the previous plugin in the chain. 
10662 <b>read_frame</b> takes a new parameter called <b>use_opengl</b>.  
10663 </p>
10664 <p>The plugin passes 1 to <b>use_opengl</b> if it intends to handle the data
10665 using OpenGL.  It passes 0 to <b>use_opengl</b> if it can only handle the
10666 data using software.  The value of <b>use_opengl</b> is passed up the
10667 chain to ensure a plugin which only does software only gets the data in
10668 the row pointers.  If <b>use_opengl</b> is 0, the opengl state in VFrame
10669 is RAM.
10670 </p>
10671 <p>The plugin must not only know if it is software-only but if its output
10672 must be software only.  Call <b>get_use_opengl</b> to determine if the
10673 output can be handled by OpenGL.  If <b>get_use_opengl</b> returns 0, the
10674 plugin must pass 0 for <b>use_opengl</b> in <b>read_frame</b> and do its
10675 processing in software.  If <b>get_use_opengl</b> is 1, the plugin can
10676 decide based on its implementation whether to use OpenGL.
10677 </p>
10678
10679 <p>The main problem with OpenGL is that all the gl... calls need to be run
10680 from the same thread.  To work around this, the plugin interface has
10681 routines for running OpenGL in a common thread.  
10682 </p>
10683
10684 <p><b>run_opengl</b> transfers control to the common OpenGL thread.  This is
10685 normally called by the plugin in <b>process_buffer</b> after it calls
10686 <b>read_frame</b> and only if <b>get_use_opengl</b> is 1.
10687 </p>
10688 <p>Through a series of indirections, <b>run_opengl</b> eventually transfers
10689 control to a virtual function called <b>handle_opengl</b>. 
10690 <b>handle_opengl</b> must be overridden with a function to perform all the
10691 OpenGL routines.  The contents of <b>handle_opengl</b> must be enclosed in
10692 <b>#ifdef HAVE_GL</b> ... <b>#endif</b> to allow it to be compiled on systems
10693 with no graphics support, like render nodes.  The return value of
10694 <b>handle_opengl</b> is passed back from <b>run_opengl</b>.
10695 </p>
10696 <p><b>read_frame</b> can&rsquo;t be called from inside <b>handle_opengl</b>.  This
10697 would create a recursive lockup because it would cause other objects to
10698 call <b>run_opengl</b>.
10699 </p>
10700 <p>Once inside <b>handle_opengl</b>, the plugin has full usage of all the
10701 OpenGL features.  VFrame provides some functions to automate common
10702 OpenGL sequences.
10703 </p>
10704 <p>The VFrame argument to <b>process_buffer</b> is always available through
10705 the <b>get_output(int layer)</b> function.  If the plugin is multichannel,
10706 the layer argument retrieves a specific layer of the output buffers. 
10707 The PBuffer of the output buffer is where the OpenGL output must go if
10708 any processing is done.
10709 </p>
10710
10711
10712 <hr>
10713 <a name="DRAWING-USING-OPENGL"></a>
10714 <div class="header">
10715 <p>
10716 Next: <a href="#USING-SHADERS" accesskey="n" rel="next">USING SHADERS</a>, Previous: <a href="#GETTING-OPENGL-DATA" accesskey="p" rel="prev">GETTING OPENGL DATA</a>, Up: <a href="#USING-OPENGL" accesskey="u" rel="up">USING OPENGL</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
10717 </div>
10718 <a name="DRAWING-USING-OPENGL-1"></a>
10719 <h4 class="subsection">19.10.2 DRAWING USING OPENGL</h4>
10720
10721
10722 <p>The sequence of commands to draw on the output PBuffer stars with
10723 getting the video in a memory area where it can be recalled for
10724 drawing:
10725 </p>
10726 <div class="example">
10727 <pre class="example">get_output()-&gt;to_texture();
10728 get_output()-&gt;enable_opengl();
10729 </pre></div>
10730
10731 <p><b>to_texture</b> transfers the OpenGL data from wherever it is to the
10732 output&rsquo;s texture memory and sets the output state to TEXTURE.
10733 </p>
10734 <p><b>enable_opengl</b> makes the OpenGL context relative to the output&rsquo;s
10735 PBuffer.
10736 </p>
10737 <p>The next step is to draw the texture with some processing on the
10738 PBuffer.  The normal sequence of commands to draw a texture is:
10739 </p>
10740 <div class="example">
10741 <pre class="example">get_output()-&gt;init_screen();
10742 get_output()-&gt;bind_texture(0);
10743 get_output()-&gt;draw_texture();
10744 </pre></div>
10745
10746 <p><b>VFrame::init_screen</b> sets the OpenGL frustum and parameters to known
10747 values.
10748 </p>
10749 <p><b>VFrame::bind_texture(int texture_unit)</b> binds the texture to the given
10750 texture unit and enables it.
10751 </p>
10752 <p><b>VFrame::draw_texture()</b> calls the vertex functions to draw the
10753 texture normalized to the size of the PBuffer.  Copy this if you want
10754 custom vertices.
10755 </p>
10756 <p>The last step in the handle_opengl routine, after the texture has been
10757 drawn on the PBuffer, is to set the output&rsquo;s opengl state to SCREEN
10758 with a call to <b>VFrame::set_opengl_state</b>.  The plugin should not
10759 read back the frame buffer into a texture or row pointers if it has no
10760 further processing.  Plugins should only leave the output in the
10761 texture or RAM if its location results from normal processing.  They
10762 should set the opengl state to RAM or TEXTURE if they do.
10763 </p>
10764 <p><b>Colormodels in OpenGL</b>
10765 </p>
10766 <p>The colormodel exposed to OpenGL routines is always floating point since
10767 that is what OpenGL uses, but it may be YUV or RGB depending on the
10768 project settings.  If it&rsquo;s YUV, the U &amp; V are offset by 0.5 just like in
10769 software.  Passing YUV colormodels to plugins was necessary for speed. 
10770 The other option was to convert YUV to RGB in the first step that needed
10771 OpenGL.  Every effect and rendering step would have needed a YUV to RGB
10772 routine.  With the YUV retained, only the final compositing step needs a
10773 YUV to RGB routine.
10774 </p>
10775 <p>The OpenGL mode differentiates between alpha &amp; flat colormodels even
10776 though OpenGL always has an alpha channel.  For RGB colormodels, you
10777 must multiply the alpha component by the RGB &amp; set the alpha component
10778 to 1 whenever the colormodel has no alpha to ensure consistency with the
10779 software mode.
10780 </p>
10781 <div class="example">
10782 <pre class="example">Rout = Rin * Ain
10783 Gout = Gin * Ain
10784 Bout = Bin * Ain
10785 Aout = 1
10786 </pre></div>
10787
10788
10789 <p>For YUV colormodels, you must multiply the alpha using the following
10790 formula.
10791 </p>
10792 <div class="example">
10793 <pre class="example">Yout = Yin * Ain
10794 Uout = Uin * Ain + 0.5 * (1 - Ain)
10795 Vout = Vin * Ain + 0.5 * (1 - Ain)
10796 Aout = 1
10797 </pre></div>
10798
10799
10800
10801
10802
10803
10804 <hr>
10805 <a name="USING-SHADERS"></a>
10806 <div class="header">
10807 <p>
10808 Next: <a href="#AGGREGATING-PLUGINS" accesskey="n" rel="next">AGGREGATING PLUGINS</a>, Previous: <a href="#DRAWING-USING-OPENGL" accesskey="p" rel="prev">DRAWING USING OPENGL</a>, Up: <a href="#USING-OPENGL" accesskey="u" rel="up">USING OPENGL</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
10809 </div>
10810 <a name="USING-SHADERS-1"></a>
10811 <h4 class="subsection">19.10.3 USING SHADERS</h4>
10812
10813 <p>Very few effects can do anything useful with just a straight drawing of
10814 the texture on the PBuffer.  It&rsquo;s also not easy to figure out exactly
10815 what math is being used by the different OpenGL blending macros. 
10816 Normally you&rsquo;ll use shaders.  The shader is a C program which runs on
10817 the graphics card.  Since the graphics card is optimized for graphics,
10818 it can be much faster than running it on the CPU.
10819 </p>
10820 <p>Shaders are written in OpenGL Shading Language.  The shader source code
10821 is contained in a string.  The normal sequence for using a shader comes
10822 after a call to <b>enable_opengl</b>.
10823 </p>
10824 <div class="example">
10825 <pre class="example">char *shader_source = &quot;...&quot;;
10826 unsigned char shader_id = VFrame::make_shader(0, shader_source, 0);
10827 glUseProgram(shader_id);
10828 // Set uniform variables using glUniform commands
10829 </pre></div>
10830
10831 <p>The compilation and linking step for shaders is encapsulated by the
10832 VFrame::make_shader command.  It returns a shader_id which can be
10833 passed to OpenGL functions.  The first and last arguments must always
10834 by 0.  And arbitrary number of source strings may be put between the
10835 0&rsquo;s.  The source strings are concatenated by make_shader into one huge
10836 shader source.  If multiple main functions are in the sources, the main
10837 functions are renamed and run in order.
10838 </p>
10839 <p>There are a number of useful macros for shaders in playback3d.h.  All
10840 the shaders so far have been fragment shaders.  After the shader is
10841 initialized, draw the texture starting from <b>init_screen</b>.  The
10842 shader program must be disabled with another call to
10843 <b>glUseProgram(0)</b> and 0 as the argument.
10844 </p>
10845 <p>The shader_id and source code is stored in memory as long as Cinelerra
10846 runs.  Future calls to make_shader with the same source code run much
10847 faster.
10848 </p>
10849
10850
10851
10852 <hr>
10853 <a name="AGGREGATING-PLUGINS"></a>
10854 <div class="header">
10855 <p>
10856 Previous: <a href="#USING-SHADERS" accesskey="p" rel="prev">USING SHADERS</a>, Up: <a href="#USING-OPENGL" accesskey="u" rel="up">USING OPENGL</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
10857 </div>
10858 <a name="AGGREGATING-PLUGINS-1"></a>
10859 <h4 class="subsection">19.10.4 AGGREGATING PLUGINS</h4>
10860
10861 <p>Further speed improvements may be obtained by combining OpenGL routines
10862 from two plugins into a single handle_opengl function.  This is done
10863 when <b>Frame to Fields</b> and <b>RGB to 601</b> are attached in order. 
10864 Aggregations of more than two plugins are possible but very hard to get
10865 working.  Aggregation is useful for OpenGL because each plugin must
10866 copy the video from a texture to a PBuffer.  In software there was no
10867 copy operation.
10868 </p>
10869 <p>In aggregation, one plugin processes everything from the other plugins
10870 and the other plugins fall through.  The fall through plugins must copy
10871 their parameters to the output buffer so they can be detected by the
10872 processing plugin.
10873 </p>
10874 <p>The VFrame used as the output buffer contains a parameter table for
10875 parameter passing between plugins and it&rsquo;s accessed with
10876 <b>get_output()-&gt;get_params()</b>.  Parameters are set and retrieved in
10877 the table with calls to <b>update</b> and <b>get</b> just like with defaults.
10878 </p>
10879 <p>The fall through plugins must determine if the processor plugin is
10880 attached with calls to <b>next_effect_is</b> and <b>prev_effect_is</b>. 
10881 These take the name of the processor plugin as a string argument and
10882 return 1 if the next or previous plugin is the processor plugin.  If
10883 either returns 1, the fall through plugin must still call <b>read_frame</b> to
10884 propogate the data but return after that.
10885 </p>
10886 <p>The processor plugin must call <b>next_effect_is</b> and
10887 <b>prev_effect_is</b> to determine if it&rsquo;s aggregated with a fall through
10888 plugin.  If it is, it must perform the operations of the fall through
10889 plugin in its OpenGL routine.  The parameters for the the fall through
10890 plugin should be available by <b>get_output()-&gt;get_params()</b> if the
10891 fall through plugin set them.
10892 </p>
10893
10894
10895
10896
10897
10898
10899
10900 <hr>
10901 <a name="KEYBOARD-SHORTCUTS"></a>
10902 <div class="header">
10903 <p>
10904 Previous: <a href="#PLUGIN-AUTHORING" accesskey="p" rel="prev">PLUGIN AUTHORING</a>, Up: <a href="#Top" accesskey="u" rel="up">TOP</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
10905 </div>
10906 <a name="KEYBOARD-SHORTCUTS-1"></a>
10907 <h2 class="chapter">20 KEYBOARD SHORTCUTS</h2>
10908
10909 <p>Alex Ferrer started summarizing most of the keyboard shortcuts.  Most
10910 of the keys work without any modifier like shift or ctrl.  Most windows
10911 can be closed with a <b>Ctrl-w</b>.  Most operations can be cancelled with
10912 <b>ESC</b> and accepted with <b>Enter</b>.
10913 </p>
10914 <a name="PROGRAM-WINDOW"></a>
10915 <h3 class="section">20.1 PROGRAM WINDOW</h3>
10916
10917
10918 <a name="Editing-Media"></a>
10919 <h4 class="subsection">20.1.1 Editing Media</h4>
10920
10921 <div class="example">
10922 <pre class="example">z         Undo
10923 Shift Z   Re-Do
10924 x         Cut
10925 c         Copy
10926 v         Paste
10927 Del       Clear
10928 Shift Spc Paste Silence
10929 m         Mute region
10930 a         Select all
10931 shift + click   When done over an edit causes the highlighted selection to extend to the cursor position.
10932                 When done over the boundary of an effect causes the trim operation to apply to one effect.
10933 </pre></div>
10934
10935 <a name="Editing-Labels-_0026-In_002fOut-Points"></a>
10936 <h4 class="subsection">20.1.2 Editing Labels &amp; In/Out Points</h4>
10937
10938 <div class="example">
10939 <pre class="example">[             Toggle In point 
10940 ]             Toggle Out point 
10941 l             Toggle label at current position
10942 Ctrl &lt;-       Go to Previous Label
10943 Ctrl -&gt;       Go to Next Label
10944 </pre></div>
10945
10946
10947 <a name="Navigation"></a>
10948 <h4 class="subsection">20.1.3 Navigation</h4>
10949
10950 <div class="example">
10951 <pre class="example">Right arrow      Move right*
10952 Left arrow       Move left*
10953 Up arrow         Zoom out*
10954 Down arrow       Zoom in*
10955 Ctrl Up          Expand waveform amplitude
10956 Ctrl Dn          Shrink waveform amplitude
10957 Alt Up           Expand curve amplitude
10958 Alt Dn           Shrink curve amplitude
10959 f                Fit time displayed to selection
10960 Alt f            Fit curve amplitude to highlighted section of curves
10961 Alt Left         Move left one edit
10962 Alt Right        Move right one edit
10963 Page Up          Move up*
10964 Page Dn          Move down*
10965 Ctrl Page Up     Expand track height
10966 Ctrl Page Dn     Shrink track height
10967 Home             Go to beginning of timeline*
10968 End              Go to end of timeline*
10969
10970 </pre></div>
10971
10972 <p>* You may have to click on the timeline to deactivate any text boxes or
10973 tumblers before these work.
10974 </p>
10975
10976
10977
10978 <a name="File-operations"></a>
10979 <h4 class="subsection">20.1.4 File operations</h4>
10980
10981 <div class="example">
10982 <pre class="example">n         New project
10983 o         Load Files
10984 s         Save Project
10985 r         Record
10986 Shift R   Render
10987 q         Quit
10988 Shift P   Preferences
10989 Shift B   Batch Render
10990 Shift F   Set Format
10991 </pre></div>
10992
10993 <a name="Key-Frame-Editing"></a>
10994 <h4 class="subsection">20.1.5 Key Frame Editing</h4>
10995
10996 <div class="example">
10997 <pre class="example">
10998 Shift X    Cut keyframes
10999 Shift C    Copy keyframes
11000 Shift V    Paste keyframes
11001 Shift Del  Clear keyframes
11002 Alt c      Copy default keyframe
11003 Alt v      Paste default keyframe
11004
11005 </pre></div>
11006
11007
11008 <a name="Track-Manipulation"></a>
11009 <h4 class="subsection">20.1.6 Track Manipulation</h4>
11010
11011 <div class="example">
11012 <pre class="example">
11013 t          Add Audio Track
11014 u          Insert default Audio Transition
11015 Shift T    Add Video Track
11016 Shift U    Insert Default Video Transition
11017 d          Delete last Track
11018 Shift L    Loop playback
11019 Tab        Toggle single track arming status
11020 Shift-Tab  Toggle every other track's arming status
11021
11022 </pre></div>
11023
11024 <a name="What_0027s-drawn-on-the-timeline"></a>
11025 <h4 class="subsection">20.1.7 What&rsquo;s drawn on the timeline</h4>
11026
11027 <div class="example">
11028 <pre class="example">
11029 1         Show titles
11030 2         Show transitions
11031 3         Fade keyframes
11032 4         Mute keyframes
11033 5         Mode keyframes
11034 6         Pan keyframes
11035 7         Camera keyframes
11036 8         Projector keyframes
11037 9         Plugin keyframes
11038 0         Mask keyframes
11039 -         Camera Zoom
11040 =         Projector Zoom
11041
11042 </pre></div>
11043
11044
11045 <a name="VIEWER-_0026-COMPOSITOR-WINDOWS"></a>
11046 <h3 class="section">20.2 VIEWER &amp; COMPOSITOR WINDOWS</h3>
11047
11048 <div class="example">
11049 <pre class="example">
11050 x         Cut
11051 c         Copy
11052 v         Paste
11053 v         Splice
11054 b         Overwrite
11055 [         Toggle In point 
11056 ]         Toggle Out point 
11057 l         Toggle label at current position
11058 Ctrl &lt;-   Go to Previous Label
11059 Ctrl -&gt;   Go to Next Label
11060 Home      Go to beginning
11061 End       Go to end
11062 z         Undo
11063 Shift Z   Re-Do
11064 +         Zoom in
11065 -         Zoom out
11066
11067 </pre></div>
11068
11069
11070
11071 <a name="PLAYBACK-TRANSPORT"></a>
11072 <h3 class="section">20.3 PLAYBACK TRANSPORT</h3>
11073
11074 <p>Transport controls work in any window which has a playback transport.  They are
11075 accessed through the number pad with num lock disabled.
11076 </p>
11077 <div class="example">
11078 <pre class="example">4 Frame back         5 Reverse Slow     6 Reverse      + Reverse Fast
11079 1 Frame Forward      2 Forward Slow     3 Play     Enter Fast Forward
11080 0 Stop
11081
11082 </pre></div>
11083
11084 <p>[ Space bar ] is normal Play, Hitting any key twice is Pause.
11085 </p>
11086
11087 <p>Hitting any transport control with CTRL down causes only the region
11088 between the in/out points to be played, if in/out points are defined.
11089 </p>
11090 <a name="RECORD-WINDOW"></a>
11091 <h3 class="section">20.4 RECORD WINDOW</h3>
11092
11093 <div class="example">
11094 <pre class="example">
11095 Space              Start and pause recording of the current batch
11096 l                  Toggle label at current position.
11097
11098 </pre></div>
11099
11100 <hr>
11101
11102
11103
11104 </body>
11105 </html>