Fixed initialisation of tf in file_open(). Without setting the memory to 0,
[cinelerra_cv/mob.git] / doc / cinelerra_cv_manual_en.texi
blob858358c05d0afdfe58d8e12d220d3d686f382a38
1 \input texinfo  @c -*-texinfo-*-
3 @c Cinelerra CV Manual - ENGLISH
4 @c Cinelerra Community Version website: http://cvs.cinelerra.org
5 @c Documentation coordinator: Nicolas MAUFRAIS - e.conti@gmx.net
7 @c Licence:
8 @c You may redistribute the Cinelerra CV manual and/or modify it under the terms
9 @c of the GNU General Public License, as published by the Free Software
10 @c Foundation; either version 2 of the License, or (at your option) any later
11 @c version.
13 @setfilename cinelerra_cv_manual_en.info
14 @documentlanguage en
15 @documentencoding ISO-8859-1
16 @settitle Cinelerra CV Manual
17 @afourpaper
18 @set EDITION 1.00.EN
19 @set VERSION 2.1
21 @finalout
22 @titlepage
23 @title Cinelerra CV Manual
24 @subtitle @b{Community Version} @value{VERSION}
25 @subtitle Edition @value{EDITION}
26 @author Heroine Virtual Ltd
27 @author Cinelerra CV Team
28 @page
29 @vskip 0pt plus 1filll
30 Copyright @copyright{} 2003, 2004, 2005, 2006 Adam Crossfire - Heroine Virtual Ltd.
32 Copyright @copyright{} 2003, 2004, 2005, 2006, 2007 Cinelerra CV Team.@*
34 This manual is free; you can redistribute it and/or modify it under the terms
35 of the GNU General Public License as published by the Free Software Foundation;
36 either version 2 of the License, or (at your option) any later version.
38 This document is distributed in the hope that it will be useful, but WITHOUT
39 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
40 FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
42 You should have received a copy of the GNU General Public License along with
43 this program; if not, write to the Free Software Foundation, Inc., 59 Temple
44 Place, Suite 330, Boston, MA  02111-1307  USA
45 @end titlepage
46 @headings off
47 @evenheading @thispage @| @| @thischapter
48 @oddheading @thischapter @| @| @thispage
50 @setchapternewpage odd
52 @contents
54 @ifnottex
55 @c cincvdoc_node_number_1
56 @node Top
57 @top
58 @end ifnottex
60 @menu
61 * Introduction::                      Cinelerra in brief.
62 * Installation::                      Making Cinelerra work on your system.
63 * Configuration::                     Adjusting the behavior of Cinelerra.
64 * Project attributes::                Changing the way the media is displayed.
65 * Loading and saving files::          Moving media between disk and Cinelerra.
66 * Program window::
67 * Compositor window::
68 * Viewer window::
69 * Resources window::
70 * Sound level meters window::
71 * Transport controls::
72 * Timebar::
73 * Realtime effects::
74 * Rendered effects::
75 * Ladspa effects::
76 * Transitions::
77 * Keyframes::                         Making effects change over time.
78 * Capturing media::                   Moving media from the real world to disk.
79 * Rendering files::
80 * Tips::                              Unusual applications of Cinelerra to common problems.
81 * Troubleshooting::                   Problems with Cinelerra.
82 * Plugin authoring::                  How to write new effects.
83 * Keyboard shortcuts::                How to accelerate most commands with the keyboard.
84 * Copying::                           The GNU General Public License
85 @ifnotplaintext
86 @ifnothtml
87 @ifnotdocbook
88 * Index::                             A menu covering many topics.
89 @end ifnotdocbook
90 @end ifnothtml
91 @end ifnotplaintext
92 @end menu
94 @c cincvdoc_node_number_2
95 @node Introduction
96 @chapter Introduction
97 @cindex Introduction
99 @menu
100 * About Cinelerra::
101 * The two versions of Cinelerra::
102 * About this manual::
103 * Getting help::
104 * Tutorials::
105 @end menu
107 @c cincvdoc_node_number_3
108 @node About Cinelerra
109 @section About Cinelerra
110 @cindex About Cinelerra
111 @cindex Cinelerra, about
113 For years, some people have wanted a way to edit their audio and video in one
114 place as fluidly as writing text.  Cinelerra tries to be a single location for
115 all your audio and video editing needs.  All the recording, editing, and
116 playback are handled here.  It can be used as an audio player.  It can be used
117 to record audio or video.  It can even be used as a photo retoucher.
119 There are two types of moviegoers: producers who create new content and revisit it
120 for further refinement, and consumers who
121 want to acquire the content and watch it.  Cinelerra is not intended for
122 consumers.  Cinelerra has many features for uncompressed content, high
123 resolution processing, and compositing.  Producers
124 need these features in order to retouch many generations of footage,
125 which makes Cinelerra very complex.  Consumers should consider other tools such
126 as MainActor, Kino, or Moxy.
128 @c cincvdoc_node_number_4
129 @node The two versions of Cinelerra
130 @section The two versions of Cinelerra
131 @cindex Cinelerra, the two versions of
133 There are two branches of Cinelerra.  One can be found at
134 @uref{http://www.heroinewarrior.com} and the other at
135 @uref{http://cvs.cinelerra.org}.  This documentation is focused on
136 @b{Cinelerra-CV (Community Version)}.
138 The official Cinelerra source code is developed "upstream" by Heroine Virtual, Ltd (HV).
139 HV shares its code base with a community version of Cinelerra (Cinelerra-CV), but does not
140 actively participate with the community of developers responsible for Cinelerra-CV. 
141 HV likes to work on its own copy
142 of Cinelerra, releasing code on a periodic basis every 6 months or
143 so. 
145 Cinelerra-CV was founded by developers who wanted to extend the functionality
146 and fix bugs inherent in the HV code base.  They decided to develop Cinelerra
147 in a community fashion and not create a separate fork of the original HV code.
148 So, the Cinelerra CV code is very similar to the official release.  CV coders
149 apply bug fixes (@uref{http://bugs.cinelerra.org}), enhancements to the SVN and
150 compliance fixes.  Programmers occasionally send patches upstream.  In this
151 way, Cinelerra CV has a number of features that the official version does not.
153 Unlike other programs, the HV release can not be described as "stable".  After
154 HV's Cinelerra is released, there are often bugs or unusable new features.
155 When there is a new release, a CV member (j6t) merges HV's code with Cinelerra
156 CV code, taking the enhancements from HV and reformatting the CV code (white
157 spaces, function naming, directory naming) to be more similar to HV's with
158 slight changes to implementations.  After the merge, the latest Cinelerra CV
159 release is a little unstable as users find bugs.  Time permitting, the CV
160 programmers will address as many of these bugs as possible.  In this way,
161 Cinelerra CV can be seen as the community's attempt to stabilize HV's release. 
163 As mentioned, the community adds new enhancements to the HV source.  Members
164 will comment on each other's implementations in order to create a more fully
165 functional and stable product.  Occasionally, HV will give feedback on
166 implementations that the members of the CV submit to it.  However, not all of
167 the enhancements that the community create make it upstream; for example, YUV
168 pipe rendering.
170 Given the above discussion, obtaining the SVN just before a merge will
171 generally be more stable than a post-merge CV version.  Be aware that existing
172 project description files, or Edit Decision Lists (discussed below), may not be
173 compatible with the newly merged CV version.  With any version of Cinelerra,
174 the task of finding bugs is relatively easy.  However, clearly and concisely
175 documenting these bugs for the community that fixes them is a task that we ask
176 of all users of the software.  The community is very responsive.  Please help
177 them by creating well-formed bug reports.  You may join our mailing list at
178 @uref{http://cvs.cinelerra.org}.
180 @c cincvdoc_node_number_5
181 @node About this manual
182 @section About this manual
183 @cindex Manual, about this
185 This manual edition is @value{EDITION}, for Cinelerra CV version
186 @value{VERSION}.  You may redistribute it and/or modify it under the terms of
187 the GNU General Public License, as published by the Free Software Foundation;
188 either version 2 of the License, or (at your option) any later version.
190 This manual originates from "Secrets of Cinelerra", an excellent primer written
191 by @w{Adam @sc{Crossfire}} from @w{@sc{Heroine Virtual Ltd}}.  In 2003 Alex @sc{Ferrer} created a Wiki based on
192 that manual and added many screenshots and topic descriptions.  At that
193 time, Cinelerra CV still did not have its own manual and information regarding
194 the Community Version of Cinelerra was scattered across the Internet
195 (mailing-list, IRC, websites, wiki, etc).  In 2006, Nicolas @sc{Maufrais}
196 combined the original "Secrets of Cinelerra" with the contents from Alex @sc{Ferrer}'s Wiki
197 into a unified document.
199 Cinelerra-CV documentation maintainers: @*
200 English: Nicolas @sc{Maufrais} (coordinator) @*
201 French: Jean-Luc @sc{Coulon}
203 Other contributors: Alexandre @sc{Bourget}, Kevin @sc{Brosius}, Carlos
204 @sc{Davila}, Rafael @sc{Diniz}, Pierre @sc{Dumuid}, Mike @sc{Edwards}, Martin
205 @sc{Ellison}, Scott @sc{Frase}, Joe @sc{Friedrichsen}, Gus Gus, Ben
206 @sc{Jorden}, Nathan @sc{Kidd}, Marcin @sc{Kostur}, Valentina @sc{Messeri},
207 Herman @sc{Robak}, Dana @sc{Rogers}, Jim @sc{Scott}, Andraz @sc{Tori}, Raffaella
208 @sc{Traniello}.
210 Thanks to the GNU project team, and particularly to Karl @sc{Berry}, maintainer
211 of GNU Texinfo, for the precious help he gave us during the elaboration of this
212 manual.
214 @itemize
215 @item To fetch the manual sources, install cogito and git-core on your computer and
216 run: @*
217 @command{cg-clone git://scm.pipapo.org/cinelerra/nicolasm}
218 @item You can participate on editing this manual by making changes in the
219 Cinelerra-CV wiki: @*
220 @uref{http://cvs.cinelerra.org/docs/wiki/doku.php}
221 @end itemize
223 @ifnotplaintext
224 @ifnothtml
225 @ifnotdocbook
227 @b{Note:} This manual is intended to be duplex-printed.  Therefore, it is
228 normal in the PDF manual for some even pages to be left blank.
229 @end ifnotdocbook
230 @end ifnothtml
231 @end ifnotplaintext
233 @c cincvdoc_node_number_6
234 @node Getting help
235 @section Getting help
236 @cindex Getting help
237 @cindex Help, getting
239 Help can be found at:
240 @itemize @bullet
241 @item @b{IRC channel:} #cinelerra on Freenode
242 @item @b{Mailing list:} @uref{https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra}
243 @item @b{Cinelerra CV website:} @uref{http://cvs.cinelerra.org}
244 @end itemize
246 @c cincvdoc_node_number_327
247 @node Tutorials
248 @section Tutorials
249 @cindex Tutorials
251 Some tutorials are available on the internet:
252 @itemize @bullet
253 @item @b{Cinelerra Tutorial - Getting Started}, by Rob @sc{Fisher}@*
254 @uref{http://www.robfisher.net/video/cinelerra1.html}
255 @item @b{Guide d'utilisation de Cinelerra}, in French@*
256 @uref{http://www.funix.org/fr/linux/cinelerra.htm}
257 @item @b{Cinelerra video tutorials}, by The Source@*
258 @uref{http://www.thesourceshow.org/node/11}@* 
259 The first tutorial is in Episode 6 - "The Return Of The Pixel".@*
260 The second tutorial is in Episode 1 - "The Filesystem Menace".
261 @end itemize
263 @c cincvdoc_node_number_7
264 @node Installation
265 @chapter Installation
267 @cindex Installation
268 This is the general contents of all Cinelerra packages.
270 @itemize @bullet
271 @item @b{Foreign language translations} - These go into
272 @file{/usr/share/locale}
273 @item @b{Cinelerra executable} - This goes into @file{/usr/bin}
274 @item @b{Cinelerra plugins} - These go into @file{/usr/lib/cinelerra} in 32 bit
275 systems and @file{/usr/lib64/cinelerra} in 64 bit systems.
276 @cindex Soundtest
277 @cindex Sound card buffer size
278 @item @b{soundtest} - Utility for determining sound card buffer size.
279 @cindex mplexlo
280 @item @b{mplexlo} - Multiplexing of MPEG elementary streams without
281 standards conformance but more efficiently.
282 @cindex mpeg3cat
283 @item @b{mpeg3cat} - Utility for reading an MPEG file from a certain
284 standard and outputting it to stdout.
285 @cindex mpeg3toc
286 @cindex mpeg3dump
287 @item @b{mpeg3toc, mpeg3cat, mpeg3dump} - Utilities for indexing and
288 reading MPEG files.
289 @cindex mpeg3peek
290 @item @b{mpeg3peek} - Utility for displaying the byte offset of a
291 frame in an MPEG file.
292 @end itemize
294 @menu
295 * Hardware requirements::
296 * Software requirements::
297 * Installing an RPM::
298 * Compiling Cinelerra CV::
299 * Running Cinelerra::
300 * Debian::
301 * Ubuntu::
302 * Gentoo::
303 * Knoppix::
304 * Redhat::
305 * Mandrake::
306 * Slackware::
307 * Suse::
308 * MacOSX::
309 @end menu
311 @c cincvdoc_node_number_8
312 @node Hardware requirements
313 @section Hardware requirements
314 @cindex Hardware requirements
315 @cindex Requirements, hardware
317 Cinelerra is demanding on all PC subsystems, as reading, decoding and playing
318 video can be quite taxing.  Thus, performance and usability of Cinelerra are
319 directly proportional to the video format (SVCD/DV/HDV/HD/etc) used and the CPU
320 and I/O bus speeds and video and memory bus architecture of your hardware.
321 Therefore, it stands to reason that a less powerful system will be sufficient
322 for users working with audio only or lower resolution video formats.  However,
323 that same system may slow down considerably when playing back a higher
324 resolution format, such as DV video.  Effects and several tracks of audio will
325 compound these problems.  Given these constraints, here are some suggestions
326 for running Cinelerra:
328 @itemize @bullet
329 @item @b{CPU speed} @*
330 At least 500 MHz CPU speed, anything less would be useless.  Dual-core and
331 SMP processors greatly improve Cinelerra speed.
332 @item @b{Memory} @*
333 When working with video, a large amount of free memory available can help speed
334 up operations by avoiding unnecessary disk swaps and keeping material ready
335 accessible.  Have at least 256 Megabytes of memory.  To really use Cinelerra for
336 higher resolution video formats and larger projects, greater than 1 Gb memory space
337 is suggested.
338 @item @b{Storage} @*
339 Video editing can be quite I/O intensive.  Storage requirements are based on
340 your particular video editing needs.  If you expect to produce long pieces in
341 uncompressed or larger resolution formats, you should have large (>200 Gb) and
342 fast (<10ms) disk drives.  For example, DV uses about 3.5 Megs per second, or
343 12 Gigs per hour.  For smaller projects you might get away with 1 Gb.  RAID0
344 (stripe set), RAID1+0 (striped/mirrored) or RAID5 (stripe set with parity) will
345 also speed playback
346 @item @b{Video adapters} @*
347 Since version 2.1, Cinelerra benefits from OpenGL hardware
348 acceleration.  Make sure the video card you use supports OpenGL 2.0 in order to
349 benefit from that acceleration.  Nvidia series 7 (ie. 7600GS) are known to work
350 well.  Unfortunately, ATI's Linux drivers do not support a complete
351 implementation of OpenGL 2.0.  If you are going to send a composite signal
352 directly to a TV or video recorder, make sure your video card supports it. 
353 @item @b{Multiple monitors} @*
354 You can use XFree86's Xinerama features to work on multiple monitor heads.
355 This feature can be a very effective way of increasing productivity.
356 @item @b{TV-Out} @*
357 If your Adapter supports a TV-Out option, connecting a TV or S-Video
358 monitor to it is a great way to view your material as it will be seen on TV
359 screen.
360 @item @b{Video grabbers} @*
361 If you have an analog video camera, or want to grab video from a trusty
362 old VCR, you need some sort of video grabber.  Video grabbers are supported
363 through Video4Linux in Cinelerra.
364 @item @b{Firewire} @*
365 Firewire is the fastest way to download material into your system.  Unless
366 you will be importing your media from a CD, any other
367 pre-captured format or use an analog video grabber, you will need firewire
368 on your system. 
369 @item @b{DV cameras} @*
370 There is an large variety of DV cameras that can be used with Cinelerra.
371 Almost any camera that can connect using firewire will work.
372 Be sure to set the appropriate parameters on the video grabbing system to match
373 your particular camera.  @uref{http://www.linux1394.org} has a complete listing
374 of supported cameras.
375 @end itemize
377 @c cincvdoc_node_number_9
378 @node Software requirements
379 @section Software requirements
380 @cindex Software requirements
381 @cindex Requirements, software
383 To install Cinelerra you should have a current version of GNU/Linux with XFree86
384 and some audio management software properly running.  You should also have the
385 following libraries installed (partial list):
386 @itemize @bullet
387 @item a52dec
388 @item dv
389 @item faac
390 @item ffmpeg
391 @item fftw
392 @item lame
393 @item libavc1394
394 @item libfaad2
395 @item libraw1394
396 @item mjpegtools
397 @item OpenEXR
398 @item theora
399 @item x264
400 @end itemize
402 @c cincvdoc_node_number_10
403 @node Installing an RPM
404 @section Installing an RPM
405 @cindex Installing an RPM
406 @cindex RPM, installing an
407 @cindex Fedora
408 The easiest way to install Cinelerra is by downloading and installing an RPM
409 using the following command @*
410 @command{rpm -U --force --nodeps hvirtual*.rpm} @*
411 on a Fedora 4 system.
413 @cindex rpm2cpio
414 On systems that do not support RPM, look for a utility called @b{rpm2cpio}.
415 Download a Cinelerra RPM and from the @file{/} directory run @*
416 @command{rpm2cpio hvirtual*.rpm | cpio -i --make-directories} @*
417 This does not always work because there are many forks of the C library, each
418 incompatible with the others.  This is the biggest reason to compile from
419 scratch.
421 @c cincvdoc_node_number_11
422 @node Compiling Cinelerra CV
423 @section Compiling Cinelerra CV
424 @cindex Compiling Cinelerra CV
425 @cindex Cinelerra, compiling
427 @menu
428 * Usual compilation process::
429 * Compiling with debugging symbols::
430 @end menu
432 @c cincvdoc_node_number_12
433 @node Usual compilation process
434 @subsection Usual compilation process
435 @cindex Usual compilation process
437 You can install Cinelerra CV by fetching the sources and compiling them.  That
438 the method to use if you want to compile the most up-to-date version of
439 Cinelerra CV@.
441 @enumerate 1
442 @item First you have to fetch Cinelerra CV's sources from the SVN repository
443 (approximately 170Mb).  Run: @*
444 @command{svn checkout svn://svn.skolelinux.org/cinelerra/trunk/hvirtual} @*
445 If you already fetched the sources of an out of date revision, you can update
446 to the latest revision from within the @file{hvirtual} folder by running: @*
447 @command{svn update} @*
448 If you wish to fetch an old revision, run: @*
449 @command{svn checkout -r <revision>
450 svn://svn.skolelinux.org/cinelerra/trunk/hvirtual}
452 @item Go in the hvirtual folder: @*
453 @command{cd hvirtual}
455 @item Create the @file{./configure} file by running: @*
456 @command{autoreconf -i --force}
458 @item Then run the @file{.configure} file: @*
459 @command{./configure --with-buildinfo=svn/recompile} @*
460 You can have a look at all the options available by running: @*
461 @command{./configure --help}
463 @item And run make: @*
464 @command{make}
466 @item Finally, install Cinelerra CV: @*
467 @command{sudo make install}
468 @end enumerate
470 @b{Notes:}
471 @itemize @bullet
472 @item @b{SMP machine:} @*
473 If you compile Cinelerra CV on a multiprocessor machine (SMP), we recommend you
474 to add the @option{-j 3} option to make in order to benefit from the available
475 CPUs.
476 @item @b{For x86 CPUs only}: @*
477 You probably want to enable MMX support.  To do that, run @command{./configure}
478 with the @option{--enable-mmx} option.  If you do that, you may have to use the
479 @option{--without-pic} option too, otherwise, compilation may fail.
480 @item @b{For Pentium-M:} @*
481 Here are some useful compiler flags: @*
482 @command{./configure --prefix=/usr --enable-x86 --enable-mmx --enable-freetype2
483 --with-buildinfo=svn/recompile CFLAGS='-O3 -pipe -fomit-frame-pointer
484 -funroll-all-loops -falign-loops=2 -falign-jumps=2 -falign-functions=2
485 -ffast-math -march=pentium-m -mfpmath=sse,387 -mmmx -msse'}
486 @item @b{Installing several revisions:} @*
487 If you wish to install several revisions of Cinelerra CV on your computer,
488 create a @file{/usr/local_cinelerra} folder, and use the following options with
489 @command{./configure} (replace @option{xxx} by the number of the revision you
490 are compiling): @*
491 @option{--prefix=/usr/local_cinelerra/rxxx
492 --exec-prefix=/usr/local_cinelerra/rxxx --program-suffix=_rxxx} @*
493 If you install Cinelerra using this method, the translated @file{.po} files do
494 not get installed correctly.  Go in the @file{hvirtual} directory where the sources
495 are and run: @*
496 @command{./configure prefix=/usr} @*
497 @command{cd po} @*
498 @command{sudo make install} @*
499 You will have to run Cinelerra CV from the directory in which it is installed: @*
500 @command{cd /usr/local_cinelerra/r960} @*
501 @command{./cinelerra_r960}
502 @item @b{Automake version:} @*
503 You need automake version 1.7 to build.  1.4 will not work.  Autoconf 2.57 is
504 also required to build.
505 @end itemize
507 @c cincvdoc_node_number_13
508 @node Compiling with debugging symbols
509 @subsection Compiling with debugging symbols
510 @cindex Compiling with debugging symbols
511 @cindex Debugging symbols, compiling with
513 When Cinelerra CV crashes, one can compile it with debugging symbols and run it
514 inside gdb.  The information displayed by gdb is far more detailed and
515 will help CV developers find bugs faster.
517 First, fetch the SVN sources as usual.  Then, run the following commands: @*
518 @command{cd hvirtual} @*
519 @command{nice -19 autoreconf -i --force} @*
520 @command{mkdir ../hvdbg} @*
521 @command{cd ../hvdbg} @*
522 @command{nice -19 ../hvirtual/configure CXXFLAGS='-O0 -g' CFLAGS='-O0 -g'
523 --with-buildinfo=svn/recompile} @*
524 @command{cd quicktime/ffmpeg} @*
525 @command{nice -19 make CFLAGS='-O3'} @*
526 @command{cd ../..} @*
527 @command{nice -19 make} @*
528 @command{nice -19 make install}
530 @xref{Reporting bugs}, for information about running Cinelerra inside gdb.
532 @c cincvdoc_node_number_14
533 @node Running Cinelerra
534 @section Running Cinelerra
535 @cindex Cinelerra, running
537 The simplest way to run Cinelerra is by running @command{/usr/bin/cinelerra} @*
538 Command line options are also available by typing @command{cinelerra -h}  These
539 options are described in several sections below.  For rendering from the
540 command line @xref{Rendering files}.
542 @c cincvdoc_node_number_15
543 @node Debian
544 @section Debian
545 @cindex Debian
547 @menu
548 * Debian binaries::
549 * Debian prerequisites::
550 @end menu
552 @c cincvdoc_node_number_16
553 @node Debian binaries
554 @subsection Debian binaries
555 @cindex Binaries, Debian
557 Andraz @sc{Tori} maintains build rules for Debian Sid.  He also makes binary
558 .deb packages for Sid.  They are built from the unofficial SVN releases.
559 Debian Sid packages can be found here:
560 @itemize @bullet
561 @item @b{Apt source for i386:} @*
562 @command{@w{deb http://www.kiberpipa.org/~minmax/cinelerra/builds/sid/ ./}}
563 @item @b{Apt source for Pentium4 (optimized):} @*
564 @command{@w{deb http://www.kiberpipa.org/~minmax/cinelerra/builds/pentium4/ ./}}
565 @item @b{Apt source for Pentium-M (optimized):} @*
566 @command{@w{deb http://www.kiberpipa.org/~minmax/cinelerra/builds/pentiumm/ ./}}
567 @item @b{Apt source for AthlonXP (optimized):} @*
568 @command{@w{deb http://www.kiberpipa.org/~minmax/cinelerra/builds/athlonxp/ ./}}
569 @item @b{Apt source for Athlon64 (optimized):} @*
570 @command{@w{deb http://labbs.net/~vale/debian ./}}
571 @end itemize
573 @b{Note:} If Cinelerra produces the following error: @*
574 @command{cinelerra: relocation error: /usr/lib/libavcodec.so.0.4.8:
575 undefined symbol: faacDecOpen} @*
576 You can solve the problem by entering the following command as root: @*
577 @command{apt-get install --reinstall libfaad2-0=2.0.0-0.5}
579 @c cincvdoc_node_number_17
580 @node Debian prerequisites
581 @subsection Debian prerequisites
582 @cindex Prerequisites, Debian
584 You need some prerequisites which are not found in Debian's official
585 repositories.  You should add in your @file{/etc/apt/sources.list} the following
586 line, which is Christian Marillat's repository: @*
587 @command{deb http://www.debian-multimedia.org/ sid main}
589 In order to use the mirror you need to add in your gpg keyring Marillat's
590 gpg-key: @*
591 @command{gpg --keyserver hkp://wwwkeys.eu.pgp.net --recv-keys 1F41B907} @*
592 @command{gpg --armor --export 1F41B907 | sudo apt-key add -} @*
593 If you do not use sudo, do the following under root: @*
594 @command{gpg --armor --export 1F41B907 | apt-key add -}
596 @c cincvdoc_node_number_325
597 @node Ubuntu
598 @section Ubuntu
599 @cindex Ubuntu
601 FIXME
603 @c cincvdoc_node_number_18
604 @node Gentoo
605 @section Gentoo
606 @cindex Gentoo
608 Installation for Gentoo GNU/Linux is very straight forward.  Simply type: @*
609 @command{emerge cinelerra} @*
610 as root and it should install and run with no problems.
612 @c cincvdoc_node_number_19
613 @node Knoppix
614 @section Knoppix
615 @cindex Knoppix
617 Knoppix is a bootable CD with a collection of GNU/Linux software, automatic
618 hardware detection, and support for many graphics cards, sound cards, SCSI and
619 USB devices and other peripherals.  Knoppix can be used as a GNU/Linux demo,
620 educational CD, rescue system, or adapted and used as a platform for commercial
621 software product demos.  It is not necessary to install Knoppix on a hard disk.
622 (from @uref{http://www.knoppix.org})
624 Known Knoppix distributions which include Cinelerra:
625 @itemize @bullet
626 @item @uref{http://www.dynebolic.org}
627 @item @uref{http://linux.slo-tech.com}
628 @item @uref{http://garbure.org/pho}
629 @end itemize
631 @c cincvdoc_node_number_326
632 @node Redhat
633 @section Redhat
634 @cindex Redhat
636 FIXME
638 @c cincvdoc_node_number_20
639 @node Mandrake
640 @section Mandrake
641 @cindex Mandrake
643 Perhaps the greatest challenge to compiling Cinelerra on Mandrake is gathering
644 all the proper lib dependencies.  Once all the required libraries (and their
645 devel packages) are installed the compile process works smoothly.
647 @c cincvdoc_node_number_21
648 @node Slackware
649 @section Slackware
650 @cindex Slackware
652 Rafael @sc{Diniz} build Slackware packages for Cinelerra.
654 @itemize @bullet
655 @item @b{For x86:} @*
656 @uref{http://slack.sarava.org/packages/slackware/slackware-11.0/multimedia/}
657 @item @b{For slackintosh:} @*
658 @uref{http://slack.sarava.org/packages/slackintosh/slackintosh-11.0/multimedia/}
659 @end itemize
661 @c cincvdoc_node_number_22
662 @node Suse
663 @section Suse
664 @cindex Suse
666 RPMs for SuSE 9 are built from CVS by Kevin @sc{Brosius}, and available at
667 @uref{http://cin.kevb.net/files/RPM/}
669 @c cincvdoc_node_number_23
670 @node MacOSX
671 @section MacOSX
672 @cindex MacOSX
674 FIXME
676 @c cincvdoc_node_number_24
677 @node Configuration
678 @chapter Configuration
679 @cindex Configuration
681 Because of its flexibility, Cinelerra cannot be optimized without
682 special configuration for your specific needs.  Unfortunately, very few parameters are
683 adjustable at compile time.  Therefore, runtime configuration is the only option for most
684 users because of the multitude of parameters available. @*
685 Below are configuration options as well as the supported API's in GNU/Linux. @*
686 In Cinelerra, go to @b{settings->preferences} to see the options.
688 @menu
689 * Environment variables::  These environment variables are recognized by Cinelerra
690 * Audio drivers::          Information about the audio drivers
691 * Video drivers::          Information about the video drivers
692 * Playback::               Configuring parameters related to playback.
693 * Recording::              Configuring parameters related to recording.
694 * Performance::            Configuring parameters related to how fast things go.
695 * Interface::              Configuring the user interface.
696 * About::                  Viewing information about the program.
697 @end menu
699 @c cincvdoc_node_number_25
700 @node Environment variables
701 @section Environment variables
702 @cindex Environment variables
703 @cindex Variables, environment
704 @cindex Ladspa, path
706 In UNIX derivatives, environment variables are global variables in the shell
707 which all applications can read.  They are set with a command like @command{set
708 VARIABLE=value}.  All the environment variables can be viewed with a command
709 like @command{env}.  Cinelerra recognizes the following environment variables:
711 @itemize @bullet
712 @item @b{LADSPA_PATH} @*
713 If you want to use LADSPA plugins, this must be defined: a colon separated
714 list of directories to search for LADSPA plugins.  These are not native
715 Cinelerra plugins.  @xref{Ladspa effects}.
717 @item @b{GLOBAL_PLUGIN_DIR} @*
718 The directory in which Cinelerra should look for native plugins.  The default is
719 @file{/usr/lib/cinelerra} but you may need an alternate directory if you share
720 the same executable directory among many machines via NFS@.  Plugins of
721 different binary formats need to be in different directories.
723 @item @b{LANG} @*
724 Cinelerra has been translated into many languages.  Cinelerra language settings
725 are normally read from your GNU/Linux language settings.  To run Cinelerra on a
726 language different than the one selected on your system just change the LANG
727 environment variable. @*
728 For example, open a shell and type: @command{export LANG=es_ES}, then run
729 cinelerra from the same shell.  It will open set on the Spanish language. @*
730 Available languages are:
731 @itemize @bullet
732 @item es_ES - Espanol
733 @item sl_SI - Slovenian
734 @item fr_FR - Francais
735 @item eu_ES - Euskera
736 @item de_DE - German
737 @item pt_BR - Brazilian Portuguese
738 @end itemize
739 If you installed Cinelerra CV by compiling the sources, and you specified a
740 @option{--prefix=} option different from @file{/usr/local}, the translated
741 files were probably not installed.  @xref{Usual compilation process}, for more
742 information.
743 @end itemize
745 @c cincvdoc_node_number_26
746 @node Audio drivers
747 @section Audio drivers
748 @cindex Audio drivers
749 @cindex Drivers, audio
751 The audio drivers are used for both recording and playback.  Their
752 functionality is described below:
754 @menu
755 * Common sound driver attributes:: Attributes used for more than one sound driver.
756 * OSS:: Notes about the OSS driver
757 * OSS Envy24:: Notes about the OSS driver for the Envy24 chip
758 * Alsa:: Notes about the ALSA driver
759 * Esound:: Notes about the ESound driver
760 * Raw 1394:: Notes about the Raw1394 driver
761 * DV 1394:: Notes about the DV1394 driver
762 * IEC 61883:: Notes about the IEC 61883 driver
763 @end menu
765 @c cincvdoc_node_number_27
766 @node Common sound driver attributes
767 @subsection Common sound driver attributes
768 @cindex Common sound driver attributes
770 @itemize @bullet
771 @item @b{Device path}  @*
772 Usually a file in the @file{/dev/} directory which controls the device.
774 @item @b{Bits} @*
775 The number of bits of precision Cinelerra should set the device for.  This
776 sometimes has a figurative meaning.  Some sound drivers need to be set to 32
777 bits to perform 24 bit playback and will not play anything when set to 24 bits.
778 Some sound drivers need to be set to 24 bits for 24 bit playback.
780 @item @b{Channels} @*
781 The number of channels Cinelerra should set the device for.  Regardless of
782 the number of channels in the project, the number of channels set here will be
783 written to the device.  When this is set to 2 and the project has 1 channel you
784 will hear sound through the left speaker and not centered as expected for a
785 monaural project.  When this is set to 1 and the project has 2 channels you
786 will hear the left channel centered and not 2 channels mixed together.
787 @end itemize
789 @c cincvdoc_node_number_28
790 @node OSS
791 @subsection OSS
792 @cindex OSS
794 This was the first GNU/Linux sound driver.  It had an open source
795 implementation and a commercial implementation with more sound cards supported.
796 It was the standard sound driver up to GNU/Linux 2.4.  It still is the only
797 sound driver which an i386 binary can use when running on an x86_64 system.
799 @c cincvdoc_node_number_29
800 @node OSS Envy24
801 @subsection OSS Envy24
802 @cindex OSS Envy24
803 @cindex Envy24
805 The commercial version of OSS had a variant for 24 bit 96 KHz soundcards.  This
806 variant required significant changes to the way the sound drivers were used,
807 hence the need for the new driver.
809 @c cincvdoc_node_number_30
810 @node Alsa
811 @subsection Alsa
812 @cindex Alsa
814 ALSA is the most common sound driver in GNU/Linux 2.6.  It supports most
815 of soundcards now.  It takes advantage of low latency features in GNU/Linux 2.6
816 to get better performance than OSS had in 2.4, but roughly the same performance
817 that OSS had in 2.0.  Unfortunately ALSA is constantly changing.  A program
818 which works with it one day may not the next day.  New wrappers are being
819 developed on top of ALSA.  We plan to support them at regular
820 intervals, though not at every new release of a new wrapper. @*
821 ALSA is no longer portable between i386 and x86_64.  If an i386 binary tries to
822 play back on an x86_64 kernel, it will crash.  For this scenario, use OSS@.
824 @c cincvdoc_node_number_31
825 @node Esound
826 @subsection Esound
827 @cindex Esound
829 ESOUND was a sound server that sat on top of OSS@.  It was written for a window
830 manager called Enlightenment.  It supports a limited number of bits and has
831 high latency compared to more modern drivers, but it does have the ability to multiplex multiple audio sources.
832 It is unknown whether it still works.
834 @c cincvdoc_node_number_32
835 @node Raw 1394
836 @subsection Raw 1394
837 @cindex Raw 1394
839 The was the first interface between GNU/Linux software and firewire camcorders.
840 It is the least reliable way to play audio to a camcorder and consists of
841 a library on top of the kernel commands.
843 @c cincvdoc_node_number_33
844 @node DV 1394
845 @subsection DV 1394
846 @cindex DV 1394
848 This is the second rewrite of DV camcorder support in GNU/Linux.  This is the most
849 reliable way to play audio to a camcorder and consists of direct kernel
850 commands.
852 @c cincvdoc_node_number_34
853 @node IEC 61883
854 @subsection IEC 61883
855 @cindex IEC 61883
857 The third rewrite of DV camcorder support in GNU/Linux.  This is a library on
858 top of RAW 1394 which is a library on top of the kernel commands.  It is less
859 reliable than DV 1394 but more reliable than RAW 1394.  The next rewrite ought
860 to fix that.  Visit @uref{http://www.linux1394.org} for more information and
861 the latest drivers.
863 @c cincvdoc_node_number_35
864 @node Video drivers
865 @section Video drivers
866 @cindex Video drivers
867 @cindex Drivers, video
869 The video drivers are used for video playback in the compositor and the viewer.
871 @menu
872 * Common video driver attributes:: Parameters used by more than one driver.
873 * X11::
874 * X11-XV::
875 * X11-OpenGL::
876 * Buz::
877 * Raw 1394 video playback::
878 * DV 1394 video playback::
879 * IEC 61883 video playback::
880 @end menu
882 @c cincvdoc_node_number_36
883 @node Common video driver attributes
884 @subsection Common video driver attributes
885 @cindex Common video driver attributes
886 @cindex Video driver, common attributes
888 @itemize @bullet
889 @item @b{Display} @*
890 @cindex Dual monitor displays
891 The interface is intended for dual monitor displays.  Depending on the value of
892 Display, the Compositor window will appear on a different monitor from the rest
893 of the windows.
895 @item @b{Device path} @*
896 Usually a file in the @file{/dev/} directory which controls the device.
898 @item @b{Swap fields} @*
899 Make the even lines odd and the odd lines even when sending to the device.  On
900 an NTSC or 1080i monitor the fields may need to be swapped to prevent jittery
901 motion.
903 @item @b{Output channel} @*
904 You may need a specific connector to send video out to devices with multiple outputs.
906 @item @b{Port} @*
907 The IEEE1394 standard specifies something known as the @b{port}.  This is
908 probably the firewire card number.
910 @item @b{Channel} @*
911 The IEEE1394 standard specifies something known as the @b{channel}.  For DV
912 cameras it is always @b{63}.
913 @end itemize
915 @c cincvdoc_node_number_37
916 @node X11
917 @subsection X11
918 @cindex X11
920 This was the first method of graphical display on any UNIX system. 
921 It just writes the RGB triplet for each pixel directly to the
922 window.  It is the slowest playback method.  It is still useful as a fallback
923 when graphics hardware can not handle very large frames.
925 @c cincvdoc_node_number_38
926 @node X11-XV
927 @subsection X11-XV
928 @cindex X11-XV
930 This was an enhancement to X11 in 1999.  It
931 converts YUV to RGB in hardware with scaling.  It is the preferred playback
932 method but can not handle large frame sizes.  The maximum video size for XV is
933 usually 1920x1080.
935 @c cincvdoc_node_number_39
936 @node X11-OpenGL
937 @subsection X11-OpenGL
938 @cindex X11-OpenGL
939 @cindex OpenGL
941 The most powerful video playback method is OpenGL@.  With this driver, most
942 effects are done in hardware.  OpenGL allows video sizes up to the maximum
943 texture size, which is usually larger than what XV supports, depending on the
944 graphics driver.  To enable it you will need a binary built with OpenGL
945 support.  The @command{configure} option to enable OpenGL is
946 @option{--enable-opengl}.  You need a video card which supports OpenGL 2.0.
947 Recent Nvidia video cards should work.  You also need to use a video driver
948 supporting OpenGL 2.0, such as Nvidia's binary driver.  To know if your video
949 driver supports OpenGL 2.0, type the following command: @command{glxinfo | grep
950 "OpenGL version"}
952 @itemize @bullet
953 @item Video driver supporting hardware OpenGL 2.0 rendering: @*
954 @command{OpenGL version string: 2.0.2 NVIDIA 87.74}
955 @item Video driver not supporting hardware OpenGL 2.0 rendering: @*
956 @command{OpenGL version string: @b{1.4} (2.0.2 NVIDIA 87.74)}
957 @end itemize
959 OpenGL relies on PBuffers and shaders to do video rendering.  The graphics
960 driver must support OpenGL 2.0 and Cinelerra needs to be explicitly compiled with
961 OpenGL 2.0 support.  This requires compiling it on a system with the OpenGL 2.0
962 headers.  PBuffers are known to be fickle.  If the graphics card does not have
963 enough memory or does not have the right visuals, PBuffers will not work.  If
964 OpenGL does not work, try seeking several frames or restarting Cinelerra.
966 @b{Limitations:}
967 @itemize @bullet
968 @item OpenGL does not affect rendering.  It just accelerates playback.
969 @item X11-OpenGL processes everything in 8 bit color models, although the
970 difference between YUV and RGB is retained.
971 @item OpenGL does not work with frames whose size is larger than 4096x4096. @*
972 Here is what is written in the console when working with large frames: @*
973 @code{BC_Texture::create_texture frame size <frame_width>x<frame_height> bigger
974 than maximum texture 4096x4096.}
975 @item The scaling equation set in the preferences window is ignored by OpenGL@.
976 OpenGL always uses linear scaling.
977 @item Project and track sizes need to be multiples of four for OpenGL to work.
978 @item To get the most acceleration, OpenGL-enabled effects must be placed after
979 software-only effects.  All rendering before the last software-only effect is
980 done in software.  The core Cinelerra operations like camera and projector are
981 OpenGL@.
982 @item Not all of the effects support OpenGL acceleration. The following effects
983 support OpenGL: Brightness, Chromakey, Chromakeyhsv, Color balance,
984 Deinterlace, Diffkey, Dissolve, Flip, Frames to fields, Freeze frame, Gamma,
985 Gradient, Histogram, Hue saturation, Interpolate Pixels, Invert video, Linear
986 blur, Overlay, Perspective, Radial blur, RGB601, Rotate, Scale, Threshold,
987 Zoomblur.
988 @end itemize
990 @c cincvdoc_node_number_40
991 @node Buz
992 @subsection Buz
993 @cindex Buz
994 @cindex Video4Linux
996 This is a method for playing motion JPEG-A files directly to a composite analog
997 signal.  It uses a popular hack of the Video4Linux 1 driver from 2000 to
998 decompress JPEG in hardware.  Even though analog output is largely
999 obsolete, newer drivers have replaced BUZ@.
1001 @c cincvdoc_node_number_41
1002 @node Raw 1394 video playback
1003 @subsection Raw 1394 video playback
1004 @cindex Raw 1394
1006 This was the first interface between GNU/Linux software and firewire
1007 camcorders.  It is the least reliable way to play video to a camcorder and it
1008 consists of a library on top of the kernel commands.
1010 @c cincvdoc_node_number_42
1011 @node DV 1394 video playback
1012 @subsection DV 1394 video playback
1013 @cindex DV 1394
1015 The second rewrite of DV camcorder support in GNU/Linux.  This was the most
1016 reliable way to play video to a camcorder and consists of direct kernel
1017 commands.
1019 @c cincvdoc_node_number_43
1020 @node IEC 61883 video playback
1021 @subsection IEC 61883 video playback
1022 @cindex IEC 61883
1024 The third rewrite of DV camcorder support in GNU/Linux.  This is a library on
1025 top of RAW 1394 and is less
1026 reliable than DV 1394 but more reliable than RAW 1394.  The next rewrite ought
1027 to fix that.  Visit @uref{http://www.linux1394.org} for more information and
1028 the latest drivers.
1030 @c cincvdoc_node_number_44
1031 @node Playback
1032 @section Playback
1033 @cindex Playback
1035 @menu
1036 * Audio out::
1037 * Video out::
1038 @end menu
1040 @c cincvdoc_node_number_45
1041 @node Audio out
1042 @subsection Audio out
1043 @cindex Audio out
1044 @cindex Audio samples
1046 These determine what happens when you play sound from the timeline.
1048 @cindex Samples to send to console
1049 @cindex Console, samples to send to
1050 @itemize @bullet
1051 @item @b{Samples to send to console} @*
1052 For playing audio, small fragments of sound are read from disk and processed sequentially in
1053 a virtual console.  A larger value here causes more latency when
1054 you change mixing parameters but yields more reliable playback. @*
1055 Some sound drivers do not allow changing of the console fragment, so latency is
1056 unchanged no matter what the value. @*
1057 Previously, a good way of ensuring high quality playback was to read bigger fragments from
1058 the disk and break them into smaller fragments for the soundcard.  That changed
1059 when the virtual console moved from the push model to the pull model.  Since
1060 different stages of the rendering pipeline can change the rate of the incoming
1061 data, it would be difficult to disconnect the size of the console fragments
1062 from the size of the fragments read from disk.
1064 @cindex Audio offset
1065 @cindex Offset, audio
1066 @item @b{Audio offset} @*
1067 The ability to tell the exact playback position on GNU/Linux sound drivers is
1068 poor, if it is provided at all.  Since this information is required for
1069 proper video synchronization, it has to be accurate.  The @b{audio offset}
1070 allows users to adjust the position returned by the sound driver in order to reflect
1071 reality.  The audio offset does not affect the audio playback or rendering at
1072 all.  It merely changes the synchronization of video playback. @*
1073 The easiest way to set the audio offset is to create a timeline with one video
1074 track and one audio track.  Expand the audio track and center the audio pan.
1075 The frame rate should be larger than 24 fps and the sampling rate should be
1076 greater than 32000.  The frame size should be small enough for your computer to render
1077 it at the full framerate.  Highlight a region of the timeline starting at 10
1078 seconds and ending at 20 seconds.  Drop a @b{gradient} effect on the video
1079 track and configure it to be clearly visible.  Drop a @b{synthesizer} effect on
1080 the audio and configure it to be clearly audible. @*
1081 Play the timeline from 0 and watch to see if the gradient effect starts exactly
1082 when the audio starts.  If it does not, expand the audio track and adjust the
1083 nudge.  If the audio starts ahead of the video, decrease the nudge value.  If
1084 the audio starts after the video, increase the nudge value.  Once the tracks
1085 play back synchronized, copy the nudge value to the @b{audio offset} value in
1086 preferences. @*
1087 @b{Note:} if you change sound drivers or you change the value of @b{Use
1088 software for positioning information}, you will need to change the audio offset
1089 because different sound drivers are unequally inaccurate.
1091 @cindex View follows playback
1092 @cindex Playback, view follows
1093 @item @b{View follows playback} @*
1094 This causes the timeline window to scroll when the playback cursor moves.  This
1095 can bog down the X Server or cause the timeline window to lock up for long
1096 periods of time while drawing the assets.
1098 @cindex Use software for positioning information
1099 @cindex Positioning information, use software for
1100 @item @b{Use software for positioning information} @*
1101 Most soundcards and sound drivers do not give reliable information on the number
1102 of samples the card has played.  You need this information
1103 for synchronization when playing back video.  This option causes the sound driver to be ignored and a
1104 software timer to be used for synchronization.
1106 @cindex Audio playback in realtime
1107 @cindex Realtime, audio playback in
1108 @item @b{Audio playback in realtime} @*
1109 Back in the days when 150 MHz was the maximum speed for a personal computer, this setting allowed uninterrupted
1110 playback during periods of heavy load.  It forces the audio playback to the highest priority
1111 in the kernel.  Today, it is most useful for achieving very low latency between
1112 console tweeks and soundcard output.  You must be root to get real-time
1113 priority.
1115 @cindex Audio driver
1116 @item @b{Audio driver} @*
1117 There are many sound drivers for GNU/Linux.  This allows selecting one sound
1118 driver and setting parameters specific to it.  The sound drivers and their
1119 parameters are described in the sound driver section.  @xref{Audio drivers}.
1120 @end itemize
1122 @c cincvdoc_node_number_46
1123 @node Video out
1124 @subsection Video out
1125 @cindex Video out
1127 These determine how video gets from the timeline to your eyes.
1129 @cindex Play every frame
1130 @cindex Frame, play every
1131 @itemize @bullet
1132 @item @b{Play every frame} @*
1133 This causes every frame of video to be displayed even if it means that the playback of the audio tracks(s) will fall
1134 behind.  This option should always be enabled unless you use uncompressed
1135 codecs.  As of 1/2007, most compressed codecs do not support frame dropping anymore.
1137 @cindex Framerate achieved
1138 @item @b{Framerate achieved} @*
1139 The number of frames per second being displayed during playback.  This is
1140 updated during playback only.
1142 @cindex Decode frames asynchronously
1143 @item @b{Decode frames asynchronously} @*
1144 If you have lots of memory and more than one CPU, this option can improve
1145 playback performance by decoding video on one CPU as fast as possible while
1146 dedicating the other CPU to playing back video.  It assumes all playback
1147 operations are forward and no frames are dropped.  Operations involving reverse
1148 playback or frame dropping are negatively impacted. @*
1149 Since this option requires enormous amounts of memory, Cinelerra may crash if the
1150 input frames are very large.
1152 @cindex Scaling equation
1153 @cindex Equation, scaling
1154 @item @b{Scaling equation} @*
1155 This algorithm is used when video playback involves any kind of scaling or
1156 translation.  This does not affect 1:1 playback.
1157 @itemize @bullet
1158 @item @b{Nearest neighbor enlarge and reduce} @*
1159 Low quality output with fast playback.  Produces jagged edges and uneven motion.
1160 @item @b{Bicubic enlarge and bilinear reduce} @*
1161 High quality output with slow playback.  Bicubic interpolation is used for enlarging,
1162 which blurs slightly but does not show stair step artifacts.  A bilinear
1163 interpolation is used for reduction, which produces very sharp images and reduces noise.
1164 Bilinearly reduced images can be sharpened with a sharpen effect with less noise
1165 side effects than a normal sized image.
1166 @item @b{Bilinear enlarge and bilinear reduce} @*
1167 When slight enlargement is needed, a bilinear enlargement looks better than a
1168 bicubic enlargement.
1169 @end itemize
1171 @cindex Preload buffer for Quicktime
1172 @cindex Quicktime, preload buffer for
1173 @item @b{Preload buffer for Quicktime} @*
1174 The Quicktime/AVI decoder can handle DVD sources better when this is set to around
1175 10000000.  This reduces the amount of seeking required.  When
1176 reading high bitrate sources from a hard drive, this tends to impair performance by slowing down decoding.
1177 For normal use this should be 0.
1179 @cindex DVD subtitles
1180 @cindex Subtitles, DVD
1181 @item @b{DVD subtitle to display} @*
1182 DVD IFO files usually contain subtitle tracks.  These must be decoded with
1183 the MPEG decoder.  Select @b{Enable subtitles} to enable subtitle decoding.
1184 There are usually multiple subtitle tracks indexed by number and starting from
1185 0.  Enter the index number of the subtitle track to be decoded in the "DVD
1186 Subtitle to display" text box or use the tumbler to increase the index value.
1187 Go to the asset corresponding to the MPEG file in the Resources window and
1188 right click.  Click on Info.  The number of subtitle tracks is shown at the
1189 bottom.
1191 @cindex CR2 images
1192 @cindex Images, CR2
1193 @item @b{Interpolate CR2 images} @*
1194 Enables interpolation of CR2 images.  Interpolation is required since the raw image in a
1195 CR2 file is a Bayer pattern.  The interpolation uses dcraw's built-in
1196 interpolation and is very slow.  This operation can be disabled and the
1197 @b{Interpolate Pixels} effect used instead for faster previewing.
1199 @cindex White balance, CR2 images
1200 @item @b{White balance CR2 images} @*
1201 This enables white balancing for CR2 images if interpolation is also enabled.
1202 This is because proper white balancing needs a blending of all 3 primary colors.
1203 White balance uses the camera's matrix which is contained in the CR2 file. @*
1204 Disabling white balancing is useful for operations involving dark frame
1205 subtraction.  The dark frame and the long exposure need to have the same color
1206 matrix. @*
1207 If you disable @b{Interpolate CR2 Images} and use the @b{Interpolate Pixels}
1208 effect, be aware the @b{Interpolate Pixels} effect always does both
1209 interpolation and white balancing using the camera's matrix, regardless of the
1210 settings in Preferences.  Dark frame subtraction needs to be performed before
1211 @b{Interpolate Pixels}.
1213 @cindex Video device driver
1214 @item @b{Video driver} @*
1215 Normally video on the timeline goes to the compositor window during both continuous
1216 playback and when the insertion point is repositioned.  Instead of sending
1217 video to the Compositor window, the video driver can be set to send video to
1218 another output device during continuous playback.  However, this does not affect where
1219 video is routed when the insertion point is repositioned. @*
1220 The video drivers and their parameters are described in the video drivers
1221 section.  @xref{Video drivers}.
1222 @end itemize
1224 @c cincvdoc_node_number_47
1225 @node Recording
1226 @section Recording
1227 @cindex Recording
1229 The parameters here expedite the @b{File->Record...} function by allowing the
1230 user to pre-configure the file format.  The file format is applied to all
1231 recordings.  Also set here is the hardware for recording, since the hardware
1232 determines the supported file format (in most cases).
1234 @menu
1235 * File format::
1236 * Audio in::
1237 * Video in::
1238 @end menu
1240 @c cincvdoc_node_number_48
1241 @node File format
1242 @subsection File format
1243 @cindex File format
1244 @cindex Format, file
1246 This determines the output file format for recordings.  It depends heavily on
1247 the type of driver used.  The menu selections are the same as the rendering interface.  See @xref{Rendering files}.
1248 The @b{Record audio tracks} toggle must be enabled to record audio.  The
1249 @b{Record video tracks} toggle must be enabled to record video.  The wrench
1250 button left of each toggle opens a configuration dialog in order to set the compression scheme (codec)
1251 for each audio and video output stream.  The audio and video is wrapped in a container format
1252 defined by the @b{File Format} menu.  Different wrappers may record audio only,
1253 video only, or both.
1255 Some video drivers can only record to a certain container.  DV, for example, can
1256 only record to Quicktime with DV as the video compression scheme.  If the video driver
1257 is changed, the file format may be updated to give the supported output.  If
1258 you change the file format to an unsupported format, it may not work with the
1259 video driver.
1261 @c cincvdoc_node_number_49
1262 @node Audio in
1263 @subsection Audio in
1264 @cindex Audio in
1266 These determine what happens when you record audio.
1268 @cindex Record driver
1269 @cindex Driver, record
1270 @cindex Device path
1271 @cindex Bits
1272 @itemize @bullet
1273 @item @b{Record driver} @*
1274 This is used for recording audio in the Record window.  It may be configured the same as
1275 the Record Driver for video if the audio and video are wrapped in the same
1276 stream.  Available parameters vary depending on the driver.  Note that the drivers
1277 are the same as those available in Preferences->Playback.
1278 @itemize @bullet
1279 @item @b{Device path} @*
1280 This is usually a file in the @file{/dev/} directory that controls the device.
1281 @item @b{Bits} @*
1282 The number of bits of precision Cinelerra should set the device for.  This
1283 sometimes has a figurative meaning.  Some sound drivers need to be set to 32
1284 bits to perform 24 bit recording and will not record anything when set to 24 bits.
1285 Some sound drivers need to be set to 24 bits for 24 bit recording.
1286 @item @b{Channels} @*
1287 The number of channels Cinelerra should set the device for.  Regardless of
1288 the number of channels in the project, the number of channels set here will be
1289 written to the device.  When this is set to 2 and the project has 1 channel you
1290 will hear sound through the left speaker and not centered as expected for a
1291 monaural project.  When this is set to 1 and the project has 2 channels you
1292 will hear the left channel centered and not 2 channels mixed together.
1293 @end itemize
1295 @cindex Samples to write at a time
1296 @item @b{Samples to write at a time} @*
1297 First, audio is read in small fragments from the device.  Then, many small fragments
1298 are combined into a large fragment before writing to disk.  The disk writing
1299 process is done in a different thread.  The value here determines how large the
1300 combination of fragments is for each disk write.
1302 @cindex Sample rate for recording
1303 @cindex Recording, sample rate for
1304 @item @b{Sample rate for recording} @*
1305 Regardless of what the project settings are, the value set here will be the sample rate used for
1306 recording.  The sample rate should be set to the highest value the audio device supports.
1307 @end itemize
1309 @c cincvdoc_node_number_50
1310 @node Video in
1311 @subsection Video in
1312 @cindex Video in
1314 These determine what happens when you record video.
1316 @cindex Record driver
1317 @cindex Driver, record
1318 @itemize @bullet
1319 @item @b{Record driver} @*
1320 This is used for recording video in the Record window.  It may be configured the same as
1321 the Record Driver for video if the audio and video are wrapped in the same
1322 container.  Available parameters vary depending on the driver.  Note that the drivers available
1323 are the as those available in Preferences->Playback.
1325 @cindex Frames to record to disk at a time
1326 @item @b{Frames to record to disk at a time} @*
1327 Frames are recorded in a pipeline.  First, frames are buffered in the device.
1328 Then, they are read into a larger buffer for writing to disk.  The disk writing
1329 is done in a separate thread from the device reading.  For certain codecs the
1330 disk writing uses multiple processors.  The value set here determines how many frames
1331 are written to disk at a time.
1333 @cindex Frames to buffer in device
1334 @item @b{Frames to buffer in device} @*
1335 This is the number of frames to store in the device before reading and determines
1336 how much latency there can be in the system before frames are dropped.
1338 @cindex Use software for positioning information
1339 @item @b{Use software for positioning information} @*
1340 Video uses audio for synchronization, but most soundcards do not give accurate
1341 position information.  Selecting this options makes Cinelerra calculate an estimation of audio position in
1342 software instead of hardware for synchronization.
1344 @cindex Sync drives automatically
1345 @item @b{Sync drives automatically} @*
1346 For high bitrate recording, the disk drives you use may be fast enough to store the data but
1347 your operating system may wait several minutes and stall as it writes several minutes of
1348 data at a time.  This forces the operating system to flush its buffers every second
1349 instead of every few minutes to produce slightly better real-time behavior.
1351 @cindex Size of captured frame
1352 @cindex Captured frame, size of
1353 @item @b{Size of captured frame} @*
1354 This is the size of the recorded frames in pixels.  It is independent of the project
1355 frame size because most video devices only record a fixed frame size.  If the
1356 frame size given here is not supported by the device, Cinelerra may crash.
1358 @cindex Frame rate for recording
1359 @cindex Recording, frame rate for
1360 @item @b{Frame rate for recording} @*
1361 The frame rate recorded is different from the project settings.  This sets the
1362 recorded frame rate.
1363 @end itemize
1365 @c cincvdoc_node_number_51
1366 @node Performance
1367 @section Performance
1368 @cindex Performance
1370 You will spend most of your time configuring this section.  The main focus of
1371 the performance section is rendering parameters not available in the rendering dialog.
1373 @cindex Cache items
1374 @itemize @bullet
1375 @item @b{Cache items} @*
1376 To speed up rendering, several assets are kept open simultaneously.  This
1377 determines how many are kept open.  A number too large may exhaust your memory
1378 pretty fast and result in a crash.  A number too small may result in slow
1379 playback as assets need to be reopened more frequently.
1381 @cindex Seconds to preroll renders
1382 @item @b{Seconds to preroll renders} @*
1383 Some effects need a certain amount of time to settle in.  Checking this option sets a number of
1384 seconds to render without writing to disk before the selected region is
1385 rendered.  When using the renderfarm, you will sometimes need to preroll to get
1386 seemless transitions between the jobs.  Every job in a renderfarm is prerolled
1387 by this value.  This does not affect background rendering, however.  Background
1388 rendering uses a different preroll value.
1390 @cindex Force single processor use
1391 @cindex SMP, force single processor use
1392 @item @b{Force single processor use} @*
1393 Cinelerra tries to use all processors on the system by default, but sometimes
1394 you will only want to use one processor, like in a renderfarm client.  This
1395 forces only one processor to be used.  In addition, the operating system usually
1396 uses the second processor for disk access.  So this option is really a
1397 1.25 processor mode.  The value of this parameter is used in renderfarm
1398 clients.
1399 @end itemize
1401 @menu
1402 * Background rendering::
1403 * Renderfarm::
1404 @end menu
1406 @c cincvdoc_node_number_52
1407 @node Background rendering
1408 @subsection Background rendering
1409 @cindex Background rendering
1410 @cindex Rendering, background
1412 Background rendering was originally conceived to allow HDTV effects to be
1413 displayed in real-time.  Background rendering causes temporary output to
1414 be rendered constantly while the timeline is being modified.  The temporary
1415 output is displayed during playback whenever possible.  This is useful for
1416 transitions and previewing effects that are too slow to display in
1417 real time.  If a renderfarm is enabled, the renderfarm is used
1418 for background rendering.  This gives you the potential for real-time effects if
1419 enough network bandwidth and CPU nodes exist.
1421 Background rendering is enabled in the @b{Performance} tab of the
1422 @b{Preferences} window.  It has one interactive function @b{Settings menu ->
1423 Set background render}.  This sets the point where background rendering starts
1424 up to the position of the insertion point.  If any video exists, a red bar appears in the time
1425 ruler showing what has been background rendered.
1427 It is often useful to insert an effect or a transition and then select
1428 @b{Settings menu -> Set background render} right before the effect to preview
1429 it in real time and full framerates.
1431 @cindex Frames per background rendering job
1432 @itemize @bullet
1433 @item @b{Frames per background rendering job} @*
1434 This only works if a renderfarm is being used; otherwise, background rendering
1435 creates a single job for the entire timeline.  The number of frames specified
1436 here is scaled to the relative CPU speed of rendering nodes and used in a
1437 single renderfarm job.  The optimum number is 10 - 30 since network bandwidth
1438 is used to initialize each job.
1440 @cindex Frames to preroll background
1441 @item @b{Frames to preroll background} @*
1442 This is the number of frames to render ahead of each background rendering job.
1443 Background rendering is degraded when preroll is used since the jobs are small.
1444 When using background rendering, this number is ideally 0.  Some effects may
1445 require 3 frames of preroll.
1447 @cindex Output for background rendering
1448 @item @b{Output for background rendering} @*
1449 Background rendering generates a sequence of image files in a certain
1450 directory.  This parameter determines the filename prefix of the image files.
1451 It should be on a fast disk, accessible to every node in the renderfarm by the
1452 same path.  Since hundreds of thousands of image files are usually created,
1453 @command{ls} commands will not work in the background rendering directory.  The
1454 @image{manual_images_en/magnify,7mm} browse button for this option normally will not
1455 work either, but the @image{manual_images_en/wrench,4.33mm} configuration button for
1456 this option works.
1458 @cindex File format
1459 @item @b{File format} @*
1460 The file format for background rendering has to be a sequence of images.  The
1461 format of the image sequences determines the quality and speed of playback.
1462 JPEG is good most of the time.
1463 @end itemize
1465 @c cincvdoc_node_number_53
1466 @node Renderfarm
1467 @subsection Renderfarm
1468 @cindex Renderfarm
1470 To use the renderfarm, set these options.  Ignore them for a standalone system
1472 @cindex Use render farm for rendering
1473 @itemize @bullet
1474 @item @b{Use render farm for rendering} @*
1475 When selected, all the @b{file->render} operations use the renderfarm.
1477 @cindex Nodes
1478 @item @b{Nodes} @*
1479 Displays all the nodes on the renderfarm and shows which ones are active.  Nodes are
1480 added by entering the host name of the node, verifying the value of @b{port}
1481 and selecting @b{add node}.  If you have hundreds of nodes, experienced
1482 users may be better off editing the
1483 @file{~/.bcast/.Cinelerra_rc} file rather than using configuration dialog.
1484 Remember that @file{.Cinelerra_rc} is overwritten whenever a copy of Cinelerra
1485 exits. @*
1486 Once nodes are created, select the @b{ON} column to activate and deactivate nodes.
1487 Nodes may be edited by highlighting a row and hitting @b{apply
1488 changes}.
1490 @cindex Hostname, renderfarm
1491 @item @b{Hostname} @*
1492 Edit the hostname of an existing node or enter the hostname of a new node here.
1494 @cindex Port, renderfarm
1495 @item @b{Port} @*
1496 Edit the port number of an existing node or enter the port number of a new node here.
1498 @cindex Node, replace
1499 @item @b{Replace node} @*
1500 When editing an existing node, select this to commit the changes to @b{hostname}
1501 and @b{port}.  The changes will not be committed if you do not click this button.
1503 @cindex Node, add a
1504 @item @b{Add node} @*
1505 Create a new node with the @b{hostname} and @b{port} settings.
1507 @cindex Node, delete a
1508 @item @b{Delete node} @*
1509 Deletes whatever node is highlighted in the @b{nodes} list.
1511 @cindex Sort nodes
1512 @cindex Nodes, sort
1513 @item @b{Sort nodes} @*
1514 Sorts the @b{nodes} list based on the hostname.
1516 @cindex Rates, reset
1517 @item @b{Reset rates} @*
1518 This sets the framerate for all the nodes to 0.  Frame rates are used to scale
1519 job sizes based on CPU speed of the node.  Frame rates are calculated only when
1520 renderfarm is enabled.
1522 @cindex Total jobs to create
1523 @cindex Jobs, total number to create
1524 @item @b{Total jobs to create} @*
1525 Determines the number of jobs to dispatch to the renderfarm.  The more jobs you
1526 create, the more finely balanced the renderfarm becomes. @*
1527 You can determine the total jobs to create by multiplying the number of nodes
1528 including the master node by some number.  Multiply them by 1 to have one job
1529 dispatched for every node.  Multiply them by 3 to have 3 jobs dispatched for
1530 every node.  If you have 10 slave nodes and one master node, specify 33 to have
1531 a well balanced renderfarm.
1532 @end itemize
1534 @c cincvdoc_node_number_54
1535 @node Interface
1536 @section Interface
1537 @cindex Interface
1539 These parameters affect purely how the user interface works.
1541 @cindex Index files, location
1542 @cindex Index files
1543 @itemize @bullet
1544 @item @b{Index files go here} @*
1545 Back in the days when 4 MB/sec was extremely fast for a hard drive, index
1546 files were introduced to speed up drawing the audio tracks.  This option
1547 determines where index files are placed on the hard drive.
1549 @cindex Index file, size of
1550 @item @b{Size of index file} @*
1551 This determines the size of an index file.  Larger index sizes allow smaller files
1552 to be drawn faster, while slowing down the drawing of large files.  Smaller
1553 index sizes allow large files to be drawn faster, while slowing down small
1554 files.
1556 @cindex Index files, number to keep
1557 @item @b{Number of index files to keep} @*
1558 To keep the index directory from becoming unruly, old index files are deleted.
1559 This determines the maximum number of index files to keep in the directory.
1561 @cindex Index files, delete all
1562 @item @b{Delete all indexes} @*
1563 When you change the index size or you want to clean out excess index files,
1564 this deletes all the index files.
1566 @cindex Time representation
1567 @item @b{Use hours:minutes:seconds.xxx} @*
1568 Various representations of time are given.  Select the most convenient one.
1569 The time representation can also be changed by @key{CTRL} clicking on the time
1570 ruler.
1572 @cindex Thumbnails
1573 @item @b{Use thumbnails} @*
1574 The Resource Window displays thumbnails of assets by default.  Drawing asset thumbnails can take a
1575 while.  This option disables thumbnail drawing.
1577 @cindex In/out points, clicking does what
1578 @item @b{Clicking in/out points does what} @*
1579 Cinelerra not only allows you to perform editing by dragging in/out points, but
1580 also defines three separate operations that occur when you drag an in/out
1581 point.  Here you can select the behavior of each mouse button.  The
1582 usage of each editing mode is described in editing.
1584 @cindex Meter, Min dB
1585 @item @b{Min dB for meter} @*
1586 Some sound sources have a lower noise threshold than others.  Everything below
1587 the noise threshold is meaningless.  This option sets the meters to clip below
1588 a certain level.  Consumer soundcards usually bottom out at -65.  Professional
1589 soundcards bottom out at -90.  @xref{Sound level meters window}.
1591 @cindex Meter, Max dB
1592 @item @b{Max dB for meter} @*
1593 This sets the maximum sound level represented by the sound meters.  No matter
1594 what this value is, no soundcard can play sound over 0 dB@.  This value is
1595 presented merely to show how far over the limit a sound wave is.  @xref{Sound
1596 level meters window}.
1598 @cindex Theme
1599 @item @b{Theme} @*
1600 Cinelerra supports variable themes.  Select one here and restart Cinelerra to
1601 see it.
1602 @end itemize
1604 @c cincvdoc_node_number_55
1605 @node About
1606 @section About window
1608 This section gives you information about the copyright, the time of the current
1609 build, the lack of a warranty, and the versions of some of the libraries.  Be
1610 sure to agree to the terms of the lack of the warranty.
1612 @c cincvdoc_node_number_56
1613 @node Project attributes
1614 @chapter Project attributes
1615 @cindex Project attributes
1616 @cindex Attributes of project
1618 @menu
1619 * Set format window::
1620 * Presets::
1621 * Audio attributes::
1622 * Video attributes::
1623 @end menu
1625 @c cincvdoc_node_number_57
1626 @node Set format window
1627 @section Set format window
1628 @cindex Set format window
1629 @cindex Format, window
1631 When you play media files in Cinelerra, the media files have a certain number
1632 of tracks, a certain frame size, a certain sample size, and so on and so forth.
1633 No matter what attributes the media file has, it is played back according
1634 to the project attributes.  So, if an audio file's sample rate is different than the
1635 project attributes, it is resampled.  In like fashion, if a video file's frame size is different
1636 than the project attributes, the video is composited on a black frame, either cropped
1637 or bordered with black.
1639 The project attributes are adjusted in @b{Settings->Set Format} and to a
1640 lesser extent in @b{File->New}.  When you adjust project settings in
1641 @b{file->new}, a new, empty timeline is created.  Every timeline created
1642 from this point on uses the same settings.  When you adjust settings in
1643 @b{settings->format}, media on the timeline is left unchanged. Also, every
1644 timeline created from this point uses the same settings.
1646 @center @image{manual_images_en/format,70mm}
1647 @center @b{Set format window}
1649 In addition to the traditional settings for sample rate, frame rate, frame
1650 size, Cinelerra uses some unusual settings like @b{channel positions, color
1651 model, and aspect ratio.}
1653 @c cincvdoc_node_number_58
1654 @node Presets
1655 @section Presets
1656 @cindex Presets
1658 Select an option from this menu to have all the project settings set to
1659 one of the known standards.
1661 @c cincvdoc_node_number_59
1662 @node Audio attributes
1663 @section Audio attributes
1664 @cindex Audio attributes
1666 @itemize @bullet
1667 @item @b{Tracks} @*
1668 Sets the number of audio tracks for the new project.  Tracks can
1669 be added or deleted later, but options are provided here for convenience.
1671 @item @b{Channels} @*
1672 Sets the number of audio channels for the new project.  The number
1673 of audio channels does not have to be the same as the number of tracks.
1675 @item @b{Samplerate} @*
1676 Sets the samplerate of the audio.  The project samplerate does not have to
1677 be the same as the media sample rate that you load.  Media is resampled to
1678 match the project sample rate.
1680 @item @b{Channels positions} @*
1681 The currently enabled audio channels and their positions in the user interface
1682 boxes are displayed in the channel position widget.
1683 @end itemize
1685 @center @image{manual_images_en/channelpositions,40mm}
1687 The channels are numbered.  When rendered, the output from channel 1 is
1688 rendered to the first output track in the file or the first soundcard channel
1689 of the soundcard.  Later channels are rendered to output tracks numbered
1690 consecutively.
1692 The audio channel positions correspond to where in the panning widgets each of
1693 the audio outputs is located.  The closer the panning position is to one of the audio
1694 outputs, the more signal that speaker gets.  Click on a speaker icon and drag
1695 to change the audio channel location.
1697 The speakers can be in any orientation.  A different speaker arrangement is
1698 stored for every number of audio channels since normally you do not want the
1699 same speaker arrangement for different numbers of channels.
1701 Channel positions is the only setting that does not affect the output
1702 necessarily.  Click on a speaker icon and drag to change the position of a
1703 channel.  It is merely a convenience, so that when more than two channels are used, the
1704 pan controls on the timeline can distinguish between them.  It has nothing to
1705 do with the actual arrangement of speakers.
1707 Different channels can be positioned very close together to make them have
1708 the same output.
1710 @c cincvdoc_node_number_60
1711 @node Video attributes
1712 @section Video attributes
1713 @cindex Video attributes
1715 @itemize @bullet
1716 @item @b{Tracks} @*
1717 Sets the number of video tracks the new project is assigned.  Tracks can
1718 be added or deleted later, but options are provided here for convenience.
1720 @item @b{Framerate} @*
1721 Sets the framerate of the video.  The project framerate does not have to be
1722 the same as an individual media file frame rate that you load.  Media is reframed to match the
1723 project framerate.
1725 @item @b{Canvas size} @*
1726 Sets the size of the video output.  In addition, each track also has its own frame
1727 size.  Initially, the @b{New} dialog creates video tracks whose size match
1728 the video output. The video track sizes can be changed later without
1729 changing the video output.
1731 @item @b{Aspect ratio} @*
1732 Sets the aspect ratio.  The aspect ratio is applied to the video output.
1733 The aspect ratio can be different than the ratio that results from the formula:
1734 h / v (the number of horizontal pixels divided into the number of vertical
1735 pixels).  If the aspect ratio differs from the results of the formula above,
1736 your output will be in non-square pixels.
1738 @item @b{Auto aspect ratio} @*
1739 If this option is checked, the @b{New} dialog always recalculates the @b{Aspect
1740 ratio} setting based upon the given @b{Canvas size}.  This ensures pixels are
1741 always square.
1743 @item @b{Color model} @*
1744 The project will be stored in the color model video intermediates selected in
1745 the dropdown. @*
1746 Color model is very important for video playback because video has the
1747 disadvantage of being very slow.  Although it is not noticeable, audio
1748 intermediates contain much more information than the audio on disk and the
1749 audio which is played.  Audio always uses the highest bandwidth intermediate
1750 because it is fast. @*
1751 Video intermediates must use the least amount of data for the required quality
1752 because it is slow, but video intermediates still use a higher bandwidth color
1753 model than video which is stored and video which is played.  This allows more
1754 processing to be done with less destruction of the original data. @*
1755 The video is stored on disk in one colormodel, usually a YUV
1756 derivative.  When played back, Cinelerra decompresses it from the file format
1757 directly into the format of the output device.  If effects are processed, Cinelerra
1758 decompresses the video into an intermediate colormodel first and then converts it to
1759 the format of the output device.  The selection
1760 of an intermediate colormodel determines how fast and accurate the effects are. @*
1761 Cinelerra colormodels are described using a certain packing order of components
1762 and a certain number of bits for each component.  The packing order is printed
1763 on the left and the bit allocation is printed on the right.
1764 @cindex RGB-888
1765 @itemize @bullet
1766 @item @b{RGB-888} @*
1767 This allocates 8 bits for the R, G, and B channels and no alpha.  This is
1768 normally used for uncompressed media with low dynamic range.
1769 @cindex RGBA-8888
1770 @item @b{RGBA-8888} @*
1771 This allocates an alpha channel to the 8 bit RGB colormodel.  It is used
1772 for overlaying multiple tracks.
1773 @cindex YUV-888
1774 @item @b{YUV-888} @*
1775 This allocates 8 bits for Y, U, and V@.  This is used for low dynamic range
1776 operations in which the media is compressed in the YUV color space.  Most
1777 compressed media is in YUV and this derivate allows video to be processed fast with the
1778 least color degradation.
1779 @cindex YUVA-8888
1780 @item @b{YUVA-8888} @*
1781 This allocates an alpha channel to the 8 bit YUV colormodel for transparency.
1782 @cindex RGB-Float
1783 @item @b{RGB-Float} @*
1784 This allocates a 32 bit float for the R, G, and B channels and no alpha.
1785 This is used for high dynamic range processing with no transparency.
1786 @cindex RGBA-Float
1787 @item @b{RGBA-Float} @*
1788 This adds a 32 bit float for alpha to RGB-Float.  This is used for high
1789 dynamic range processing with transparency.
1790 @end itemize
1791 @b{In order to do effects which involve alpha channels, a colormodel with an
1792 alpha channel must be selected}.  These are RGBA8888, YUVA8888, and RGBA Float.
1793 The 4 channel colormodels are slower than 3 channel colormodels,
1794 with the slowest being RGBA Float.  Some effects, like fade, work around the
1795 need for alpha channels while other effects, like chromakey, require an alpha
1796 channel to do anything, so it is a good idea to try the effect without alpha
1797 channels to see if it works before settling on an alpha channel and slowing it
1798 down. @*
1799 When using compressed footage, YUV colormodels are usually faster than RGB colormodels.
1800 They also destroy fewer colors than RGB colormodels.  If
1801 footage stored as JPEG or MPEG is processed many times in RGB, the colors will
1802 fade whereas they will not fade if processed in YUV@. @*
1803 Years of working with high dynamic range footage have shown floating point RGB
1804 to be the best format for high dynamic range.  16 bit integers were used
1805 in the past and were too lossy and slow for the amount of improvement. @*
1806 RGB float does not destroy information when used with YUV source footage and
1807 also supports brightness above 100%.  Be aware that some effects, like
1808 Histogram, still clip above 100% when in floating point.
1809 @end itemize
1811 @c cincvdoc_node_number_61
1812 @node Loading and saving files
1813 @chapter Loading and saving files
1814 @cindex Loading and saving files
1815 @cindex Files, loading and saving
1817 @menu
1818 * Supported file formats::     What formats Cinelerra can import and export
1819 * Loading files::              Loading all types of files
1820 * Loading the backup::         Recovering the session from before a crash
1821 * Saving files::               Saving edit decision lists
1822 * Merging projects::
1823 @end menu
1825 @c cincvdoc_node_number_62
1826 @node Supported file formats
1827 @section Supported file formats
1828 @cindex Supported file formats
1829 @cindex File format
1831 Here are most of the supported file formats and notes regarding their
1832 compression.  You may be able to load other formats not described here. @*
1833 The format of the file affects what Cinelerra does with it.  Edit decision
1834 lists stored in XML save the project settings.  Formats which contain media but no edit
1835 decisions just add data to the tracks.  If your project sample rate is 48 kHz
1836 and you load a sound file with 96khz, you will still be playing it at 48 kHz.  If
1837 you load an EDL file at 96khz and the current project sample rate is 48 kHz,
1838 you will change it to 96 kHz. @*
1839 Some file formats are very slow to display on the timeline.  These usually have
1840 video which is highly compressed.  Drawing highly compressed video thumbnails on the timeline (picons) can
1841 be very slow.  Disable picon drawing for these files with the @b{draw media}
1842 toggle to speed up operations.
1844 @center @image{manual_images_en/track_attributes}
1845 @center @b{Track attributes}
1847 Supported file formats are currently:
1848 @itemize @bullet
1849 @item WAV
1850 @item PCM
1851 @item AIFF
1852 @item AC3 audio
1853 @end itemize
1855 @menu
1856 * Quicktime::
1857 * MPEG-4 audio::
1858 * Images sequence::
1859 * Still images::
1860 * AVI::
1861 * MPEG files containing video::
1862 * DVD movies::
1863 * MPEG 1 audio::
1864 * Ogg Theora/Vorbis::
1865 * Edit decision list::
1866 @end menu
1868 @c cincvdoc_node_number_63
1869 @node Quicktime
1870 @subsection Quicktime
1871 @cindex Quicktime
1873 Quicktime is not the standard for UNIX but we use it because it is well
1874 documented.  All of the Quicktime movies on the internet are compressed.
1875 Cinelerra supports some compressed Quicktime movies.  If Cinelerra
1876 crashes when loading a Quicktime movie, it is most likely because the format
1877 was not supported. @*
1878 Quicktime is a container for two streams, a video stream and an audio stream.  These
1879 streams are compressed using separate encoding schemes.  The preferred encoding for
1880 Quicktime output is MPEG-4 Video and MPEG-4 Audio.  This format is compatible in the
1881 commercial players for Windows, has good compression quality and good output quality.  For better
1882 compression, use H-264 video.  Unfortunately H-264 decoding is so slow it can
1883 not play very large frame sizes. @*
1884 Cinelerra supports two non-standard codecs: Dual MPEG-4 video and Dual H.264
1885 video.  These will not play in anything but Cinelerra and XMovie.  They are
1886 designed for movies where the frames have been divided into two fields, each
1887 field displayed sequentially.  The dual codecs interleave two video streams to
1888 improve efficiency without requiring major changes to the player.
1890 @c cincvdoc_node_number_64
1891 @node MPEG-4 audio
1892 @subsection MPEG-4 audio
1893 @cindex MPEG-4 audio
1895 This is the same as Quicktime with MPEG-4 Audio as the audio codec.
1897 @c cincvdoc_node_number_65
1898 @node Images sequence
1899 @subsection Images sequence
1900 @cindex Images sequence
1902 Rendering an images sequence is not the same as rendering a single image.  When
1903 rendering an images sequence Cinelerra generates a table of contents file for
1904 the images sequence and creates a different image file for every timeline
1905 position.  To get better performance, the table of contents can be loaded instead of the individual images.
1906 To learn more about the different image formats
1907 supported in an images sequence, read about still images.
1909 @c cincvdoc_node_number_66
1910 @node Still images
1911 @subsection Still images
1912 @cindex Still images
1913 @cindex Images, still
1915 @menu
1916 * Loading still images::
1917 * Still images size::
1918 * Open EXR images::
1919 * Raw digital camera images::
1920 @end menu
1922 @c cincvdoc_node_number_67
1923 @node Loading still images
1924 @subsubsection Loading still images
1925 @cindex Loading still images
1926 @cindex Still images, loading
1928 Rendering a single image causes the image file to be overwritten for every
1929 timeline position.  No table of contents is created.  When loaded, the image
1930 takes up one frame in length.  To view the image, zoom in time on the timeline so you can see the single frame.  To extend the
1931 length of the image, drag it just as you would do with regular video media.  You can drag a still
1932 image as much as you want.  Images in Cinelerra have the ability to be dragged to an infinite length. @*
1933 Cinelerra lets you define the initial size of the loaded images.  The parameter
1934 is set in the Images section of the @b{settings preferences recording window}. @*
1935 Unless your original material comes from a digital source (like a digital photo
1936 camera), the first thing you have to do before you can use it is to somehow
1937 capture the assets into a usable digital medium. @*
1938 For old photos, paper maps, drawings or diagrams, you might have to use a scan
1939 them into a file format like PNG, TIF, TGA or JPG files by using a digital scanner.  You might
1940 want to use Gimp to post-process the images, clean damaged areas or color
1941 correct the assets. @*
1942 If your assets come from a digital source like a digital camera or a screen
1943 capture, be sure to capture the material using the best resolution possible.
1944 This will allow you to get the best quality output from your Cinelerra project.
1946 @c cincvdoc_node_number_68
1947 @node Still images size
1948 @subsubsection Still images size
1949 @cindex Still images size
1951 @b{Important:} Imported images always stay at their original size.  Therefore,
1952 you have to take into account the aspect ratio of your video in Cinelerra and
1953 rescale your pictures before importing them in Cinelerra. @*
1954 For example, PAL images aspect ratio is 4/3, but 720x576 is 5/4. For your
1955 imported images to be displayed correctly, you have to rescale their horizontal
1956 size: @*
1957 new horizontal size=@math{(5 / 4) / (4 / 3)} x original horizontal size @*
1958 For PAL videos, you have to multiply the horizontal size of the pictures you
1959 want to import by a factor of 0.9375. @*
1960 Here is a small shell script which, when ran from a folder containing jpg
1961 images, resize those images and put the new images in a @file{resized} folder:
1962 @verbatim
1963 #/bin/sh
1964 mkdir resized
1965 for element in `ls . | grep jpg`;
1967     size=`identify ${element}`
1968     width=`echo ${size} | sed '+s+.*JPEG ++' | sed '+s+x.*++'`
1969     height=`echo ${size} | sed '+s+.*JPEG [0-9]*x++' | sed '+s+DirectClass.*++'`
1970     let new_width=${width}*9375/10000
1971     convert -resize ${new_width}x${height} -quality 100 ${element} resized/${element}
1972 done
1973 @end verbatim
1975 @c cincvdoc_node_number_69
1976 @node Open EXR images
1977 @subsubsection Open EXR images
1978 @cindex EXR images
1979 @cindex Images, EXR
1981 You may not know about Open EXR@.  This format stores floating point RGB images.
1982 It also supports a small amount of compression.  Projects which render to EXR
1983 should be in a floating point color model to take advantage of the benefits of EXR @xref{Project
1984 attributes}.  Several compression options are available for EXR@.
1986 @cindex Compression
1987 @cindex PIZ compression
1988 @itemize @bullet
1989 @item @b{PIZ:} Lossless wavelet compression.  This is the best compression.
1990 @cindex ZIP compression
1991 @item @b{ZIP:} Lossless gzip algorithm.
1992 @cindex RLE compression
1993 @item @b{RLE:} Lossless run length encoding.  This is the fastest, but worst
1994 compression.
1995 @cindex PXR24 compression
1996 @item @b{PXR24:} Lossy compression where the floating point numbers are
1997 converted to 24 bits and compressed with gzip.
1998 @end itemize
2000 Select @b{Use Alpha} if the project colormodel has an alpha channel and you
2001 want to retain it in the file.  Otherwise the primary colors are multiplied by
2002 the alpha channel.
2004 @c cincvdoc_node_number_70
2005 @node Raw digital camera images
2006 @subsubsection Raw digital camera images
2007 @cindex Raw digital camera images
2008 @cindex Camera images, raw digital
2010 RAW digital camera images are a special kind of image file that Cinelerra only
2011 imports.  Once they are on the timeline, these must be processed in a floating point color space.
2012 Raw images from Canon cameras are the only ones tested.  They
2013 need to have the @b{Gamma} effect applied to correct gamma.  Because raw images
2014 take a long time to interpolate, they are usually viewed first in a proxy file
2015 and then touched up.
2017 First apply the Gamma effect to a track of raw images and set it to
2018 @b{automatic} with @b{0.6} gamma.  Then render the timeline to a Quicktime JPEG
2019 file.  Append the Quicktime JPEG file in a new track and disable playback of
2020 the old track.  Now the gamma corrected copy of each raw image can be previewed
2021 relatively fast in the same timeline position as the original image.
2023 @c cincvdoc_node_number_71
2024 @node AVI
2025 @subsection AVI
2026 @cindex AVI
2028 Because AVI (Audio-Video Interleave) is so fragmented with varied audio and
2029 video codecs, you may not be able to play all AVI formatted files.
2031 @c cincvdoc_node_number_72
2032 @node MPEG files containing video
2033 @subsection MPEG files containing video
2034 @cindex MPEG files containing video
2035 @cindex mpeg3toc
2037 MPEG files containing video can be loaded directly into Cinelerra.  If the file
2038 is supported, a table of contents is built.  If the file is unsupported, it
2039 usually crashes or shows very short tracks.  Unfortunately, this method of
2040 loading MPEG files is not good enough if you intend to use the files in a
2041 renderfarm. @*
2042 To use MPEG files in a renderfarm, you need to run mpeg3toc in order to generate a table
2043 of contents for the file and then load the table of contents.  mpeg3toc needs the
2044 absolute path of the MPEG file.  If you do not use an absolute path, it assumes that
2045 the MPEG file is in the same directory that Cinelerra is run from. @*
2046 MPEG streams are structured into multiple tracks.  Each track can be video or
2047 audio.  Each audio track can have 1-6 channels.  Cinelerra converts each
2048 channel of audio into a track.
2050 @cindex mpeg2enc
2051 @b{Notes on mpeg video encoding:} @*
2052 MPEG video encoding is done separately from MPEG audio encoding.  In MPEG video
2053 there are two colormodels.  The YUV 4:2:0 colormodel is encoded by a highly
2054 optimized version of mpeg2enc with presets for standard consumer electronics.
2055 In the process of optimizing mpeg2enc, they got rid of YUV 4:2:2 encoding.  The
2056 YUV 4:2:2 colormodel is encoded by a less optimized version of mpeg2enc. @*
2057 YUV 4:2:2 encoding was kept around because the NTSC version of DV video loses
2058 too much quality when transferred to YUV 4:2:0.  This DV video must be
2059 transferred to YUV 4:2:2. @*
2060 When encoding YUV 4:2:0, the bitrate parameter changes meaning depending on
2061 whether the bitrate or quantization is fixed.  If the bitrate is fixed, it is
2062 the target bitrate.  If the quantization is fixed, it is the maximum bitrate
2063 allowed.  This is a quirk of the mpeg2enc version.
2065 @c cincvdoc_node_number_73
2066 @node DVD movies
2067 @subsection DVD movies
2068 @cindex DVD movies
2069 @cindex IFO file
2071 DVD are split into a number of programs, each identified by a unique
2072 @file{IFO} file.  If you want to load a DVD, find the corresponding @file{IFO}
2073 file for the program of interest.  Load the IFO file directly and a table of
2074 contents will be built.  Alternatively for renderfarm usage, a table of
2075 contents can be created separately. @*
2076 @cindex mpeg3toc
2077 Run: @command{mpeg3toc -v /cdrom/video_ts/vts_01_0.ifo dvd.toc} @*
2078 or something similar.  Then load @file{dvd.toc}.
2080 @c cincvdoc_node_number_74
2081 @node MPEG 1 audio
2082 @subsection MPEG 1 audio
2083 @cindex MPEG 1 audio
2085 These are .mp2 and .mp3 files.  If the files are encoded using a fixed bitrate, they can be loaded directly
2086 with no table of contents.  Variable bitrate streams need to have a table of
2087 contents created with mpeg3toc.
2089 @c cincvdoc_node_number_75
2090 @node Ogg Theora/Vorbis
2091 @subsection Ogg Theora/Vorbis
2092 @cindex Ogg Theora/Vorbis
2094 The OGG format is an antiquated but supposedly unpatented way of compressing
2095 audio and video.  The quality is not as good as H.264 or MPEG-4 Audio.  In
2096 reality, anyone with enough money and desire can find a patent violation so the
2097 justification for OGG is questionable.
2099 @c cincvdoc_node_number_76
2100 @node Edit decision list
2101 @subsection Edit decision list
2102 @cindex EDL
2104 Edit decision lists are generated by Cinelerra for storing projects.  EDL files end
2105 in .xml.  When loaded, they change the attributes of the current project.  Because edit decision
2106 lists consist of text, they can be edited in a text editor.
2108 @c cincvdoc_node_number_77
2109 @node Loading files
2110 @section Loading files
2111 @cindex Loading files
2112 @cindex Files, loading
2114 All data that you work with in Cinelerra is acquired either by @b{recording
2115 from a device} or by @b{loading from disk}.  This section describes loading. @*
2116 The loading and playing of files is just as you would expect.  Just go to
2117 @b{file->Load}, select a file for loading, and click @b{ok}.  Click the forward
2118 play button and it should start playing, regardless of whether a progress bar
2119 has appeared.
2121 @center @image{manual_images_en/load, 80mm}
2122 @center @b{The load window}
2124 If the file is a still image, the project's attributes are not changed and the
2125 first frame of the track becomes the image.  If the file has audio, Cinelerra
2126 may build an index file in order to speed up drawing.  You can edit and play the
2127 file while the index file is being built.
2129 @menu
2130 * Insertion strategy::
2131 * Loading multiple files::
2132 * Loading files from the command prompt::
2133 * Filtering files by extension::
2134 * Loading other formats::
2135 @end menu
2137 @c cincvdoc_node_number_78
2138 @node Insertion strategy
2139 @subsection Insertion strategy
2140 @cindex Insertion strategy
2141 @cindex Strategy, insertion
2143 Usually, three things happen when you load a file:
2144 @enumerate 1
2145 @item the existing project is cleared from the screen
2146 @item the project's attributes are changed to match the file's attributes
2147 @item the new file's tracks are created in the timeline
2148 @end enumerate
2149 However, Cinelerra lets you change what happens when you load a file. @*
2150 In the file selection box go to the @b{Insertion strategy} box and select it.
2151 Each of these options loads the file a different way.
2152 @itemize @bullet
2153 @item @b{Replace current project} @*
2154 All tracks in the current project are deleted and new tracks are created to
2155 match the source.  Project attributes are only changed when loading XML@.  If
2156 multiple files are selected, Cinelerra adds new tracks for each file.
2158 @item @b{Replace current project and concatenate tracks} @*
2159 Same as replace current project, except that if multiple files are selected, Cinelerra
2160 will concatenates the tracks of each file, one after another, in alphanumeric order.
2162 @item @b{Append in new tracks} @*
2163 The current project is not deleted and new tracks are created for the
2164 source.
2166 @item @b{Concatenate to existing tracks} @*
2167 The current project is not deleted and new files are concatenated to the
2168 existing tracks.
2170 @item @b{Paste at insertion point} @*
2171 The file is pasted into the timeline at the insertion point.
2173 @item @b{Create new resources only} @*
2174 The timeline is unchanged and new resources are created in the Resource
2175 Window.
2176 @end itemize
2178 The insertion strategy is a recurring option in many of Cinelerra's functions.
2179 In each place the options do the same thing.  Using these options, you can almost
2180 do all your editing by loading files.  If you load files by passing command
2181 line arguments to Cinelerra, the files are loaded with @b{Replace current
2182 project} rules.
2184 @c cincvdoc_node_number_79
2185 @node Loading multiple files
2186 @subsection Loading multiple files
2187 @cindex Loading multiple files
2188 @cindex Files, loading multiple
2190 In the file selection box go to the list of files.  Select a file.  Go to
2191 another file and select it while holding down @key{CTRL}.  This selects one
2192 additional file.  Go to another file and select it while holding down
2193 @key{SHIFT}.  This selects every intervening file.  This behavior is available
2194 in most every list box. @*
2195 Use this method and the @b{Concatenate to existing tracks} insertion strategy
2196 to create an images slideshow or a song playlist.
2198 @c cincvdoc_node_number_80
2199 @node Loading files from the command prompt
2200 @subsection Loading files from the command prompt
2201 @cindex Loading files from the command prompt
2202 @cindex Command prompt, loading files from the
2204 Another way to load files is to pass the filenames as arguments on the command
2205 line. @*
2206 @command{cinelerra myvideo.mov myothervideo.mov} @*
2207 This creates new tracks for every file and starts the program with all the
2208 arguments loaded.
2210 @c cincvdoc_node_number_81
2211 @node Filtering files by extension
2212 @subsection Filtering files by extension
2213 @cindex Filtering files by extension
2214 @cindex Files, extension
2215 @cindex Extension, filtering files by
2217 If there are too many files in your media directory, it can be difficult to
2218 find the file you want.  For this purpose, the @b{load
2219 window} allows you to filter which files are displayed in the list box by extension
2220 name. @*
2221 Click the dropdown box (right below the file name text box)
2222 and select the file extension of your media (i.e.  mpg,
2223 mov, mp3, avi, etc).  The file list now shows only files with the selected
2224 extension.
2226 @c cincvdoc_node_number_82
2227 @node Loading other formats
2228 @subsection Loading other formats
2229 @cindex Loading other formats
2230 @cindex Other formats, loading
2232 If you can not load a particular kind of video clip and do not have the
2233 original source file, you will have to convert it to a format supported by Cinelerra.
2235 @itemize @bullet
2236 @item @b{ffmpeg} @*
2237 Syntaxis: @*
2238 @command{ffmpeg -sameq -i ORIGINAL.avi new_video.mpeg} @*
2239 The @option{-sameq} option maintains the original quality.
2241 @item @b{mjpegtools} @*
2242 Syntaxis: @*
2243 Video: @command{lav2yuv original.avi | mpeg2enc -o output.m1v} @*
2244 Audio: @command{lav2wav original.avi | mp2enc -o output.mp2} @*
2245 Mixing audio & video: @command{mplex output.mp2 output.m1v -o new_video.m1v}
2247 @item @b{mencoder} @*
2248 First option: @*
2249 @command{mencoder INPUT_FILE.avi -ovc lavc -lavcopts vcodec=mpeg4:
2250 vhq:vbitrate=300 -oac mp3lame -lameopts br=64:vol=1 -o OUTPUT_FILE.avi} @*
2251 Second option: @*
2252 @command{mencoder input.avi -ovc rawyuv -oac copy -o output.avi}
2254 @item @b{dv-utils} @*
2255 Syntaxis: @*
2256 @command{dv2dv -o qt input_file.avi output_file.qt}
2258 @item @b{Transcode} @*
2259 First option: @*
2260 @command{transcode -i test.avi -o test_divx4mp3.avi -y divx4} @*
2261 Second option: @*
2262 @command{transcode -i test.mov -x mplayer -o salida.mpg -y yuv4mpeg} @*
2263 More information about the available transcode options can be found at: @*
2264 @uref{http://www.theorie.physik.uni-goettingen.de/~ostreich/transcode}
2265 @end itemize
2267 @c cincvdoc_node_number_83
2268 @node Loading the backup
2269 @section Loading the backup
2270 @cindex Loading the backup
2271 @cindex Backup, loading the
2273 There is one special XML file on disk at all times.  After every editing
2274 operation, Cinelerra saves the current project to a backup in
2275 @file{$HOME/.bcast/backup.xml}.  In the event of a crash, the first thing you should do
2276 after restarting Cinelerra is select @b{file->load backup} in order to load the backup.
2277 This will start Cinelerra at the point in your editing operations directly before the program
2278 crashed.  It is important after a crash to restart Cinelerra
2279 without performing any editing operations as you will overwrite the backup.
2281 @c cincvdoc_node_number_84
2282 @node Saving files
2283 @section Saving files
2284 @cindex Saving files
2285 @cindex Files, saving
2286 @cindex Files, XML
2287 @cindex XML files
2289 When Cinelerra saves a file, it saves an edit decision list of the current
2290 project but does not save any media.  Go to @b{File->save as...}.  Select a file
2291 to overwrite or enter a new file.  Cinelerra automatically concatenates
2292 @samp{.xml} to the filename if no @samp{.xml} extension is given.
2294 The saved file contains all the project settings and locations of every edit.
2295 Instead of media, the file contains pointers to the original media files on disk.
2297 For each media file, the XML file stores either an absolute path or just the
2298 relative path.  If the media is in the same directory as the XML file, a
2299 relative path is saved.  If it is in a different directory, an absolute path is
2300 saved.
2302 In order to move XML files around without breaking the media linkages, you
2303 need either to keep the media in the same directory as XML file forever or save
2304 the XML file in a different directory than the media and not move the media
2305 ever again.
2307 If you want to create an audio playlist and burn it on a CD-ROM, save the XML
2308 file in the same directory as the audio files and burn the entire directory.
2309 This keeps the media paths relative.
2311 XML files are useful in saving the current state of Cinelerra before retiring from an editing session.
2312 XML files are specific to
2313 Cinelerra only.  You can not play XML files in a dedicated movie player.  Real-time
2314 effects in an XML file have to be re-synthesized every time you play it back.
2315 The XML file also requires you to maintain copies of all the source assets on
2316 hard disk, which can take up space and cost a lot of electricity to spin.
2317 Render your projects to a final format for more persistent storage of the output.
2319 @c cincvdoc_node_number_85
2320 @node Merging projects
2321 @section Merging projects
2322 @cindex Merging projects
2323 @cindex Projects, merging
2325 To merge several separate projects into one big one :
2326 @enumerate 1
2327 @item Open cinelerra
2328 @item Load project A
2329 @item Open a second copy of cinelerra
2330 @item Load project B
2331 @item Cut and paste from A to B
2332 @end enumerate
2334 @c cincvdoc_node_number_86
2335 @node Program window
2336 @chapter Program window
2337 @cindex Program window
2339 @menu
2340 * Navigating the program window::
2341 * Editing::                           Moving the media in time.
2342 @end menu
2344 This contains the timeline and the entry point for all menu driven operations.
2345 The timeline consists of a vertical stack of tracks with a horizontal
2346 representation of time.  This defines the output of rendering operations and
2347 what is saved when you save files.  To the left of the timeline is the patchbay which
2348 contains options affecting each track.
2350 @center @image{manual_images_en/program_insertion_point,120mm}
2351 @center @b{The timeline}
2353 Under the @b{Window} menu, you will find options that affect the main windows.
2354 @b{default positions} repositions all the windows to a 4 screen editing
2355 configuration.  On dual headed displays, the @b{default positions} operation
2356 fills only one monitor with windows.
2358 @c cincvdoc_node_number_87
2359 @node Navigating the program window
2360 @section Navigating the program window
2361 @cindex Navigating the program window
2362 @cindex Program window, navigating the
2364 The program window contains many features for navigation and displays the
2365 timeline as it is structured in memory: tracks stacked vertically and extending
2366 across time horizontal.  The horizontal scroll bar allows you to scan across
2367 time.  The vertical scroll bar allows you to scan across tracks.
2369 @menu
2370 * Video tracks::
2371 * Audio tracks::
2372 * Track navigation::
2373 * The track popup menu::
2374 * The insertion point::
2375 * The in/out points::
2376 * Using labels in the program window::
2377 @end menu
2379 @c cincvdoc_node_number_88
2380 @node Video tracks
2381 @subsection Video tracks
2382 @cindex Video tracks
2383 @cindex Tracks, video
2385 @center @image{manual_images_en/track_video,120mm}
2386 @center @b{A video track}
2388 Video tracks represent the duration of your videos and clips, just as if you placed real
2389 photographic film stock end-to-end on a table.  The individual images you see on the
2390 track are samples of what is located at that particular instant on the timeline.
2392 @c cincvdoc_node_number_89
2393 @node Audio tracks
2394 @subsection Audio tracks
2395 @cindex Audio tracks
2396 @cindex Tracks, audio
2398 @center @image{manual_images_en/track_audio,120mm}
2399 @center @b{An audio track}
2401 Audio tracks represent your sound media as an audio waveform.  Following the film
2402 analogy, it would be as if you "viewed" magnetic tape horizontally on your
2403 table. @*
2404 You can adjust the horizontal and vertical magnification of the tracks, using
2405 the @b{zoom panel bar}. @*
2406 You can adjust the magnification of the audio "waveform" display using the
2407 @b{zoom panel bar}. @*
2408 The controls to the left of the tracks are called the @b{patch bay}.  The patch bay is
2409 used to control the behavior of the tracks.
2411 @c cincvdoc_node_number_90
2412 @node Track navigation
2413 @subsection Track navigation
2414 @cindex Track navigation
2415 @cindex Navigation, track
2417 Track Navigation involves both selecting a specific audio or video track and
2418 moving to a certain time in the track.  The program window contains many
2419 features for navigation and displays the timeline as it is structured in
2420 memory.
2422 The horizontal scroll bar allows you to scan across time.
2424 The vertical scroll bar allows you to scan across tracks.
2426 In addition to the graphical tools, you may also use the keyboard
2427 to navigate.  As a general rule, keyboard navigation is faster than navigation
2428 with a mouse.
2429 Use @kbd{PAGE UP} and @kbd{PAGE DOWN} to scroll up and down the
2430 tracks.
2432 You will often need to scroll beyond the end of the timeline, but the scrollbars
2433 will not let you do it.  Instead, use the RIGHT arrow to scroll past the end of
2434 timeline.
2436 Use the @key{HOME} and @key{END} keys to instantly go to the beginning or end
2437 of the timeline.  In @b{I-beam} mode, hold down @key{SHIFT} while pressing
2438 @key{HOME} or @key{END} in order to select the region of the timeline between the
2439 insertion point and the key pressed.
2441 Below the timeline, you will find the zoom panel.  The zoom panel contains values
2442 for @b{sample zoom}, @b{amplitude}, @b{track zoom}, and @b{curve zoom}.  In addition
2443 to the scrollbars, these values are the main tools for positioning the
2444 timeline.
2446 @center @image{manual_images_en/zoompanel,100mm}
2448 Changing the @b{sample zoom} causes the unit of time displayed in the timeline to change size.  It
2449 allows you to view your media all the way from individual frames to the
2450 entire length of your project.  The higher the setting, the more frames you can see per
2451 screen.  @b{If your mouse has a wheel and it works in X11, mouseover the tumblers
2452 and use the wheel to zoom in and out.}
2454 @cindex Amplitude
2455 The @b{amplitude} only affects audio.  It determines how large the waveform appears if
2456 the waveform is drawn.
2458 @cindex Track zoom
2459 The @b{track zoom} affects all tracks.  It determines the height of each track.
2460 If you change the track zoom, the amplitude zoom compensates so that the audio waveforms
2461 look proportional.
2463 @cindex Curve zoom
2464 The @b{curve zoom} affects the curves in all the tracks.  It determines the
2465 amplitude and offset of the curves.  The tumbler changes curve amplitude, but
2466 the only way to curve offset is to use the @b{fit curves} button.
2467 @image{manual_images_en/fit_curves}
2469 Use the @kbd{LEFT} and @kbd{RIGHT} arrows to move across time in small
2470 increments.  You will often need to scroll beyond the end of the timeline, but
2471 scrollbars will not let you do this.  Instead, use the @kbd{RIGHT} arrow to scroll
2472 past the end of timeline.
2474 Use the @kbd{UP} and @kbd{DOWN} arrows to change the sample zoom by a power of
2475 two.
2477 @kbd{CTRL-UP} and @kbd{CTRL-DOWN} cause the amplitude zoom to change.
2479 @kbd{CTRL-PGUP} and @kbd{CTRL-PGDOWN} cause the track zoom to change.
2481 @kbd{ALT-UP} and @kbd{ALT-DOWN} cause the curve amplitude to change.
2483 @c cincvdoc_node_number_91
2484 @node The track popup menu
2485 @subsection The track popup menu
2486 @cindex The track popup menu
2488 Each Track has a popup menu.  To activate the @b{track popup menu}, RIGHT-click
2489 on the track.  The popup menu affects the track whether the track is armed on the
2490 @b{patch bay} or not.  The Track Menu contains a number of options:
2491 @itemize @bullet
2492 @item Attach Effect - opens a dialog box of effects applicable to the type of track
2493 @item Move up - moves the selected track up in the stack.
2494 @item Move down - moves the selected track down in the stack.
2495 @item Delete track - removes the track from the program
2496 @item Add Track - adds a track of the same media type (audio/video) as the one
2497 selected.
2498 @item Resize Track - resizes the track
2499 @item Match Output - Size resizes the track to match the current output size
2500 @end itemize
2502 @c cincvdoc_node_number_92
2503 @node The insertion point
2504 @subsection The insertion point
2505 @cindex Insertion point
2507 The first time you start Cinelerra, you will see a flashing insertion point in the program window.
2508 Analogous to the cursor on your word processor, the
2509 insertion point marks the place on the timeline where the next activity on the
2510 program will begin.  It is also the starting point of all playback operations.
2511 When rendering, it defines the region of the timeline to be rendered.
2513 @center @image{manual_images_en/program_insertion_point,100mm}
2514 @center @b{The insertion point on the main program,}
2515 @center @b{marked by the vertical hair-line at the 00:00.500 point}
2517 Normally, the insertion point is moved by clicking inside the timebar.  Any
2518 region of the timebar not obscured by labels and in or out points is a hotspot
2519 for repositioning the insertion point.
2521 @center @image{manual_images_en/main_timebar,160mm}
2522 @center @b{The main timebar}
2524 Depending on the mode of operation, the insertion point can be moved by clicking in the timeline itself.
2525 The insertion point has two modes of operation:
2526 @itemize @bullet
2527 @item drag and drop mode
2528 @item cut and paste mode
2529 @end itemize
2531 The mode of operation is determined by selecting the arrow or the i-beam in the
2532 buttonbar.
2534 @center @image{manual_images_en/editing_mode,15mm}
2535 @center @b{The editing mode buttons}
2537 @cindex Drag and drop mode
2538 @cindex Mode, drag and drop
2539 If the arrow is highlighted, it enables @b{drag and drop} mode.  In drag and
2540 drop mode, clicking in the timeline does not reposition the insertion point.
2541 Instead, it selects an entire edit.  Dragging in the timeline repositions the
2542 edit, snapping it to other edit boundaries.  This is useful for
2543 reordering audio playlists and moving effects around.
2545 @cindex Cut and paste mode
2546 @cindex Mode, cut and paste
2547 If the i-beam is highlighted it enables @b{cut and paste mode}.  In cut and
2548 paste mode, clicking in the timeline repositions the insertion point.  Dragging
2549 in the timeline highlights a region.  The highlighted region becomes the
2550 playback range during the next playback operation, the rendered range during
2551 the next render operation, and the region affected by cut and paste operations.
2553 @center @image{manual_images_en/program_highlight,100mm}
2554 @center @b{Tracks with highlighted area, shown inside the green area}
2556 @b{SHIFT-clicking} in the timeline extends the highlighted region.
2558 @b{Double-clicking} in the timeline selects the entire edit the
2559 cursor is over.
2561 When moving the insertion point and selecting regions,
2562 the positions are either aligned to frames or aligned to samples.  When editing
2563 video, you will want to align to frames.  When editing audio you will want to
2564 align to samples.  Select your preference by using @b{settings->align cursor on frames}.
2566 If the highlighted region is the region affected by cut and paste operations,
2567 how do I cut and paste in @b{drag and drop} mode?  In this case, you need to set
2568 @b{in/out points} to define an affected region.
2570 @c cincvdoc_node_number_93
2571 @node The in/out points
2572 @subsection The in/out points
2573 @cindex In/out points
2575 In both editing modes, you can set in/out points.  The in/out points define the
2576 affected region.  In drag and drop mode, they are the only way to define an
2577 affected region.  In both cut and paste mode and drag and drop mode, the
2578 highlighted area overrides the in/out points.  If a highlighted area and in/out
2579 points are set, the highlighted area is affected by editing operations and the
2580 in/out points are ignored.  If no region is highlighted, the in/out points are
2581 used.
2583 Normally, in/out points do not affect the playback region. The in/out points
2584 determine the playback region only if you hold down @key{CTRL} while issuing a
2585 playback command.
2587 To set in/out points, go to the timebar and position the insertion point
2588 somewhere.  Select the @image{manual_images_en/in_point_button,5mm} @b{in point button}.
2589 Go to a position after the in point and click the
2590 @image{manual_images_en/out_point_button,5mm} @b{out point button}.
2592 @center @image{manual_images_en/inout_points,160mm}
2593 @center @b{Timebar with in/out points set}.
2595 If you select either the in point or the out point, the insertion point will jump to
2596 that location.  After selecting an in point, if you click the @b{in point button}
2597 the in point will be deleted.  After selecting an out point, if you click the
2598 @b{out point button} the out point will be deleted.
2600 If you select a region somewhere else while in/out points already exist, the
2601 existing points will be repositioned when you click the in/out buttons.
2603 @b{SHIFT-clicking} on an in/out point highlights the region between the
2604 insertion point and that in/out point.
2606 Instead of using the button bar, you can use the @kbd{[} and @kbd{]} keys to
2607 toggle in/out points.
2609 In both cut and paste editing mode and drag and drop editing mode, in/out
2610 points override the highlighted area.  If a highlighted area and in/out points
2611 are set, the highlighted area affects playback while the in/out points affect
2612 editing operations.  To avoid confusion, it is better to use either highlighting
2613 or in/out points but not both simultaneously.
2615 The insertion point and the in/out points allow you to define an affected
2616 region, but they do not let you jump to exact points on the timeline very easily.
2617 For this purpose there are labels.
2619 @c cincvdoc_node_number_94
2620 @node Using labels in the program window
2621 @subsection Using labels in the program window
2622 @cindex Labels, using in the program window
2624 Labels are an easy way to set exact locations on the timeline that you want to jump
2625 to.  When you position the insertion point somewhere and click the
2626 @image{manual_images_en/label_button,5mm} @b{label button}, a new label appears on the
2627 timeline.
2629 @center @image{manual_images_en/timebar_label,160mm}
2630 @center @b{Timebar with a label on it}
2632 No matter what the zoom settings are, clicking on the label positions the
2633 insertion point exactly where you set it.  Hitting the label button again when
2634 a label is selected deletes it.
2636 @b{SHIFT-clicking} on a label extends the highlighted region.
2638 @b{Double-clicking} between two labels highlights the region between the
2639 labels.
2641 Hitting the @key{l} key has the same effect as the label button.
2643 If you hit the label button when a region is highlighted, labels are
2644 created at each end of the highlighted region.  However, if one end already has a label,
2645 then the existing label is deleted.
2647 Labels can reposition the insertion point when they are selected but they can
2648 also be traversed with the @image{manual_images_en/label_traversal,15mm} @b{label
2649 traversal} buttons.  When a label is out of view, the label traversal buttons
2650 reposition the timeline so the label is visible.  There are keyboard shortcuts
2651 for label traversal, too.
2653 @kbd{CTRL-LEFT} repositions the insertion point on the previous label.
2655 @kbd{CTRL-RIGHT} repositions the insertion point on the next label.
2657 With label traversal you can quickly seek back and forth on the
2658 timeline but you can also select regions.
2660 @kbd{SHIFT-CTRL-LEFT} highlights the region between the insertion point and the
2661 previous label.
2663 @kbd{SHIFT-CTRL-RIGHT} highlights the region between the insertion point and
2664 the next label.
2666 Manually hitting the label button or @key{l} key over and over again to delete
2667 a series of labels can get tedious.  To delete a set of labels, first
2668 highlight a region. Second, use the @b{Edit->Clear labels} function.  If
2669 in/out points exist, the labels between the in/out points are cleared and the
2670 highlighted region is ignored.
2672 @b{Editing or locking labels from moving:} @*
2673 In @b{Cut and Paste} editing mode only, by enabling "Edit labels" in the
2674 settings menu, or by disabling the @image{manual_images_en/locklabels_unlocked,5mm}
2675 @b{"Lock labels from moving"} button on the program toolbar labels will be cut,
2676 copied or pasted along with the selected region of the first armed track. @*
2677 Similarly, if a selected area of a resource is spliced from the viewer to the
2678 timeline in a position before labels, these labels will be pushed to the right
2679 on the timebar for the length of the selected area. @*
2680 To prevent labels from moving on the timebar, just disable the
2681 "Edit labels" option or enable the @image{manual_images_en/locklabels_unlocked,5mm}
2682 @b{"Lock labels from moving"} button. @*
2683 In @b{Drag and Drop} editing mode labels will be always locked to the timebar,
2684 even with the "Edit labels" option enabled.
2686 @c cincvdoc_node_number_95
2687 @node Editing
2688 @section Editing
2689 @cindex Editing
2691 Editing comprises both the time domain and the track domain.  Since the
2692 timeline consists of a stack of tracks, you need to worry about how to sort and
2693 create tracks in addition to what time certain media appears on a track.
2695 In the time domain, Cinelerra offers many ways to approach the editing process.
2696 The three main methods are two screen editing, drag and drop editing, and cut
2697 and paste editing.
2699 There are several concepts Cinelerra uses when editing which apply to all the
2700 methods.  The @b{timeline} is where all editing decisions are represented.
2701 This is a stack of tracks in the center of the main window.  It can be scrolled
2702 up, down, left and right with the scrollbars on the right and bottom of it.  It
2703 can also be scrolled up and down with a mouse wheel.
2705 The @b{active region} is the range of time which is affected by editing
2706 commands on the timeline.  The active region is determined first by the
2707 presence of in/out points in the timeline.  If those do not exist the
2708 highlighted region is used.  If no highlighted region exists the insertion
2709 point is used as the start of the active region.  Some commands treat all the
2710 space to the right of the insertion point as active, like @b{Render}, while
2711 others treat the active length as 0 if no end point for the active region is
2712 defined.
2714 Finally, editing decisions never affect source material.  This is @b{non
2715 destructive editing} and it became popular with audio because it was much
2716 faster than if you had to copy all the media affected by an edit.  Editing only
2717 affects pointers to source material, so if you want to have a media file at the
2718 end of your editing session which represents the editing decisions, you need to
2719 @b{render} it.  @xref{Rendering files}.
2721 Every track on the timeline has a set of attributes on the left, the most
2722 important of which is the @b{arm track} attribute.
2724 @menu
2725 * The patchbay::           Enabling different features on different tracks
2726 * Nudging tracks::         Move entire tracks horizontally
2727 * Panning tracks::         Changing the audio output channels
2728 * Automatic track panning::  Panning tracks to common speaker arrangements
2729 * Standard audio mappings::  Making audio panning that works on other players.
2730 * Manipulating tracks::    Moving whole tracks around
2731 * Two screen editing::     Using two video windows to edit
2732 * Drag and drop editing::  Dragging objects to edit
2733 * Cut and paste editing::  Editing media like text
2734 * Trimming::               Changing in and out points
2735 @end menu
2737 @c cincvdoc_node_number_96
2738 @node The patchbay
2739 @subsection The patchbay
2740 @cindex Patchbay
2742 On the left of the timeline is a region affectionately known as the patchbay.
2743 The patchbay enables features specific to each track.  All tracks have a text
2744 area for naming the track.
2746 All tracks have an @b{expander} @image{manual_images_en/expandpatch_checked,5mm} for
2747 viewing more options and for viewing the effects on the track.  Click on the
2748 expander to expand or collapse the track.  If it is pointing sideways, the
2749 track is collapsed.  If it is pointing down, the track is expanded.  Existing
2750 effects appear below the media for the track.
2752 All tracks have the following row of toggles for several features.
2754 @center @image{manual_images_en/track_attributes}
2755 @center @b{Track attributes}
2757 If the toggle is colored, it is enabled.  If the toggle is the background color
2758 of most of the windows, it is disabled.  Click on the toggle to enable or
2759 disable the feature.  Several mouse operations speed up the configuration of
2760 several tracks at a time.
2762 Click on an attribute and drag across adjacent tracks to copy the same
2763 attribute to those tracks.
2765 Hold down @key{SHIFT} while clicking a track's attribute to enable the
2766 attribute in the current track and toggle the attribute in all the other
2767 tracks.
2769 Hold down @key{SHIFT} while clicking an attribute.  Click until all the tracks
2770 except the selected one are disabled.  Then drag the cursor over the adjacent
2771 track to enable the attribute in the adjacent track.
2773 The other attributes affect the output of the track:
2774 @cindex Play track
2775 @cindex Track, play
2776 @itemize @bullet
2777 @item @b{Play track} @*
2778 Determines whether the track is rendered or not.  If it is off,
2779 the track is not rendered.  However, if the track is chained to any other
2780 tracks, the other tracks perform all the effects in the chained track,
2781 regardless of play status.
2783 @cindex Arm track
2784 @cindex Track, arm
2785 @item @b{Arm track} @*
2786 Determines whether the track is armed or not.  Only the @b{armed
2787 tracks} are affected by editing operations.  Make sure you have enough armed
2788 destination tracks when you paste or splice material or some tracks in the
2789 material will get left out. @*
2790 In addition to restricting editing operations, the armed tracks in combination
2791 with the active region determine where material is inserted when loading files.
2792 If the files are loaded with one of the insertion strategies which do not delete
2793 the existing project, the armed tracks will be used as destination tracks. @*
2794 Press @key{TAB} while the cursor is anywhere over a track to toggle the track
2795 arming status. @*
2796 Press @kbd{SHIFT-TAB} while the cursor is over a track to toggle the arming
2797 status of every other track.
2799 @cindex Gang fader
2800 @cindex Fader, gang
2801 @item @b{Gang fader} @*
2802 Causes the fader to track the movement of whatever other fader
2803 you are adjusting.  A fader is only ganged if the @b{arm track} is also on.
2804 This is normally used to adjust audio levels on all the tracks simultaneously.
2805 Gang also causes @b{Nudge} parameters to synchronize across all the ganged
2806 tracks.
2808 @cindex Draw media
2809 @cindex Media, draw
2810 @item @b{Draw media} @*
2811 Determines if picons or waveforms are drawn on the track.  By
2812 default, some file formats load with this off while other file formats load
2813 with it on.  This depends on whether the file format takes a long time to draw
2814 on the timeline.  Merely set it to on if you want to see picons for any file
2815 format.
2817 @cindex Mute track
2818 @cindex Track, mute
2819 @item @b{Mute track} @*
2820 Causes the output to be thrown away once the track is completely
2821 rendered.  This happens whether or not @b{play track} is on.  If the track is
2822 part of an effect chain, the output of the effect chain track is overlaid on
2823 the final output even though it is routed back to another track.  Mute track is
2824 used to keep the effect chain track from overlapping the output of the source
2825 track.
2827 @cindex Fader
2828 @item @b{Fader} @*
2829 All tracks have a fader, but the units of each fader depend on whether it is
2830 audio or video.  Click and drag the fader to fade the track in and out.  If it
2831 is ganged to other tracks of the same media type, with the @b{arm} option
2832 enabled, the other faders should follow.  Hold down @key{SHIFT} and drag a
2833 fader to center it on 0.
2834 @end itemize
2836 @c cincvdoc_node_number_97
2837 @node Nudging tracks
2838 @subsection Nudging tracks
2839 @cindex Nudging tracks
2840 @cindex Tracks, nudging
2842 Each track has a nudge textbox in its patchbay.  You may have to expand the
2843 track to see it.  These are views of the patchbays when expanded.
2845 @center @image{manual_images_en/apatches}
2846 @center @b{Pan and nudge for an audio track}
2848 @center @image{manual_images_en/vpatches}
2849 @center @b{Overlay mode and nudge for a video track}
2851 The nudge is the amount the track is shifted left or right during playback.
2852 The track is not displayed shifted on the timeline, but it is shifted when it
2853 is played back.  This is useful for synchronizing audio with video, creating
2854 fake stereo, or compensating for an effect which shifts time, all without
2855 tampering with any edits.
2857 Merely enter the amount of time to shift to instantly shift the track.
2858 Negative numbers make the track play later.  Positive numbers make the track
2859 play sooner.  The nudge units are either @b{seconds} or the native units for
2860 the track.  Select the units by @b{right clicking} on the nudge textbox and
2861 using the context sensitive menu.
2863 Nudge settings are ganged with the @b{Gang faders} toggle and the @b{Arm track}
2864 toggle.
2866 Use the mouse wheel over the nudge textbox to increment and decrement it.
2868 @c cincvdoc_node_number_98
2869 @node Panning tracks
2870 @subsection Panning tracks
2871 @cindex Panning tracks
2872 @cindex Tracks, panning
2874 Audio tracks have a panning box in their patchbays.  A patchbay may have to be expanded
2875 to see the panning box.  The panning box is shown here.
2877 @center @image{manual_images_en/apatches}
2878 @center @b{Pan and nudge for an audio track}
2880 Position the pointer in the panning box and click/drag to reposition the audio
2881 output among the speaker arrangement.  The loudness of each speaker is printed
2882 during the dragging operation.  The panning box uses a special algorithm to try
2883 to allow audio to be focused through one speaker or branched between the
2884 nearest speakers when more than 2 speakers are used.
2886 @c cincvdoc_node_number_99
2887 @node Automatic track panning
2888 @subsection Automatic track panning
2889 @cindex Track panning, automatic
2891 Several convenience functions are provided for automatically setting the
2892 panning to several common standards.  They are listed in the @b{Audio} menu.
2893 These functions only affect audio tracks with @b{recording} enabled.
2895 @itemize @bullet
2896 @item @b{Audio->Map 1:1} @*
2897 This maps every track to its own channel and wraps around when all the
2898 channels are allocated.  It is most useful for making 2 tracks with 2 channels
2899 map to stereo and for making 6 tracks with 6 channels map to a 6 channel
2900 soundcard.
2902 @item @b{Audio->Map 5.1:2} @*
2903 This maps 6 tracks to 2 channels.  The project should have 2 channels when
2904 using this function.  Go to @b{Settings->format} to set the output channels to
2905 2.  This is most useful for down-mixing 5.1 audio to stereo.
2906 @end itemize
2908 @c cincvdoc_node_number_100
2909 @node Standard audio mappings
2910 @subsection Standard audio mappings
2911 @cindex Standard audio mappings
2912 @cindex Audio mappings, standard
2914 Although Cinelerra lets you map any audio track to any speaker, there are
2915 standard mappings you should use to ensure the media can be played back
2916 elsewhere.  Also, most audio encoders require the audio tracks to be mapped to
2917 standard speaker numbers or they will not work.
2919 @cindex Channel position
2920 @cindex Position, channel
2921 In the @b{channel position} widget @xref{Project attributes}, the
2922 channels are numbered to correspond to the output tracks they are rendered to.
2923 For stereo, the source of channel 1 needs to be the left track and the source
2924 of channel 2 needs to be the right track.
2926 For 5.1 surround sound, the sources of the 6 channels need to be in the order
2927 of center, front left, front right, back left, back right, low frequency
2928 effects.  If the right tracks are not mapped to the right speakers, most audio
2929 encoders will not encode the right information if they encode anything at all.
2930 The low frequency effects track specifically can not store high frequencies in
2931 most cases.
2933 @c cincvdoc_node_number_101
2934 @node Manipulating tracks
2935 @subsection Manipulating tracks
2936 @cindex Manipulating tracks
2937 @cindex Tracks, manipulating
2939 Tracks in Cinelerra either contain audio or video.  There is no special
2940 designation for tracks other than the type of media they contain.  When you
2941 create a new project, it contains a number of default tracks.  You can
2942 still add or delete tracks from the menus.  The @b{Tracks} menu
2943 contains a number of options for dealing with multiple tracks simultaneously.
2944 Each track itself has a popup menu which affects one track.
2946 Bring up the popup menu by moving over a track and right clicking.  The popup
2947 menu affects the track whether it is armed or not. @*
2948 @cindex Move tracks
2949 @cindex Tracks, move
2950 @b{Move up} and @b{move down} moves the track up or down in the stack.
2951 @b{Delete track} deletes the track.
2953 Operations in the @b{Tracks} menu affect only tracks which are armed:
2954 @itemize @bullet
2955 @item @b{Move tracks up} and @b{Move tracks down} shift all the armed tracks up
2956 or down the stack.
2957 @cindex Delete tracks
2958 @cindex Tracks, delete
2959 @item @b{Delete tracks} deletes the armed tracks.
2960 @item @b{Delete last track} deletes the last track, whether it is armed or not.
2961 Holding down the @b{d} key quickly deletes all the tracks.
2962 @cindex Concatenate tracks
2963 @cindex Tracks, concatenate
2964 @item @b{Concatenate tracks} is more complicated.  It takes every @b{playable}
2965 track and concatenates it to the end of the first @b{armed tracks}.  If there
2966 are two armed tracks followed by two playable tracks, the concatenate operation
2967 puts the two playable tracks after the two armed tracks.  If there are three
2968 playable tracks instead, two tracks are put after the armed tracks and a third
2969 track is put on the end of the first armed track.  The destination track wraps
2970 around until all the playable tracks are concatenated.
2971 @end itemize
2973 Finally, you will want to create new tracks.  The @b{Audio} and @b{Video} menus
2974 each contain an option to add a track of their specific type.  In the case of
2975 audio, the new track is put on the bottom of the timeline and the output
2976 channel of the audio track is incremented by one.  In the case of video, the
2977 new track is put on the top of the timeline.  This way, video has a natural
2978 compositing order.  New video tracks are overlaid on top of old tracks.
2980 @c cincvdoc_node_number_102
2981 @node Two screen editing
2982 @subsection Two screen editing
2983 @cindex Two screen editing
2985 This is the fastest way to construct a program out of movie files.  The idea
2986 consists of viewing a movie file in one window and viewing the program in
2987 another window.  subsections of the movie file are defined in one window and
2988 transferred to the end of the program in the other window.
2990 The way to begin a two screen editing session is to load some resources.  In
2991 @b{file->load} load some movies with the insertion mode @b{create new
2992 resources}.  You want the timeline to stay unchanged while new resources are
2993 brought in.  Go to the Resource Window and select the @b{media} folder.  The
2994 newly loaded resources should appear.  Drag a resource from the media side of
2995 the window over the Viewer window.
2997 There should be enough armed tracks on the timeline to put the subsections of
2998 source material that you want.  If there are not, create new tracks or arm more
2999 tracks.
3001 In the viewer window seek to the starting point of a clip you want to use.  Use
3002 either the @b{slider} or the @b{transport controls}.  Use the @b{preview
3003 region} to narrow down the search.  Set the starting point with the
3004 @image{manual_images_en/in_point_button,5mm} @b{in point button}.
3006 Seek to the ending point of the clip you want to use.  Set the ending point
3007 with the @image{manual_images_en/out_point_button,5mm} @b{out point button}.  The two
3008 points should now appear on the timebar and define a clip.
3010 There are several things you can do with the clip now.
3012 @itemize @bullet
3013 @item @b{Splice} @*
3014 @image{manual_images_en/splice_button,5mm} Inserts the clip in the timeline, pushing
3015 everything back.  If an @b{in point} or @b{out point} exists on the timeline it
3016 is inserted there, otherwise it is inserted after the insertion point.  After
3017 that, the insertion point moves to the end of the clip.  If there is no in/out
3018 point, the insertion point will be used as the next splice location.  This way
3019 you can continuously build up the program by splicing.
3020 @item @b{Overwrite} @*
3021 @image{manual_images_en/overwrite_button,5mm} Overwrites the region of the timeline with
3022 the clip.  If an @b{in point} or @b{out point} exists on the timeline it is
3023 overwritten there, otherwise it is overwritten after the insertion point.  If a
3024 region is highlighted or both in and out points exist the difference between
3025 the active region and the clip length is deleted.
3026 @item @b{Create a clip} @*
3027 @image{manual_images_en/toclip_button,5mm} Generates a new clip for the resource window
3028 containing the affected region but does not change the timeline.  Every clip
3029 has a title and a description.  These are optional.
3030 @item Copy behaves the same as in cut and paste editing.
3031 @end itemize
3032 Two screen editing can be done purely by keyboard shortcuts.  When you move the
3033 pointer over any button a tooltip should appear, showing what key is bound to
3034 that button.  In the Viewer window, the number pad keys control the transport
3035 and the @kbd{[} @kbd{]} @kbd{v} keys perform in/out points and splicing.
3037 @c cincvdoc_node_number_103
3038 @node Drag and drop editing
3039 @subsection Drag and drop editing
3040 @cindex Drag and drop editing
3041 @cindex Editing, drag and drop
3043 @b{Drag and drop editing} is a quick and simple way of working in Cinelerra,
3044 using only the mouse.  The basic idea is to create a bunch of clips, then drag
3045 them in order into the timeline building a prototype film that you can watch on
3046 the compositor.  If after watching it, you wish to re-arrange your clips, set
3047 effects, add transition or insert/delete material, just drag and drop them on
3048 the timeline.
3050 @enumerate 1
3051 @item Load some files using @b{file->load}.
3052 @item Set the insertion mode to @b{Create new resources}.  This loads the files
3053 into the Resource Window.
3054 @item Create some audio and video tracks on the timeline using the video and
3055 audio menus.
3056 @item Open the @b{Media} folder in the resource window.
3057 @item Make sure the necessary tracks are armed and drag a media file from the
3058 resource window to the timeline.  If the media has video, drag it onto a video
3059 track.  If the media is pure audio, drag it onto an audio track.
3061 @center @image{manual_images_en/drag_to_program,70mm}
3063 @end enumerate
3064 Cinelerra fills out the audio and video tracks below the dragging cursor with
3065 data from the file.  This affects what tracks you should create initially and
3066 which track to drag the media onto.  If the media has one video track and two
3067 audio tracks, you will need one video track and two audio tracks on the timeline
3068 and the media should be dragged over the first video track.  If the media has
3069 audio only you will need one audio track on the timeline for every audio track in
3070 the media and the media should be dragged over the first audio track.
3072 When dragging, the media snaps to the start of track if the track is empty.  If
3073 there are edits on the track, the media snaps to the nearest edit boundary.
3075 You can also drag multiple files from the resource window.  Either draw a box
3076 around the files, use @key{SHIFT}, or use @key{CTRL} when selecting files.
3077 When you drop the files in the timeline, they are concatenated.  The behavior
3078 of @key{SHIFT} and @key{CTRL} changes depending on if the resources are in text
3079 or icons.
3081 To display the resources as text or icons, right click inside the media list.
3082 Select either @b{display icons} or @b{display text} to change the list format.
3084 When displaying text in the resource window @b{SHIFT-clicking} on media files
3085 extends the number of highlighted selections.  @b{CTRL-clicking} on media files
3086 in text mode selects additional files one at a time.
3088 When displaying icons in the resource window @b{SHIFT-clicking} or
3089 @b{CTRL-clicking} selects media files one at a time.
3091 In addition to dragging media files, if you create clips and open the @b{clip}
3092 folder you can drag clips on the timeline.
3094 In the timeline there is further dragging functionality.  Dragging edits around
3095 the timeline allows you to sort music playlists, sort movie scenes, and give
3096 better NAB demos but not much else.  To enable the dragging functionality of
3097 the timeline, select the arrow toggle @image{manual_images_en/arrow,2.67mm}.
3098 Move over an edit and drag it.  During a dragging operation the edit snaps to
3099 the nearest boundary.
3101 @center Select a track with various scenes.
3103 @center @image{manual_images_en/drop_before}
3105 @center Original track with three scenes.
3107 @center Go to scene #3, click and drag it to the middle.
3109 @center @image{manual_images_en/drag_track}
3111 @center When you drop scene #3
3113 @center @image{manual_images_en/drop_concept}
3115 @center scene #2 shifts to the right
3117 @center @image{manual_images_en/drop_after}
3119 @center This is how the finished sequence looks.
3121 If more than one track is armed, Cinelerra will drag any edits which start on
3122 the same position as the edit the cursor is currently over.  In other words,
3123 you can drag and drop a group of edits.  Cinelerra recognises as a group the
3124 edits of different armed tracks that have aligned beginnings, regardless of whether they have
3125 the same source or aligned ends.
3127 In Drag and Drop editing mode you can't drag and drop labels. They will be
3128 always locked to the timebar, even with the "Edit labels" option enabled.
3129 Still, with the "Edit labels" option enabled, if a selected area of a resource
3130 is spliced from the Viewer to the timeline in a position before labels, these
3131 labels will be pushed to the right for the length of the selected area.
3133 @c cincvdoc_node_number_104
3134 @node Cut and paste editing
3135 @subsection Cut and paste editing
3136 @cindex Cut and paste editing
3137 @cindex Editing, cut and paste
3139 This is the traditional method of editing in audio editors.  In the case of
3140 Cinelerra, you either need to start a second instance of Cinelerra and copy from
3141 one instance to the other, copy from different tracks in the same instance, or load a
3142 media file into the Viewer and copy from there.
3144 Load some files onto the timeline.  To perform cut and paste editing select the
3145 @image{manual_images_en/ibeam,1.67mm} i-beam toggle.  Select a region of the timeline
3146 and select the @image{manual_images_en/cut,5.67mm} cut button to cut it.  Move the
3147 insertion point to another point in the timeline and select the
3148 @image{manual_images_en/paste,5mm} paste button.  Assuming no in/out points are
3149 defined on the timeline this performs a cut and paste operation.
3151 If in/out points are defined, the insertion point and highlighted region are
3152 overridden by the in/out points for clipboard operations.  Thus, with in/out
3153 points you can perform cut and paste in drag and drop mode as well as cut and
3154 paste mode.
3156 When editing audio, it is customary to cut from one part of a waveform into the
3157 same part of another waveform.  The start and stop points of the cut are
3158 identical in each waveform and might be offset slightly, while the wave data is
3159 different.  It would be very hard to highlight one waveform to cut it and
3160 highlight the second waveform to paste it without changing the relative start
3161 and stop positions.
3163 One option for simplifying this is to open a second copy of Cinelerra, cutting
3164 and pasting to transport media between the two copies.  This way two
3165 highlighted regions can exist simultaneously.
3167 Another option is to set in/out points for the source region of the source
3168 waveform and set labels for the destination region of the destination waveform.
3169 Perform a cut, clear the in/out points, select the region between the labels,
3170 and perform a paste.
3172 A final operation in cut and paste editing is the @b{edit->clear} operation.
3173 If a region is highlighted or in/out points exist, the affected region is
3174 cleared by @b{edit->clear}.  But if the insertion point is over an edit
3175 boundary and the edits on each side of the edit boundary are the same resource,
3176 the edits are combined into one edit comprised by the resource.  The start of
3177 this one edit is the start of the first edit and the end of this one edit is
3178 the end of the second edit.  This either results in the edit expanding or
3179 shrinking.
3181 @c cincvdoc_node_number_105
3182 @node Trimming
3183 @subsection Trimming
3184 @cindex Trimming
3186 With some edits on the timeline it is possible to do trimming.  By trimming you
3187 shrink or grow the edit boundaries by dragging them.  In drag and drop mode or
3188 cut and paste mode, move the cursor over an edit boundary until it changes
3189 shape.  The cursor will either be an expand left or an expand right.  If the
3190 cursor is an expand left, the dragging operation affects the beginning of the
3191 edit.  If the cursor is an expand right, the dragging operation affects the end
3192 of the edit.
3194 When you click on an edit boundary to start dragging, the mouse button number
3195 determines which dragging behavior is going to be followed.  3 possible
3196 behaviors are bound to mouse buttons in the interface preferences.
3197 @xref{Interface}.
3199 The effect of each drag operation not only depends on the behavior button but
3200 whether the beginning or end of the edit is being dragged.  When you release
3201 the mouse button, the trimming operation is performed.
3203 In a @b{Drag all following edits} operation, the beginning of the edit either
3204 cuts data from the edit if you move it forward or pastes new data from before
3205 the edit if you move it backward.  The end of the edit pastes data into the
3206 edit if you move it forward or cuts data from the end of the edit if you move
3207 it backward.  All the edits thereafter shift.  Finally, if you drag the end of
3208 the edit past the start of the edit, the edit is deleted.
3210 In a @b{Drag only one edit} operation, the behavior is the same when you drag
3211 the beginning or end of an edit.  The only difference is none of the other
3212 edits in the track shift.  Instead, anything adjacent to the current edit
3213 expands or shrinks to fill gaps left by the drag operation.
3215 In a @b{Drag source only} operation, nothing is cut or pasted.  If you move the
3216 beginning or end of the edit forward, the source reference in the edit shifts
3217 forward.  If you move the beginning or end of the edit backward, the source
3218 reference shifts backward.  The edit remains in the same spot in the timeline
3219 but the source shifts.
3221 For all file formats besides still images, the extent of the trimming operation
3222 is clamped to the source file length.  Attempting to drag the start of the edit
3223 beyond the start of the source clamps it to the source start.
3225 In all trimming operations, all edits which start on the same position as the
3226 cursor when the drag operation begins are affected.  Unarm tracks to prevent
3227 edits from being affected.
3229 Most effects in Cinelerra can be figured out just by using them and tweeking.
3230 Here are brief descriptions of effects which you might not utilize fully by
3231 mere experimentation.
3233 @c cincvdoc_node_number_106
3234 @node Compositor window
3235 @chapter Compositor window
3236 @cindex Compositor window
3238 This window displays the output of the timeline.  It is the interface for most
3239 compositing operations or operations that affect the appearance of the timeline
3240 output.  Operations done in the Compositor affect the timeline but do not affect
3241 clips.
3243 @menu
3244 * Compositor controls::
3245 * Compositing::
3246 @end menu
3248 @c cincvdoc_node_number_107
3249 @node Compositor controls
3250 @section Compositor controls
3251 @cindex Compositor controls
3253 The video output has several navigation functions.  The video output size is
3254 either locked to the window size or unlocked with scrollbars for navigation.
3255 The video output can be zoomed in and out and panned.  Navigating the video
3256 output this way does not affect the rendered output; it just changes the point
3257 of view in the compositor window.
3259 If it is unlocked from the window size, middle clicking and dragging anywhere
3260 in the video pans the point of view.
3262 Hitting the @kbd{+} and @kbd{-} keys zooms in and out of the video output.
3264 Underneath the video output are copies of many of the functions available in
3265 the main window.  In addition there is a @image{manual_images_en/cwindow_zoom,30mm}
3266 zoom menu and a @image{manual_images_en/cwindow_light,8mm} tally light.
3268 The zoom menu jumps to all the possible zoom settings and, through the @b{Auto}
3269 option, locks the video to the window size.  The zoom menu does not affect the
3270 window size.
3272 The tally light turns red when rendering is happening.  This is useful for
3273 knowing if the output is current.
3275 Right clicking anywhere in the video output brings up a menu with all the zoom
3276 levels and some other options.  In this particular case the zoom levels resize
3277 the entire window and not just the video.
3279 The @b{reset camera} and @b{reset projector} options center the camera and
3280 projector @xref{Compositing}.
3282 @cindex Hide controls
3283 @cindex Controls, hide
3284 The @b{Hide controls} option hides everything except the video.
3286 On the left of the video output is a toolbar specific to the compositor window.
3287 Here are the functions in the toolbar:
3289 @menu
3290 * Protect video::
3291 * Magnifying glass::
3292 * Masks tool::
3293 * Camera::
3294 * Projector::
3295 * Crop tool::
3296 * Eyedropper::
3297 * Tool info::
3298 * Safe regions tool::
3299 @end menu
3301 @c cincvdoc_node_number_108
3302 @node Protect video
3303 @subsection Protect video
3304 @cindex Protect video
3305 @cindex Video, protect
3307 This disables changes to the compositor output from clicks in it.  It is an
3308 extra layer on top of the track arming toggle to prevent unwanted changes.
3310 @c cincvdoc_node_number_109
3311 @node Magnifying glass
3312 @subsection Magnifying glass
3313 @cindex Magnifying glass
3315 This tool @image{manual_images_en/magnify,7mm} zooms in and out of the compositor
3316 output without resizing the window.  If the video output is currently locked to
3317 the size of the window, clicking in it with the magnifying glass unlocks it and
3318 creates scrollbars for navigation.
3320 Left clicking in the video zooms in. @*
3321 Ctrl clicking in the video zooms out. @*
3322 Rotating the wheel on a wheel mouse zooms in and out.
3324 @c cincvdoc_node_number_110
3325 @node Masks tool
3326 @subsection Masks tool
3327 @cindex Masks tool
3329 This tool @image{manual_images_en/mask} brings up the mask editing tool @xref{Masks}.
3330 Enable the @image{manual_images_en/toolwindow,2.67mm} tool window to see options
3331 for this tool.
3333 @c cincvdoc_node_number_111
3334 @node Camera
3335 @subsection Camera
3336 @cindex Camera
3338 This tool @image{manual_images_en/camera,4.67mm} brings up the camera editing tool
3339 @xref{The camera and projector}.  Enable the
3340 @image{manual_images_en/toolwindow,2.67mm} tool window to see options for this
3341 tool.
3343 @c cincvdoc_node_number_112
3344 @node Projector
3345 @subsection Projector
3346 @cindex Projector
3348 This tool @image{manual_images_en/projector,4.67mm} brings up the projector
3349 editing tool @xref{The camera and projector}.  Enable the
3350 @image{manual_images_en/toolwindow,2.67mm} tool window to see options for this
3351 tool.
3353 @c cincvdoc_node_number_113
3354 @node Crop tool
3355 @subsection Crop tool
3356 @cindex Crop tool
3358 This tool @image{manual_images_en/crop,4.33mm} brings up the cropping tool
3359 @xref{Cropping}.  The @image{manual_images_en/toolwindow,2.67mm} tool window must
3360 be enabled to use this tool.
3362 @c cincvdoc_node_number_114
3363 @node Eyedropper
3364 @subsection Eyedropper
3365 @cindex Eyedropper
3367 This brings up the eyedropper.  The eyedropper detects whatever color is under
3368 it and stores it in a temporary area.  Enabling the
3369 @image{manual_images_en/toolwindow,2.67mm} tool info shows the currently selected color.
3370 Click anywhere in the video output to select the color at that point. @*
3371 The eyedropper not only lets you see areas which are clipped, but its value can
3372 be applied to many effects.  Different effects handle the eyedropper
3373 differently.
3375 @c cincvdoc_node_number_115
3376 @node Tool info
3377 @subsection Tool info
3378 @cindex Tool info
3380 This tool @image{manual_images_en/toolwindow,2.67mm} button works only in
3381 conjunction with the other controls on the compositor.  Based on what
3382 compositing control is active the toggle button will activate/deactivate the
3383 appropriate control dialog box.
3385 Controls with dialog boxes are:
3386 @itemize @bullet
3387 @item Edit mask
3388 @item Camera automation
3389 @item Projector automation
3390 @item Crop control
3391 @end itemize
3393 @c cincvdoc_node_number_116
3394 @node Safe regions tool
3395 @subsection Safe regions tool
3396 @cindex Safe regions tool
3398 This tool @image{manual_images_en/titlesafe} draws the safe regions in the video
3399 output.  This does not affect the rendered output @xref{Safe regions}.
3401 @c cincvdoc_node_number_117
3402 @node Compositing
3403 @section Compositing
3404 @cindex Compositing
3406 A large amount of Cinelerra's binary size is directed towards compositing.
3407 When you remove the letterboxing from a widescreen show, you are compositing.
3408 Changing the resolution of a show, making a split screen, and fading in and out
3409 among other things are all compositing operations in Cinelerra.  Cinelerra
3410 detects when it is in a compositing operation and plays back through the
3411 compositing engine only then.  Otherwise, it uses the fastest decoder available
3412 in the hardware.
3414 Compositing operations are done on the timeline and in the Compositor window.
3415 Shortcuts exist in the Resource window for changing some compositing
3416 attributes.  Once some video files are on the timeline, the compositor window
3417 is a good place to try compositing.
3419 @menu
3420 * The camera and projector::
3421 * Masks::
3422 * Cropping::
3423 * Safe regions::
3424 * Overlay modes::
3425 * Track and output sizes::
3426 @end menu
3428 @c cincvdoc_node_number_118
3429 @node The camera and projector
3430 @subsection The camera and projector
3431 @cindex Camera
3432 @cindex Projector
3434 @menu
3435 * The temporary::
3436 * Compositing projector controls::
3437 * Compositing camera controls::
3438 * Popup menu of options::
3439 * The camera and projector tool window::
3440 @end menu
3442 @c cincvdoc_node_number_119
3443 @node The temporary
3444 @subsubsection The temporary
3445 @cindex Temporary
3447 In the compositor window, the most important functions are the
3448 @image{manual_images_en/camera,4.67mm} camera button and the
3449 @image{manual_images_en/projector,4.67mm} projector button.  These control
3450 operation of the camera and projector.  Cinelerra's compositing routines use a
3451 "temporary", a frame of video in memory where all graphics processing is
3452 performed. Inside Cinelerra's compositing pipeline, the camera determines where
3453 in the source video the "temporary" is copied from.  The projector determines
3454 where in the output the "temporary" is copied to.
3456 @center @image{manual_images_en/temporary_explained,140mm}
3458 The process is pretty much as if we scanned in a roll of film one frame at a
3459 time, then (using Gimp, for example) digitally altered the scanned image with
3460 various filters.  Once the image has been transformed by the filters (color
3461 correction, for example) we then project the finished image back into a new
3462 roll of film, thus creating a new "modified" version of the original.
3464 Each track has a different "temporary" which is defined by the track size.  By
3465 resizing the tracks you can create split screens, pans, and zooms.
3467 @center @image{manual_images_en/compositing_pipeline,140mm}
3468 @center @b{Visual representation of the compositing pipeline}
3470 When editing the camera and projector in the compositing window, the first
3471 track with @b{record} enabled is the track affected.  Even if the track is
3472 completely transparent, it is still the affected track.  If multiple video
3473 tracks exist, the easiest way to select one track for editing is to
3474 @b{SHIFT-click} on the record icon of the track.  This solos the track.
3476 @center @image{manual_images_en/projector_concept,120mm}
3478 The purpose of the projector is to place the contents of the "temporary" into the
3479 project's output.  The intent of the projector is to composite several
3480 sources from the various tracks into one final output track.
3482 The projector alignment frame is identical to the camera's viewport, except
3483 that it guides where on the output canvas to put the contents of each
3484 temporary.
3486 @center @image{manual_images_en/projector_screen}
3488 @c cincvdoc_node_number_120
3489 @node Compositing projector controls
3490 @subsubsection Compositing projector controls
3491 @cindex Compositing projector controls
3492 @cindex Projector controls, compositing
3494 When the @b{projector} button is enabled in the compositor window, you are in
3495 projector editing mode.  A guide box appears in the video window.  Dragging
3496 anywhere in the video window causes the guide box to move, hopefully along with
3497 the video.  @b{SHIFT-dragging} anywhere in the video window causes the guide
3498 box to shrink and grow along with the video.  Once you have positioned the
3499 video with the projector, you are ready to master the camera.
3501 @c cincvdoc_node_number_121
3502 @node Compositing camera controls
3503 @subsubsection Compositing camera controls
3504 @cindex Compositing camera controls
3505 @cindex Camera controls, compositing
3507 Select the @image{manual_images_en/camera,4.67mm} camera button to enable camera
3508 editing mode.  In this mode, the guide box shows where the camera position is
3509 in relation to past and future camera positions but not where it is in relation
3510 to the source video.  Dragging the camera box in the compositor window does not
3511 move the box but instead moves the location of the video inside the box.
3513 @cindex Viewport
3514 The @b{viewport} is a window on the camera that frames the area of source video
3515 to be scanned.  The viewport is represented as a red frame with diagonal cross
3516 bars.
3518 @center @image{manual_images_en/camera_concept,100mm}
3519 @center @b{The viewport}
3521 @center @image{manual_images_en/viewport_sizes,150mm}
3522 @center @b{Viewport sizes}
3524 The size of the viewport is defined by the size of the current track.  A
3525 smaller viewport (640x400) captures a smaller area.  A larger viewport
3526 (800x200) captures an area larger than the source video and fills the empty
3527 spaces with blanks.
3529 Once we have our viewport defined, we still need to place the camera right
3530 above the area of source video we are interested on.  To control the location
3531 of the camera:
3532 @enumerate 1
3533 @item Open the compositor window with a track selected.
3534 @item Select the camera button to enable camera editing mode.
3535 @item Drag over the display window.
3536 @end enumerate
3538 When we drag over the viewport in the compositor window (although initially
3539 counter-intuitive), the viewport does not moves but the area of video that sits
3540 under the camera's location does, like when watching the output of a moving camera.
3542 @center @image{manual_images_en/viewport_drag,100mm}
3543 @center @b{In the compositor window, the viewport is always}
3544 @center @b{shown centered, what moves is the video under it}
3546 For example, when you drag the camera down, the viewport in effect is moving
3547 downwards on the video, showing its path towards the bottom of the video, but
3548 from our perspective on the compositor screen, we see the video moving up.
3549 When you drag the camera right, the video seems to move left, and so on.
3551 @b{Note:} The guide box shows where the camera position is in relation to past
3552 and future camera positions, not where it is in relation to the source video.
3554 @c cincvdoc_node_number_122
3555 @node Popup menu of options
3556 @subsubsection Popup menu of options
3557 @cindex Popup menu of options
3558 @cindex Options, popup menu of
3560 In the compositing window, there is a popup menu of options for the camera and
3561 projector.  Right click over the video portion of the compositing window to
3562 bring up the menu.
3564 @itemize @bullet
3565 @item Reset Camera causes the camera to return to the center position.
3566 @item Reset Projector causes the projector to return to the center.
3567 @end itemize
3569 @c cincvdoc_node_number_123
3570 @node The camera and projector tool window
3571 @subsubsection The camera and projector tool window
3572 @cindex The camera and projector tool window
3574 The camera and projector have shortcut operations that do not appear in the popup menu and are not
3575 represented in video overlays.  These are accessed in the @b{Tool window}.
3576 Most operations in the Compositor window have a tool window which is enabled by
3577 activating the @image{manual_images_en/toolwindow,2.67mm} question mark.
3579 @center @image{manual_images_en/compositor_campro_tool,40mm}
3580 @center @b{The camera and projector tool window}
3582 In the case of the camera and projector, the tool window shows x, y, and z
3583 coordinates.  By either tumbling or entering text directly, the camera and
3584 projector can be precisely positioned.  9 justification types are also defined
3585 for easy access.  A popular justification operation is upper left projection
3586 after image reduction.  This is used when reducing the size of video with
3587 aspect ratio adjustment.
3589 @itemize @bullet
3590 @item @image{manual_images_en/button_justify_left} Left
3591 @item @image{manual_images_en/button_justify_centerH} Center Horizontal
3592 @item @image{manual_images_en/button_justify_right} Right
3593 @item @image{manual_images_en/button_justify_top} Top
3594 @item @image{manual_images_en/button_justify_centerV} Center Vertical
3595 @item @image{manual_images_en/button_justify_bottom} Bottom
3596 @end itemize
3598 The translation effect allows simultaneous aspect ratio conversion and
3599 reduction but is easier to use if the reduced video is put in the upper left of
3600 the temporary instead of in the center.  The track size is set to the original
3601 size of the video and the camera is centered.  The output size is set to the
3602 reduced size of the video.  Without any effects, this produces just the cropped
3603 center portion of the video in the output.
3605 The translation effect is dropped onto the video track.  The input dimensions
3606 of the translation effect are set to the original size and the output
3607 dimensions are set to the reduced size.  To put the reduced video in the center
3608 subsection that the projector shows would require offsetting @b{out x and out y}
3609 by a complicated calculation.  Instead, we leave @b{out x and out y} at 0 and
3610 use the projector's tool window.
3612 Merely by selecting @image{manual_images_en/left_justify} left justify and
3613 @image{manual_images_en/top_justify} top justify, the projector displays the reduced
3614 image from the top left corner of the temporary in the center of the output.
3616 @c cincvdoc_node_number_124
3617 @node Masks
3618 @subsection Masks
3619 @cindex Masks
3621 Masks select a region of the video for either displaying or hiding.  Masks are
3622 also used in conjunction with another effect to isolate the effect to a certain
3623 region of the frame.  A copy of one video track may be delayed slightly and
3624 unmasked in locations where the one copy has interference but the other copy
3625 does not.  Color correction may be needed in one subsection of a frame but not
3626 another.  A mask can be applied to just a subsection of the color corrected track
3627 while the vanilla track shows through.  Removal of boom microphones, airplanes,
3628 and housewives are other mask uses.
3630 The order of the compositing pipeline affects what can be done with masks.
3631 Mainly, masks are performed on the temporary after effects and before the
3632 projector.  This means multiple tracks can be bounced to a masked track and
3633 projected with the same mask.
3635 Our compositing pipeline graph now has a masking stage.  There are 8 possible
3636 masks per track.  Each mask is defined separately, although they each perform
3637 the same operation, whether it is addition or subtraction.
3639 @center @image{manual_images_en/compositing_pipeline2,140mm}
3640 @center @b{Compositing pipeline with masks}
3642 To define a mask, go into the Compositor window and enable the
3643 @image{manual_images_en/mask} @b{mask} toggle.  Now go over the video and click-drag.
3645 @b{IMPORTANT:} You have to select @b{automatic keyframes} (@xref{Automatic
3646 keyframes},) if you wish to move a mask over time.  If you do not select
3647 @b{automatic keyframes}, the mask position will be the same even if you edit at
3648 different places on the timeline.
3650 @center @image{manual_images_en/compositor_mask1,60mm}
3652 Click-drag again in another part of the image to create each new point of the
3653 mask.  While it is not the conventional Bezier curve behavior, this masking
3654 interface performs in realtime what the effect of the mask is going to be.
3655 Creating each point of the mask expands a rubber band curve.
3657 Once points are defined, they can be moved by @b{CTRL-dragging} in the vicinity
3658 of the corner.
3660 @center @image{manual_images_en/compositor_mask_drag}
3661 @center @b{CTRL-drag allows you to move existing points to}
3662 @center @b{new locations, thus altering the shape of the mask}
3664 This, however, does not smooth out the curve.  The in-out points of the Bezier
3665 curve are accessed by @b{SHIFT-dragging} in the vicinity of the corner.  Then
3666 @b{SHIFT-dragging} near the in or out point causes the point to move.
3668 @center @image{manual_images_en/compositor_mask_bezier}
3669 @center @b{SHIFT-drag activates belzier handles}
3671 @center @b{to create curves between mask points}
3673 Finally, once you have a mask, the mask can be translated in one piece by
3674 @b{ALT-dragging} the mask.  Mask editing in Cinelerra is identical to how The
3675 Gimp edits masks except in this case the effect of the mask is always on.
3677 @center @image{manual_images_en/compositor_mask_translate}
3678 @center @b{CTRL-ALT-drag translates an entire mask}
3679 @center @b{to a new location on the screen}
3681 The masks have many more parameters which could not be represented with video
3682 overlays.  These are represented in the tool window for masks.  Selecting the
3683 @image{manual_images_en/toolwindow,2.67mm} question mark when the
3684 @image{manual_images_en/mask} mask toggle is highlighted brings up the mask options.
3686 @center @image{manual_images_en/mask_dialog,70mm}
3687 @center @b{Mask options window}
3689 The @b{mode} of the mask determines if the mask removes data or makes data
3690 visible.  If the mode is subtractive, the mask causes video to disappear.  If
3691 the mode is additive, the mask causes video to appear and everything outside
3692 the mask to disappear.
3694 @center @image{manual_images_en/compositor_mask_mode,160mm}
3695 @center @b{Mask mode}
3697 The @b{value} of the mask determines how extreme the addition or subtraction
3698 is.  In the subtractive mode, higher values subtract more alpha.  In the
3699 additive mode, higher values make the region in the mask brighter while the
3700 region outside the mask is always hidden.
3702 @center @image{manual_images_en/composite_mask_value}
3703 @center @b{Mask value}
3705 The mask number determines which one of the 8 possible masks we are editing.
3706 Each track has 8 possible masks.  When you click-drag in the compositor window,
3707 you are only editing one of the masks.  Change the value of @b{mask number} to
3708 cause another mask to be edited.  The previous mask is still active but only
3709 the curve overlay for the currently selected mask is visible.
3711 When multiple masks are used, their effects are ORed together.  Every mask in a
3712 single track uses the same value and mode.
3714 @cindex Feather mask
3715 @cindex Mask, feather
3716 The edges of a mask are hard by default but this rarely is desired.  The
3717 @b{feather} parameter determines how many pixels to feather the mask.  This
3718 creates softer edges but takes longer to render.
3720 @center @image{manual_images_en/compositor_feather,120mm}
3721 @center @b{Feather parameter}
3723 Finally, there are parameters which affect one point on the current mask
3724 instead of the whole mask.  These are @b{Delete, x, y}.  The active point is
3725 defined as the last point dragged in the compositor window.  Any point can be
3726 activated merely by @b{CTRL-clicking} near it without moving the pointer.  Once
3727 a point is activated, @b{Delete} deletes it and @b{x, y} allow repositioning by
3728 numeric entry.
3730 @c cincvdoc_node_number_125
3731 @node Cropping
3732 @subsection Cropping
3733 @cindex Cropping
3735 Cropping changes the value of the output dimensions and the projector to reduce
3736 the visible picture area.  Enable the @image{manual_images_en/crop,4.33mm} crop toggle
3737 and the @image{manual_images_en/toolwindow,2.67mm} tool window in the @b{compositing
3738 window} to display the @b{Crop control dialog box}.
3740 @center @image{manual_images_en/compositor_crop_tool,60mm}
3741 @center @b{Crop control dialog box}
3743 Click-drag anywhere in the video to define the crop area.  This draws a
3744 rectangle over the video.  Click-drag anywhere in the video to start a new
3745 rectangle.  Click-drag over any corner of the rectangle to reposition the
3746 corner.
3748 @center @image{manual_images_en/compositor_crop}
3749 @center @b{Crop area defined}
3751 @b{ALT-click} in the cropping rectangle to translate the rectangle to any
3752 position without resizing it.
3754 The tool window allows text entry of the coordinates and executes the cropping
3755 operation.  When the rectangle is positioned, hit the @b{do it} button in the
3756 tool window to execute the cropping operation.
3758 @b{Note:} The X1,Y1 & X2,Y2 coordinates on the crop control dialog allows text
3759 entry of the top left and bottom right coordinates that define the crop
3760 rectangle.
3762 @c cincvdoc_node_number_126
3763 @node Safe regions
3764 @subsection Safe regions
3765 @cindex Safe regions
3766 @cindex Regions, safe
3768 On consumer displays the borders of the image are cut off and within the
3769 cut-off point is a region which is not always square like it is in the
3770 compositor window.  The borders are intended for scratch room and vertical
3771 blanking data.  You can show where these borders are by enabling the
3772 @image{manual_images_en/titlesafe} safe regions toggle.  Keep titles inside the inner
3773 rectangle and keep action inside the outer rectangle.
3775 @c cincvdoc_node_number_127
3776 @node Overlay modes
3777 @subsection Overlay modes
3778 @cindex Overlay modes
3780 Every video track has an overlay mode, accessible by expanding the track.  The
3781 overlay mode is a pull-down menu on the left under the fader.  When collapsed,
3782 it displays an icon representing the current overlay mode.
3784 Select the @image{manual_images_en/expandpatch_checked} expand track toggle to view all
3785 the options for a video track if you can not see the overlay mode.  The overlay
3786 mode of video tracks is @b{normal} by default.  Select other modes by clicking
3787 the overlay button and selecting an item from the popup menu.
3789 Overlay modes are processed inside the projector stage of compositing.  The
3790 different modes are summarized below.
3792 @cindex Normal overlay mode
3793 @itemize @bullet
3794 @item @b{Normal} @*
3795 This mode uses a traditional Porter-Diff equation to blend tracks with alpha.
3796 When no alpha exists in the project color model, the new track always replaces
3797 the output.
3799 @cindex Addition overlay mode
3800 @item @b{Addition} @*
3801 In this mode, whatever is in the output is added to the current track.
3802 The result is blended based on the current track's alpha onto the output.
3804 @cindex Subtraction overlay mode
3805 @item @b{Subtraction} @*
3806 In this mode, the current track is subtracted from the output and the
3807 result is alpha blended onto the output.
3809 @cindex Multiply overlay mode
3810 @item @b{Multiply} @*
3811 This is the most useful operation.  The current track is multiplied by the
3812 output and the result blended onto the output.  Usually a black and white image
3813 with no alpha channel or a white title on a black image is used as the current
3814 track.  With the multiply operation, only the output portions under the white
3815 area show.
3817 @cindex Divide overlay mode
3818 @item @b{Divide} @*
3819 This mode divides the current track by the output and the result is
3820 blended into the output.  It usually results in overloaded levels.
3822 @cindex Replace overlay mode
3823 @item @b{Replace} @*
3824 This mode does no blending and overwrites the output with the current
3825 track.
3826 @end itemize
3828 @c cincvdoc_node_number_128
3829 @node Track and output sizes
3830 @subsection Track and output sizes
3831 @cindex Track and output sizes
3832 @cindex Sizes, track and output
3834 @menu
3835 * Track size::
3836 * Output size::
3837 @end menu
3839 The size of the temporary and the size of the output in our compositing
3840 pipeline are independent and variable.  This fits into everything covered so
3841 far.  The camera's viewport is the temporary size.  Effects are processed in
3842 the temporary and are affected by the temporary size.  Projectors are rendered
3843 to the output and are affected by the output size.  If the temporary is smaller
3844 than the output, the temporary is bordered by blank regions in the output.  If
3845 the temporary is bigger than the output, the temporary is cropped.
3847 @c cincvdoc_node_number_149
3848 @node Track size
3849 @subsubsection Track size
3850 @cindex Track size
3851 @cindex Size, track
3853 The temporary size is defined as the track size.  Each track has a different
3854 size.  Right click on a track to bring up the track's menu.  Select @b{Resize
3855 Track} to resize the track to any arbitrary size.  Alternatively you can select
3856 @b{Match output size} to make the track the same size as the output.
3858 @center @image{manual_images_en/resize_track,70mm}
3859 @center @b{The resize track window}
3861 For example, the next image shows how a video track and a project output of
3862 equal sizes look when displayed on the compositor.
3864 @center @image{manual_images_en/compositor_output_equal,70mm}
3865 @center @b{Project output size and video}
3866 @center @b{track with equal dimensions (720x480)}
3868 If you resize a track, then its appearance on the compositor changes
3869 accordingly.
3871 Reducing the track (to 640 x 400) and leaving the project's output size
3872 untouched makes the track show on the compositor smaller and framed by a blank
3873 area.
3875 @center @image{manual_images_en/compositor_output_small,70mm}
3876 @center @b{New track (640x400), smaller}
3877 @center @b{than the project's output (720x480)}
3879 Enlarging the track (to 800 x 560) and leaving the project's output size
3880 untouched makes the track show on the compositor larger and cropped to the
3881 output's dimension.
3883 @center @image{manual_images_en/compositor_output_large,70mm}
3884 @center @b{New track (800x560), cropped to}
3885 @center @b{the project's output size (720x480)}
3887 Using this relationship between the track and the project's output size you can
3888 effectively reduce or magnify the size of a particular track with regards to
3889 the final output and therefore create visual "effects" like split screens,
3890 pans, and zooms on the compositor.
3892 @c cincvdoc_node_number_129
3893 @node Output size
3894 @subsubsection Output size
3895 @cindex Output size
3896 @cindex Size, output
3898 The output size is set in either @b{New} when creating a new project or
3899 @b{Settings->Format}.  In the Resource window there is another way to change
3900 the output size.  Right click on a video asset and select @b{Match project
3901 size} to conform the output to the asset.  When new tracks are created, the
3902 track size always conforms to the output size specified by these methods.
3904 When rendering, the project's output size is the final video track size where
3905 the temporary pipeline is rendered into.
3907 If the output size is larger than the temporary then the image transferred from
3908 the temporary will fit inside the Output Track.  Any space left on the Output
3909 is left blank.
3911 @center @image{manual_images_en/output_small}
3912 @center @b{Output size (shown in green) larger than the temporary}
3914 If the output size is smaller than the temporary then some of the temporary
3915 video will be cropped out.
3917 @center @image{manual_images_en/output_large}
3918 @center @b{Output size too small for the temporary}
3920 @c cincvdoc_node_number_130
3921 @node Viewer window
3922 @chapter Viewer window
3923 @cindex Viewer window
3925 The viewer window is a place to load and preview your source media and clips.
3926 Here you can quickly browse through an asset using the @b{slider control},
3927 focus on an area of work with the @b{preview region} or you use @b{editing
3928 controls} to cut & paste segments into the project or create a clip for later
3929 use.
3931 @center @image{manual_images_en/viewer,80mm}
3932 @center @b{The viewer window}
3934 To open the viewer window, go to @b{Window->Show Viewer}
3936 The display is the area on the viewer where you actually see media playing.
3937 Before you can play any media, you first must load it on the viewer.
3939 To load media into the viewer:
3940 @enumerate 1
3941 @item Open the @b{resources manager} window and select the @b{asset manager} or
3942 the @b{clip manager} folder.
3943 @item Drag a file from the @b{asset manager} or the @b{clip manager} to the
3944 viewer
3946 @center @image{manual_images_en/drag_to_viewer,101.75mm}
3947 @end enumerate
3949 You can also load media onto the viewer by right clicking on a file in the
3950 @b{asset manager} and selecting @b{View} from the popup menu or by double
3951 clicking on the icon.
3953 Once your media loads you will see it appear on the display. To play, rewind or
3954 forward through it use the @b{slider control} or the @b{transport controls}.
3956 You can change the media display size by right clicking on the screen to
3957 activate the display zoom menu.  Select zoom levels of 50%, 100% or 200% of the
3958 original media size.
3960 When displaying media, the viewer uses the project's defined output size format
3961 settings, not the original assets format.  You can change the project's output
3962 to match the asset's format using the @b{match project size} menu option in the
3963 @b{asset manager}.
3965 In here you will scrub around source media and clips, selecting regions to paste
3966 into the project.  Operations done in the viewer affect a temporary EDL or a
3967 clip but not the timeline.
3969 @c cincvdoc_node_number_131
3970 @node Resources window
3971 @chapter Resources window
3972 @cindex Resources window
3974 @menu
3975 * Navigating the resources::
3976 @end menu
3978 Effects, transitions, clips, and assets are accessed here.  Most of the
3979 resources are inserted into the project by dragging them out of the resource
3980 window.  Management of resource allocation is also performed here.
3982 @c cincvdoc_node_number_132
3983 @node Navigating the resources
3984 @section Navigating the resources
3985 @cindex Navigating the resources
3986 @cindex Resources, navigating the
3988 The resource window is divided into two areas.  One area lists folders and
3989 another area lists folder contents.  Going into the folder list and clicking on
3990 a folder updates the contents area with the contents of that folder.
3992 @center @image{manual_images_en/resources_audio_effects,60mm}
3993 @center @b{The resources window}
3995 The folder and contents can be displayed as icons or text.
3997 @b{Right clicking} in the folder or contents area brings up a menu containing
3998 formatting options.  Select @b{Display text} to display a text listing.  Select
3999 @b{Sort items} to sort the contents of the folder alphabetically.
4001 The @b{asset info window} displays detailed information about the selected
4002 media file.  To access it, go to the asset manager folder and right click on
4003 the label or icon of the file you are interested on.  An asset menu will
4004 appear, then click on Info.
4006 @center @image{manual_images_en/asset_info,50mm}
4007 @center @b{The asset info window}
4009 @c cincvdoc_node_number_133
4010 @node Sound level meters window
4011 @chapter Sound level meters window
4012 @cindex Sound level meters window
4014 An additional window, the @b{levels window} can be brought up from the
4015 @b{Window} menu.  The @b{levels} window displays the output audio levels after
4016 all mixing is done.
4018 @center @image{manual_images_en/sound_level_meters_window,,80mm}
4020 @center @b{The sound level meters window}
4022 Sound level meters appear in many locations.  They can be toggled in the viewer
4023 and compositor windows with the level toggle.  They appear in the patchbay when
4024 a track is expanded (@xref{The patchbay}.)  They appear in the recording
4025 monitor when audio is being recorded.
4027 The sound levels in the @b{levels window, compositor, and viewer} correspond to
4028 the final output levels before they are clipped to the soundcard range.  In the
4029 @b{record monitor} they are the input values from the sound card.  In the
4030 @b{patchbay} they are the sound levels for each track after all effects are
4031 processed and before down-mixing for the output.
4033 Most of the time, audio levels have numerical markings in dB but in the
4034 patchbay there is not enough room.
4036 The sound level is color coded as an extra means of determining the sound
4037 level.  Even without numerical markings, the sound level color can distinguish
4038 between several ranges and overload.  Look at the color codings in a meter with
4039 numerical markings to see what colors correspond to what sound level.  Then for
4040 meters in the patchbay in expanded audio tracks, use the color codings to see
4041 if it is overloading.
4043 Be aware that sound levels in Cinelerra can go above 0 dB@.  This allows not
4044 only seeing if a track is overloading but how much information is being lost by
4045 the overloading.  Overloading by less than 3 dB is usually acceptable.  While
4046 overloading is treated as positive numbers in Cinelerra, it is clipped to 0
4047 when sent to a sound card or file.
4049 The visible range of the sound level meters is configurable in
4050 @b{settings->preferences->interface} (@xref{Interface}.)
4052 @c cincvdoc_node_number_134
4053 @node Transport controls
4054 @chapter Transport controls
4055 @cindex Transport controls
4057 Transport controls are just as useful in navigation as they are in playing back
4058 footage, hence they are described here in the navigation section.  Each of the
4059 Viewer, Compositor, and Program windows has a transport panel.
4061 @center @image{manual_images_en/transport_panel,130mm}
4062 @center @b{The transport panel}.
4064 The transport panel is controlled by the keyboard as well as the graphical
4065 interface.  For each of the operations it performs, the starting position is
4066 the position of the insertion point in the Program window and the slider in the
4067 Compositor window.  The ending position is either the end or start of the
4068 timeline or the end or start of the selected region if there is one.
4070 The orientation of the end or start depends on the direction of playback.  If
4071 it is forward the end position is the end of the selected region.  If it is
4072 backward the end position is the start of the selected region.
4074 The insertion point moves to track playback.  When playback stops, the
4075 insertion point stays where playback stopped.  Thus, by playing back you change
4076 the position of the insertion point.
4078 The keyboard interface is usually the fastest and has more speeds.  The
4079 transport keys are arranged in a sideways @b{T} on the number pad.
4081 @multitable @columnfractions .08 .17 .08 .17 .08 .17 .08 .17
4082 @item @kbd{4}
4083 @tab Frame back
4084 @tab @kbd{5}
4085 @tab Reverse Slow
4086 @tab @kbd{6}
4087 @tab Reverse
4088 @tab @kbd{+}
4089 @tab Reverse Fast
4090 @item @kbd{1}
4091 @tab Frame Forward
4092 @tab @kbd{2}
4093 @tab Forward Slow
4094 @tab @kbd{3}
4095 @tab Play
4096 @tab @kbd{Enter}
4097 @tab Fast Forward
4098 @item @kbd{0}
4099 @tab Stop
4100 @tab
4101 @tab
4102 @tab
4103 @tab
4104 @tab
4105 @tab
4106 @end multitable
4108 Hitting any key on the keyboard twice pauses it.
4110 When using frame advance functions the behavior may seem odd.  If you frame
4111 advance forward and then frame advance backward, the displayed frame does not
4112 change.  This is because the playback position is not the frame but the time
4113 between two frames.  The rendered frame is the area that the playback position
4114 crosses.  When you increment the time between two frames by one and decrement
4115 it by one, you cross the same frame both times and so the same frame is
4116 displayed.
4118 The transport behavior changes if you hold down @key{CTRL} when issuing any of
4119 the transport commands.  This causes the starting point to be the in point if
4120 playing forward and the out point if playing backward.  If playing forward, the
4121 out point becomes the ending point and if playing backward, the in point
4122 becomes the ending point.  If no in/out points are specified, the behavior
4123 falls back to using the insertion point and track boundaries as the starting
4124 and ending points.
4126 It is possible to use a hardware JogShuttle@footnote{Refer to David Arendt's
4127 message posted on the Cinelerra CV mailing-list on the 2003-11-11 for more
4128 information}
4130 @c cincvdoc_node_number_135
4131 @node Timebar
4132 @chapter Timebar
4133 @cindex Timebar
4135 The navigation features of the Viewer and Compositor behave very similarly.
4136 Each has a timebar and slider below the video output.  The timebar and slider
4137 are critical for navigation.
4139 @center @image{manual_images_en/timebarslider,160mm}
4141 @cindex Preview region
4142 The timebar represents the entire time covered by the program.  When you define
4143 labels and in/out points it defines those, too.  Finally the timebar defines a
4144 region known as the @b{preview region}.
4146 The @b{preview region} is the region of the timeline which the slider affects.
4147 The slider only covers the time covered by the preview region.  By using a
4148 preview region inside the entire program and using the slider inside the
4149 preview region you can quickly and precisely seek in the compositor and viewer.
4151 When you replace the current project with a file the preview region
4152 automatically resizes to cover the entire file.  When you append data or change
4153 the size of the current project, the preview region stays the same size and
4154 shrinks.  Therefore, you need to resize the preview region.
4156 Load a file and then slide around it using the compositor slider.  The
4157 insertion point in the main window follows the compositor.  Move the pointer
4158 over the compositor's timebar until it turns into a left resize pointer.  The
4159 click and drag right.  The preview region should have changed and the slider
4160 resized proportionally.
4162 Go to the right of the timebar until a right resize pointer appears.  Drag left
4163 so the preview region shrinks.
4165 Go to the center of the preview region in the timebar and drag it around to
4166 convince yourself if can be moved.
4168 @b{Note:} When you append data or change the size of the current project, the
4169 preview region stays the same size and shrinks.  Therefore, you need to resize
4170 the preview region.
4172 @center @image{manual_images_en/previewregion,160mm}
4173 @center @b{Preview region in compositor}
4175 If you go to the slider and slide it around with the preview region shrunk,
4176 you will see the slider only affects the preview region.  The timebar and slider
4177 in the viewer window work exactly the same.
4179 Labels and in/out points are fully supported in the viewer and compositor.  The
4180 only difference between the viewer and compositor is the compositor reflects
4181 the state of the program while the viewer reflects the state of a clip but not
4182 the program.
4184 When you hit the @b{label button} in the compositor, the label appears both in
4185 the compositor timebar and the program timebar.
4187 When you select a label or in/out point in the compositor, the program window
4188 jumps to that position.
4190 @center @image{manual_images_en/viewer_labels,160mm}
4191 @center @b{Labels and in/out points in the viewer}.
4193 In the viewer and compositor, labels and in/out points are displayed in the
4194 timebar.  Instead of displaying just a region of the program, the timebar
4195 displays the entire program here.
4197 Like the program window, the compositor has a zoom capability.  First, the
4198 pull-down menu on the bottom of the compositor window has a number of zoom
4199 options.  When set to @b{Auto} the video is zoomed to match the compositor
4200 window size as closely as possible.  When set to any other percentage, the
4201 video is zoomed a power of 2 and scrollbars can be used to scroll around the
4202 output.  When the video is zoomed bigger than the window size, not only do
4203 scrollbars scan around it but @b{middle mouse button} dragging in the video
4204 output scans around it.  This is exactly when The Gimp does.
4206 Furthermore, the zoom @image{manual_images_en/magnify,7mm} toggle causes the
4207 Compositor window to enter zoom mode.  In zoom mode, clicking in the video
4208 output zooms in while @b{ctrl-clicking} in the video output zooms out.  If you
4209 have a wheel mouse, rotating the wheel zooms in or out too.
4211 Zooming in or out with the zoom tool does not change the rendered output, mind
4212 you.  It is merely for scrutinizing video or fitting it in the desktop.
4214 Playing video on the compositor when zoomed to any size other that 100%, the
4215 original size, requires Cinelerra to do extra processing steps.  This could
4216 affect performance on slower systems.
4218 @c cincvdoc_node_number_136
4219 @node Realtime effects
4220 @chapter Realtime effects
4221 @cindex Realtime effects
4222 @cindex Effects, realtime
4224 These are layered under the track they apply to.  They process the track when
4225 the track is played back, with no permanent storage of the output except when
4226 the project is rendered.
4228 All the realtime effects are listed in the resource window, divided into two
4229 groups: audio effects and video effects.  Audio effects should be dragged from
4230 the resource window onto audio tracks.  Video effects should be dragged onto
4231 video tracks.
4233 If there is data on the destination track, the effect is applied to the entire
4234 track.  If there is no data on the track the effect is deleted.  Finally, if a
4235 region of the track is selected the effect is pasted into the region,
4236 regardless of whether there is data.
4238 Some of the effects do not process data but synthesize data.  In the case of a
4239 synthesis effect, you will want to select a region of the track so the dragging
4240 operation pastes it without deleting it.
4242 When dragging more than one effect onto a track, you will see the effects
4243 layering from top to bottom, on the bottom of the track.  When the track is
4244 played back, effects are processed from top to bottom.  The output of the top
4245 effect becomes the input of the bottom effect and so on and so forth.
4247 In addition to dragging from the resource window, effects may be applied to a
4248 track by a popup menu.  Right click on a track and select @b{Attach effect}
4249 from the popup.  The attach effect dialog gives you more control than pure
4250 dragging and dropping.  For one thing, the attach effect dialog lets you attach
4251 two more types of effects: shared effects and shared tracks.  Select a plugin
4252 from the @b{Plugins} column and hit @b{Attach} under the plugins column to
4253 attach it.  The effect is the same as if the effect was dragged from the
4254 resource window.
4256 When an effect exists under a track, it often needs to be configured.  Go
4257 to the effect and right click on it to bring up the effect popup.  In the
4258 effect popup is a @b{show} option.  The show option causes the GUI for the
4259 effect to appear under the cursor.  Most effects have GUI's but some do not.  If
4260 the effect does not have a GUI, nothing pops up when the @b{show} option is
4261 selected.  When you tweek parameters in the effect GUI, the parameters normally
4262 affect the entire duration of the effect.
4264 @menu
4265 * Realtime effect types::
4266 * Editing realtime effects::
4267 * Realtime audio effects::     Realtime audio effects
4268 * Realtime video effects::     Realtime video effects
4269 @end menu
4271 @c cincvdoc_node_number_137
4272 @node Realtime effect types
4273 @section Realtime effect types
4274 @cindex Realtime effect types
4276 The two other effect types supported by the Attach Effect dialog are recycled
4277 effects.  In order to use a recycled effect, three requirements must be met:
4278 @itemize @bullet
4279 @item There must be other effects in the timeline.
4280 @item The other effects must be of the same type as the track you are attaching
4281 an effect to.  If the track is an audio track, the effects must be audio
4282 effects.  If the track is a video track, the effects must be video effects.
4283 @item The insertion point or selected region must start inside the other
4284 effects.
4285 @end itemize
4287 In the case of a shared effect, these conditions must be true.  In the case of
4288 a shared track, there merely must be another track on the timeline of the same
4289 type as the track you are applying an effect to.  If you right clicked on a
4290 video track to attach an effect, there will not be anything in the @b{shared
4291 tracks} column if no other video track exists.  If you right clicked on an
4292 audio track there will not be anything in the shared track column if no other
4293 audio track exists.
4295 If shared effects or shared tracks are available, they appear in the @b{shared
4296 effects} and @b{shared tracks} columns.  The @b{attach} button under each
4297 column causes anything highlighted in the column to be attached under the
4298 current track.
4300 Shared effects and shared tracks allow very unique things to be done.  In the
4301 case of a shared effect, the shared effect is treated like a copy of the
4302 original effect except in the shared effect the GUI can not be brought up.  All
4303 configuration of the shared effect is determined by the GUI of the original
4304 effect and only the GUI of the original effect can be brought up.
4306 When a shared effect is played back, it is processed just like a normal effect
4307 except the configuration is copied from the original effect.  Some effects
4308 detect when they are being shared, like the reverb effects and the compressor.
4309 These effects determine what tracks are sharing them and either mix the two
4310 tracks together or use one track to stage some value.  The reverb mixes tracks
4311 together to simulate ambience.  The compressor uses one of the sharing tracks
4312 as the trigger.
4314 @cindex Bouncing tracks
4315 @cindex Tracks, bouncing
4316 When an original track has a @b{shared track} as one of its effects, the shared
4317 track itself is used as a realtime effect.  This is more commonly known as
4318 @b{bouncing tracks} but Cinelerra achieves the same operation by attaching
4319 shared tracks.  The fade and any effects in the shared track are applied to the
4320 original track.  Once the shared track has processed the data, the original
4321 track performs any effects which come below the shared track and then
4322 composites it on the output.
4324 In addition, once the shared track has processed the output of the original
4325 track like a realtime effect, the shared track mixes itself into the output
4326 with it is settings for pan, mode, and projector.  Thus, two tracks are mixing
4327 the same data on the output.  Most of the times you do not want the shared track
4328 to mix the same data as the original track on the output.  You want it to stop
4329 right before the mixing stage and give the data back to the original track.  Do
4330 this by enabling the @image{manual_images_en/mutepatch_up} mute toggle next to each
4331 track for whom you do not want to mix on the output.
4333 Suppose you were making video and you did want the shared track to composite
4334 the original track's data on the output a second time.  In the case of video,
4335 the video from the shared track would always appear under the video from the
4336 original track, regardless of whether it was on top of the original track.
4337 This is because shared tracks are composited in order of their attachment.
4338 Since it is part of the original track it has to be composited before the
4339 original track is composited.
4341 @c cincvdoc_node_number_138
4342 @node Editing realtime effects
4343 @section Editing realtime effects
4344 @cindex Realtime effects, editing
4345 Many operations exist for manipulating effects once they are in the timeline.
4346 Because mixing effects and media is such complex business, the methods used in
4347 editing effects are not as concise as cutting and pasting.  Some of the editing
4348 happens by dragging in/out points, some of the editing happens through popup
4349 menus, and some of it happens by dragging effects.
4351 Normally when you edit tracks, the effects follow the editing decisions.  If
4352 you cut from a track, the effect shrinks.  If you drag edit in/out points, the
4353 effect changes length.  This behavior can be disabled by selecting
4354 @b{Settings->edit effects} in the project window.  This decouples effects from
4355 editing operations, but what if you just want to edit the effects?
4357 Move the timeline cursor over the effect borders until it changes to a resize
4358 left or resize right icon.  In this state, if you drag the end of the effect,
4359 it performs an edit just like dragging the end of a track does.
4361 The three editing behaviors of track trimming apply to effect trimming and they
4362 are bound to the mouse buttons that you set in @b{interface preferences}.
4363 @xref{Interface}.  When you perform a trim edit on an effect, the effect
4364 boundary is moved by dragging on it.  Unlike track editing, the effect has no
4365 source length.  You can extend the end of an effect as much as desired without
4366 being limited.
4368 Also unlike track editing, the starting position of the drag operation does not
4369 bind the edit decision to media.  The media the effect is bound to does not
4370 follow effect edits.  Other effects, however, do follow editing decisions made
4371 on an effect.  If you drag the end of an effect which is lined up to effects on
4372 other tracks, the effects on the other tracks will be edited while the media
4373 stays the same.
4375 What happens if you trim the end of an effect in, leaving a lot of unaffected
4376 time near the end of the track?  When you drag an effect in from the Resource
4377 Window you can insert the effect in the portion of the row unoccupied by the
4378 trimming operation.  Realtime effects are organized into rows under the track.
4379 Each row can have multiple effects.
4381 In some cases you will want a trimming operation to change only one row of
4382 effects.  This can be achieved by first positioning the insertion point on the
4383 start or end of the effect.  Then press @key{SHIFT} while beginning the
4384 trimming operation.  This causes the operation to change only one row of
4385 effects.
4387 In addition to trimming, you can move effects up or down.  Every track can have
4388 a stack of effects under it.  By moving an effect up or down you change the
4389 order in which effects are processed in the stack.  Go to an effect and right
4390 click to bring up the effect menu.  The @b{Move up} and @b{Move down} options
4391 move the effect up or down.
4393 @cindex Shared effects
4394 @cindex Effects, shared
4395 When you are moving effects up or down, be aware that if they are shared as
4396 @b{shared effects}, any references will be pointing to a different effect after
4397 the move operation.
4399 Finally, there is dragging of effects.  Dragging effects works just like
4400 dragging edits.  You must select the @image{manual_images_en/arrow,2.67mm} arrow
4401 to enter drag and drop mode before dragging effects.  The effects snap to media
4402 boundaries, effect boundaries, and tracks.  Be aware if you drag a reference to
4403 a shared effect, the reference will usually point to the wrong effect
4404 afterwards.
4406 Right click on an effect to bring up a menu for the effect.  Select
4407 @b{attach...} to change the effect or change the reference if it is a shared
4408 effect.
4410 @c cincvdoc_node_number_139
4411 @node Realtime audio effects
4412 @section Realtime audio effects
4413 @cindex Realtime audio effects
4415 @menu
4416 * Compressor::        How to reduce the dynamic range of audio.
4417 * Live audio::        Pass audio from the soundcard directly to the timeline.
4418 * Pitch shift::
4419 * Reverse audio::     How to play regions in reverse.
4420 * Delay audio::
4421 * Denoise::
4422 * DenoiseFFT::
4423 * Despike::
4424 * EQ Parametric::
4425 * Freeverb::
4426 * Gain::
4427 * Heroine College::
4428 * Interpolate::
4429 * Invert Audio::
4430 * Loop audio::
4431 * Overlay::
4432 * SoundLevel::
4433 * Spectrogram::
4434 * Synthesizer::
4435 * Time stretch::
4436 @end menu
4438 @c cincvdoc_node_number_140
4439 @node Compressor
4440 @subsection Compressor
4441 @cindex Compressor
4443 @image{manual_images_en/compressor,12.5mm}
4445 Contrary to computer science experience, the audio compressor does not reduce
4446 the amount of data required to store the audio.  The audio compressor reduces
4447 the dynamic range of the audio.  In Cinelerra the compressor actually performs
4448 the function of an expander and compressor.
4450 The compressor works by calculating the maximum sound level within a certain
4451 time period of the current position.  The maximum sound level is taken as the
4452 input sound level.  For every input sound level there is an output sound level
4453 specified by the user.  The gain at the current position is adjusted so the
4454 maximum sound level in the time range is the user specified value.
4456 The compressor has a graph which correlates every input sound level to an
4457 output level.  The horizontal direction is the input sound level in dB@.  The
4458 vertical direction is the output sound level in dB@.  The user specifies output
4459 sound levels by creating points on the graph.  Click in the graph to create a
4460 point.  If 2 points exist, drag one point across another point to delete it.
4461 The most recent point selected has its vales displayed in textboxes for more
4462 precise adjustment.
4464 To make the compressor reduce the dynamic range of the audio, make all the
4465 output values greater than the input values except 0 dB@.  To make the
4466 compressor expand the dynamic range of the audio, make all the output values
4467 except 0 dB less than the input values.  The algorithm currently limits all
4468 sound levels above 0 dB to 0 dB so to get an overloaded effect put a gain
4469 effect before the compressor to reduce all the levels and follow it with
4470 another gain effect to amplify all the levels back over 0 dB@.
4472 @b{Reaction secs:} This determines where in relation to the current position
4473 the maximum sound level is taken and how fast the gain is adjusted to reach
4474 that peak.  It is notated in seconds.  If it is negative the compressor reads
4475 ahead of the current position to get the future peak.  The gain is ramped to
4476 that peak over one reaction time.  This allows it to hit the desired output
4477 level exactly when the input peak occurs at the current position.
4479 If the reaction time is positive the compressor scans only the current position
4480 for the gain and ramps gain over one reaction time to hit the desired output
4481 level.  It hits the output level exactly one reaction time after detecting the
4482 input peak.
4484 @b{Decay secs:} If the peak is higher than the current level, the compressor
4485 ramps the gain up to the peak value.  Then if a future peak is less than the
4486 current peak it ramps the gain down.  The time taken to ramp the gain down can
4487 be greater than the time taken to ramp the gain up.  This ramping down time is
4488 the decay seconds.
4490 @b{Trigger type:}  The compressor is a multi-channel effect.  Several tracks can
4491 share one compressor.  How the signal from many tracks is interpreted is
4492 determined by the trigger type.
4494 The @b{Trigger type} uses the value supplied in the @b{Trigger} textbox as the
4495 number of the track to use as input for the compressor.  This allows a track
4496 which is not even heard to determine the loudness of the other tracks.
4498 The @b{Maximum} trigger takes the loudest track and uses it as the input for
4499 the compressor.
4501 The @b{Total} trigger type adds the signals from all the tracks and uses the
4502 total as the input for the compressor.  This is the most natural sounding
4503 compression and is ideal when multiple tracks are averaged into single
4504 speakers.
4506 @b{Trigger:} The compressor is a multichannel effect.  Several tracks can share
4507 one compressor.  Normally only one track is scanned for the input peak.  This
4508 track is specified by the @b{Trigger}.  By sharing several tracks and playing
4509 with the trigger value, you can make a sine wave on one track follow the
4510 amplitude of a drum on another track for example.
4512 @b{Smooth only:} For visualizing what the compressor is doing to the
4513 sound-level, this option causes it to replace the sound wave with just the
4514 current peak value.  It makes it very easy to see how @b{reaction secs} affects
4515 the detected peak values.
4517 @c cincvdoc_node_number_141
4518 @node Delay audio
4519 @subsection Delay audio
4520 @cindex Delay audio
4522 @image{manual_images_en/delayaudio,12.5mm}
4524 Just tell how much seconds you want to delay the video track.
4526 @c cincvdoc_node_number_142
4527 @node Denoise
4528 @subsection Denoise
4529 @cindex Denoise
4531 @image{manual_images_en/denoise,13mm}
4533 FIXME
4535 @c cincvdoc_node_number_143
4536 @node DenoiseFFT
4537 @subsection DenoiseFFT
4538 @cindex DenoiseFFT
4540 @image{manual_images_en/denoisefft,13mm}
4542 FIXME
4544 @c cincvdoc_node_number_144
4545 @node Despike
4546 @subsection Despike
4547 @cindex Despike
4549 @image{manual_images_en/despike,12.5mm}
4551 FIXME
4553 @c cincvdoc_node_number_145
4554 @node EQ Parametric
4555 @subsection EQ Parametric
4556 @cindex EQ Parametric
4558 @image{manual_images_en/parametric,12.5mm}
4560 FIXME
4562 @c cincvdoc_node_number_146
4563 @node Freeverb
4564 @subsection Freeverb
4565 @cindex Freeverb
4567 @image{manual_images_en/freeverb,12.5mm}
4569 FIXME
4571 @c cincvdoc_node_number_147
4572 @node Gain
4573 @subsection Gain
4574 @cindex Gain
4576 @image{manual_images_en/gain,12.5mm}
4578 FIXME
4580 @c cincvdoc_node_number_148
4581 @node Heroine College
4582 @subsection Heroine College
4583 @cindex Heroine College
4585 @image{manual_images_en/reverb,12.5mm}
4587 FIXME
4589 @c cincvdoc_node_number_150
4590 @node Interpolate
4591 @subsection Interpolate
4592 @cindex Interpolate
4594 @image{manual_images_en/interpolateaudio,13.25mm}
4596 FIXME
4598 @c cincvdoc_node_number_151
4599 @node Invert Audio
4600 @subsection Invert Audio
4601 @cindex Invert Audio
4603 @image{manual_images_en/invertaudio,12.5mm}
4605 FIXME
4607 @c cincvdoc_node_number_152
4608 @node Live audio
4609 @subsection Live audio
4610 @cindex Live audio effect
4612 @image{manual_images_en/liveaudio,12.5mm}
4614 This effect reads audio directly from the soundcard input.  It replaces any
4615 audio on the track so it is normally applied to an empty track.
4617 To use Live Audio, highlight a horizontal region of an audio track or define in
4618 and out points.  Then drop the Live Audio effect into it.  Create extra tracks
4619 and attach shared copies of the first Live Audio effect to the other tracks to
4620 have extra channels recorded.
4622 Live Audio uses the sound driver selected in
4623 @b{Settings->Preferences->Playback->Audio Out} for recording, but unlike
4624 recording it uses the @b{playback buffer size} as the recording buffer size and
4625 it uses the @b{project sample rate} as the sampling rate.
4627 These settings are critical since some sound drivers can not record in the same
4628 sized buffer they play back in.  Live audio has been most reliable when ALSA is
4629 the recording driver and the playback fragment size is 2048.
4631 Drop other effects after Live Audio to process soundcard input in realtime.
4633 Now the bad news.  With live audio there is no read-ahead, so effects like
4634 compressor will either delay if they have read-ahead enabled or playback will
4635 under-run.
4637 Another problem is sometimes the recording clock on the soundcard is slightly
4638 slower than the playback clock.  The recording eventually falls behind and
4639 playback sounds choppy.
4641 Finally, live audio does not work in reverse.
4643 @c cincvdoc_node_number_153
4644 @node Loop audio
4645 @subsection Loop audio
4646 @cindex Loop audio
4648 @image{manual_images_en/loopaudio,12.5mm}
4650 FIXME
4652 @c cincvdoc_node_number_154
4653 @node Overlay
4654 @subsection Overlay
4655 @cindex Overlay
4657 @image{manual_images_en/overlay,13.25mm}
4659 FIXME
4661 @c cincvdoc_node_number_155
4662 @node Pitch shift
4663 @subsection Pitch shift
4664 @cindex Pitch shift
4665 @cindex Audio, pitch shift
4667 @image{manual_images_en/pitch,12.5mm}
4669 Like the time stretching methods, there are three pitch shifting methods:
4670 @b{Pitch shift}, @b{Resample}, and @b{Asset info dialog}.  Pitch shift is a
4671 realtime effect which can be dragged and dropped onto recordable audio tracks.
4672 Pitch shift uses a fast Fourier transform to try to change the pitch without
4673 changing the duration, but this introduces windowing artifacts.
4675 Because the windowing artifacts are less obtrusive in audio which is obviously
4676 pitch shifted, Pitch shift is mainly useful for extreme pitch changes.  For
4677 mild pitch changes, use @b{Resample} from the @b{Audio->Render Effect}
4678 interface.  Resample can change the pitch within 5% without a noticeable change
4679 in duration.
4681 Another way to change pitch slightly is to go to the @b{Resources} window,
4682 highlight the @b{media} folder, right click on an audio file, click on
4683 @b{Info}.  Adjust the sample rate in the @b{Info} dialog to adjust the pitch.
4684 This method also requires left clicking on the right boundary of the audio
4685 tracks and dragging left or right to correspond to the length changes.
4687 @c cincvdoc_node_number_156
4688 @node Reverse audio
4689 @subsection Reverse audio
4690 @cindex Reverse audio effect
4692 @image{manual_images_en/reverseaudio,12.5mm}
4694 Apply @b{reverse audio} to an audio track and play it backwards.  The sound
4695 plays forward.
4697 Be aware when reversing audio that the waveform on the timeline does not
4698 reflect the actual reversed output.
4700 @c cincvdoc_node_number_157
4701 @node SoundLevel
4702 @subsection SoundLevel
4703 @cindex SoundLevel
4705 @image{manual_images_en/level,12.5mm}
4707 FIXME
4709 @c cincvdoc_node_number_158
4710 @node Spectrogram
4711 @subsection Spectrogram
4712 @cindex Spectrogram
4714 @image{manual_images_en/spectrogram,12.5mm}
4716 FIXME
4718 @c cincvdoc_node_number_159
4719 @node Synthesizer
4720 @subsection Synthesizer
4721 @cindex Synthesizer
4723 @image{manual_images_en/synthesizer,12.5mm}
4725 FIXME
4727 @c cincvdoc_node_number_160
4728 @node Time stretch
4729 @subsection Time stretch
4730 @cindex Time stretch
4732 @image{manual_images_en/timestretch,12.5mm}
4734 FIXME
4736 @c cincvdoc_node_number_161
4737 @node Realtime video effects
4738 @section Realtime video effects
4739 @cindex Realtime video effects
4741 @menu
4742 * 1080 to 480::       How to convert HDTV into SD
4743 * Aging TV::    How to achieve an old movie look
4744 * Blur::
4745 * Brightness/contrast::    How to adjust brightness and contrast
4746 * Burning TV::        How to make your video "burn"
4747 * Chroma key::        Create transparency based on color similarities.
4748 * Chroma key (HSV)::
4749 * Color balance::
4750 * Delay video::
4751 * Denoise video::
4752 * Denoise video2::
4753 * Decimate::          How to reduce frame rates by eliminating similar frames.
4754 * Deinterlace::       How to convert interlaced video to progressive video.
4755 * Difference key::    Create transparency based on color differences.
4756 * DotTV::             How to give a "DotTV" look to your video
4757 * Downsample::        How to reduce the size of an image by throwing out data
4758 * Fields to frames::  How to recover interlaced video from bobbed video
4759 * Flip::              How to flip a video track
4760 * Frames to fields::
4761 * Freeze frame::
4762 * Gamma::
4763 * Gradient::
4764 * Histogram::         How to change the mapping of different brightness values.
4765 * HolographicTV::
4766 * Hue saturation::    How to adjust hue and saturation
4767 * Interpolate video::
4768 * Interpolate pixels:: How to create the illusion of higher framerates.
4769 * Inverse telecine::  How to convert pulled down frames to progressive frames.
4770 * Invert video::
4771 * Linear blur::
4772 * Live video::        Pass video from the capture card directly to the timeline.
4773 * Loop video::        How to loop regions of the timeline.
4774 * Motion::            The art of motion tracking.
4775 * Motion blur::
4776 * Oil painting::      How to make your video look like a painting
4777 * Overlay video::
4778 * Perspective::       How to modify the perspective of a video track
4779 * Polar::             How to bend and wrap your video
4780 * RGB-601::
4781 * Radial blur::
4782 * ReframeRT::         Changing the number of frames in a sequence.
4783 * Reverse video::     How to play regions in reverse.
4784 * Rotate::            How to rotate your video
4785 * SVG via Inkscape::
4786 * Scale::
4787 * Selective temporal averaging::
4788 * Sharpen::
4789 * ShiftInterlace::
4790 * Swap channels::
4791 * Threshold::         How to get monochrome out of a region of the image.
4792 * Time average::      How to add trail patterns or increase still image quality.
4793 * TimeFront::
4794 * Title::             How to add text to a track from inside Cinelerra.
4795 * Translate::
4796 * Unsharp::           How to unsharp your video
4797 * Videoscope::        How to view the dynamic range of intensity and hue.
4798 * Wave::
4799 * Whirl::
4800 * YUV::
4801 * Zoom blur::
4802 @end menu
4804 @c cincvdoc_node_number_162
4805 @node 1080 to 480
4806 @subsection 1080 to 480
4807 @cindex 1080 to 480 effect
4809 @image{manual_images_en/1080to540,12.5mm}
4811 Most TV broadcasts are received with a 1920x1080 resolution but originate from
4812 a 720x480 source at the studio.  It is a waste of space to compress the entire
4813 1920x1080 if the only resolvable details are 720x480.  Unfortunately resizing
4814 1920x1080 video to 720x480 is not as simple as shrinking it.
4816 At the TV station the original 720x480 footage was first converted to fields of
4817 720x240.  Each field was then scaled up to 1920x540.  The two 1920x540 fields
4818 were finally combined with interlacing to form the 1920x1080 image.  This
4819 technique allows a consumer TV to display the re-sampled image without extra
4820 circuitry to handle 720x480 interlacing in a 1920x1080 image.
4822 If you merely deinterlace the 1920x1080 images, you would end up with
4823 resolution of 720x240.  The @b{1080 to 480} effect properly extracts two
4824 1920x540 size fields from the image, resizes them separately, and combines them
4825 again to restore a 1920x480 interlaced image.  The @b{scale} effect must then
4826 be applied to reduce the horizontal size to 960 or 720 depending on the
4827 original aspect ratio.
4829 The tracks to which @b{1080 to 480} is applied need to be at 1920x1080
4830 resolution.  The project settings in @b{settings->format} should be at least
4831 720x480 resolution.
4833 The effect does not know if the first row in the 1920x1080 image belongs to the
4834 first row of the 720x480 original.  You have to specify what the first row is
4835 in the effect configuration.
4837 The output of this effect is a small image in the middle of the original
4838 1920x1080 frame.  Use the projector to center the output image in the playback.
4840 Finally, once you have 720x480 interlaced video you can either apply @b{frames
4841 to fields} of @b{inverse telecine} to further recover original progressive
4842 frames.
4844 @c cincvdoc_node_number_163
4845 @node Aging TV
4846 @subsection Aging TV
4847 @cindex Aging TV
4849 @image{manual_images_en/aging,17mm}
4851 This effect is the one to use if you want to achieve an "old movie" or TV show
4852 look.  It will put moving lines up and down the movie as well as putting "snow"
4853 on the video.  Use is along with Brightness/Contrast and Color Balance to make
4854 your movie look like a really old black and white movie.
4856 @c cincvdoc_node_number_164
4857 @node Blur
4858 @subsection Blur
4859 @cindex Blur
4861 @image{manual_images_en/blur,12.5mm}
4863 This effect blurs a video track.  The parameters are:
4864 @itemize @bullet
4865 @item @b{Horizontal and vertical} @*
4866 Those parameters are used to tell which one of field blurring affects.  It
4867 can be be both fields.
4868 @item @b{Radius} @*
4869 Use this slider to define the amount of blur to apply.
4870 @item @b{Blur alpha, red, green, blue} @*
4871 Specifies which color channels has to be blurred.
4872 @end itemize
4874 @c cincvdoc_node_number_165
4875 @node Brightness/contrast
4876 @subsection Brightness/contrast
4877 @cindex Brightness/contrast
4878 @cindex Contrast
4880 @image{manual_images_en/brightness,12.5mm}
4882 If you want to brighten a dark shot, or add light, this is the tool to use.  Do
4883 not overuse the effect or you risk degrading your video quality.  Use the effect along
4884 with Keyframing to brighten a long shot that is dark at the beginning but bright
4885 at the end.  Generally you will want to change the brightness and contrast
4886 about the same amount (eg darkness 28 contrast 26) so that your original colors
4887 are kept intact.
4889 @c cincvdoc_node_number_166
4890 @node Burning TV
4891 @subsection Burning TV
4892 @cindex Burning TV
4893 @cindex Video burning
4895 @image{manual_images_en/burn,16mm}
4897 The video burning effect makes your video "burn" where there are small light
4898 colored patches of video, on the edge of a white T-shirt for example.  It can
4899 be a great asset to a music video and just a great outlet to help free your
4900 imagination in your video.
4902 @c cincvdoc_node_number_167
4903 @node Chroma key
4904 @subsection Chroma key
4905 @cindex Chroma key effect
4907 @image{manual_images_en/chromakey,12.5mm}
4909 This effect erases pixels which match the selected color.  They are replaced
4910 to black if there is no alpha channel and transparency if there is an alpha
4911 channel.  The selection of color model is important to determine the behavior.
4913 @cindex Color picker
4914 @cindex Picker, color
4915 Chroma key uses either the lightness or the hue to determine what is erased.
4916 @b{Use value} singles out only the lightness to determine transparency.  Select
4917 a center color to erase using the @b{Color} button.  Alternatively a color can
4918 be picked directly from the output frame by first using the @b{color picker} in
4919 the compositor window and then selecting the @b{Use color picker} button.  This
4920 sets the chroma key color to the current color picker color.
4922 Be aware that the output of the chroma key is fed back to the compositor, so
4923 selecting a color again from the compositor will use the output of the chroma
4924 key effect.  The chroma key should be disabled when selecting colors with the
4925 color picker.
4927 If the lightness or hue is within a certain threshold it is erased.  Increasing
4928 the threshold determines the range of colors to be erased.  It is not a simple
4929 on/off switch, however.  As the color approaches the edge of the threshold, it
4930 gradually gets erased if the slope is high or is rapidly erased if the slope is
4931 low.  The slope as defined here is the number of extra values flanking the
4932 threshold required to go from opaque to transparent.
4934 Normally threshold is very low when using a high slope.  The two parameters
4935 tend to be exclusive because slope fills in extra threshold.
4937 The slope tries to soften the edges of the chroma key but it does not work well
4938 for compressed sources.  A popular softening technique is to use a maximum
4939 slope and chain a blur effect below the chroma key effect to blur just the
4940 alpha.
4942 @c cincvdoc_node_number_168
4943 @node Chroma key (HSV)
4944 @subsection Chroma key (HSV)
4945 @cindex Chroma key effect (HSV)
4947 @image{manual_images_en/chromakeyhsv,12.5mm}
4949 FIXME
4951 @c cincvdoc_node_number_169
4952 @node Color balance
4953 @subsection Color balance
4954 @cindex Color balance
4955 @cindex Balance, color
4957 @image{manual_images_en/colorbalance,12.5mm}
4959 Video Color Balance is a great effect to use along with Brightness/contrast and
4960 Hue/Saturation to try and compensate for possible errors in filming (low
4961 lighting, etc).  It can only do so much without greatly lowering the quality of
4962 the video, however.  It is just like the color balance effect on a picture
4963 editing program, such as GIMP@.  With it you can change the colors being sent to
4964 output CMY (Cyan, Magenta, Yellow) or RGB (Red, Green, Blue).
4966 @c cincvdoc_node_number_170
4967 @node Decimate
4968 @subsection Decimate
4969 @cindex Decimate effect
4971 @image{manual_images_en/decimate,13.25mm}
4973 This effect drops frames from a track which are most similar in order to reduce
4974 the frame rate.  This is usually applied to a DVD to convert the 29.97 fps
4975 video to the 23.97 fps film rate but this decimate effect can take any input
4976 rate and convert it to any lower output rate.
4978 The output rate of @b{decimate} is the project frame rate.  The input rate is
4979 set in the @b{decimate} user interface.  To convert 29.97 fps progressive video
4980 to 23.97 fps film, apply a decimate effect to the track.  Set the decimate
4981 input rate to 29.97 and the project rate to 23.97.
4983 Be aware every effect layered before decimate processes video at the decimate
4984 input rate and every effect layered after decimate processes video at the
4985 project frame rate.  Computationally intensive effects should come below
4986 decimate.
4988 @c cincvdoc_node_number_171
4989 @node Deinterlace
4990 @subsection Deinterlace
4991 @cindex Deinterlace effect
4993 @image{manual_images_en/deinterlace,12.5mm}
4995 The deinterlace effect has evolved over the years to deinterlacing and a whole
4996 lot more.  In fact two of the deinterlacing methods, @b{Inverse Telecine} and
4997 @b{Frames to Fields}, are separate effects.  The deinterlace effect offers
4998 several variations of line replication to eliminate comb artifacts in
4999 interlaced video.  It also has some line swapping tools to fix improperly
5000 captured video or make the result of a reverse effect display fields in the
5001 right order.
5003 @c cincvdoc_node_number_172
5004 @node Delay video
5005 @subsection Delay video
5006 @cindex Delay video
5008 @image{manual_images_en/delayvideo,12.5mm}
5010 FIXME
5012 @c cincvdoc_node_number_173
5013 @node Denoise video
5014 @subsection Denoise video
5015 @cindex Denoise video
5017 @image{manual_images_en/denoisevideo,12.5mm}
5019 FIXME
5021 @c cincvdoc_node_number_174
5022 @node Denoise video2
5023 @subsection Denoise video2
5024 @cindex Denoise video
5026 @image{manual_images_en/denoisemjpeg,12.5mm}
5028 FIXME
5030 @c cincvdoc_node_number_175
5031 @node Difference key
5032 @subsection Difference key
5033 @cindex Difference key effect
5035 @image{manual_images_en/diffkey,12.5mm}
5037 The difference key creates transparency in areas which are similar between 2
5038 frames.  The Difference key effect must be applied to 2 tracks.  One track
5039 contains the action in front of a constant background and another track
5040 contains the background with nothing in front of it.  Apply the difference key
5041 to the track with the action and apply a shared copy of it to the track with
5042 the background.  The track with the background should be muted and underneath
5043 the track with the action and the colormodel should have an alpha channel.
5045 Pixels which are different between the background and action track are treated
5046 as opaque.  Pixels which are similar are treated as transparent.  Change
5047 @b{threshold} in the difference key window to make more pixels which are not the
5048 same color transparent.  Change @b{slope} to change the rate at which the
5049 transparency tapers off as pixels get more different.
5051 The slope as defined here is the number of extra values flanking the threshold
5052 required to go from opaque to transparent.  A high slope is more useful with a
5053 low threshold because slope fills in extra threshold.
5055 @b{Use value} causes the intensity of pixels to be compared instead of the
5056 color.
5058 Applying a blur to the top track with just the alpha channel blurred can soften
5059 the transparency border.
5061 @b{Note:} Currently this effect is known to crash when using YUV modes.
5063 @c cincvdoc_node_number_176
5064 @node DotTV
5065 @subsection DotTV
5066 @cindex DotTV
5068 @image{manual_images_en/dot,16.5mm}
5070 Another effect by Kentaro (effectTV).
5072 @c cincvdoc_node_number_177
5073 @node Downsample
5074 @subsection Downsample
5075 @cindex Downsample
5077 @image{manual_images_en/downsample,12.5mm}
5079 Downsampling is the process of reducing the size of an
5080 image by throwing out data, reducing sampling rate.
5082 Parameters refers to: @*
5083 Horizontal @*
5084 Horizontal offset @*
5085 Vertical @*
5086 Vertical offset @*
5087 Channels
5089 @c cincvdoc_node_number_178
5090 @node Fields to frames
5091 @subsection Fields to frames
5092 @cindex Fields to frames effect
5094 @image{manual_images_en/fieldframe,12.5mm}
5096 This effect reads frames at twice the project framerate, combining 2 input
5097 frames into a single interlaced output frame.  Effects preceding @b{fields to
5098 frames} process frames at twice the project frame rate.  Each input frame is
5099 called a field.
5101 @b{Fields to frames} needs to know what field corresponds to what lines in the
5102 output frame.  The easiest way to figure it out is to try both options in the
5103 window.  If the input fields are the result of a line doubling process like
5104 @b{frames to fields}, the wrong setting results in blurrier output.  If the
5105 input fields are the result of a standards conversion process like @b{1080 to
5106 480}, the wrong setting will not make any difference.
5108 The debobber which converts 720x480 interlaced into 1920x1080 interlaced or
5109 1280x720 progressive seems to degrade the vertical resolution to the point that
5110 it can not be recovered.
5112 @c cincvdoc_node_number_179
5113 @node Flip
5114 @subsection Flip
5115 @cindex Flip
5117 @image{manual_images_en/flip,12.5mm}
5119 This effect permits to flip a video track (or a portion of) from left to right,
5120 right to left, up to down, down to up.
5122 The dialog window is simple, since only the vertical and horizontal parameters
5123 are needed.
5125 @c cincvdoc_node_number_180
5126 @node Frames to fields
5127 @subsection Frames to fields
5128 @cindex Frames to fields
5130 @image{manual_images_en/framefield,13.25mm}
5132 FIXME
5134 @c cincvdoc_node_number_181
5135 @node Freeze frame
5136 @subsection Freeze frame
5137 @cindex Freeze frame effect
5139 @image{manual_images_en/freezeframe,12.5mm}
5141 In its simplest form, highlight a region of the track to freeze, drop the
5142 freeze frame effect on the highlighted region, and the lowest numbered frame in
5143 the affected area will play throughout the entire region.
5145 Freezeframe has an @b{enabled} option which can be keyframed.  Regions of a
5146 freeze frame effect which are enabled repeat the lowest numbered frame since
5147 the last keyframe.  This has unique possibilities.
5149 @itemize @bullet
5150 @item If a freeze frame effect has a keyframe in the middle of it set to
5151 @b{enabled}, the frame in the middle is repeated in the entire effect.
5152 @item If a freeze frame effect has several keyframes, each set to @b{enabled},
5153 every time a keyframe is encountered the frame under it becomes the frozen one.
5154 @item If a freeze frame effect alternates between @b{enabled} and @b{disabled},
5155 each time an @b{enabled} keyframe is encountered the frame under it is
5156 replicated until the next @b{disabled} keyframe.  The disabled regions play
5157 through.
5158 @end itemize
5160 @c cincvdoc_node_number_182
5161 @node Gamma
5162 @subsection Gamma
5163 @cindex Gamma effect
5164 @cindex Raw camera images
5166 @image{manual_images_en/gamma,12.5mm}
5168 Raw camera images store colors in a logarithmic scale.  The blacks in these
5169 images are nearly 0 and the whites are supposed to be infinity.  The graphics
5170 card and most video codecs store colors in a linear scale but Cinelerra keeps
5171 raw camera images in their original logarithmic scale when it renders them.
5172 This is necessary because the raw image parser can not always decode the proper
5173 gamma values for the images.  It also does its processing in 16 bit integers,
5174 which takes away a lot of information.
5176 The gamma effect converts the logarithmic colors to linear colors through a
5177 gamma value and a maximum value.  The gamma value determines how steep the
5178 output curve is and the maximum value is where 1.0 in the output corresponds to
5179 maximum brightness in the input.
5181 The gamma effect has 2 more parameters to simplify gamma correction.  The
5182 @b{automatic} option causes it to calculate @b{max} from the histogram of the
5183 image.  Use this when making a preview of a long list of images since it
5184 changes for every image.
5186 The @b{use color picker} option uses the value currently in the color picker to
5187 set the @b{max} value.  Note that every time you pick a color from the
5188 compositor window, you need to hit @b{use color picker} to apply the new value.
5190 @c cincvdoc_node_number_183
5191 @node Gradient
5192 @subsection Gradient
5193 @cindex Gradient
5195 @image{manual_images_en/gradient,12.5mm}
5197 FIXME
5199 @c cincvdoc_node_number_184
5200 @node Histogram
5201 @subsection Histogram
5202 @cindex Histogram effect
5204 @image{manual_images_en/histogram,12.5mm}
5206 This shows the number of occurrences of each color on a histogram plot.
5208 It is always performed in floating point RGB regardless of the project
5209 color-space.  The histogram has two sets of transfer parameters: the input
5210 transfer and the output transfer.
5212 4 histograms are possible in the histogram viewer.  The red, green, blue
5213 histograms show the input histograms for red, green, blue and multiply them by
5214 an input transfer to get the output red, green, blue.  Then the output red,
5215 green, blue is scaled by an output transfer.  The scaled red, green, blue is
5216 converted into a value and plotted on the value histogram.  The value histogram
5217 thus changes depending on the settings for red, green, blue.  The value
5218 transfers are applied uniformly to R, G, B after their color transfers are
5219 applied.
5221 Select which transfer to view by selecting one of the channels on the top of
5222 the histogram.
5224 The input transfer is defined by a graph overlaid on the histogram.  The
5225 horizontal direction corresponds to every possible input color.  The vertical
5226 direction corresponds to the output color for every input color.  Video
5227 entering the histogram is first plotted on the histogram plot, then it is
5228 translated so output values now equal the output values for each input value on
5229 the input graph.
5231 The input graph is edited by adding and removing any number of points.  Click
5232 and drag anywhere in the input graph to create a point and move it.  Click on
5233 an existing point to make it active and move it.  The active point is always
5234 indicated by being filled in.  The active point's input and output color are
5235 given in text boxes on top of the window.  The input and output color of the
5236 point can be changed through these text boxes.
5238 Points can be deleted by first selecting a point and then dragging it to the
5239 other side of an adjacent point.  They can also be deleted by selecting them
5240 and hitting @b{delete}.
5242 After the input transfer, the image is processed by the output transfer.  The
5243 output transfer is simply a minimum and maximum to scale the input colors to.
5244 Input values of 100% are scaled down to the output's maximum.  Input values of
5245 0% are scaled up to the output minimum.
5247 Input values below 0 are always clamped to 0 and input values above 100% are
5248 always clamped to 100%.  Click and drag on the output gradient's triangles to
5249 change it.  It also has textboxes to enter values into.
5251 Enable the @b{automatic} toggle to have the histogram calculate an automatic
5252 input transfer for the red, green, blue but not the value.  It does this by
5253 scaling the middle 99% of the pixels to take 100% of the histogram width.  The
5254 number of pixels permitted to pass through is set by the @b{Threshold} textbox.
5255 A threshold of 0.99 scales the input so 99% of the pixels pass through.
5256 Smaller thresholds permit fewer pixels to pass through and make the output look
5257 more contrasty.
5259 Automatic input transfer is calculated for the R, G, and B channels but not the
5260 value. @*
5261 @b{Plot histogram} @*
5262 @b{Split output}
5264 @c cincvdoc_node_number_185
5265 @node HolographicTV
5266 @subsection HolographicTV
5267 @cindex HolographicTV
5269 @image{manual_images_en/holo,16.25mm}
5271 By Kentarou effectTV
5273 @c cincvdoc_node_number_186
5274 @node Hue saturation
5275 @subsection Hue saturation
5276 @cindex Hue saturation
5277 @cindex Saturation
5279 @image{manual_images_en/huesaturation,12.5mm}
5281 With that effect you can change hue, saturation and value.  The parameters are
5282 modified using 3 simple sliders.
5284 @c cincvdoc_node_number_187
5285 @node Interpolate video
5286 @subsection Interpolate video
5287 @cindex Interpolate video
5289 @image{manual_images_en/interpolatevideo,13.25mm}
5291 FIXME
5293 @c cincvdoc_node_number_188
5294 @node Interpolate pixels
5295 @subsection Interpolate pixels
5296 @cindex Interpolate pixels
5298 @image{manual_images_en/interpolate,12.5mm}
5300 The interpolate pixels effect tries to create the illusion of a higher frame
5301 rate from source footage of very low framerates by averaging frames over time.
5302 It averages two input frames for each output frame.  The input frames are at
5303 different times, resulting in a dissolve for all output frames between the
5304 input frames.  There are two ways of specifying the input frames.  You can
5305 specify an input frame rate which is lower than the project frame rate.  This
5306 causes input frames to be taken at even intervals,
5308 You can also specify keyframe locations as the positions of the input frames.
5309 In this mode the output frame rate is used as the input frame rate and you just
5310 create keyframes wherever you want to specify an input frame.
5312 @c cincvdoc_node_number_189
5313 @node Inverse telecine
5314 @subsection Inverse telecine
5315 @cindex Inverse telecine effect
5317 @image{manual_images_en/ivtc,12.5mm}
5319 This is the most effective deinterlacing tool when the footage is a video
5320 transfer of a film.  Here the film was converted from 24 fps to 60 fps.  Then
5321 the 60 fps was down-sampled to 30 fps by extracting odd and even lines and
5322 interlacing the lines.  The IVTC effect is primarily a way to convert
5323 interlaced video to progressive video.  It undoes three patterns of
5324 interlacing. @*
5325 @code{A AB BC CD D} @*
5326 @code{AB CD CD DE EF} @*
5327 @code{Automatic}
5329 The first two options are fixed patterns and affected by the @b{pattern offset}
5330 and @b{odd field first} parameters.  The last option creates several
5331 combinations of lines for each frame and picks the most progressive
5332 combination.  It is a brute force algorithm.
5334 This technique does not rely on a pattern like other techniques and is less
5335 destructive but the timing is going to be jittery because of the lack of a
5336 frame rate reduction.  In order to smooth out the timing, you need to follow
5337 inverse telecine with a decimate effect.
5339 @c cincvdoc_node_number_190
5340 @node Invert video
5341 @subsection Invert video
5342 @cindex Invert video
5344 @image{manual_images_en/invertvideo,12.5mm}
5346 Also called invert video, it is a method of reversing the colors of a video
5347 track.
5349 The three parameters refer to channels (Red, Blue, Green, Alpha)
5351 @c cincvdoc_node_number_191
5352 @node Linear blur
5353 @subsection Linear blur
5354 @cindex Linear blur
5356 @image{manual_images_en/linearblur,12.5mm}
5358 Blur has three styles: Linear, Radial, and Zoom
5360 Parameters refer to:
5361 @itemize @bullet
5362 @item @b{Length} @*
5363 Distance between original image and final blur step
5364 @item @b{Angle} @*
5365 Angle of motion, for linear blur
5366 @item @b{Steps} @*
5367 Number of blur steps
5368 @item @b{Channels} @*
5369 Which channel(s) to blur.
5370 @end itemize
5372 @c cincvdoc_node_number_192
5373 @node Live video
5374 @subsection Live video
5375 @cindex Live video effect
5377 @image{manual_images_en/livevideo,12.5mm}
5379 This effect reads video directly from the capture card input.  It replaces any
5380 video on the track so it is normally applied to an empty track.  The
5381 configuration for the capture card is taken from the recording preferences.  Go
5382 to @b{Settings->Preferences->Recording} to set up the capture card.
5384 Go to the @b{Video In} section where it says @b{Record driver}.  It must be set
5385 to either @b{Video4Linux2} or @b{IEC 61883}.  Other video drivers have not been
5386 tested with Live Video and probably will not work.
5388 For live video, the selection for @b{File Format} and @b{Video} needs to be set
5389 to a format the timeline can use.  The file format must be @b{Quicktime for
5390 Linux} and video recording must be enabled for it.  Click on the wrench
5391 @image{manual_images_en/wrench,4.33mm} to set the video compression.
5393 The video compression depends on the recording driver.  For the
5394 @b{Video4Linux2} recording driver, the compression must be @b{Motion JPEG A}.
5395 For the @b{IEC 61883} driver, the compression must be @b{DV}.  This gets the
5396 driver to generate output in a colormodel that the timeline can use.
5398 Some cards provide color and channel settings.  Live video takes the color
5399 settings from the values set in the @b{Video In} window.  Go to
5400 @b{File->Record} to bring up the recording interface and the Video In window.
5401 Values set in the @b{Video in} window are used by @b{Live Video}.  Any channels
5402 the capture card supports need to be configured in the @b{Video in} interface
5403 since the same channels are used by the @b{Live Video} effect.
5405 With the video recording configured, highlight a horizontal region of a video
5406 track or define in and out points.  Then drop the Live Video effect into it.
5407 Drop other effects after Live Video to process the live video in realtime.  For
5408 best results, you should use OpenGL and a video card which supports GL shading
5409 language.  Go to @b{Settings->Preferences->Playback->Video Out} to enable the
5410 OpenGL driver.
5412 Only one Live Video effect can exist at any time on the timeline.  It can not be
5413 shared by more than one track.
5415 @c cincvdoc_node_number_193
5416 @node Loop video
5417 @subsection Loop video
5418 @cindex Loop video effect
5420 @image{manual_images_en/loopvideo,12.5mm}
5422 Sections of video can be looped by dropping a @b{loop} effect on them.
5423 Contrary to the @b{settings->loop playback} option, the loop effects can be
5424 rendered where the @b{settings->loop playback} option can not be.  The loop
5425 effects are also convenient for short regions.
5427 The loop effects have one option: the number of @b{frames} or @b{samples} to
5428 loop.  This specifies the length of the region to loop starting from either the
5429 beginning of the effect or the latest keyframe.  The region is replicated for
5430 the entire effect.
5432 Every time a keyframe is set in a loop effect, the keyframe becomes the
5433 beginning of the region to loop.  Setting several keyframes in succession
5434 causes several regions to loop.  Setting a single keyframe causes the region
5435 after the keyframe to be looped throughout the effect, no matter where the
5436 keyframe is.  The end of an effect can be looped from the beginning by setting
5437 the keyframe near the end.
5439 @c cincvdoc_node_number_194
5440 @node Motion
5441 @subsection Motion
5442 @cindex Motion video effect
5444 @image{manual_images_en/motion,12.5mm}
5446 The motion tracker is almost a complete application in itself.  The motion
5447 tracker tracks two types of motion: translation and rotation.  It can track
5448 both simultaneously or one only.  It can do 1/4 pixel tracking or single pixel
5449 tracking.  It can stabilize motion or cause one track to follow the motion of
5450 another track.
5452 Although the motion tracker is applied as a realtime effect, it usually must be
5453 rendered to see useful results.  The effect takes a long time to precisely
5454 detect motion.
5456 The motion tracker works by using one region of the frame as the region to
5457 track.  It compares this region between 2 frames to calculate the motion.  This
5458 region can be defined anywhere on the screen.  Once the motion between 2 frames
5459 has been calculated, a number of things can be done with that motion vector.
5460 It can be scaled by a user value and clamped to a maximum range.  It can be
5461 thrown away or accumulated with all the motion vectors leading up to the
5462 current position.
5464 To save time the motion result can be saved for later reuse, recalled from a
5465 previous calculation, or discarded.
5467 The motion tracker has a notion of 2 tracks, the master layer and the target
5468 layer.  The master layer is where the comparison between 2 frames takes place.
5469 The target layer is where motion is applied either to track or compensate for
5470 the motion in the master layer.
5472 The intricacies of motion tracking are enough to sustain entire companies and
5473 build careers around.  The motion tracker in Cinelerra is not as sophisticated
5474 as some world class motion trackers but it is enough to sweeten some camcorder
5475 footage.
5477 Here is a brief description of the motion tracking parameters:
5479 @itemize @bullet
5481 @item @b{Track translation} @*
5482 Enables translation operations.  The motion tracker tracks X and Y motion in
5483 the master layer and adjusts X and Y motion in the target layer.
5485 @cindex Motion effect, translation block
5486 @cindex Translation block
5487 @item @b{Translation block size} @*
5488 For the translation operations, a block is compared to a number of neighboring
5489 blocks to find the one with the least difference.  The size of the block to
5490 search for is given by this parameter.
5492 @item @b{Translation search radius} @*
5493 The size of the area to scan for the translation block.
5495 @item @b{Translation search steps} @*
5496 Ideally the search operation would compare the translation block with every
5497 other pixel in the translation search radius.  To speed this operation up, a
5498 subset of the total positions is searched.  Then the search area is narrowed
5499 and rescanned by the same number of search steps until the motion is known to
5500 1/4 pixel accuracy.
5502 @item @b{Block X, Y} @*
5503 These coordinates determine the center of the translation block based on
5504 percentages of the width and height of the image.  The center of the block
5505 should be part of the image which is visible at all times.
5507 @item @b{Maximum absolute offset} @*
5508 The amount of motion detected by the motion tracker is unlimited if this is
5509 100.  If it is under 100 the amount of motion is limited by that percentage of
5510 the image size.
5512 @item @b{Settling speed} @*
5513 The motion detected between every frame can be accumulated to form an absolute
5514 motion vector.  If the settling speed is 100 the absolute vector is added to
5515 the next frame.  If the settling speed is less than 100 the absolute vector is
5516 downscaled by the settling amount before being added to the next frame.
5518 @item @b{Track rotation} @*
5519 Enables rotation operations.  The motion tracker tracks rotation in the master
5520 layer and adjusts rotation in the target layer.
5522 @item @b{Rotation block size} @*
5523 For rotation operations a single block is compared to equally sized blocks,
5524 each rotated by a different amount.  This is the size of the rotation block.
5526 @item @b{Rotation search radius} @*
5527 This is the maximum angle of rotation from the starting frame the rotation
5528 scanner can detect.  The rotation scan is from this angle counterclockwise to
5529 this angle clockwise.  Thus the rotation search radius is half the total range
5530 scanned.
5532 @item @b{Rotation search steps} @*
5533 Ideally every possible angle would be tested to get the rotation.  To speed up
5534 the rotation search, the rotation search radius is divided into a finite number
5535 of angles and only those angles compared to the starting frame.  Then the
5536 search radius is narrowed and an equal number of angles is compared in the
5537 smaller radius until the highest possible accuracy is achieved. @*
5538 Normally you need one search step for every degree scanned.  Since the rotation
5539 scanner scans the rotation search radius in two directions, you need two steps
5540 for every degree in the search radius to search the complete range.
5542 @item @b{Draw vectors} @*
5543 When translation is enabled, 2 boxes are drawn on the frame.  One box
5544 represents the translation block.  Another box outside the translation block
5545 represents the extent of the translation search radius.  In the center of these
5546 boxes is an arrow showing the translation between the 2 master frames. @*
5547 When rotation is enabled a single box the size of the rotation block is drawn
5548 rotated by the amount of rotation detected.
5550 @item @b{Track single frame} @*
5551 When this option is used the motion between a single starting frame and the
5552 frame currently under the insertion point is calculated.  The starting frame is
5553 specified in the @b{Frame number} blank.  The motion calculated this way is
5554 taken as the absolute motion vector.  The absolute motion vector for each frame
5555 replaces the absolute motion vector for the previous frame.  Settling speed has
5556 no effect on it since it does not contain any previous motion vectors.
5557 Playback can start anywhere on the timeline since there is no dependence on
5558 previous results.
5560 @item @b{Track previous frame} @*
5561 Causes only the motion between the previous frame and the current frame to be
5562 calculated.  This is added to an absolute motion vector to get the new motion
5563 from the start of the sequence to the current position.  After every frame
5564 processed this way, the block position is shifted to always cover the same
5565 region of the image.  Playback must be started from the start of the motion
5566 effect in order to accumulate all the necessary motion vectors.
5568 @item @b{Previous frame same block} @*
5569 This is useful for stabilizing jerky camcorder footage.  In this mode the
5570 motion between the previous frame and the current frame is calculated.  Instead
5571 of adjusting the block position to reflect the new location of the image, like
5572 Track Previous Frame does, the block position is unchanged between each frame.
5573 Thus a new region is compared for each frame.
5575 @item @b{Master layer} @*
5576 This determines the track which supplies the starting frame and ending frame
5577 for the motion calculation.  If it is @b{Bottom} the bottom track of all the
5578 tracks sharing this effect is the master layer.  The top track of all the
5579 tracks is the target layer.
5581 @item @b{Calculation} @*
5582 This determines whether to calculate the motion at all and whether to save it
5583 to disk.  If it is @b{Don't Calculate} the motion calculation is skipped.  If
5584 it is @b{Recalculate} the motion calculation is performed every time each frame
5585 is rendered.  If it is @b{Save} the motion calculation is always performed but
5586 a copy is also saved.  If it is @b{Load}, the motion calculation is loaded from
5587 a previous save calculation.  If there is no previous save calculation on disk,
5588 a new motion calculation is performed.
5590 @item @b{Action} @*
5591 Once the motion vector is known this determines whether to move the target
5592 layer opposing the motion vector or following the motion vector.  If it is
5593 @b{Do Nothing} the target layer is untouched.  If it is @b{Track...} the target
5594 layer is moved by the same amount as the master layer.  This is useful for
5595 matching titles to objects in the frame.  If it is @b{Stabilize...} the target
5596 layer is moved opposite to the motion vector.  This is useful for stabilizing
5597 an object in the frame.  The motion operations can be accurate to single pixels
5598 or subpixels by changing the action setting.
5599 @end itemize
5601 @menu
5602 * Secrets of motion tracking::
5603 * 2 pass motion tracking::
5604 * Using blur to improve motion tracking::
5605 * Using histogram to improve motion tracking::
5606 * Motion tracking in action::
5607 * Tracking stabilization in action::
5608 @end menu
5610 @c cincvdoc_node_number_195
5611 @node Secrets of motion tracking
5612 @subsubsection Secrets of motion tracking
5613 @cindex Secrets of motion tracking
5614 @cindex Motion tracking, secrets of
5616 Since it is a very slow effect, there is a method to applying the motion
5617 tracker to get the most out of it.  First disable playback for the track to do
5618 motion tracking on.  Then drop the effect on a region of video with some motion
5619 to track.  Then rewind the insertion point to the start of the region.  Set
5620 @b{Action} -> @b{Do Nothing}.  Set @b{Calculation} -> @b{Don't calculate}.
5621 Enable @b{Draw vectors}.  Then enable playback of the track to see the motion
5622 tracking areas.
5624 Enable which of @b{translation motion} or @b{rotation motion} vectors you want
5625 to track.  By watching the compositor window and adjusting the @b{Block x,y}
5626 settings, center the block on the part of the image you want to track.  Then
5627 set search radius, block size, and block coordinates for translation and
5628 rotation.
5630 Once this is configured, set the calculation to @b{Save coords} and do test
5631 runs through the sequence to see if the motion tracker works and to save the
5632 motion vectors.  Once this is done, disable playback for the track, disable
5633 @b{Draw vectors}, set the motion action to perform on the target layer and
5634 change the calculation to @b{Load coords}.  Finally enable playback for the
5635 track.
5637 When using a single starting frame to calculate the motion of a sequence, the
5638 starting frame should be a single frame with the least motion to any of the
5639 other frames.  This is rarely frame 0.  Usually it is a frame near the middle
5640 of the sequence.  This way the search radius need only reach halfway to the
5641 full extent of the motion in the sequence.
5643 If the motion tracker is used on a render farm, @b{Save coords} and @b{previous
5644 frame} mode will not work.  The results of the save coords operation are saved to
5645 the hard drives on the render nodes, not the master node.  Future rendering
5646 operations on these nodes will process different frames and read the wrong
5647 coordinates from the node filesystems.  The fact that render nodes only
5648 visualize a portion of the timeline also prevents @b{previous frame} from
5649 working since it depends on calculating an absolute motion vector starting on
5650 frame 0.
5652 @c cincvdoc_node_number_196
5653 @node 2 pass motion tracking
5654 @subsubsection 2 pass motion tracking
5655 @cindex 2 pass motion tracking
5656 @cindex Motion tracking, 2 pass
5658 The method described above is 2 pass motion tracking.  One pass is used just to
5659 calculate the motion vectors.  A second pass is used to apply the motion
5660 vectors to the footage.  This is faster than a single pass because errors in
5661 the motion vector calculation can be discovered quickly.
5663 This also allows the motion tracking to use a less demanding colormodel like
5664 RGB888 in the scanning step and a more demanding colormodel like RGB Float in
5665 the action step.  The scanning step takes much longer than action.
5667 This suffers the disadvantage of not being practical for extremely long
5668 sequences where some error is acceptable and the picture quality is lousy to
5669 begin with, like stabilizing camcorder footage.
5671 The slower method is to calculate the motion vectors and apply them
5672 simultaneously.  This method can use one track as the motion vector calculation
5673 track and another track as the target track for motion vector actions.  This is
5674 useful for long sequences where some error is acceptable.
5676 @c cincvdoc_node_number_197
5677 @node Using blur to improve motion tracking
5678 @subsubsection Using blur to improve motion tracking
5679 @cindex Blur, motion tracking
5680 @cindex Motion tracking, improving using blur
5682 With extremely noisy or interlaced footage, applying a blur effect before the
5683 motion tracking can improve accuracy.  Either save the motion vectors in a
5684 @b{tracking pass} and disable the blur for the @b{action pass} or apply the
5685 blur just to the @b{master layer}.
5687 @c cincvdoc_node_number_198
5688 @node Using histogram to improve motion tracking
5689 @subsubsection Using histogram to improve motion tracking
5690 @cindex Motion tracking, using histogram
5692 A histogram is almost always applied before motion tracking to clamp out noise
5693 in the darker pixels.  Either save the motion vectors in a @b{tracking pass}
5694 and disable the histogram for the @b{action pass} or apply the histogram just
5695 to the @b{master layer}.
5697 @c cincvdoc_node_number_199
5698 @node Motion tracking in action
5699 @subsubsection Motion tracking in action
5700 @cindex Motion tracking in action
5702 First, add a motion effect to the track.  Drag it from the resource window and
5703 drop it directly over the video in Cinelerra's main window.  You should see
5704 something similar to this:
5706 @center @image{manual_images_en/cin_timeline_eff_clip,90mm}
5708 Then right-click on the motion effect marker in the timeline and select show
5709 to see the motion tracker dialog:
5711 @center @image{manual_images_en/cin_motion_win,90mm}
5713 Start by looking at your Compositor.  You will see some new boxes
5714 overlaid on the video.  These are important to control the motion tracker.
5715 Here is a quick shot of what it will look like when working:
5717 @center @image{manual_images_en/cin_comp_action_small,90mm}
5719 The image above shows the motion tracker losing track of the object because of
5720 a search window that is too small.  We will talk about this more later, but
5721 quickly: @*
5722 @itemize @bullet
5723 @item The middle small box is the target of the tracker.
5724 @item The middle larger box is the search range for the tracker.  It should
5725 contain the full range of motion for the tracking target.
5726 @item In this example, we are trying to track the hanging handle.  We have
5727 failed in this video frame, because the handle is far right of the center of
5728 frame.
5729 @item The left pointing vector indicates the motion tracker attempting to find
5730 the target.  More on this later.
5731 @end itemize
5733 Move to the beginning of your video clip
5735 Make sure the motion tracker dialog is open
5737 Look at the Compositor
5739 Start adjusting these four knobs:
5741 @center @image{manual_images_en/cin_motion_track,90mm}
5743 Make sure you check Track Translation
5745 Uncheck Track Rotation
5747 Start with knob two - Translation block size - and spin it to get an idea
5748 for what is changing.  Notice that both boxes resize.  Look at the small inside
5749 box.  Adjust it to the size of the target (the object you want to track).  Do not
5750 worry if it does not cover the object yet.
5752 Go on to knobs three and four - Block X and Block Y@.  Use these to put the
5753 target designator over the target itself.
5755 Finally, use the top knob - Translation search radius.  Expand it to
5756 include the full range of travel you expect for the target.  If you look back
5757 at my original action shot, the search radius was to small and the target moved
5758 outside the range.  You can test this by playing the timeline and viewing the
5759 results (if your machine is fast enough for realtime) or by rendering and
5760 viewing the stabilized handle in the output.
5762 Make the first video frame look similar to:
5764 @center @image{manual_images_en/cin_comp_first_setup_small,90mm}
5766 This image shows a lot of detail.  Notice that the small frame is centered over
5767 the handle and sized to just include it.  Those settings are control by knobs
5768 two through four.  Finally, the outer frame is larger than the back and forth
5769 movement of the handle in the entire video clip.
5771 Finally, here are other settings needed to see the effect:
5773 @center @image{manual_images_en/cin_motion_set_output1,90mm}
5775 @itemize @bullet
5776 @item @b{Draw vectors} Uncheck this to prevent rendering of the target boxes and
5777 motion vectors in your rendered video.  If checked, the vectors and boxes are
5778 rendered in output video.
5779 @item @b{Track Single Frame} For this example it is set with a Frame number of 0
5780 (first frame)
5781 @item @b{Master Layer} If the effect is shared between two tracks it specifies
5782 which of those tracks will be the one where motion is tracked (Master Layer)
5783 and which layer will be affected by the resulting translation vectors (Target
5784 Layer).  If there is no second track sharing motion tracker then the
5785 Master=Target.
5786 @item @b{Action} Select the stabilize options to have the rendered video follow
5787 the motion of the target.  Select a Track option to run motion tracking without
5788 adjusting the video.
5789 @item @b{Calculation}
5790 @itemize @bullet
5791 @item @b{Don't Calculate} select this option to turn off adjustment of video.
5792 @item @b{Recalculate} Perform motion tracking and update video per Action
5793 setting.
5794 @item @b{Save and Load} Saves/Loads the translation/rotation vectors (absolute
5795 or relative) to/from files.  Each frame gets an separate file in /tmp directory
5796 which contains its vector.
5797 @end itemize
5798 @end itemize
5800 @c cincvdoc_node_number_200
5801 @node Tracking stabilization in action
5802 @subsubsection Tracking stabilization in action
5803 @cindex Tracking stabilization in action
5805 In this section, we will explain how to stabilize a video.  Such a need can
5806 arise when the video was taken from a vehicle for example.
5808 First select on the timeline the part of the footage you want to stabilize,
5809 using the in and out points.  Then apply the motion effect on that part of the
5810 video.
5812 Select the "Previous frame same block" option.  That option is recommended for
5813 stabilizing jerky camcorder footage.  Its goal is not to "follow" an object.
5814 The block stays exactly at the same place during all the effect length.
5816 Enlarge the block and select almost half the size of the video.  Select the
5817 "Stabilize subpixel" option: it will give a finer stabilization.  Reduce the
5818 "Maximum absolute offset" value to limit the stabilization amplitude.  You
5819 probably prefer to get a non-perfect stabilization on some places on the video,
5820 than having a very large black border on one side of the picture during big
5821 shakes.  Set the "Translation search steps" value to 128.  Increasing that
5822 value will not give a better result, but will considerably increase the
5823 rendering time.  Make sure the "Draw vectors" option is selected, and render
5824 the part of the video where the motion effect is applied.
5826 If the result is good, deselect the "Draw vectors" option.  The block and
5827 vectors were not drawn anymore on the video.  Then, render your video to a
5828 @file{.dv} file, and import it into your project.
5830 You will notice the video is stabilized but there are black borders which
5831 appear on sides of the frame.  You have to zoom in and define projector
5832 keyframes to move the projector around the screen, in order to remove those
5833 black borders.  The more your footage is jerky, the more you have to zoom in to
5834 discard the black borders.  That is why the result is better with HDV footage
5835 than with DV footage.
5837 @c cincvdoc_node_number_201
5838 @node Motion blur
5839 @subsection Motion blur
5840 @cindex Motion blur
5842 @image{manual_images_en/motionblur,12.5mm}
5844 FIXME
5846 @c cincvdoc_node_number_202
5847 @node Oil painting
5848 @subsection Oil painting
5849 @cindex Oil painting
5850 @cindex Painting, oil
5852 @image{manual_images_en/oilpainting,12.5mm}
5854 This effect makes video tracks appears as a painting.  It can be controlled by
5855 Radius slider.  Intensity of colors can be chosen as option.
5857 @c cincvdoc_node_number_203
5858 @node Overlay video
5859 @subsection Overlay video
5860 @cindex Overlay video
5862 @image{manual_images_en/overlay,13.25mm}
5864 FIXME
5866 @c cincvdoc_node_number_204
5867 @node Perspective
5868 @subsection Perspective
5869 @cindex Perspective
5871 @image{manual_images_en/perspective,12.5mm}
5873 The perspective effect allows you to change the perspective of an object, and
5874 is perfect for making objects appear as if they are fading into the distance.
5876 @c cincvdoc_node_number_205
5877 @node Polar
5878 @subsection Polar
5879 @cindex Polar
5881 @image{manual_images_en/polar,12.5mm}
5883 The Polar effect bends and warps your video in weird ways.  Mathematically, it
5884 converts your video from either polar coordinates to rectangular coordinates,
5885 or the reverse.
5887 @c cincvdoc_node_number_206
5888 @node RGB-601
5889 @subsection RGB-601
5890 @cindex RGB-601
5892 FIXME
5894 @image{manual_images_en/rgb601,12.5mm}
5896 @c cincvdoc_node_number_207
5897 @node Radial blur
5898 @subsection Radial blur
5899 @cindex Radial blur
5901 @image{manual_images_en/radialblur,12.5mm}
5903 It creates a whirlpool blur that simulates a swirling camera.  You can vary the
5904 location, type, and quality of the blur.
5906 @c cincvdoc_node_number_208
5907 @node ReframeRT
5908 @subsection ReframeRT
5909 @cindex ReframeRT video effect
5911 @image{manual_images_en/reframert,12.5mm}
5913 ReframeRT changes number of frames in a sequence of video directly from the
5914 timeline.  It has 2 modes, selected by the 2 toggles in the GUI@.
5916 @b{Stretch} mode multiplies the current frame number of its output by the scale
5917 factor to arrive at the frame to read from its input.  If its current output
5918 frame is #55 and the scale factor is 2, frame #110 is read from its input.  The
5919 stretch mode has the effect of changing the length of output video by the
5920 inverse of the scale factor.  If the scale factor is greater than 1, the output
5921 will end before the end of the sequence on the timeline.  If it is less than 1,
5922 the output will end after the end of the sequence on the timeline.  The
5923 ReframeRT effect must be lengthened to the necessary length to accommodate the
5924 scale factor.  Change the length of the effect by clicking on the endpoint of
5925 the effect and dragging.
5927 Although stretch mode changes the number of the frame read from its input, it
5928 does not change the frame rate of the input.  Effects before ReframeRT assume
5929 the same frame rate as ReframeRT@.
5931 @cindex Fast play effect
5932 The ReframeRT in stretch mode can be use to create a @b{fast play effect}.
5933 Select Stretch mode and enter a value greater than 1 to get accelerated
5934 playback.
5936 @cindex Slow motion effect
5937 For @b{slow motion effect}, use a ReframeRT effect in stretch mode with a value
5938 less than 1.  @b{Example}: you have a clip that you want to put in slow motion.
5939 The clip starts at 33.792 seconds and ends at 39.765.  The clip is 5.973
5940 seconds long.  You want to play it at 4/10ths normal speed.  You divide the
5941 clip length by the playback speed (5.973/.4) to get a final clip length of
5942 14.9325 seconds.  You create an in point at the start of your clip: 33.792
5943 seconds.  You put an out point 14.9325 seconds later, at 48.7245 seconds
5944 (33.792 + 14.9325).  You attach a ReframeRT effect, set it to .4 and stretch.
5945 You change the out point at 48.7245 to an in point.  You start your next clip
5946 after the slow motion effect at the 48.7245 out point.
5948 You can also change the frame rate of the clip if you right click on it in the
5949 @b{media viewer} and go to @b{Info}.  If you do not hit the drop down first, you
5950 can type in a desired frame rate as well.  Cinelerra will pick the right frames
5951 out for the project frame rate, effectively doing the time-lapsing as well
5953 @b{Downsample} mode does not change the length of the output sequence.  It
5954 multiplies the frame rate of the output by the scale factor to arrive at a
5955 frame rate to read the input.  This has the effect of replicating the input
5956 frames so that they only change at the scaled frame rate when sent to the
5957 output.  It does not change the length of the sequence.  If the scale factor is
5958 0.5 and the output frame rate is 30 fps, only 15 frames will be shown per
5959 second and the input will be read at 15 fps.  Downsample is only useful for
5960 scalefactors below 1, hence the name downsample.
5962 Downsample mode changes the frame rate of the input as well as the number of
5963 the frame to read, so effects before ReframeRT see the frame rate * the scale
5964 factor as their frame rate.  If the scale factor is 2 and the output frame rate
5965 is 30, the input frame rate will be 60 and the input frame number will by
5966 doubled.  This will not normally do anything but some input effects may behave
5967 differently at the higher frame rate.
5969 @c cincvdoc_node_number_209
5970 @node Reverse video
5971 @subsection Reverse video
5972 @cindex Reverse video effect
5974 @image{manual_images_en/reversevideo,12.5mm}
5976 Media can be reversed on the timeline in realtime.  This is not to be confused
5977 with using the reverse playback on the transport.  The reverse effects reverse
5978 the region covered by the effect regardless of the transport direction.
5980 The region to be reversed is first determined by what part of the track the
5981 effect is under and second by the locations of keyframes in the effect.  The
5982 reverse effects have an @b{enabled} option which allows you to set keyframes.
5983 This allows may possibilities.
5985 Every @b{enabled} keyframe is treated as the start of a new reversed region and
5986 the end of a previous reversed region.  Several @b{enabled} keyframes in
5987 succession yield several regions reversed independent of each other.  An
5988 @b{enabled} keyframe followed by a @b{disabled} keyframe yields one reversed
5989 region followed by a forward region.
5991 @c cincvdoc_node_number_210
5992 @node Rotate
5993 @subsection Rotate
5994 @cindex Rotate
5996 @image{manual_images_en/rotate,13.25mm}
5998 The Rotate filter can rotate the video in 90 degree increments, reverse and
5999 flip the video.
6001 @c cincvdoc_node_number_211
6002 @node SVG via Inkscape
6003 @subsection SVG via Inkscape
6004 @cindex SVG via Inkscape
6006 @image{manual_images_en/svg,12.5mm}
6008 FIXME
6010 @c cincvdoc_node_number_212
6011 @node Scale
6012 @subsection Scale
6013 @cindex Scale
6015 @image{manual_images_en/scale,12.5mm}
6017 FIXME
6019 @c cincvdoc_node_number_213
6020 @node Selective temporal averaging
6021 @subsection Selective temporal averaging
6022 @cindex Selective temporal averaging
6024 @image{manual_images_en/timeavg,12.5mm}
6026 This plugin is designed to smooth out non-moving areas of a video clip.  The
6027 smoothing is performed by averaging the color component for each pixel across a
6028 number of frames.  The smoothed value is used if both the standard deviation
6029 and the difference between the current component value and the average
6030 component value are below a threshold.
6032 The average and standard deviation are calculated for each of the components
6033 of the video.  The type of components averaged is determined by the color model
6034 of the entire project.  The average and standard deviation of the frames can be
6035 examined by selecting the specific radio button in the plugin options window.
6037 The region over which the frames are averaged is determined by either a fixed
6038 offset or a restart marker system.  In a restart marker system, certain
6039 keyframes are marked as beginning of sections.  Then for each section, the
6040 frames surrounding the current frame are used as the frames to average over,
6041 except when approaching the beginning and end of a section, whereby the
6042 averaging is performed over the @i{N} beginning or ending frames respectively.
6044 @b{Common usage:}
6046 If you have to select the number of frames you wish to average.
6048 @enumerate 1
6049 @item Enter a reasonable number of frames to average (e.g. 10).
6050 @item Select the @b{Selective Temporal Averaging} method and enter 1 and 10 for
6051 all the @b{Av. Thres.} and @b{S.D. Thres.} respectively.  This basically causes
6052 all pixels to use the average value.
6053 @item Turn the mask for a the first component on.  This should make the whole
6054 frame have a solid color of that specific component.
6055 @item Slowly reduce the @b{S.D. Thres.} value.  As you do so, you will notice
6056 that the regions vastly different from the average will have a flipped mask
6057 state.  Continue to reduce the threshold until you reach the point at which
6058 non-moving regions of the video have a flipped masked state.  This value is
6059 known as the @b{noise-floor} and is the level of natural noise generated by the
6060 CCD in the camera.
6061 @item Repeat the same procedure for the @b{Av. Thres.}
6062 @item Turn off the mask
6063 @item Repeat this for all channels
6064 @end enumerate
6066 @c cincvdoc_node_number_214
6067 @node Sharpen
6068 @subsection Sharpen
6069 @cindex Sharpen
6071 @image{manual_images_en/sharpen,12.5mm}
6073 FIXME
6075 @c cincvdoc_node_number_215
6076 @node ShiftInterlace
6077 @subsection ShiftInterlace
6078 @cindex ShiftInterlace
6080 @image{manual_images_en/shiftinterlace,12.5mm}
6082 FIXME
6084 @c cincvdoc_node_number_216
6085 @node Swap channels
6086 @subsection Swap channels
6087 @cindex Swap channels
6089 @image{manual_images_en/swapchannels,12.5mm}
6091 FIXME
6093 @c cincvdoc_node_number_217
6094 @node Threshold
6095 @subsection Threshold
6096 @cindex Threshold video effect
6097 @cindex Luminance
6099 @image{manual_images_en/threshold,12.5mm}
6101 Threshold converts the image to pure luminance.  Then luminance values below
6102 and above the threshold range are converted to black and luminance values
6103 inside the threshold range are converted to white.  The threshold window shows
6104 a histogram of luminance values for the current frame.  Click dragging inside
6105 the histogram creates a range to convert to white.  @b{SHIFT-clicking} extends
6106 one border of this range.  Values for the threshold range can also be specified
6107 in the text boxes.
6109 This effect is basically a primitive luminance key.  A second track above the
6110 track with the threshold effect can be multiplied, resulting in only the parts
6111 of the second track within the threshold being displayed.
6113 @c cincvdoc_node_number_218
6114 @node Time average
6115 @subsection Time average
6116 @cindex Time average video effect
6118 @image{manual_images_en/timeavg,12.5mm}
6120 Time average is one effect which has many uses besides creating nifty trail
6121 patterns of moving objects.  It is main use is reducing noise in still images.
6122 Merely point a video camera at a stationary subject for 30 frames, capture the
6123 frames, and average them using @b{time average} and you will have a super high
6124 quality print.  In floating point colormodels, time average can increase the
6125 dynamic range of lousy cameras.
6127 Inside the time average effect is an accumulation buffer and a divisor.  A
6128 number of frames are accumulated in the accumulation buffer and divided by the
6129 divisor to get the average.
6131 Because the time average can consume enormous amounts of memory, it is best
6132 applied by first disabling playback for the track, dropping the time average in
6133 it, configuring time average for the desired number of frames, and re-enabling
6134 playback for the track.
6136 @itemize @bullet
6137 @item @b{Frames to average} @*
6138 This determines the number of frames to be accumulated in the accumulation
6139 buffer.  For extremely large integrations it is easier to edit the EDL in a
6140 text editor and put in the number of frames.
6142 @item @b{Accumulate} @*
6143 This outputs the accumulation buffer without dividing it.
6145 @item @b{Average} @*
6146 This causes the accumulation buffer to be divided before being output.
6147 This results in the average of all the frames.
6149 @item @b{Inclusive Or} @*
6150 This causes the accumulation buffer to be replaced by any pixels which
6151 are not transparent.  In combination with motion tracking it allows entire
6152 sequences to be combined to form panoramas.
6154 @item @b{Reprocess frame again} @*
6155 If an effect before the time average is adjusted the time average normally
6156 does not reread the accumulation buffer to get the change.  This forces it to
6157 reread the accumulation buffer when other effects change.
6159 @item @b{Disable subtraction} @*
6160 In order to represent the accumulation of only the specified number of
6161 frames, the time average retains all the previous frames in memory and
6162 subtracts them out as it plays forward.  It would run out of memory if it had
6163 to accumulate thousands of frames.  By disabling subtraction the previous
6164 frames are not stored in memory and only the average function is affected by
6165 the frame count.
6166 @end itemize
6168 @c cincvdoc_node_number_219
6169 @node TimeFront
6170 @subsection TimeFront
6171 @cindex TimeFront
6173 @image{manual_images_en/timefront,12.5mm}
6175 This is a warping framework plugin based on this article: @*
6176 @uref{http://www.vision.huji.ac.il/videowarping/HUJI-CSE-LTR-2005-10_etf-tr.pdf}
6178 @c cincvdoc_node_number_220
6179 @node Title
6180 @subsection Title
6181 @cindex Title
6182 @cindex Gimp
6184 @image{manual_images_en/titler,12.5mm}
6186 While it is possible to add text to movies by importing still images from The
6187 Gimp and compositing them, the Titler allows you to add text from within
6188 Cinelerra.
6190 The titler has standard options for @b{font, size, and style}.  The best font
6191 is a generic, normal font like Arial in a large size.
6193 The titler also has options you will only find in moving pictures.  The
6194 @b{Justify} operation justifies the text relative to the entire frame.  Once
6195 justified, the @b{X and Y} offset is applied.  This allows text to be justified
6196 while at the same time letting you push it within the title safe region.
6198 The @b{motion type} scrolls the text in any of the four directions.  When using
6199 this, the text may disappear.  Move the insertion point along the timeline
6200 until the text is far enough along the animation to reappear.  The text scrolls
6201 on and scrolls off.
6203 Setting @b{loop} causes the text to scroll completely off and repeat.  Without
6204 @b{loop} the text scrolls off and never reappears.
6206 The speed of the animation is determined by @b{speed}.  Set it higher to speed
6207 up the animation.
6209 @b{Drop shadow} draws a black copy of the text to the bottom right of the
6210 original text.  This is useful when drawing text over changing video to keep
6211 the border always visible.
6213 In addition to the scrolling, @b{Fade in/Fade out} are a second type of
6214 animation.  If the fade seconds are 0, no fading is done.
6216 @b{Color} picks the color to draw the text in.  Usually white is the only
6217 practical color.
6219 @b{Stamp timecode} replaces the text with the current position on the timeline
6220 in seconds and frames.
6222 @menu
6223 * Adding fonts to the titler:: How to add fonts to the titler
6224 * The title-safe region::      How to keep text visible on output
6225 @end menu
6227 @c cincvdoc_node_number_221
6228 @node Adding fonts to the titler
6229 @subsubsection Adding fonts to the titler
6231 @cindex Fonts, adding to the titler
6232 @cindex TTF fonts
6233 The X Window system originally did not have a suitable font renderer for video.
6234 It also is restricted to the current bit depth.  It does not have a convenient
6235 way to know which fonts work with the suitable font renderer in the desired bit
6236 depth.  The easiest way we have found to support fonts in the titler is to have a
6237 directory for them at @file{/usr/lib/cinelerra/fonts}.
6239 The titler supports mainly @b{TTF}, true type fonts.  It supports others but
6240 TTF are the most reliable.  To add true type fonts, copy the @file{.TTF} files
6241 to the @file{/usr/lib/cinelerra/fonts} directory.  In that directory run
6242 @command{ttmkfdir && mv fonts.scale fonts.dir} and restart Cinelerra.  The new
6243 fonts should appear.  The usage of ttmkfdir changes frequently so this
6244 technique might not work.
6246 @c cincvdoc_node_number_222
6247 @node The title-safe region
6248 @subsubsection The title-safe region
6249 @cindex Title-safe region
6250 @cindex TV display
6252 If the video is displayed on a consumer TV, the outer border is going to be
6253 cropped by 5% on each side.  Moreover, text which is too close to the edge
6254 looks sloppy.  Make sure when adding titles to have the @b{title-safe}
6255 @image{manual_images_en/titlesafe} tool active in the @b{compositor} window.  The text
6256 should not cross the inner rectangle.
6258 @c cincvdoc_node_number_223
6259 @node Translate
6260 @subsection Translate
6261 @cindex Translate
6263 @image{manual_images_en/translate,12.5mm}
6265 FIXME
6267 @c cincvdoc_node_number_224
6268 @node Unsharp
6269 @subsection Unsharp
6270 @cindex Unsharp
6272 @image{manual_images_en/unsharp,12.5mm}
6274 This effect unsharps the video.  Its parameters are:
6275 @itemize @bullet
6276 @item @b{Amount} @*
6277 Moving the slider to the right makes dark areas get darker and light areas
6278 get lighter.
6280 @item @b{Radius} @*
6281 This slider controls how much blurring is used in the edge-finding stage.
6282 The practical effect of this is to specify how large a region is darkened or
6283 lightened.
6285 @item @b{Threshold} @*
6286 This slider permits to control how big is a difference between a pixel in
6287 the blurred copy and the original copy is needed before any darkening or
6288 lightening will be applied.
6289 @end itemize
6291 @c cincvdoc_node_number_225
6292 @node Videoscope
6293 @subsection Videoscope
6294 @cindex Videoscope
6296 @menu
6297 * The waveform scope::
6298 * The vectorscope::
6299 @end menu
6301 @image{manual_images_en/videoscope,12.5mm}
6303 The videoscope is a tool that digitally represents levels of light and color on
6304 a calibrated screen.  It is useful because the human eye is not specialized to
6305 match precise level of light and color, but to detect differences between
6306 lights and colors.
6308 The Videoscope can be used in conjunction with other Cinelerra plugins such as
6309 YUV, HUE, Brightness, Histogram to accurately correct video for contrast,
6310 clarity, conformance (normalize various videos shot under different light
6311 settings) or for cinematic purposes.
6313 Some thought is being given to having a video scope for recording.
6314 Unfortunately, this would require a lot of variations of the video scope for
6315 all the different video drivers.
6317 The Videoscope contains two displays: the @b{waveforme scope} and the
6318 @b{vectorscope}
6320 @c cincvdoc_node_number_226
6321 @node The waveform scope
6322 @subsubsection The waveform scope
6323 @cindex Waveform scope
6325 Screen labeled vertically from bottom to top bottom or 0% is maximum Black Top
6326 or 100% is maximum White.  Divides the source video on vertical columns of
6327 pixels, then each pixel on the column is metered, and plotted on corresponding
6328 vertical scale the waveform scope according to its light intensity value.
6330 A pixel on the bottom of the scope indicates for full black, a pixel on the top
6331 (100%) of the scope is full white.
6333 The image shows a stair step set of lines on scope, indicating the matching
6334 levels of luminance on the test image bars.  Multiple levels on the same column
6335 are represented by multiple lines on the scope.
6337 The Waveform scope helps correct image light levels for contrast range or for
6338 conforming light levels on various scenes originally shot on different light
6339 settings.
6341 Adjusting light levels.  (adjusting luminance) *Insert the xxx videoeffect on
6342 your track, right click, Show Insert the videoscope effect on the track.  (make
6343 sure that it is placed below the xx effect, so it can see the result of the xxx
6344 effect.  If it is not, rightclick and move it down to make it so) rightclick,
6345 show.
6347 Looking at the luminance levels shown on the waveform, adjust the xxx control
6348 to match the desired level of light for your image.
6350 If you are looking for best contrast range, adjust the xxx level on the plugin
6351 to align the darkest point on the scope on the 0% scale and the whitest portion
6352 of interest on the 100%.  Anything above 100% is over saturated.
6354 @c cincvdoc_node_number_227
6355 @node The vectorscope
6356 @subsubsection The vectorscope
6357 @cindex Vectorscope
6359 The Vectorscope is used to monitor color.  The screen represents a color wheel
6360 where pixel color value is plotted on the radius of a line moving away from the
6361 center, the smallest radius indicates full white and the outer circles
6362 indicating highest values of intensity.
6364 Color hue is also plotted, represented by the angle in degrees on the color
6365 wheel, representing different hue colors.
6367 The Vectorscope can used along other plugins to correct color, adjust image
6368 tint, and apply other effects for cinematic effects, image correction or to
6369 conform separate screens to look the same.
6371 The vectorscope can also be used to monitor that the video output can be
6372 properly displayed on various monitors.  Any points along the inner radius will
6373 be displayed as pure white and any points above the 100% radius, will probably
6374 not be correctly displayed on the screen.
6376 @c cincvdoc_node_number_228
6377 @node Wave
6378 @subsection Wave
6379 @cindex Wave
6381 @image{manual_images_en/wave,12.5mm}
6383 The wave effect adds waves on the image.
6385 @center @image{manual_images_en/effect_wave_before_after,120mm}
6387 You can adjust the following parameters:
6389 @center @image{manual_images_en/effect_wave_window,60mm}
6391 @c cincvdoc_node_number_229
6392 @node Whirl
6393 @subsection Whirl
6394 @cindex Whirl
6396 @image{manual_images_en/whirl,12.5mm}
6398 FIXME
6400 @c cincvdoc_node_number_230
6401 @node YUV
6402 @subsection YUV
6403 @cindex YUV
6405 @image{manual_images_en/yuv,12.5mm}
6407 FIXME
6409 @c cincvdoc_node_number_231
6410 @node Zoom blur
6411 @subsection Zoom blur
6412 @cindex Zoom blur
6414 @image{manual_images_en/zoomblur,12.5mm}
6416 FIXME
6418 @c cincvdoc_node_number_232
6419 @node Rendered effects
6420 @chapter Rendered effects
6421 @cindex Rendered effects
6422 @cindex Effects, rendered
6423 Another type of effect is performed on a section of the track and the result
6424 stored somewhere before it is played back.  The result is usually pasted into
6425 the track to replace the original data.
6427 The rendered effects are not listed in the resource window but instead are
6428 accessed through the @b{Audio->Render effect} and @b{Video->Render effect} menu
6429 options.  Each of these menu options brings up a dialog for the rendered
6430 effect.  Rendered effects apply to only one type of track, either audio or
6431 video.  If no tracks of the type exist, an error pops up.
6433 A region of the timeline to apply the effect to must be defined before
6434 selecting @b{Render effect...}.  If no in/out points and no highlighted region
6435 exist, the entire region after the insertion point is treated as the affected
6436 region.  Otherwise, the region between the in/out points or the highlighted
6437 region is the affected region.
6439 Secondly, the tracks to apply the rendered affect to need to be @b{armed}.  All
6440 other tracks are ignored.
6442 Finally, the rendered affect processes certain track attributes when it reads
6443 its input data but not others.  Transitions in the affected track are applied.
6444 Nudge is not and effects are not.  This allows the new data to be pasted into
6445 the existing position without changing the nudge value.
6447 In the render effect dialog is a list of all the realtime and all the rendered
6448 effects.  The difference here is that the realtime effects are rendered to disk
6449 and not applied under the track.  Highlight an effect in the list to designate
6450 it as the one being performed.
6452 Define a file to render the effect to in the @b{Select a file to render to}
6453 box.  The @image{manual_images_en/magnify,7mm} magnifying glass allows file selection
6454 from a list.
6456 Select a file format which can handle the track type.  The
6457 @image{manual_images_en/wrench,4.33mm} wrench allows configuration specific to the
6458 file format.
6460 There is also an option for creating a new file at each label.  If you have a
6461 CD rip on the timeline which you want to divide into different files, the
6462 labels would become dividing points between the files if this option were
6463 selected.  When the timeline is divided by labels, the effect is re-initialized
6464 at every label.  Normalize operations take the peak in the current file and not
6465 in the entire timeline.
6467 Finally there is an insertion strategy just like in the render dialog.  It
6468 should be noted that even though the effect applies only to audio or video, the
6469 insertion strategy applies to all tracks just like a clipboard operation.
6471 When you click @b{OK} in the effect dialog, it calls the GUI of the effect.  If
6472 the effect is also a realtime effect, a second GUI appears to prompt for
6473 acceptance or rejection of the current settings.  After accepting the settings,
6474 the effect is processed.
6476 @menu
6477 * Rendered audio effects::     Rendered audio effects
6478 * Rendered video effects::     Rendered video effects
6479 @end menu
6481 @c cincvdoc_node_number_233
6482 @node Rendered audio effects
6483 @section Rendered audio effects
6484 @cindex Rendered audio effects
6486 @menu
6487 * Resample::        How to reduce the dynamic range of audio.
6488 @end menu
6490 @c cincvdoc_node_number_234
6491 @node Resample
6492 @subsection Resample
6493 @cindex Resample effect
6495 This multiplies the number of each output sample by a scale factor to arrive at
6496 the number of the input sample.  The output file's sample rate is set to the
6497 project sample rate but its length is changed to reflect the scaled number of
6498 samples.  It also filters the resampled audio to remove aliasing.
6500 If the scale factor is 2, every 2 input samples will be reduced to 1 output
6501 sample and the output file will have half as many samples as the input
6502 sequence.  If it is 0.5, every 0.5 input samples will be stretched to 1 output
6503 sample and the output file will have twice as many samples as the input
6504 sequence.
6506 @c cincvdoc_node_number_235
6507 @node Rendered video effects
6508 @section Rendered video effects
6509 @cindex Rendered video effects
6511 @menu
6512 * Reframe::        Reframe
6513 @end menu
6515 @c cincvdoc_node_number_236
6516 @node Reframe
6517 @subsection Reframe
6518 @cindex Reframe video effect
6520 This does exactly the same thing as @b{ReframeRT} in @b{Stretch} mode.  It
6521 multiplies the output frame number by the scale factor to arrive at the input
6522 frame number and changes the length of the sequence.  Unlike ReframeRT, this
6523 must run from the @b{Video} menu and render its output.
6525 Be aware @b{Reframe} does not write the scaled frame rate as the frame rate of
6526 the rendered file.  It produces a file of scaled length and equal frame rate as
6527 the project.  The new length is 1/scale factor as big as the original sequence.
6529 @b{To create a slow-motion of fast moving video:}
6530 @enumerate 1
6531 @item Select the video clip you wish to re-frame and put it on a
6532 video track
6533 @item Select the area you wish to reframe
6534 @item From the Video menu, select the Render Effect option
6535 @item From the effect list, select Reframe
6536 @item Enter the output format and insertion strategy for the new
6537 clip to be created
6538 @item Press ok
6539 @item At the popup menu, enter the scale factor 2 to run twice as
6540 fast, and .5 to run at half speed
6541 @end enumerate
6543 @c cincvdoc_node_number_237
6544 @node Ladspa effects
6545 @chapter Ladspa effects
6546 @cindex Ladspa effects
6548 LADSPA effects are supported in realtime and rendered mode for audio.  The
6549 LADSPA plugins you get from the internet vary in quality.  Most can not be
6550 tweeked in realtime very easily and work better when rendered.  Some crash and
6551 some can only be applied to one track due to a lack of re-entrancy.  Although
6552 Cinelerra implements the LADSPA interface as accurately as possible, multiple
6553 tracks of realtime, simultaneous processing go beyond the majority of LADSPA
6554 users.  LADSPA effects appear in the audio folder as the hammer and
6555 screwdriver, to signify that they are Plugins for GNU/Linux Audio Developers.
6557 LADSPA Effects are enabled merely by setting the @env{LADSPA_PATH} environment
6558 variable to the location of your LADSPA plugins or putting them in the
6559 @file{/usr/lib/cinelerra} directory.
6561 If you use Debian, you can get a lot of plugins using apt: @*
6562 @command{apt-cache search ladspa} @*
6563 @command{apt-get install jack-rack cmt blop swh-plugins}
6565 @c cincvdoc_node_number_238
6566 @node Transitions
6567 @chapter Transitions
6568 @cindex Transitions
6570 @menu
6571 * Using transitions::
6572 * Dissolve video transition::
6573 @end menu
6575 @c cincvdoc_node_number_239
6576 @node Using transitions
6577 @section Using transitions
6578 @cindex Using transitions
6580 When one edit ends and another edit begins, the default behavior is to have
6581 the first edit's output immediately become the output of the second edit when
6582 played back.  Transitions are a way for the first edit is output to become the
6583 second edit is output with different variations.
6585 Cinelerra supports audio and video transitions, all of which are listed in the
6586 resource window.
6588 @center @image{manual_images_en/resources_video_transitions,70mm}
6589 @center @b{Video transitions in the resources window}
6591 Transitions may only apply to the matching track type.  Transitions under
6592 @b{audio transitions} can only apply to audio tracks.  Transitions under
6593 @b{video transitions} can only apply to video tracks.
6595 Load a video file and cut a section from the center so the edit point is
6596 visible on the timeline.  Go the resource window and click on the @b{Video
6597 transitions} folder.  Drag a transition from the transition list onto the
6598 second video edit on the timeline.  A box highlights over where the transition
6599 will appear.  Releasing it over the second edit applies the transition between
6600 the first and second edit.
6602 @center @image{manual_images_en/drop_transition}
6603 @center @b{Dragging a dissolve transition to the timeline}
6605 You can now scrub@footnote{Scrubbing refers to moving backwards and forwards in
6606 time across a video or audio clip.} over the transition with the transport
6607 controls and watch the output in the @b{Compositor window}.  Scrubbing with the
6608 insertion point does not normally show transitions because the transition
6609 durations are usually too short.
6611 @cindex Detach Transitions
6612 @cindex Edit Transitions
6613 Once the transition is in place, it can be edited similarly to an effect.  Move
6614 the pointer over the transition and right click to bring up the transition
6615 menu.  The @b{show} option brings up specific parameters for the transition in
6616 question if there are any.  The @b{length} option adjusts the length of the
6617 transition in seconds.  Once these two parameters are set, they are applied to
6618 future transitions until they are changed again.  Finally, the @b{detach}
6619 option removes the transition from the timeline.
6621 Dragging and dropping transitions from the Resource window to the Program
6622 window can be really slow and tiring.  Fortunately, once you drag a transition
6623 from the Resource window, the @b{U} and @b{u} keys will paste the same
6624 transition.  The @b{U} key pastes the last video transition and the @b{u} key
6625 pastes the last audio transition on all the recordable tracks.  If the
6626 insertion point or in point is over an edit, the beginning of the edit is
6627 covered by the transition.
6629 It should be noted that when playing transitions from the timeline to hardware
6630 accelerated video device, the hardware acceleration will usually be turned off
6631 momentarily during the transition and on after the transition in order to
6632 render the transition.  Using an un-accelerated video device for the entire
6633 timeline normally removes the disturbance.
6635 @b{Important:} The exact point in time when the transition takes effect is not
6636 straightforward.  It starts when the second edit begins and lasts a certain
6637 amount of time into the second edit.  Therefore, the first asset needs to have
6638 enough data after the edit point to fill the transition into the second edit.
6640 For example, the dissolve transition starts at the exact position where it is
6641 located on the timeline.  If you set a duration of 1 second for a dissolve
6642 transition, it @b{will not} start 0.5 second before the transition and continue
6643 0.5 second after that point.  In fact, it will start exactly where the
6644 transition is located on the timeline, and last for 1 second from that
6645 position.
6647 It is a common error to put a dissolve transition just after the last frame of
6648 an asset.  Let's imagine a dissolve transition is put between asset A and asset
6649 B, just after the last frame of asset A@.
6651 Since the dissolve effect starts exactly at the position where it is located,
6652 there is no more frames from asset A to display when the dissolve transition
6653 starts.  Therefore, there is no other choice for Cinelerra than freezing the
6654 last frame of asset A and dissolving it with asset B@.
6656 You have to make sure there is enough frames of asset A to be displayed when
6657 the dissolve transition starts.  The duration of those frames should be equal
6658 or greater than the length of the transition effect.
6660 @c cincvdoc_node_number_240
6661 @node Dissolve video transition
6662 @section Dissolve video transition
6663 @cindex Dissolve video transition
6665 @image{manual_images_en/video_disolve_icon}
6667 This is a soft dissolve transition between two video segments, which we call in
6668 and out segments.  The in segment turns increasingly transparent while the out
6669 segment materializes into its place.  The length of time for the full effect to
6670 take place can be controlled by the "Transition Length" control.
6672 @b{Available controls:} @*
6673 By right-clicking on the transition icon in the timeline, a menu will pop-up
6674 with the following controls
6675 @itemize @bullet
6676 @item @b{Show:} Pop up the transition specific menu (not available on this
6677 transition)
6678 @item @b{On:} Toggle on/off the transition effect
6679 @item @b{Transition length:} Set the span in seconds for the transition to
6680 complete
6681 @item @b{Detach:} Remove the transition from the timeline
6682 @end itemize
6684 @c cincvdoc_node_number_241
6685 @node Keyframes
6686 @chapter Keyframes
6687 @cindex Keyframes
6689 When you change the fade, camera, projector, or other parameters for a track,
6690 they stay by default the same for the entire duration of the timeline.  Setting
6691 static parameters is not very useful sometimes.  Normally you need to move the
6692 camera around over time or change mask positions.  Masks need to follow
6693 objects.  We create dynamic changes by defining keyframes.  A keyframe is a
6694 certain point in time when the settings for one operation change.  In
6695 Cinelerra, there are keyframes for almost every compositing parameter and
6696 effect parameter.
6698 @cindex Default keyframe
6699 @cindex Keyframe, default
6700 Whenever you adjust any parameter, the value is stored in a keyframe.  If the
6701 value is stored in a keyframe, why does not it always change?  The keyframe it
6702 is stored in by default is known as the @b{default keyframe}.  The default
6703 keyframe applies to the entire duration if no other keyframes are present.  The
6704 default keyframe is not drawn anywhere because it always exists.  The only way
6705 change occurs over time is if non-default keyframes are created.
6707 Display keyframes for any parameter by using the @b{view} menu.  A faster way
6708 to toggle multiple keyframe types is to bring up @b{window->overlays}.  This
6709 window allows toggling of every parameter in the view menu.  When keyframes are
6710 selected, they are drawn on the timeline over the tracks they apply to.
6712 Keyframes come in many forms: curves, toggles, modes, and so on.  How to handle
6713 the different types of keyframes is described here.
6715 @menu
6716 * Curve keyframes::
6717 * Toggle keyframes::
6718 * Automatic keyframes::
6719 * Compositor keyframes::
6720 * Editing keyframes::
6721 @end menu
6723 @c cincvdoc_node_number_242
6724 @node Curve keyframes
6725 @section Curve keyframes
6726 @cindex Curve keyframes
6727 @cindex Keyframes, curve
6729 Many parameters are stored in Bezier curves.  Go to @b{view->fade} or
6730 @b{view->...zoom} to show curves on the timeline for those parameters.  In
6731 either arrow editing mode or i-beam editing mode, move the cursor over the
6732 curves in the timeline until it changes shape.  Then merely by clicking and
6733 dragging on the curve you can create a keyframe at the position.
6735 After the keyframe is created, click drag on it again to reposition it.  When
6736 you click-drag a second keyframe on the curve, it creates a smooth ramp.
6737 @b{CTRL-dragging} on a keyframe changes the value of either the input control
6738 or the output control.  This affects the sharpness of the curve.  While the
6739 input control and the output control can be moved horizontally as well as
6740 vertically, the horizontal movement is purely for legibility and is not used in
6741 the curve value.
6743 You may remember that The Gimp and the Compositing masks all use @key{SHIFT} to
6744 select control points so why does the timeline use @key{CTRL}?  When you
6745 @b{SHIFT-drag} on a timeline curve, the keyframe snaps to the value of either
6746 the next or previous keyframe, depending on which exists.  This lets you set a
6747 constant curve value without having to copy the next or previous keyframe.
6749 @menu
6750 * Navigating curve keyframes::
6751 @end menu
6753 @c cincvdoc_node_number_243
6754 @node Navigating curve keyframes
6755 @subsection Navigating curve keyframes
6756 @cindex Navigating curve keyframes
6758 There is not much room on the timeline for a wide range of curve values.  You
6759 need to zoom the curves in and out vertically to have any variability.  This is
6760 done by 2 tools: the automation fit button and automation zoom menu
6761 @image{manual_images_en/autozoom}.
6763 The automation fit button scales and offsets the vertical range so the selected
6764 curve area appears in the timeline.  If a region of the timeline is highlighted
6765 by the cursor, only that region is scaled.  In/out points do not affect the
6766 zoomed region.  @kbd{ALT-f} also performs automation fitting.
6768 The automation zoom menu manually changes the vertical scaling of the curves in
6769 multiples of 2.  Click on its tumbler to change the zoom.  @kbd{ALT-UP} and
6770 @kbd{ALT-DOWN} change the automation zoom from the keyboard.
6772 @c cincvdoc_node_number_244
6773 @node Toggle keyframes
6774 @section Toggle keyframes
6775 @cindex Toggle keyframes
6776 @cindex Keyframes, toggle
6778 Mute is the only toggle keyframe.  Mute keyframes determine where the track is
6779 processed but not rendered to the output.  Click-drag on these curves to create
6780 a keyframe.  Unlike curves, the toggle keyframe has only two values: on or off.
6781 @key{CTRL} and @key{SHIFT} do nothing on toggle keyframes.
6783 @c cincvdoc_node_number_245
6784 @node Automatic keyframes
6785 @section Automatic keyframes
6786 @cindex Automatic keyframes
6787 @cindex Keyframes, automatic
6789 You may have noticed when a few fade curves are set up, moving the insertion
6790 point around the curves causes the faders to reflect the curve value under the
6791 insertion point.  This is not just to look cool.  The faders themselves can set
6792 keyframes in automatic keyframe mode.  Automatic keyframe mode is usually more
6793 useful than dragging curves.
6795 Enable automatic keyframe mode by enabling the automatic keyframe toggle
6796 @image{manual_images_en/autokeyframe}.  In automatic keyframe mode, every time you tweek
6797 a key-framable parameter it creates a keyframe on the timeline.  Since
6798 automatic keyframes affect many parameters, it is best enabled just before you
6799 need a keyframe and disabled immediately thereafter.
6801 It is useful to go into the @b{View} menu and make the desired parameter
6802 visible before performing a change.  The location where the automatic keyframe
6803 is generated is under the insertion point.  If the timeline is playing back
6804 during a tweek, several automatic keyframes will be generated as you change the
6805 parameter.
6807 When automatic keyframe mode is disabled, a similarly strange thing happens.
6808 Adjusting a parameter adjusts the keyframe immediately preceding the insertion
6809 point.  If two fade keyframes exist and the insertion point is between them,
6810 changing the fader changes the first keyframe.
6812 There are many parameters which can only be keyframed in automatic keyframe
6813 mode.  These are parameters for which curves would take up too much space on
6814 the track or which can not be represented easily by a curve.
6816 Effects are only key-framable in automatic mode because of the number of
6817 parameters in each individual effect.
6819 Camera and projector translation can only be keyframed in automatic keyframe
6820 mode while camera and projector zoom can be keyframed with curves.  It is here
6821 that we conclude the discussion of compositing, since compositing is highly
6822 dependant on the ability to change over time.
6824 @c cincvdoc_node_number_246
6825 @node Compositor keyframes
6826 @section Compositor keyframes
6827 @cindex Compositor keyframes
6828 @cindex Keyframes, compositor
6830 Camera and projector translation is represented by two parameters: x and y.
6831 Therefore it is cumbersome to adjust with curves.  Cinelerra solves this
6832 problem by relying on automatic keyframes.  With a video track loaded, move the
6833 insertion point to the beginning of the track and enable automatic keyframe
6834 mode.
6836 Move the projector slightly in the compositor window to create a keyframe.
6837 Then go forward several seconds.  Move the projector a long distance to create
6838 another keyframe and emphasize motion.  This creates a second projector box in
6839 the compositor, with a line joining the two boxes.  The joining line is the
6840 motion path.  If you create more keyframes, more boxes are created.  Once all
6841 the desired keyframes are created, disable automatic keyframe mode.
6843 Now when scrubbing around with the compositor window's slider, the video
6844 projection moves over time.  At any point between two keyframes, the motion
6845 path is red for all time before the insertion point and green for all time
6846 after the insertion point.  It is debatable if this is a very useful feature
6847 but it makes you feel good to know what keyframe is going to be affected by the
6848 next projector tweek.
6850 Click-drag when automatic keyframes are off to adjust the preceding keyframe.
6851 If you are halfway between two keyframes, the first projector box is adjusted
6852 while the second one stays the same.  Furthermore, the video does not appear to
6853 move in step with the first keyframe.  This is because halfway between two
6854 keyframes the projector translation is interpolated.  In order to set the
6855 second keyframe you will need to scrub after the second keyframe.
6857 By default the motion path is a straight line, but it can be curved with
6858 control points.  @b{CTRL-drag} to set either the in or out control point of the
6859 preceding keyframe.  Once again, we depart from The Gimp because @key{SHIFT} is
6860 already used for zoom.  After the in or out control points are extrapolated
6861 from the keyframe, @b{CTRL-dragging} anywhere in the video adjusts the nearest
6862 control point.  A control point can be out of view entirely yet still
6863 controllable.
6865 When editing the camera translation, the behavior of the camera boxes is
6866 slightly different.  Camera automation is normally used for still photo
6867 panning.  The current camera box does not move during a drag, but if multiple
6868 keyframes are set, every camera box except the current keyframe appears to
6869 move.  This is because the camera display shows every other camera position
6870 relative to the current one.
6872 The situation becomes more intuitive if you bend the motion path between two
6873 keyframes and scrub between the two keyframes.  The division between red and
6874 green, the current position between the keyframes, is always centered while the
6875 camera boxes move.
6877 @c cincvdoc_node_number_247
6878 @node Editing keyframes
6879 @section Editing keyframes
6880 @cindex Editing keyframes
6881 @cindex Keyframes, editing
6883 @b{IMPORTANT:} when copying and pasting keyframes, make sure there is @b{no IN
6884 or OUT point defined on the timeline}.
6886 Keyframes can be shifted around and moved between tracks on the timeline using
6887 similar cut and paste operations to editing media.  Only the keyframes selected
6888 in the @b{view} menu are affected by keyframe editing operations, however.
6890 The most popular keyframe editing operation is replication of some curve from
6891 one track to the other, to make a stereo pair.  The first step is to solo the
6892 source track's record @image{manual_images_en/recordpatch_up} patch by
6893 @b{SHIFT-clicking} on it.  Then either set in/out points or highlight the
6894 desired region of keyframes.  Go to @b{keyframes->copy keyframes} to copy them
6895 to the clipboard.  Solo the destination track's record
6896 @image{manual_images_en/recordpatch_up} patch by @b{SHIFT-clicking} on it and go to
6897 @b{keyframes->paste keyframes} to paste the clipboard.
6899 The media editing commands are mapped to the keyframe editing commands by using
6900 the @key{SHIFT} key instead of just the keyboard shortcut.
6902 This leads to the most complicated part of keyframe editing, the default
6903 keyframe.  Remember that when no keyframes are set at all, there is still a
6904 default keyframe which stores a global parameter for the entire duration.  The
6905 default keyframe is not drawn because it always exists.  What if the default
6906 keyframe is a good value which you want to transpose between other non-default
6907 keyframes?  The @b{keyframes->copy default keyframe} and @b{keyframes->paste
6908 default keyframe} allow conversion of the default keyframe to a non-default
6909 keyframe.
6911 @b{Keyframes->copy default keyframe} copies the default keyframe to the
6912 clipboard, no matter what region of the timeline is selected.  The
6913 @b{keyframes->paste keyframes} function may then be used to paste the clipboard
6914 as a non-default keyframe.
6916 If you have copied a non-default keyframe, it can be stored as the default
6917 keyframe by calling @b{keyframes->paste default keyframe}.  After using paste
6918 default keyframe to convert a non-default keyframe into a default keyframe, you
6919 will not see the value of the default keyframe reflected until all the
6920 non-default keyframes are removed.
6922 Finally, there is a convenient way to delete keyframes besides selecting a
6923 region and calling @b{keyframes->clear keyframes}.  Merely click-drag a
6924 keyframe before its preceding keyframe or after its following keyframe on the
6925 track.
6927 @c cincvdoc_node_number_248
6928 @node Capturing media
6929 @chapter Capturing media
6930 @cindex Capturing media
6931 @cindex Media, capturing
6933 @menu
6934 * Capturing using Cinelerra::
6935 * Capturing using dvgrab::
6936 @end menu
6938 @c cincvdoc_node_number_249
6939 @node Capturing using Cinelerra
6940 @section Capturing using Cinelerra
6942 @menu
6943 * Cinelerra recording functions::
6944 * Batch recording::
6945 * Editing tuner information::
6946 @end menu
6948 @c cincvdoc_node_number_250
6949 @node Cinelerra recording functions
6950 @subsection Cinelerra recording functions
6951 @cindex Cinelerra recording functions
6953 Ideally, all media would be stored on hard drives, CD-ROM, flash, or DVD and
6954 loading it into Cinelerra would be a matter of loading a file.  In reality,
6955 very few sources of media can be accessed like a filesystem but instead rely on
6956 tape transport mechanisms and dumb I/O mechanisms to transfer the data to
6957 computers.  These media types are imported into Cinelerra through the Record
6958 dialog.
6960 The first step in recording is to configure the input device.  In
6961 @b{Settings->preferences} are a number of recording parameters described in
6962 configuration @xref{Recording}.  These parameters apply to recording no matter
6963 what the project settings are, because the recording parameters are usually the
6964 maximum capability of the recording hardware while project settings come and
6967 Go to @b{File->record} to record a dumb I/O source.  This prompts for an output
6968 format much like rendering does.  Once that is done, the record window and the
6969 record monitor pop up.
6971 The record window has discrete sections.  While many parameters change
6972 depending on if the file has audio or video, the discrete sections are always
6973 the same.
6975 @itemize @bullet
6976 @item The output format area describes the format of the output file and the
6977 current position within it.
6978 @item The edit batch area lets you change parameters in the current batch.
6979 @item The transport controls start and stop recording different ways.
6980 @item The batch list displays all the defined batches.
6981 @item The confirmation area lets you determine how the output files are
6982 imported into the timeline and quit.
6983 @end itemize
6985 @center @image{manual_images_en/recording,140mm}
6986 @center @b{Recording window areas}
6988 Recording in Cinelerra is organized around batches.  A batch essentially
6989 defines a distinct output file for the recording.  For now you can ignore the
6990 batch concept entirely and record merely by hitting the record button
6991 @image{manual_images_en/record}.
6993 The record button opens the current output file if it is not opened and writes
6994 captured data to it.  Use the stop button to stop the recording.  Recording can
6995 be resumed with the record button without erasing the file at this point.  In
6996 the case of a video file, there is a single frame record button
6997 @image{manual_images_en/singleframe} which records a single frame.
6999 When enough media is recorded, choose an insertion method from the @b{Insertion
7000 Strategy} menu and hit @b{close}.
7002 @c cincvdoc_node_number_251
7003 @node Batch recording
7004 @subsection Batch recording
7005 @cindex Batch recording
7007 Now we come to the concept of batches.  Batches try to make the dumb I/O look
7008 more like a filesystem.  Batches are traditionally used to divide tape into
7009 different programs and save the different programs as different files instead
7010 of recording straight through an entire tape.  Because of the high cost of
7011 developing frame-accurate deck control mechanisms, the only use of batches now
7012 is recording different programs during different times of day.  This is still
7013 useful for recording TV shows or time lapse movies as anyone who can not afford
7014 proper appliances knows.
7016 The record window supports a list of batches and two recording modes:
7017 interactive and batch recording.  Interactive recording happens when the record
7018 button is pressed.  Interactive recording starts immediately and uses the
7019 current batch to determine everything except start time.  By default, the
7020 current batch is configured to behave like tape.
7022 Batch recording happens when the @b{start} button is pressed.  In batch
7023 recording, the @b{start time} is the time the batch starts recording.
7025 First, you will want to create some batches.  Each batch has certain parameters
7026 and methods of adjustment.
7028 @itemize @bullet
7030 @item @b{On} @*
7031 Determines whether the batch is included in batch recording operations.  Click
7032 the list row under @b{On} to enable or disable batches.
7034 @item @b{Path} @*
7035 It is the file the batch is going to be recorded to.  The filename specified in
7036 the record dialog is the name of the first batch, to simplify interactive
7037 recording, but the filename may be changed in the record window for any batch
7038 in the @b{edit batch} area.
7040 @item @b{News} @*
7041 Shows whether the file exists or not.  This is a very important attribute since
7042 there is no confirmation dialog if the file exists.  The first time you hit
7043 record, the file is opened.  If the file exists at this point it is erased.
7044 News says @b{File exists} if it exists and @b{OK} if it does not.  Every time
7045 you resume recording in the same batch, the news should say @b{Open},
7046 indicating the file is already opened and will not be erased in the next record
7047 button press. @*
7048 If you change out of the current batch after recording, the file is closed.
7049 Next time you change into the batch, the file will be erased.
7051 @item @b{Start time} @*
7052 It is the 24 hour time of day the batch will start recording if in batch mode.
7053 The start time may become a time of tape and reel number if deck control is
7054 implemented but for now it is a time of day.
7056 @item @b{Duration} @*
7057 This is the length of the batch.  It only has meaning if the @b{Mode} of the
7058 batch is @b{Timed}.  Once the recording length reaches @b{duration} the
7059 recording stops, whether in interactive or batch mode.
7061 @item @b{Source} @*
7062 This has meaning only when the capturing hardware has multiple sources.
7063 Usually the source is a tuner channel or input.  When the current batch
7064 finishes and the next batch begins recording, the source is changed to what the
7065 next batch is set to.  This way multiple TV stations can be recorded at
7066 different times.
7067 @end itemize
7069 The record window has a notion of the @b{current batch}.  The current batch is
7070 not the same as the batch which is highlighted in the batch list.  The current
7071 batch text is colored red in the batch list.  The highlighted batch is merely
7072 displayed in the edit batch section for editing.
7074 By coloring the current batch red, any batch can be edited by highlighting it,
7075 without changing the batch to be recorded.
7077 All recording operations take place in the current batch.  If there are
7078 multiple batches, highlight the desired batch and hit @b{activate} to make it
7079 the current batch.  If the @b{start} button is pressed, the current batch
7080 flashes to indicate it is waiting for the start time in batch mode.  If the
7081 @b{record} button is pressed, the current batch is recorded immediately in
7082 interactive mode.
7084 In batch and interactive recording modes, when the current batch finishes
7085 recording the next batch is activated and performed.  All future recording is
7086 done in batch mode.  When the first batch finishes, the next batch flashes
7087 until its start time is reached.
7089 Interrupt either the batch or the interactive operation by hitting the stop
7090 button.
7092 Finally there is the @image{manual_images_en/rewind} rewind button.  In either
7093 interactive or batch recording, the rewind button causes the current batch to
7094 close its file.  The next recording operation in the current batch deletes the
7095 file.
7097 @c cincvdoc_node_number_252
7098 @node Editing tuner information
7099 @subsection Editing tuner information
7100 @cindex Editing tuner information
7101 @cindex Tuner, editing information
7103 Sometimes in the recording process and the configuration process, you will need
7104 to define and select tuner channels to either record or play back to.  In the
7105 case of the Video4Linux and Buz recording drivers, tuner channels define the
7106 source.  When the Buz driver is also used for playback, tuner channels define
7107 the destination.
7109 Defining tuner channels is accomplished by pushing the @image{manual_images_en/channel}
7110 channel button.  This brings up the channel editing window.  In this window you
7111 add, edit, and sort channels.  Also, for certain video drivers, you can adjust
7112 the picture quality.
7114 The @b{add} operation brings up a channel editing box.  The title of the
7115 channel appears in the channel list.  The source of the channel is the entry in
7116 the physical tuner's frequency table corresponding to the title.
7118 Fine tuning in the channel edit dialog adjusts the physical frequency slightly
7119 if the driver supports it.  The norm and frequency table together define which
7120 frequency table is selected for defining sources.  If the device supports
7121 multiple inputs, the input menu selects these.
7123 To sort channels, highlight the channel in the list and push @b{move up} or
7124 @b{move down} to move it.
7126 Once channels are defined, the @b{source} item in the record window can be used
7127 to select channels for recording.  The same channel selecting ability also
7128 exists in the record monitor window.  Be aware channel selections in the record
7129 monitor window and the record window are stored in the current batch.
7131 For some drivers an option to @b{swap fields} may be visible.  These drivers
7132 do not get the field order right every time without human intervention.  Toggle
7133 this to get the odd and even lines to record in the right order.
7135 @c cincvdoc_node_number_253
7136 @node Capturing using dvgrab
7137 @section Capturing using dvgrab
7138 @cindex Dvgrab, capturing using
7140 dvgrab is great and simple to use a command line tool to capture videos from a
7141 DV camcorder.  When invoked it will automatically put your camera in play
7142 mode, and start storing the videos on your hard disk.  Video files will be
7143 labeled sequentially, as: @file{001.avi}, @file{002.avi} and so on.
7145 To install dvgrab, use your distribution preferred installation mechanism (apt,
7146 rpm, deb, etc) or refer to the dvgrab webpage.
7148 Capturing videos in four easy steps:
7149 @enumerate 1
7150 @item Create a directory where you want the capture videos to be stored
7151 @item @command{cd} to that directory
7152 @item Type: @command{dvgrab --buffers 500} and @kbd{RETURN}
7153 @item Press @kbd{CTRL-C} to stop capturing video
7154 @end enumerate
7156 The @option{--autosplit} option is very useful. It splits scenes according to
7157 the timecode. However, that only works when grabbing from a DV camcorder. It
7158 will not work when grabbing from a analog/digital converter such as a Canopus
7159 ADVC110.
7161 Read the dvgrab manual to get more information about dvgrab features.
7163 @c cincvdoc_node_number_254
7164 @node Rendering files
7165 @chapter Rendering files
7166 @cindex Rendering files
7167 @cindex Files, rendering
7169 Rendering takes a section of the timeline, performs all the editing, effects
7170 and compositing, and stores it in a pure movie file.  You can then delete all
7171 the source assets, play the rendered file in a movie player, or bring it back
7172 into Cinelerra for more editing.  It is very difficult to retouch any editing
7173 decisions in the pure movie file, however, so keep the original assets and XML
7174 file around several days after you render it.
7176 All rendering operations are based on a region of the timeline to be rendered.
7177 You need to define this region on the timeline.  The navigation section
7178 describes methods of defining regions.  @xref{Timebar}.  The
7179 rendering functions define the region based on a set of rules.  When a region
7180 is highlighted or in/out points are set, the affected region is rendered.  When
7181 no region is highlighted, everything after the insertion point is rendered.
7182 Merely by positioning the insertion point at the beginning of a track and
7183 unsetting all in/out points, the entire track is rendered.
7185 @menu
7186 * Single file rendering::      Rendering a single file
7187 * Separate files rendering::
7188 * Insertion strategy of rendered files::
7189 * Batch rendering::            Rendering several files unattended
7190 * The render farm::            Rendering using many computers
7191 * Command line rendering::     Rendering from the command line without a GUI
7192 * Rendering options and encoding tips::
7193 * Using background rendering::
7194 @end menu
7196 @c cincvdoc_node_number_255
7197 @node Single file rendering
7198 @section Single file rendering
7199 @cindex Single file rendering
7201 The fastest way to get media to disk is to use the single file rendering
7202 function.
7204 Go to @b{File->render} or press @kbd{SHIFT-R} to bring up the render dialog.
7205 Select the magnifying glass @image{manual_images_en/magnify,7mm} to bring up a file
7206 selection dialog.  This determines the filename to write the rendered file to
7207 and the encoding parameters.
7209 @center @image{manual_images_en/render_window,80mm}
7210 @center @b{The render window}
7212 In the render dialog select a format from the @b{File Format} menu.  The format
7213 of the file determines whether you can render audio or video or both.  Select
7214 the @b{Render audio tracks} toggle to generate audio tracks and @b{Render video
7215 tracks} to generate video tracks.
7217 Select the wrench @image{manual_images_en/wrench,4.33mm} next to each toggle to set
7218 compression parameters.  If the file format can not store audio or video the
7219 compression parameters will be blank.  If @b{Render audio tracks} or @b{Render
7220 video tracks} is selected and the file format does not support it, trying to
7221 render will pop up an error.
7223 @c cincvdoc_node_number_256
7224 @node Separate files rendering
7225 @section Separate files rendering
7226 @cindex Separate files rendering
7228 The @b{Create new file at each label} option causes a new file to be created
7229 when every label in the timeline is encountered.  This is useful for dividing
7230 long audio recordings into individual tracks.  When using the renderfarm,
7231 @b{Create new file at each label} causes one renderfarm job to be created at
7232 every label instead of using the internal load balancing algorithm to space
7233 jobs.
7235 When @b{Create new file at each label} is selected, a new filename is created
7236 for every output file.  If the filename given in the render dialog has a 2
7237 digit number in it, the 2 digit number is overwritten with a different
7238 incremental number for every output file.  If no 2 digit number is given,
7239 Cinelerra automatically concatenates a number to the end of the given filename
7240 for every output file.
7242 In the filename @file{/hmov/track01.wav} the @samp{01} would be overwritten for
7243 every output file.  The filename @file{/hmov/track.wav}; however, would become
7244 @file{/hmov/track.wav001} and so on and so forth.  Filename regeneration is
7245 only used when either renderfarm mode is active or creating new files for every
7246 label is active.
7248 @c cincvdoc_node_number_257
7249 @node Insertion strategy of rendered files
7250 @section Insertion strategy of rendered files
7251 @cindex Insertion strategy of rendered files
7253 Finally the render dialog lets you select an insertion mode.  The insertion
7254 modes are the same as with loading files.  In this case if you select @b{insert
7255 nothing} the file will be written out to disk without changing the current
7256 project.  For other insertion strategies be sure to prepare the timeline to
7257 have the output inserted at the right position before the rendering operation
7258 is finished.  @xref{Editing}.  Editing describes how to cause output to be
7259 inserted at the right position.
7261 It should be noted that even if you only have audio or only have video
7262 rendered, a @b{paste} insertion strategy will behave like a normal paste
7263 operation, erasing any selected region of the timeline and pasting just the
7264 data that was rendered.  If you render only audio and have some video tracks
7265 armed, the video tracks will get truncated while the audio output is pasted
7266 into the audio tracks.
7268 @c cincvdoc_node_number_258
7269 @node Batch rendering
7270 @section Batch rendering
7271 @cindex Batch rendering
7273 If you want to render many projects to media files without having to repeatedly
7274 attend to the @b{Render} dialog, @b{batch rendering} is the function to use.
7275 In this function, you specify many EDL files to render and the unique output
7276 files for each.  Then Cinelerra loads each EDL file and renders it
7277 automatically, without any user intervention.  Each EDL file and its output to
7278 be rendered are called a @b{batch}.  This allows a huge amount of media to be
7279 processed and greatly increases the value of an expensive computer.
7281 The first thing to do when preparing to do batch rendering is define projects
7282 to be rendered.  The batch renderer requires a separate EDL file for every
7283 batch to be rendered.  Set up a project and define the region to be rendered
7284 either by highlighting it, setting in/out points around it, or positioning the
7285 insertion point before it.  Then save the project as an EDL@.  Define as many
7286 projects as needed this way.  The batch renderer takes the active region from
7287 the EDL file for rendering.
7289 With all the EDL files prepared with active regions, go to @b{File->batch
7290 render}.  This brings up the batch rendering dialog.  The interface for batch
7291 rendering is a bit more complex than for single file rendering.
7293 A list of batches must be defined before starting a batch rendering operation.
7294 The table of batches appears on the bottom of the batch render dialog and is
7295 called @b{batches to render}.  Above this are the configuration parameters for
7296 a single batch.
7298 Set the @b{output path}, @b{file format}, @b{Audio}, @b{Video}, and @b{Create
7299 new file at each label} parameters as if it was a single file.  These
7300 parameters apply to only one batch.  In addition to the standard rendering
7301 parameters, you must select the source EDL to use in the batch.  Do this by
7302 setting the @b{EDL path}.
7304 If the @b{batches to render} list is empty or nothing is highlighted, click
7305 @b{New} to create a new batch.  The new batch will contain all the parameters
7306 you just set.
7308 Repeatedly press the @b{New} button to create more batches with the same
7309 parameters.  Highlight any batch and edit the configuration on the top of the
7310 batch render window.  The highlighted batch is always synchronized to the
7311 information displayed.
7313 Click and drag batches to change the order in which they are rendered.  Hit
7314 @b{delete} to permanently remove the highlighted batch.
7316 In the list box is a column which enables or disables the batch.  This way
7317 batches can be skipped without being deleted.  Click on the @b{Enabled} column
7318 in the list box to enable or disable a batch.  If it is checked, the batch is
7319 rendered.  If it is blank, the batch is skipped.
7321 The other columns in the batch list are informative.
7322 @itemize @bullet
7323 @item @b{Output} The output path of the batch.
7324 @cindex EDL
7325 @item @b{EDL} The source EDL of the batch.
7326 @item @b{Elapsed} The amount of time taken to render the batch if it is
7327 finished.
7328 @end itemize
7330 To start rendering from the first enabled batch, hit @b{Start}.
7332 Once rendering, the main window shows the progress of the batch.  Once the
7333 batch finishes, the elapsed column in the batch list is updated and the next
7334 batch is rendered until all the enabled batches are finished.  The currently
7335 rendering batch is always highlighted red.
7337 To stop rendering before the batches are finished without closing the batch
7338 render dialog, hit @b{Stop}.
7340 To stop rendering before the batches are finished and close the batch render
7341 dialog, hit @b{Cancel}.
7343 To exit the batch render dialog whether or not anything is being rendered, hit
7344 @b{Cancel}.
7346 @c cincvdoc_node_number_259
7347 @node The render farm
7348 @section The render farm
7349 @cindex Render farm
7351 When bicubic interpolation and HDTV was first done on Cinelerra, the time
7352 needed to produce the simplest output became unbearable even on the fastest
7353 dual 1.7 GHz Xeon of the time.  Renderfarm support even in the simplest form
7354 brings HDTV times back in line with SD while making SD faster than real-time.
7356 While the renderfarm interface is not spectacular, it is simple enough to use
7357 inside an editing suite with less than a dozen nodes without going through the
7358 same amount of hassle you would with a several hundred node farm.  Renderfarm
7359 is invoked transparently for all file->render operations when it is enabled in
7360 the preferences.
7362 Cinelerra divides the selected region of the timeline into a certain number of
7363 jobs which are then dispatched to the different nodes depending on the load
7364 balance.  The nodes process the jobs and write their output to individual files
7365 on the filesystem.  The output files are not concatenated.  It is important for
7366 all the nodes to have access to the same filesystem on the same mount point for
7367 assets.
7369 If a node can not access an input asset it will display error messages to its
7370 console but probably not die.  If it can not access an output asset it will cause
7371 the rendering to abort.
7373 It should be noted that in the render dialog, the @b{Create new file at each
7374 label} option causes a new renderfarm job to be created at each label instead
7375 of by the load balancer.  If this option is selected when no labels exist, only
7376 one job will be created.
7378 A Cinelerra renderfarm is organized into a master node and any number of slave
7379 nodes.  The master node is the computer which is running the GUI@.  The slave
7380 nodes are anywhere else on the network and are run from the command line.  Run
7381 a slave node from the command line with @command{cinelerra -d}
7383 That is the simplest configuration.  Type @command{cinelerra -h} to see more
7384 options.  The default port number may be overridden by passing a port number
7385 after the @option{-d}.
7387 Most of the time you will want to bring in the rendered output and fine tune the
7388 timing on the timeline.  Also some file formats like MPEG can not be direct
7389 copied.  Because of this, the jobs are left in individual files.
7391 You can load these by creating a new track and specifying @b{concatenate to
7392 existing tracks} in the load dialog.  Files which support direct copy can be
7393 concatenated into a single file by rendering to the same file format with
7394 renderfarm disabled.  Also to get direct copy, the track dimensions, output
7395 dimensions, and asset dimensions must be equal.
7397 MPEG files or files which do not support direct copy have to be concatenated
7398 with a command line utility.  MPEG files can be concatenated with @b{cat}.
7400 Configuration of the renderfarm is described in the configuration chapter
7401 @xref{Renderfarm}.  The slave nodes traditionally read and write data to a
7402 common filesystem over a network, thus they do not need hard drives.
7404 Ideally all the nodes on the renderfarm have similar CPU performance.
7405 Cinelerra load balances on a first come first serve basis.  If the last segment
7406 is dispatched to the slowest node, all the fastest nodes may end up waiting for
7407 the slowest node to finish while they themselves could have rendered it faster.
7409 @c cincvdoc_node_number_260
7410 @node Command line rendering
7411 @section Command line rendering
7412 @cindex Command line rendering
7413 @cindex Rendering, command line
7415 The command line rendering facility consists of a way to load the current set
7416 of batch rendering jobs and process them without a GUI@.  This is useful if
7417 you are planning on crashing X repeatedly or want to do rendering on the other
7418 side of a low bandwidth network.  You might have access to a supercomputer in
7419 India but still be stuck in America, exiled you might say.  A command line
7420 interface is ideal for this.
7422 To perform rendering from the command line, first run Cinelerra in graphical
7423 mode.  Go to @b{file->batch render}.  Create the batches you intend to render
7424 in the batch window and close the window.  This saves the batches in a file.
7425 Set up the desired renderfarm attributes in @b{settings->preferences} and exit
7426 Cinelerra.  These settings are used the next time command line rendering is
7427 used.
7429 On the command line run: @command{cinelerra -r}
7431 to processes the current batch jobs without a GUI@.  Setting up all the
7432 parameters for this operation is hard.  That is why the command line aborts if
7433 any output files already exist.
7435 Other parameters exist for specifying alternative files for the preferences and
7436 the batches.  Attempting to use anything but the defaults is very involved so
7437 it has not been tested.
7439 @c cincvdoc_node_number_261
7440 @node Rendering options and encoding tips
7441 @section Rendering options and encoding tips
7442 @cindex Rendering options and encoding tips
7444 @menu
7445 * Rendering to Quicktime4linux to re-encode using mencoder::
7446 * Making a DVD::
7447 @end menu
7449 @c cincvdoc_node_number_262
7450 @node Rendering to Quicktime4linux to re-encode using mencoder
7451 @subsection Rendering to Quicktime4linux to re-encode using mencoder
7452 @cindex Rendering to Quicktime4linux to re-encode using mencoder
7454 If you want to reencode your rendered file with mencoder, you should export it
7455 as a Quicktime4linux file:
7457 @itemize @bullet
7458 @item Audio option Two Complements 16bits (Pcm)
7459 @item Video option DV
7460 @end itemize
7462 @b{Mencoder encoding options:}
7464 @itemize @bullet
7465 @item @b{Avi (mpeg4/divx) not for upload purposes:} @*
7466 @command{mencoder -of avi -o cinelerra.avi -oac mp3lame -ovc lavc -lavcopts
7467 vcodec=mpeg4:vbitrate=2500 cinelerra_render.mov}
7469 @item @b{Internet (download):} @*
7470 @command{mencoder -of avi -o cinelerra_render.avi -oac mp3lame -ovc lavc
7471 -lavcopts vcodec=mpeg4:vbitrate=400 -vf scale=320:240 cinelerra_render.mov} @*
7472 or @*
7473 First pass: @*
7474 @command{mencoder input.mov -ovc xvid -xvidencopts bitrate=600:pass=1 -vf
7475 scale=320:240 -oac mp3lame -lameopts abr:br=64 -o output.avi} @*
7476 Second pass: @*
7477 @command{mencoder input.mov -ovc xvid -xvidencopts bitrate=600:pass=2 -vf
7478 scale=320:240 -oac mp3lame -lameopts abr:br=64 -o output.avi}
7479 @end itemize
7481 Scott Frase wrote a Quicktime for GNU/Linux Compatibility Chart.  It contains an
7482 exhaustive list of all the Quicktime compression schemes available and their
7483 compatibility in Cinelerra, Mplayer and some other media players.  That
7484 document has two main sections, one based on an HDV resolution-formatted
7485 project and another based on a DV resolution-format project.
7487 It is available here: @*
7488 @uref{http://content.serveftp.net/video/qtcompatibility.ods}
7490 Some interesting notes:
7491 @itemize @bullet
7492 @item Mplayer does behave better with smaller, DV resolution video
7493 @item Cinelerra compatibility with files rendered from a DV project is not much
7494 different than its compatibility with files rendered from an HDV project.
7495 @item Comparison chart of DV/HDV mplayer/cinelerra compatibility included
7496 @end itemize
7498 @c cincvdoc_node_number_263
7499 @node Making a DVD
7500 @subsection Making a DVD
7501 @cindex Making a DVD
7502 @cindex DVD, making a
7504 @menu
7505 * Rendering to mpeg2::
7506 * Making a DVD menu::
7507 * Authoring a DVD::
7508 * Burning a DVD::
7509 @end menu
7511 @c cincvdoc_node_number_264
7512 @node Rendering to mpeg2
7513 @subsubsection Rendering to mpeg2
7514 @cindex Rendering to mpeg2
7515 @cindex Mpeg2, rendering to
7517 Here is a method to export mpeg2 video and make a single chapter DVD@.  This
7518 method allows you to precisely set the encoding option you want and produces an
7519 mpeg2 file which is 100% compatible with all DVD standalone players.
7521 The mplex program from @b{mjpegtools} must be installed.  The mjpegtools
7522 package is built in the hvirtual distribution and the mplex utility may be
7523 extracted from there.
7525 First, make sure you properly defined your cinelerra project format before
7526 rendering your video (menu @b{Settings->Format}).  PAL is 720x576 at 25 frames
7527 per second, and NTSC is 720x480 at 29.97 frames per second.
7529 @enumerate 1
7530 @item Create a script @file{~/cine_render.sh}
7531 @item Copy in @file{~/cine_render.sh file} the following lines: @*
7532 @command{#/bin/bash} @*
7533 @command{mpeg2enc -v 0 -K tmpgenc -r 16 -4 1 -2 1 -D 10 -E 10 -g 15 -G 15 -q 6
7534 -b 8600 -f 8 -o $1}
7535 @item Put the execute permissions on that file:
7536 @command{chmod 777 ~/cine_render.sh}
7537 @item Open cinelerra, and select the part of the video you want to render with
7538 the [ and ] points
7539 @item Press @kbd{SHIFT-R}
7540 @item Select the @b{YUV4MPEG Stream} file format
7541 @item Deselect @b{Render audio tracks} and select @b{Render video tracks}
7542 @item Click on the wrench
7543 @item In the newly opened window, indicate the name of the @file{m2v} file you
7544 want to create.  That file will contain video only.
7545 @item Click on @b{Use pipe} and write this command:
7546 @command{/home/<your_user>/cine_render.sh %}
7547 @item Click OK to close the second window, and OK again to render your
7548 @file{m2v} file
7549 @item When the m2v file is rendered, open the rendering window again, and
7550 render an AC3 file at 224kbits
7551 @item Finally, combine video and audio with this command:
7552 @command{mplex -f 8 your_video_file.m2v your_audio_file.ac3 -o
7553 video_audio_file.mpeg}
7554 @end enumerate
7556 You can modify the mpeg2enc parameters if you want to.  Look at the mpeg2enc
7557 manpage.  Some details about the settings:
7558 @itemize
7559 @item @option{-b 8600} : This is the maximum bitrate of your @file{m2v} file (it
7560 does not include the audio bitrate).  We recommend you to do not increase that
7561 value or you could get errors when mplexing the video and the audio.
7562 @item @option{-q 6} : This is the quantizer setting.  If you reduce it (do not go
7563 below 3), the quality increases.  But the bitrate will increase.  It's
7564 recommended to keep the medium bitrate achieved (that's displayed when mplexing
7565 the audio and video files) around 10% lower than the bitrate defined with the
7566 @option{-b} setting.
7567 @end itemize
7569 If your material is noisy (Hi8 analog material for example), you can add some
7570 mjpegtools in the command line written in @file{~/cine_render.sh}:
7571 @itemize @bullet
7572 @item @command{y4mshift} and @command{y4mscaler} can be used to remove the
7573 noisy borders around the video.  For example, those commands added at the
7574 beginning of the command line in @file{cine_render.sh} remove the black borders
7575 around a Hi8 video: @*
7576 @command{y4mshift -n -2 | yuvscaler -I USE_744x560+12+8 -O DVD -M BICUBIC |}
7577 @item @command{yuvdenoise} and @command{yuvmedianfilter} can help removing
7578 noise.  Example: @*
7579 @command{yuvdenoise -F | yuvmedianfilter -T 3 |} @*
7580 Denoising is a complex task, and the options given above are just an example.
7581 Please read the mjpegtools'manual and subscribe to its mailing-list for more
7582 information.
7583 @end itemize
7585 @c cincvdoc_node_number_265
7586 @node Making a DVD menu
7587 @subsubsection Making a DVD menu
7588 @cindex Making a DVD menu
7590 A DVD menu is composed of:
7592 @itemize @bullet
7593 @item a background (still image or video)
7594 @item buttons
7595 @item sound/music
7596 @end itemize
7598 You can build a menu with a GUI such as qdvdauthor, dvdstyler, dvdwizard or
7599 tovid.  However, using those GUI is not perfect for the moment, since they are
7600 bugged or limited for the moment.
7602 The method we explain below is more complicated than using a GUI, however it:
7604 @itemize @bullet
7605 @item produces DVD playable on all standalone players
7606 @item is not subject to bugs
7607 @item will save you a lot of time since all you have to do to author a new DVD
7608 is to modify text files
7609 @end itemize
7611 If you prefer to use a GUI, we recommend you to try tovid: @*
7612 @uref{http://tovid.wikia.com/wiki/Main_Page}
7614 Here are the steps needed to create your DVD menu:
7616 @itemize @bullet
7617 @item create the menu background with cinelerra
7618 @item add the buttons by creating PNG images
7619 @item combine the menu and the buttons with spumux
7620 @end itemize
7622 We suppose that you want to create a menu with an animated background.  Launch
7623 Cinelerra and create a project containing what you want to be the background of
7624 the menu.  You can add a music if you wish to.  Pay attention to the fact that
7625 this menu will play in loop.
7627 To draw the buttons, you have two possibilities:
7629 @itemize @bullet
7630 @item display them in Cinelerra.  That way, you will be able to make animated
7631 buttons, such as a video thumbnail for each part of your video.
7632 @item do not draw the buttons in Cinelerra.  You will add them later on, from
7633 PNG images "added" to the mpeg2 menu file.  This is the simpliest method, but
7634 you won't be able to display animated buttons.
7635 @end itemize
7637 Render that video into m2v and ac3 using the @command{cine_render.sh} method
7638 explain above.  Combine the audio and video with mplex as you would do with any
7639 "normal" video.
7641 You obtain a mpeg2 file containing the menu background, and some buttons
7642 displayed above it if you added them in Cinelerra.
7644 We have to use spumux to define each button position in that mpeg2 file.  If
7645 you did not draw the buttons in Cinelerra, you will be able to put them in with
7646 spumux.
7648 Spumux is a command line utility which takes 2 arguments:
7650 @itemize @bullet
7651 @item an XML file explaining where the buttons are
7652 @item the mpeg2 file name (the one you rendered for the menu)
7653 @end itemize
7655 Here is a spumux example XML file:
7656 @verbatim
7657 <subpictures>
7658  <stream>
7659   <spu start="00:00:00.0" image="buttons_normal.png" highlight=
7660   "buttons_highlight.png" select="buttons_select.png">
7661    <button name="1" x0="94 " y0="234 " x1="253 " y1="278"
7662    down="2" right="4" />
7663    <button name="2" x0="63 " y0="287 " x1="379 " y1="331" up="1"
7664    down="3" right="5" />
7665   </spu>
7666  </stream>
7667 </subpictures>
7668 @end verbatim
7670 @itemize @bullet
7671 @item @b{image="buttons_normal.png"} This png image contains the buttons as
7672 they should appear when they are not selected nor highlighted.
7673 @item @b{highlight="buttons_highlight.png"} This png image contains the buttons
7674 in their highlighted state.
7675 @item @b{select="buttons_select.png} This png image contains the buttons in
7676 their selected state.
7677 @end itemize
7679 If you already made the buttons in Cinelerra, you have to specify empty (100%
7680 transparent) PNG images here.
7682 The PNG images used in spumux must:
7684 @itemize @bullet
7685 @item contain an @b{alpha channel} (ie support transparency)
7686 @item be in @b{4 indexed colors}. You can easily convert an image to 4 indexed
7687 colors using Gimp.
7688 @end itemize
7690 There is one line per button. Each line contains the button coordinates, a
7691 button having a rectangular shape:
7693 @itemize @bullet
7694 @item @b{x0, y0}: upper left corner
7695 @item @b{x1, y1}: bottom right corner
7696 @end itemize
7698 You also have to set which button to move to when using the up, down, left and
7699 right buttons of the DVD remote.  Here is an example:
7701 @verbatim
7702 <button name="3" ...coordinates... up="1" down="5" left="2" right="4" />
7703 @end verbatim
7705 When button 3 is selected, if the "Up" key is pressed on the remote then the
7706 button 1 will be highlighted.  If the "Right" key is pressed on the remote,
7707 then button 4 will be highlighted.
7709 When you have finished editing your spumux XML file, you have to type this
7710 command: @*
7711 @command{spumux menu.xml < menu.mpeg > menu_with_buttons.mpeg} @*
7712 That will make a @file{menu_with_buttons.mpeg}. It is an mpeg2 files with
7713 buttons.
7715 @c cincvdoc_node_number_266
7716 @node Authoring a DVD
7717 @subsubsection Authoring a DVD
7718 @cindex Authoring a DVD
7720 After having rendered to mpeg2 your video files, and having prepared a menu
7721 with spumux, you need to "author" the DVD with dvdauthor.
7723 Dvdauthor uses XML files to describe the DVD structure.  The syntax is
7724 rigorous, and one should really pay a lot of attention to the .xml file syntax.
7725 The risk is the DVD to be readable on some standalone players, but not all of
7726 them.
7728 To help you start using dvdauthor, we will show you some example XML files.
7730 @verbatim
7731 <dvdauthor dest="/path/to/the/folder/which/will/contain/the/dvd">
7732     <vmgm />
7733     <titleset>
7734         <titles>
7735             <pgc>
7736                 <vob file="/the/mpeg/file.mpeg" />
7737                 <post>
7738                     jump chapter 1;
7739                 </post>
7740             </pgc>
7741         </titles>
7742     </titleset>
7743 </dvdauthor>
7744 @end verbatim
7746 This is a very simple dvdauthor XML file. There are no menus, so the video file
7747 @file{/the/mpeg/file.mpeg} will be played as soon as you insert the DVD in the
7748 player.
7750 The command in <post> tag means the video should be played in a loop.  When the
7751 DVD player reaches the end of the video, it will jump to the first chapter of
7752 the video (which dvdautor assumes to be the beginning of the video since
7753 chapters haven't been defined).
7755 To author the DVD, just type the following command: @*
7756 @command{dvdauthor -x simple_example.xml}
7758 Now, let's have a look at a more complex example. When the DVD is inserted, a
7759 menu is displayed and you can choose to play any of 4 videos.
7761 @verbatim
7762 <dvdauthor dest="/path/to/the/folder/which/will/contain/the/dvd" jumppad="yes" >
7763 <vmgm>
7764  <fpc> jump menu 1; </fpc>
7765   <menus>
7766    <video format="pal" aspect="4:3" resolution="720x576" />
7767    <pgc entry="title" >
7768     <vob file="menu.mpeg" pause="0" />
7769     <button name="1" > { g3=1; jump titleset 1 menu entry root; } </button>
7770     <button name="2" > { g3=2; jump titleset 1 menu entry root; } </button>
7771     <button name="3" > { g3=3; jump titleset 1 menu entry root; } </button>
7772     <button name="4" > { g3=4; jump titleset 1 menu entry root; } </button>
7773      <post> { jump cell 1; } </post>
7774    </pgc>
7775   </menus>
7776  </vmgm>
7777  <titleset>
7778   <menus>
7779    <pgc entry="root" >
7780     <pre> { if ( g3 gt 0 )  {
7781                 if ( g3 eq 1 ) { g3=0; jump title 1  chapter 1; }
7782                 if ( g3 eq 2 ) { g3=0; jump title 1  chapter 3; }
7783                 if ( g3 eq 3 ) { g3=0; jump title 1  chapter 5; }
7784                 if ( g3 eq 4 ) { g3=0; jump title 1  chapter 7; }
7785                 jump vmgm menu entry title;
7786                 }
7787         } </pre>
7788     <post> { jump vmgm menu entry title; } </post>
7789    </pgc>
7790   </menus>
7791   <titles>
7792    <video format="pal" aspect="4:3" resolution="720x576" />
7793    <pgc pause="0" >
7794     <vob file="video_1.mpeg" pause="0" />
7795     <vob file="blackvideo.mpg" pause="0" />
7796     <vob file="video_2.mpeg" pause="0" />
7797     <vob file="blackvideo.mpg" pause="0" />
7798     <vob file="video_3.mpeg" pause="0" />
7799     <vob file="blackvideo.mpg" pause="0" />
7800     <vob file="video_4.mpeg" pause="0" />
7801     <post> { call vmgm menu entry title; } </post>
7802    </pgc>
7803   </titles>
7804  </titleset>
7805 </dvdauthor>
7806 @end verbatim
7808 The file @file{blackvideo.mpg} is used to add a 2 second black screen between
7809 each video. Here is how to create it: @*
7810 @command{convert -size 720x576 xc:black -depth 8 blackframe.ppm} @*
7811 @command{dd if=/dev/zero bs=4 count=960000 | toolame -b 128 -s 48 /dev/stdin
7812 emptyaudio.mpa} @*
7813 @command{ppmtoy4m -S 420mpeg2 -n 50 -F 25:1 -r blackframe.ppm | mpeg2enc -a 2
7814 -n p -f 8 -o blackvideo.mpv} @*
7815 @command{mplex -f 8 -o blackvideo.mpg blackvideo.mpv emptyaudio.mpa}
7817 @c cincvdoc_node_number_267
7818 @node Burning a DVD
7819 @subsubsection Burning a DVD
7820 @cindex Burning a DVD
7822 When you have finished authoring the DVD, you will find in the destination folder the
7823 following directories: @file{AUDIO_TS} and @file{VIDEO_TS}.  To test your DVD
7824 before burning it, cd into this folder, and type: @*
7825 @command{xine dvd:`pwd`}
7827 If your DVD plays fine on your computer, it is time to burn it.  When you are
7828 in the folder containing @file{AUDIO_TS} and @file{VIDEO_TS}, type this
7829 command (adjusting for your dvd burner device, eg /dev/dvdrw): @*
7830 @command{nice -n -20 growisofs -dvd-compat -speed=2 -Z /dev/dvd -dvd-video -V
7831 VIDEO ./ && eject /dev/dvd}
7833 If you have a lot of copies to do, you can first make an .iso master using this
7834 command: @*
7835 @command{nice -n -20 mkisofs -dvd-video -V VIDEO -o ../dvd.iso .} @*
7836 This @file{../dvd.iso} file can be burnt using this command: @*
7837 @command{nice -n -20 growisofs -dvd-compat -speed=2 -Z /dev/dvd=../dvd.iso &&
7838 eject /dev/cdrom}
7840 We recommend you do not burn at a speed higher than 4x.  Use good quality DVD-R
7841 only.
7843 To test your DVD on a standalone player without wasting several DVD-R, you can
7844 burn on DVD-RW@.  First, format your DVD-RW using this command: @*
7845 @command{dvd+rw-format -lead-out /dev/dvd} @*
7846 Then, burn the DVD-RW using the commands above.
7848 @c cincvdoc_node_number_268
7849 @node Using background rendering
7850 @section Using background rendering
7851 @cindex Background rendering
7852 @cindex Rendering, background
7854 Background rendering allows impossibly slow effects to play back in real-time
7855 shortly after the effect is pasted in the timeline.  It continuously renders
7856 temporary output.  When renderfarm is enabled, background rendering uses the
7857 renderfarm continuously.  This way, any size video can be seen in real-time
7858 merely by creating a fast enough network with enough nodes.
7860 Background rendering is enabled in settings->preferences->performance.  It has
7861 one interactive function: @b{settings->set background render}.  This sets the
7862 point where background rendering begins to where the in point is.  If any video
7863 exists, a red bar appears in the timeline showing what has been background
7864 rendered.
7866 It is often useful to insert an effect or a transition and then select
7867 settings->set background render right before the effect to preview it at full
7868 framerates.
7870 @c cincvdoc_node_number_269
7871 @node Tips
7872 @chapter Tips
7873 @cindex Tips
7875 In this section, you will find ways to solve common problems using Cinelerra.
7876 This section is arranged in order of the problems and what tools are used to
7877 solve them.  Following sections are arranged in order of the tools and their
7878 uses.
7880 @menu
7881 * Encoding into Dolby Pro Logic::
7882 * Cleaning analog TV::
7883 * Defeating interlacing::
7884 * Making video look like film::
7885 * Clearing out haze::
7886 * Making a ringtone::
7887 * Time stretching audio::
7888 * Video screen captures::
7889 * Improving performance::             Making Cinelerra run better on GNU/Linux.
7890 * Translating Cinelerra::             How to translate Cinelerra to different languages.
7891 * Panning and zooming still images::
7892 @end menu
7894 @c cincvdoc_node_number_270
7895 @node Encoding into Dolby Pro Logic
7896 @section Encoding into Dolby Pro Logic
7897 @cindex Dolby Pro Logic, encoding into
7899 Dolby pro logic is an easy way to output 6 channel audio from a 2-channel
7900 soundcard with degraded but useful results.  Rudimentary Dolby pro logic
7901 encoding can be achieved with clever usage of the effects.
7903 First, create the front left and right channels. Create 2 audio tracks, each
7904 carrying either the left or right channel. Pan the left channel to the left and
7905 the right channel to the right with @b{pan}.
7907 Next, create the rear left and right channels. Create another 2 audio tracks as
7908 above: the left channel panned left and the right channel panned right.  Then
7909 apply @b{invert audio} to both new channels and the signals will come out of
7910 the rear speakers.
7912 Next, create the center channel by creating a single audio track with monaural
7913 audio from a different source.  Center it with the @b{pan} control and the
7914 signal will come out of the center speaker.
7916 If a copy of the signal in the back speakers is desired in any single
7917 front speaker, the signal in the back speakers must be delayed by at least 0.05
7918 seconds and a single new track should be created.  Pan the new track to orient
7919 the signal in the front speakers.
7921 If the same signal is desired in all the speakers except the center speaker,
7922 delay the back speakers by 0.5 seconds and delay either the front left or front
7923 right by 0.2 seconds.
7925 If you want to hear something from the subwoofer, create a new track, select a
7926 range, drop a synthesizer effect, and set the frequency below 60 Hz.  The
7927 subwoofer merely plays anything below 60Hz or so.
7929 Other tricks you can perform to separate the speakers are parametric
7930 equalization to play only selected ranges of frequencies through different
7931 speakers and lowpass filtering to play signals through the subwoofer.
7933 @c cincvdoc_node_number_271
7934 @node Cleaning analog TV
7935 @section Cleaning analog TV
7936 @cindex Cleaning analog TV
7937 @cindex TV, cleaning analog
7939 Unless you live in a rich nation like China or are a terrorist, you probably
7940 record analog TV more than you record digital TV@.  The picture quality on
7941 analog TV is horrible but you can do things in Cinelerra to make it look more
7942 like it did in the studio.
7944 First, when capturing the video, capture it in the highest resolution possible.
7945 For Europeans it is 720x576 and for North Americans it is 720x480.  Do not bother
7946 adjusting the brightness or contrast in the recording monitor, although maxing
7947 out the color is useful.  Capture it using MJPEG or uncompressed Component
7948 Video if possible.  If those are too demanding, then capture it using JPEG@.
7949 RGB should be a last resort.
7951 Now on the timeline use @b{Settings->Format} to set a YUV colorspace.  Drop a
7952 @b{Downsample} effect on the footage.  Set it for
7953 @verbatim
7954 Horizontal:        2
7955 Horizontal offset: 0
7956 Vertical:          2
7957 Vertical offset:   0
7958       red
7959   x   green
7960   x   blue
7961       alpha
7962 @end verbatim
7964 Use the camera tool to shift the picture up or down a line to remove the most
7965 color interference from the image.  This is the difference we are looking for:
7967 @center @image{manual_images_en/cleaning1}
7969 If you have vertical blanking information or crawls which constantly change in
7970 each frame, block them out with the @b{Mask} tool.  This improves compression
7971 ratios.
7973 This is about all you can do without destroying more data than you would
7974 naturally lose in compression.  The more invasive cleaning techniques involve
7975 deinterlacing.
7977 @c cincvdoc_node_number_272
7978 @node Defeating interlacing
7979 @section Defeating interlacing
7980 @cindex Interlacing, defeating
7982 Interlacing is done on most video sources because it costs too much to build
7983 progressive scanning cameras and progressive scanning CRT's.  Many a consumer
7984 has been disappointed to spend 5 paychecks on a camcorder and discover what
7985 horrible jagged images it produces on a computer monitor.
7987 As for progressive scanning camcorders, forget it.  Cost factors are probably
7988 going to keep progressive scanning cameras from ever equaling the spatial
7989 resolution of interlaced cameras.  Interlacing is here to stay.  That is why
7990 they made deinterlacing effects in Cinelerra.
7992 We do not believe there has ever been a perfect deinterlacing effect.  They are
7993 either irreversible or do not work.  Cinelerra cuts down the middle by providing
7994 deinterlacing tools that are irreversible sometimes and do not work sometimes
7995 but are neither one or the other.
7997 @itemize @bullet
7998 @item
7999 @cindex Interlacing, line doubling
8000 @b{Line Doubling}
8001 This one is done by the @b{Deinterlace} effect when set to @b{Odd lines} or
8002 @b{Even lines}.  When applied to a track it reduces the vertical resolution by
8003 1/2 and gives you progressive frames with stairstepping.  This is only useful
8004 when followed by a scale effect which reduces the image to half its size.
8006 @item
8007 @cindex Interlacing, line averaging
8008 @b{Line averaging}
8009 The @b{Deinterlace} effect when set to @b{Average even lines} or @b{Average odd
8010 lines} does exactly what line doubling does except instead of making straight
8011 copies of the lines it makes averages of the lines.  This is actually useful
8012 for all scaling. @*
8013 There is an option for adaptive line averaging which selects which lines to line
8014 average and which lines to leave interlaced based on the difference between the
8015 lines.  It does not work.
8017 @item
8018 @cindex Interlacing, inverse telecine
8019 @b{Inverse Telecine}
8020 This is the most effective deinterlacing tool when the footage is an NTSC TV
8021 broadcast of a film.  @xref{Inverse telecine}.
8023 @item
8024 @cindex Interlacing, time base correction
8025 @b{Time base correction}
8026 The first three tools either destroy footage irreversibly or do not work
8027 at times.  @b{Time base correction} is last because it is the perfect
8028 deinterlacing tool.  It leaves the footage intact.  It does not reduce
8029 resolution, perceptually at least.  It does not cause jittery timing.
8031 @item
8032 @cindex Interlacing, frames to fields
8033 The @b{Frames to Fields} effect converts each frame to two frames, so it must
8034 be used on a timeline whose project frame rate is twice the footage's frame
8035 rate.  In the first frame it puts a line-averaged copy of the even lines.  In
8036 the second frame it puts a line-averaged copy of the odd lines.  When played
8037 back at full framerates it gives the illusion of progressive video with no loss
8038 of detail. @*
8039 Best of all, this effect can be reversed with the @b{Fields to frames} effect.
8040 That one combines two frames of footage back into the one original interlaced
8041 frame of half the framerate. @*
8042 Be aware that frames to fields inputs frames at half the framerate as the
8043 project.  Effects before frames to fields process at the reduced framerate. @*
8044 Unfortunately, the output of @b{Frames to Fields} can not be compressed as
8045 efficiently as the original because it introduces vertical twitter and a super
8046 high framerate. @*
8047 Interlaced 29.97 fps footage can be made to look like film by applying
8048 @b{Frames to Fields} and then reducing the project frame rate of the resulting
8049 59.94 fps footage to 23.97 fps.  This produces no timing jitter and the
8050 occasional odd field gives the illusion of more detail than there would be if
8051 you just line averaged the original.
8052 @end itemize
8054 @cindex Interlacing, HDTV exceptions
8055 @cindex HDTV interlacing
8056 @b{HDTV exceptions} @*
8057 1920x1080 HDTV is encoded a special way.  If it is a broadcast of original HDTV
8058 film, an inverse telecine works fine.  If it is a rebroadcast of a 720x480
8059 source, you need to use a time base and line doubling algorithm to deinterlace
8060 it, @xref{1080 to 480}.
8062 @c cincvdoc_node_number_273
8063 @node Making video look like film
8064 @section Making video look like film
8065 @cindex Making video look like film
8066 @cindex Film look
8068 Video sweetening is constantly getting better.  Lately the best thing you can
8069 do for dirt cheap consumer camcorder video is to turn it into progressive 24
8070 fps output.  While you can not really do that, you can get pretty close for the
8071 money.  Mind you, since this procedure can degrade high quality video just as easily
8072 as it improves low quality video, it should only be used for low quality
8073 video.
8075 @enumerate 1
8076 @item Set project framerate to twice the video framerate.
8077 @item Apply a @b{Sharpen} effect.  Set it to sharpness: 25, no interlacing, and
8078 horizontal only.
8079 @item Drop a @b{Frame to Fields} effect on the same track.  Set Average Empty
8080 Rows to on and play through the video a few times to figure out which field is
8081 first.  If the wrong field is first, the motion is shaky.  Secondly, any
8082 editing in the doubled frame rate may now screw up the field order.  We are
8083 still figuring out the easiest way to support warnings for field glitches but
8084 for now you need to go back to the normal framerate to do editing or play test
8085 to make sure the fields are right.
8086 @item Render just the video to the highest quality file possible.
8087 @item Import the video back to a new track.  Set the project framerate to
8088 24.  The new track should now display more filmish and sharper images than the
8089 original footage.
8090 @end enumerate
8092 This entire procedure could be implemented in one non-realtime effect, but the
8093 biggest problem with that is you will most often want to keep the field based
8094 output and the 24 fps output for posterity.  A non-realtime effect would
8095 require all that processing just for the 24 fps copy.  Still debating that one.
8097 @c cincvdoc_node_number_274
8098 @node Clearing out haze
8099 @section Clearing out haze
8100 @cindex Clearing out haze
8101 @cindex Haze, clearing out
8102 @cindex Gradient effect
8104 You probably photograph a lot of haze and never see blue sky.  Even if you
8105 can afford to briefly go somewhere where there is blue sky, horizon shots
8106 usually can stand for more depth.  This is what the @b{gradient effect} is for.
8108 Drop the gradient effect on hazy tracks.  Set the following parameters:
8109 @itemize @bullet
8110 @item Angle: 0
8111 @item Inner radius: 0
8112 @item Outer radius: 40
8113 @item Inner color: blue 100% alpha
8114 @item Outer color: blue 0% alpha
8115 @end itemize
8117 It is important to set the 0% alpha color to blue even though it is 0% alpha.
8118 The color of the outer alpha is still interpolated with the inner color.  This
8119 is a generally applicable setting for the gradient.  Some scenes may work
8120 better with orange or brown for an evening feel.
8122 @c cincvdoc_node_number_275
8123 @node Making a ringtone
8124 @section Making a ringtone
8125 @cindex Ringtone, making a
8127 This is how we made ringtones for the low end Motorola V180's and it will
8128 probably work with any new phone.  Go to @b{File->Load files...} and load a
8129 sound file with Insertion strategy: @b{Replace current project}.  Go to
8130 @b{Settings->Format} change @b{Channels} to 1 and @b{Samplerate} to 16000 or
8131 22050.
8133 Either highlight a region of the timeline or set in/out points to use for the
8134 ringtone.  To improve sound quality on the cell phone, you need the maximum
8135 amplitude in as many parts of the sound as possible.  Right click on track
8136 Audio 1 and select @b{Attach effect..}.  Highlight the @b{Compressor} effect
8137 and hit @b{Attach} in the attachment popup.
8139 Make sure the insertion point or highlighted area is in the region with the
8140 Compressor effect.  Right click on track Audio 2 and select @b{Attach
8141 effect..}.  Highlight @b{Audio 1: Compressor} and hit @b{Attach}.  Click the
8142 Audio1 Compressor's magnifying glass @image{manual_images_en/magnify,7mm} to bring up
8143 the compressor GUI@.
8145 Set the following parameters:
8146 @itemize @bullet
8147 @item Reaction secs: @b{-0.1}
8148 @item Decay secs: @b{0.1}
8149 @item Trigger Type: @b{Total}
8150 @item Trigger: @b{0}
8151 @item Smooth only: @b{No}
8152 @end itemize
8154 Click @b{Clear} to clear the graph.  Click anywhere in the grid area and drag a
8155 new point to 0 Output and -50 Input.  The graph should look like this.
8157 @center @image{manual_images_en/compress,70mm}
8159 Go to @b{File->Render}.  Specify the name of an mp3 file to output to.  Set the
8160 file format to @b{MPEG Audio}.  Click the wrench
8161 @image{manual_images_en/wrench,4.33mm} for Audio and set @b{Layer} to @b{III} and
8162 @b{Kbits per second} to @b{24} or @b{32}.  Check @b{Render audio tracks} and
8163 uncheck @b{Render video tracks}.  Hit OK to render the file.
8165 The resulting @file{.mp3} file must be uploaded to a web server.  Then, the
8166 phone's web browser must download the @file{.mp3} file directly from the URL@.
8167 There also may be a size limit on the file.
8169 @c cincvdoc_node_number_276
8170 @node Time stretching audio
8171 @section Time stretching audio
8172 @cindex Time stretching audio
8173 @cindex Audio, time stretching
8175 It may appear that time stretching audio is a matter of selecting a region of
8176 the audio tracks, enabling recording for the desired tracks, going to
8177 @b{Audio->Render Effect}, and applying @b{Time Stretch}.  In actuality there
8178 are 3 audio effects for time stretching: @b{Time Stretch}, @b{Resample}, and
8179 @b{Asset info dialog}.
8181 Time Stretch applies a fast Fourier transform to try to change the duration
8182 without changing the pitch, but this introduces windowing artifacts to the
8183 audio.  It is only useful for large changes in time because obvious changes in
8184 duration make windowing artifacts less obtrusive.
8186 For smaller changes in duration, in the range of 5%, @b{Resample} should be
8187 used.  This changes the pitch of the audio but small enough changes are not
8188 noticeable.  Resample does not introduce any windowing artifacts, so this is
8189 most useful for slight duration changes where the listener is not supposed to
8190 know what is going on.
8192 Another way to change duration slightly is to go to the @b{Resources} window,
8193 highlight the @b{media} folder, right click on an audio file, click on
8194 @b{Info}.  Adjust the sample rate in the @b{Info} dialog to adjust the
8195 duration.  This method also requires left clicking on the right boundary of the
8196 audio tracks and dragging left or right to correspond to the length changes.
8198 @c cincvdoc_node_number_277
8199 @node Video screen captures
8200 @section Video screen captures
8201 @cindex Video screen captures
8203 We explain here how to record video screen captures and edit them in Cinelerra.
8205 First, you have to record the video with xvidcap.  You can find that utility in
8206 most distributions' repositories, or download it here: @*
8207 @uref{http://xvidcap.sourceforge.net}
8209 First, capture the screen: @*
8210 @command{xvidcap --fps 10 --cap_geometry 1280x1024+0+0 --file "file1.mpeg"
8211 --gui no --audio no}
8213 Do not forget to change the geometry option according to your screen size.
8214 Then, convert the @file{file1.mpeg} file you obtained into an mpeg file
8215 suitable for Cinelerra: @*
8216 @command{ffmpeg -r 10 -i file1.mpeg -s 1280x1024 -b 3000 -aspect 1.33 -r 25
8217 file2.mpeg}
8219 You can now load that file into Cinelerra.  Make sure you properly set the
8220 video format of your project (size, frame-rate, aspect-ratio)
8222 When you have finished editing your video, you have to render it.  Render it as
8223 a jpeg-sequence. It is recommended to write the jpeg files in a new folder,
8224 since there probably will have a lot of files created.
8226 Then, open a shell window, and cd into that folder.  Encode the jpeg files
8227 using those commands:
8229 First pass: @*
8230 @command{mencoder "mf://*.jpg" -mf fps=25 -oac pcm -sws 2 -vf
8231 scale=1280:1024,hqdn3d=2:1:2 -ovc lavc -lavcopts
8232 vcodec=mpeg4:vbitrate=800:aspect=4/3:vpass=1 -ofps 10 -of avi -o /dev/null
8233 -ffourcc DIVX} @*
8234 Second pass: @*
8235 @command{mencoder "mf://*.jpg" -mf fps=25 -oac pcm -sws 2 -vf
8236 scale=1280:1024,hqdn3d=2:1:2 -ovc lavc -lavcopts
8237 vcodec=mpeg4:vbitrate=800:aspect=4/3:vpass=2 -ofps 10 -of avi -o
8238 ../rendered_file.avi -ffourcc DIVX}
8240 You can also render the video to mpeg4 directly from Cinelerra if you wish to.
8242 @c cincvdoc_node_number_278
8243 @node Improving performance
8244 @section Improving performance
8245 @cindex Performance, improving
8247 For the moment GNU/Linux is not an excellent desktop.  It is more of a server.
8248 Most of what you will find on modern GNU/Linux distributions are faceless,
8249 network-only programs strategically designed to counteract one Microsoft server
8250 feature or another and not to perform very well at user interaction.  There are
8251 a number of parameters on GNU/Linux, which ordinary people can adjust to make
8252 it behave more like a thoroughbred in desktop usage.
8254 @menu
8255 * Disabling swap space::
8256 * Enlarging sound buffers::
8257 * Freeing more shared memory::
8258 * Speeding up the hard drive::
8259 * Disabling cron::
8260 * Reducing USB mouse sensitivity::
8261 * Assorted X tweeks::
8262 * Speeding up the file system::
8263 * Improving Zoran video::
8264 @end menu
8266 @c cincvdoc_node_number_279
8267 @node Disabling swap space
8268 @subsection Disabling swap space
8269 @cindex Disabling swap space
8270 @cindex Swap space, disabling
8272 On systems with lots of memory, Cinelerra sometimes runs better without a swap
8273 space.  If you have 4 GB of RAM, you are probably better off without a swap
8274 space.  If you have 512MB of RAM, you should keep the swap.  If you want to do
8275 recording, you should probably disable swap space in any case.  There is a
8276 reason for this.  GNU/Linux only allows half the available memory to be used.
8277 Beyond that, it starts searching for free pages to swap, in order to cache more
8278 disk access.  In a 4 GB system, you start waiting for page swaps after using
8279 only 2 GB@.
8281 The question then is how to make GNU/Linux run without a swap space.
8282 Theoretically it should be a matter of running @*
8283 @command{swapoff -a}
8285 Unfortunately, without a swap space the kswapd tasklet normally spins at 100%.
8286 To eliminate this problem, edit @file{linux/mm/vmscan.c}.  In this file, put a
8287 line saying @command{return 0;} before it says
8288 @verbatim
8289     /*
8290      * Kswapd main loop.
8291      */
8292 @end verbatim
8294 Then recompile the kernel.
8296 @c cincvdoc_node_number_280
8297 @node Enlarging sound buffers
8298 @subsection Enlarging sound buffers
8299 @cindex Sound buffers, enlarging
8301 In order to improve realtime performance, the audio buffers for all the
8302 GNU/Linux sound drivers were limited from 128k to 64k.  For recording audio and
8303 video simultaneously and for most audio recording this causes dropouts.
8304 Application of low latency and preemptible kernel patches make it possible to
8305 record more audio recordings but it does not improve recording video with audio.
8306 This is where you need to hack the kernel.
8308 To see if your sound buffers are suitable, run the included soundtest program
8309 with nothing playing or recording.  This allocates the largest possible buffers
8310 and displays them.  If the @b{Total bytes available} is under 131072, you need
8311 to see about getting the buffers enlarged in the driver.  While many drivers
8312 differ, we have a hack for at least one driver.
8314 This only applies to the OSS version of the Soundblaster Live driver.  Since
8315 every sound card and every sound driver derivative has a different
8316 implementation you will need to do some searching for other sound cards.  Edit
8317 @file{linux/drivers/sound/emu10k1/audio.c}
8319 Where it says
8320 @verbatim
8321 if (bufsize >= 0x10000)
8322 @end verbatim
8323 change it to:
8324 @verbatim
8325 if (bufsize > 0x40000)
8326 @end verbatim
8328 Where it says
8329 @verbatim
8330     for (i = 0; i < 8; i++)
8331         for (j = 0; j < 4; j++)
8332 @end verbatim
8333 change it to:
8334 @verbatim
8335     for (i = 0; i < 16; i++)
8336         for (j = 0; j < 4; j++)
8337 @end verbatim
8339 In @file{linux/drivers/sound/emu10k1/hwaccess.h}, change
8340 @verbatim
8341 #define MAXBUFSIZE 65536
8342 @end verbatim
8344 @verbatim
8345 #define MAXBUFSIZE 262144
8346 @end verbatim
8348 Finally, in @file{linux/drivers/sound/emu10k1/cardwi.h}, change
8349 @verbatim
8350 #define WAVEIN_MAXBUFSIZE         65536
8351 @end verbatim
8353 @verbatim
8354 #define WAVEIN_MAXBUFSIZE         262144
8355 @end verbatim
8357 Then recompile the kernel modules.
8359 @c cincvdoc_node_number_281
8360 @node Freeing more shared memory
8361 @subsection Freeing more shared memory
8362 @cindex Freeing more shared memory
8363 @cindex Shared memory, freeing
8364 @cindex Memory, freeing
8366 The GNU/Linux kernel only allows 32MB of shared memory to be allocated by
8367 default.  This needs to be increased to do anything useful.  Run the following
8368 command: @*
8369 @command{echo "0x7fffffff" > /proc/sys/kernel/shmmax}
8371 @c cincvdoc_node_number_282
8372 @node Speeding up the hard drive
8373 @subsection Speeding up the hard drive
8374 @cindex Speeding up the hard drive
8375 @cindex Hard drive, speeding up the
8376 @cindex hdparm
8378 This is a very popular command sequence among GNU/Linux gurus, which is not
8379 done by default on GNU/Linux distributions. @*
8380 @command{hdparm -c3 -d1 -u1 -k1 /dev/hda}
8382 @itemize @bullet
8383 @item @option{-c3} puts the hard drive into 32 bit I/O with sync.  This
8384 normally does not work due to inept kernel support for most IDE controllers.
8385 If you get lost interrupt or SeekComplete errors, quickly use @option{-c0}
8386 instead of @option{-c3} in your command.
8387 @item @option{-d1} enables DMA of course.  This frees up the CPU partially
8388 during data transfers.
8389 @item @option{-u1} allows multiple interrupts to be handled during hard drive
8390 transactions.  This frees up even more CPU time.
8391 @item @option{-k1} prevents GNU/Linux from resetting your settings in case of a
8392 glitch.
8393 @end itemize
8395 @c cincvdoc_node_number_283
8396 @node Disabling cron
8397 @subsection Disabling cron
8398 @cindex Disabling cron
8399 @cindex Cron, disabling
8401 GNU/Linux runs some daily operations like compressing man pages.  These may be
8402 acceptable background tasks while compiling or word processing but not while
8403 playing video.  Disable these operations by editing
8404 @file{/etc/rc.d/init.d/anacron}.
8406 Put @command{exit} before the first line not beginning in @command{#}.
8408 In @file{/etc/rc.d/init.d/crond} put @command{exit} before the first line not
8409 beginning in @command{#}.  Then reboot.
8411 You can not use the @command{at} command anymore, but who uses that command
8412 anyways?
8414 @c cincvdoc_node_number_284
8415 @node Reducing USB mouse sensitivity
8416 @subsection Reducing USB mouse sensitivity
8417 @cindex Reducing USB mouse sensitivity
8418 @cindex Mouse, reducing sensitivity
8419 @cindex USB mouse, reducing sensitivity
8421 Gamers like high resolution mice, but this can be painful for precisely
8422 positioning the mouse on a timeline or video screen.  XFree86 once allowed you
8423 to reduce PS/2 mouse sensitivity using commands like @command{xset m 1 1} but
8424 you are out of luck with USB mice or KVM's.
8426 We have a way to reduce USB mouse sensitivity but it requires editing the
8427 kernel source code.  Even though USB mice have been supported for years, the
8428 kernel source code for USB mice is constantly being rewritten.  These
8429 instructions were relevant for 2.6.12.3.  Edit
8430 @file{/usr/src/linux/drivers/input/mousedev.c}.
8432 After the line saying
8433 @verbatim
8434 struct mousedev_hw_data {
8435 @end verbatim
8437 @verbatim
8438 #define DOWNSAMPLE_N 100
8439 #define DOWNSAMPLE_D 350
8440 int x_accum, y_accum;}
8441 @end verbatim
8443 Next, the section which says something like:
8444 @verbatim
8445 switch (code) {
8446     case REL_X: mousedev->packet.dx += value; break;
8447     case REL_Y: mousedev->packet.dy -= value; break;
8448     case REL_WHEEL:     mousedev->packet.dz -= value; break;
8450 @end verbatim
8451 must be replaced by
8452 @verbatim
8453 switch (code) {
8454     case REL_X:
8455     mousedev->packet.x_accum += value * DOWNSAMPLE_N;
8456     mousedev->packet.dx += (int)mousedev->packet.x_accum
8457     / (int)DOWNSAMPLE_D;
8458     mousedev->packet.x_accum -=
8459     ((int)mousedev->packet.x_accum / (int)DOWNSAMPLE_D)
8460     * (int)DOWNSAMPLE_D;
8461     break;
8462     case REL_Y:
8463     mousedev->packet.y_accum += value * DOWNSAMPLE_N;
8464     mousedev->packet.dy -= (int)mousedev->packet.y_accum
8465     / (int)DOWNSAMPLE_D;
8466     mousedev->packet.y_accum -=
8467     ((int)mousedev->packet.y_accum
8468     / (int)DOWNSAMPLE_D) * (int)DOWNSAMPLE_D;
8469     break;
8470     case REL_WHEEL: mousedev->packet.dz -= value; break;
8472 @end verbatim
8474 Change the value of @b{DOWNSAMPLE_N} to change the mouse sensitivity.
8476 @c cincvdoc_node_number_285
8477 @node Assorted X tweeks
8478 @subsection Assorted X tweeks
8479 @cindex X, assorted tweeks
8481 XFree86 by default can not display Cinelerra's advanced pixmap rendering very
8482 fast.  The X server stalls during list box drawing.  Fix this by adding a line
8483 to your XF86Config* files.
8485 In the @b{Section "Device"} area, add a line saying:
8486 @verbatim
8487 Option "XaaNoOffscreenPixmaps"
8488 @end verbatim
8489 and restart the X server.
8491 Screen blanking is really annoying, unless you are fabulously rich and can
8492 afford to leave your monitor on 24 hours a day without power saving mode.  In
8493 @file{/etc/X11/xinit/xinitrc} put
8494 @verbatim
8495 xset s off
8496 xset s noblank
8497 @end verbatim
8498 before the first @command{if} statement.
8500 How about those windows keys which no GNU/Linux distribution even thinks to
8501 use.  You can make the window keys provide ALT functionality by editing
8502 @file{/etc/X11/Xmodmap}.  Append the following to it.
8503 @verbatim
8504 keycode 115 = Hyper_L
8505 keycode 116 = Hyper_R
8506 add mod4 = Hyper_L
8507 add mod5 = Hyper_R
8508 @end verbatim
8510 The actual changes to a window manager to make it recognize window keys for
8511 @key{ALT} are complex.  In @b{FVWM} at least, you can edit
8512 @file{/etc/X11/fvwm/system.fvwm2rc} and put
8513 @verbatim
8514 Mouse 0 T A move-and-raise-or-raiselower
8515 #Mouse 0 W M move
8516 Mouse 0 W 4 move
8517 Mouse 0 W 5 move
8518 Mouse 0 F A resize-or-raiselower
8519 Mouse 0 S A resize-or-raiselower
8520 @end verbatim
8522 in place of the default section for moving and resizing.  Your best performance
8523 is going to be on FVWM@.  Other window managers seem to slow down video with
8524 extra event trapping and are not as efficient in layout.
8526 @c cincvdoc_node_number_286
8527 @node Speeding up the file system
8528 @subsection Speeding up the file system
8529 @cindex Speeding up the file system
8530 @cindex File system, speeding up the
8532 You will often store video on an expensive, gigantic disk array separate from
8533 your boot disk.  You will thus have to manually install an EXT filesystem on this
8534 disk array, using the @command{mke2fs} command.  By far the fastest file system
8535 is @*
8536 @cindex mke2fs
8537 @cindex tune2fs
8538 @command{mke2fs -i 65536 -b 4096 my_device} @*
8539 @command{tune2fs -r0 -c10000 my_device}
8541 This has no journaling, reserves as few blocks as possible for filenames, and
8542 accesses the largest amount of data per block possible.  A slightly slower file
8543 system, which is easier to recover after power failures is @*
8544 @command{mke2fs -j -i 65536 -b 4096 my_device} @*
8545 @command{tune2fs -r0 -c10000 my_device}
8547 This adds a journal which slows down the writes but makes filesystem checks
8548 faster.
8550 @c cincvdoc_node_number_287
8551 @node Improving Zoran video
8552 @subsection Improving Zoran video
8553 @cindex Zoran video, improving
8555 Video recorded from the ZORAN inputs is normally unaligned or not completely
8556 encoded on the right.  This can be slightly compensated by adjusting parameters
8557 in the driver sourcecode.
8559 In @file{/usr/src/linux/drivers/media/video/zr36067.c} the structures defined
8560 near line 623 affect alignment.  At least for NTSC, the 2.4.20 version of the
8561 driver could be improved by changing
8562 @verbatim
8563     static struct tvnorm f60ccir601 = { 858, 720, 57, 788, 525, 480, 16 };
8565     static struct tvnorm f60ccir601 = { 858, 720, 57, 788, 525, 480, 17 };
8566 @end verbatim
8568 In @file{/usr/src/linux/drivers/media/video/bt819.c} more structures near line
8569 76 affect alignment and encoding. @*
8570 For NTSC
8571 @verbatim
8572     {858 - 24, 2, 523, 1, 0x00f8, 0x0000},
8573 could be changed to
8574     {868 - 24, 2, 523, 1, 0x00f8, 0x0000},
8575 @end verbatim
8576 Adjusting these parameters may or may not move your picture closer to the
8577 center.  More of the time, they will cause the driver to lock up before capturing
8578 the first frame.
8580 @b{New in 2.6.5:} @*
8581 In the 2.6 kernels, the video subsystem was rewritten again from scratch.  To
8582 adjust the Zoran parameters go to @file{drivers/media/video/zoran_card.c} and
8583 look for a group of lines like
8584 @verbatim
8585     static struct tvnorm f50sqpixel = { 944, 768, 83, 880, 625, 576, 16 };
8586     static struct tvnorm f60sqpixel = { 780, 640, 51, 716, 525, 480, 12 };
8587     static struct tvnorm f50ccir601 = { 864, 720, 75, 804, 625, 576, 18 };
8588     static struct tvnorm f60ccir601 = { 858, 720, 57, 788, 525, 480, 16 };
8590     static struct tvnorm f50ccir601_lml33 = { 864, 720, 75+34, 804, 625, 576, 18 };
8591     static struct tvnorm f60ccir601_lml33 = { 858, 720, 57+34, 788, 525, 480, 16 };
8593     /* The DC10 (57/16/50) uses VActive as HSync, so HStart must be 0 */
8594     static struct tvnorm f50sqpixel_dc10 = { 944, 768, 0, 880, 625, 576, 0 };
8595     static struct tvnorm f60sqpixel_dc10 = { 780, 640, 0, 716, 525, 480, 12 };
8597     /* FIXME: I cannot swap U and V in saa7114, so i do one
8598      * pixel left shift in zoran (75 -> 74)
8599      * (Maxim Yevtyushkin <max@linuxmedialabs.com>) */
8600     static struct tvnorm f50ccir601_lm33r10 = { 864, 720, 74+54, 804, 625, 576, 18 };
8601     static struct tvnorm f60ccir601_lm33r10 = { 858, 720, 56+54, 788, 525, 480, 16 };
8602 @end verbatim
8604 These seem to control the image position.  At least for the LML33 the following
8605 definition for @b{f60ccir601_lml33} does the trick.
8606 @verbatim
8607 static struct tvnorm f60ccir601_lml33 = { 858, 720, 67+34, 788, 525, 480, 13 };
8608 @end verbatim
8610 @c cincvdoc_node_number_288
8611 @node Translating Cinelerra
8612 @section Translating Cinelerra
8613 @cindex Translating Cinelerra
8615 @menu
8616 * Available localizations::
8617 * Updating an existing translation::
8618 * Creating a new translation::
8619 @end menu
8621 This information is needed if you wish to partipate in translating Cinelerra.
8622 @xref{Environment variables}, for running Cinelerra in your own language.
8624 @c cincvdoc_node_number_289
8625 @node Available localizations
8626 @subsection Available localizations
8627 @cindex Localizations, available
8629 There are some existing localizations for cinelerra:
8630 @itemize @bullet
8631 @item @b{DE} - German
8632 @item @b{ES} - Spanish
8633 @item @b{EU} - Basque
8634 @item @b{FR} - French
8635 @item @b{IT} - Italian
8636 @item @b{PT_BR} - Brazilian Portuguese
8637 @item @b{SL} - Slovenian
8638 @end itemize
8640 @c cincvdoc_node_number_290
8641 @node Updating an existing translation
8642 @subsection Updating an existing translation
8643 @cindex Updating an existing translation
8645 To generate an updated @file{*.po} file with the newer strings of Cinelerra
8646 source code not yet present in the @file{.po} file, run after
8647 @command{./configure}: @*
8648 @command{cd po && make}
8650 Then, edit the @file{.po} file located in @file{po/} directory of your target
8651 language and submit the diff file to the Cinelerra-CV team.
8653 @c cincvdoc_node_number_291
8654 @node Creating a new translation
8655 @subsection Creating a new translation
8656 @cindex Creating a new translation
8658 To create a new translation, run after @command{./configure}: @*
8659 @command{cd po && make}
8661 Then, edit the @file{cinelerra.pot} file located in @file{po/} and add the
8662 appropriate translated strings.  Rename the file to @file{(lang_prefix).po} and
8663 add the language prefix to @file{po/LINGUAS}.  Finally, submit the diff file to
8664 the cinelerra-CV team.
8666 @c cincvdoc_node_number_292
8667 @node Panning and zooming still images
8668 @section Panning and zooming still images
8669 @cindex Panning and zooming still images
8670 @cindex Still images, panning and zooming
8672 Cinelerra's powerful keyframe features allow you to use pan and zoom
8673 effects on still pictures.
8674 @enumerate 1
8675 @item Load and create a clip from a still image as described above.  Make the
8676 clip 10 seconds long.
8677 @item Activate the @b{automatic generation of keyframes}
8678 @item Using the @b{transport controls}, go to the beginning of the clip
8679 @item Using the @b{compositing camera control} set the clip's initial position
8680 @item Using the @b{transport controls}, move forward a couple of seconds on the
8681 clip
8682 @item Dragging on the @b{compositing camera} move the camera center to a new
8683 position further
8684 @item Now, rewind to the beginning of the clip and play it.
8685 @end enumerate
8686 You can see that the camera smoothly flows from keyframe point to next keyframe
8687 point, as Cinelerra automatically adjusts the camera movement in straight lines
8688 from point to point.
8690 @c cincvdoc_node_number_293
8691 @node Troubleshooting
8692 @chapter Troubleshooting
8693 @cindex Troubleshooting
8695 @menu
8696 * Reporting bugs::
8697 * Buz driver crashes::
8698 * Dragging in and out points does not work::
8699 * Locking up when loading files::
8700 * Synchronization lost while recording::
8701 * Applying gamma followed by blur does not work::
8702 * Copy/Paste of track selections does not work in the timeline::
8703 * Cinelerra often crashes::
8704 * Theme Blond not found error::
8705 @end menu
8707 @c cincvdoc_node_number_294
8708 @node Reporting bugs
8709 @section Reporting bugs
8710 @cindex Reporting bugs
8711 @cindex Bugs, reporting
8713 When you notice a bug, the first thing to do is to go to
8714 @uref{http://bugs.cinelerra.org} and check if it has not been already reported.
8715 If there is no bug report for the bug you noticed, you can file a bug report.
8716 Open an account on @uref{http://bugs.cinelerra.org} if you do not have one.
8717 Then, file the bug report, including the following information:
8719 @itemize @bullet
8720 @item Revision number of Cinelerra CV@.  Example: r959
8722 @item Distribution name and version.  Example: Debian SID
8724 @item Steps to replicate the bug.  That is very important since it really helps
8725 people trying to fix bugs.  Example:
8726 @enumerate 1
8727 @item launch cinelerra
8728 @item open the recording window
8729 @item click on OK
8730 @item Cinelerra crashes
8731 @end enumerate
8733 @item When Cinelerra CV crashes, a debugger output is welcome.  Run: @*
8734 @command{gdb cinelerra} @*
8735 @command{run} @*
8736 (You trigger the bug and Cinelerra CV crashes) @*
8737 @command{thread apply all bt} @*
8738 Then copy all of the information displayed into your bug report.
8739 @end itemize
8741 Do not hesitate to attach any file which you think could be useful, such as a
8742 screenshot for example.  The gdb output is more useful when Cinelerra is
8743 compiled with debugging symbols.  @xref{Compiling with debugging symbols}, for
8744 compilation instructions.
8746 Moreover, if the bug you noticed concerns a problem loading a specific file
8747 into Cinelerra-CV, uploading a small sample of such a file on the internet is
8748 appreciated.  That would allow people fixing bugs to load that file themselves
8749 in Cinelerra and look at what happens.
8751 @c cincvdoc_node_number_295
8752 @node Buz driver crashes
8753 @section Buz driver crashes
8754 @cindex Buz, driver crashes
8756 First, Zoran capture boards must be accessed using the @b{Buz} video driver in
8757 @b{Preferences->Recording} and @b{Preferences->Playback}.  Some performance
8758 tweeks are available in another section.  @xref{Improving performance}.
8760 Once tweeked, the Buz driver seems to crash if the number of recording buffers
8761 is too high.  Make sure @b{Preferences->Recording->Frames to buffer in device}
8762 is below 10.
8764 @c cincvdoc_node_number_296
8765 @node Dragging in and out points does not work
8766 @section Dragging in and out points does not work
8767 @cindex Dragging in and out points does not work
8768 @cindex In/out points, dragging does not work
8770 Sometimes there will be two edits really close together.  The point selected
8771 for dragging may be next to the indended edit if those edits are too small to see at
8772 the current zoom level.  Zoom in horizontally.
8774 @c cincvdoc_node_number_297
8775 @node Locking up when loading files
8776 @section Locking up when loading files
8777 @cindex Locking up when loading files
8778 @cindex Files, locking up when loading
8780 The most common reason loading files locks up Cinelerra is because the codec is not
8781 supported.  Another reason is because Cinelerra is building picons for the
8782 Resources window.  If you load a large number of images, it needs to decompress
8783 every single image to build a picon.  Go into
8784 @b{settings->preferences->interface} and disable @b{Use thumbnails in resource
8785 window} to skip this process.
8787 @c cincvdoc_node_number_298
8788 @node Synchronization lost while recording
8789 @section Synchronization lost while recording
8790 @cindex Synchronization lost while recording
8791 @cindex Recording, synchronization
8793 If the rate at which frames are captured during recording is much lower than the framerate of the
8794 source, the video will accumulate in the recording buffers over time and the
8795 audio and video will become well out of sync.  Decrease the @b{number of frames to
8796 buffer in the device} in @b{preferences->recording} so the excess frames are
8797 dropped instead of buffered.
8799 @c cincvdoc_node_number_299
8800 @node Applying gamma followed by blur does not work
8801 @section Applying gamma followed by blur does not work
8803 The gamma effect uses the pow function while the blur effect uses a number of
8804 exp functions in the math library.  For some reason, using the pow function
8805 breaks later calls to the exp functions in the math library.  You need to apply
8806 gamma after blur to get it to work.
8808 @c cincvdoc_node_number_300
8809 @node Copy/Paste of track selections does not work in the timeline
8810 @section Copy/Paste of track selections does not work in the timeline
8811 @cindex Copy/Paste of track selections does not work in the timeline
8813 If you are running the KDE Klipper application, either disable it, or
8814 right-click its taskbar icon, select @b{Configure Klipper} and ensure
8815 @b{Prevent empty clipboard} is not selected.
8817 @c cincvdoc_node_number_301
8818 @node Cinelerra often crashes
8819 @section Cinelerra often crashes
8820 @cindex Crashes
8822 Do a clean install.  Be sure that you do not have libraries from previous
8823 installations.  Delete your @file{$HOME/.bcast/} directory too. @*
8824 @command{rm -f /usr/local/lib/libguicast*} @*
8825 @command{rm -f /usr/lib/libguicast*} @*
8826 @command{rm -f /usr/local/lib/libquicktimehv*} @*
8827 @command{rm -f /usr/lib/libquicktimehv*} @*
8828 @command{rm -f /usr/local/lib/libmpeg3hv*} @*
8829 @command{rm -f /usr/lib/libmpeg3hv*}
8831 @c cincvdoc_node_number_302
8832 @node Theme Blond not found error
8833 @section Theme Blond not found error
8834 @cindex Theme Blond not found error
8836 If the following error message appears: @command{Aborted, MWindow::init_theme:
8837 Theme Blond not found}, then:
8838 @itemize @bullet
8839 @item You should check for the file @file{defaulttheme.*} in
8840 @file{/usr/lib/cinelerra} or @file{/usr/local/lib/cinelerra}.  If it does not
8841 exist, you need to install the plugins again.
8842 @item Try to delete the @file{$HOME/.bcast/} directory
8843 @item Look into @file{$HOME/.bcast/Cinelerra_rc} and find THEME, it should be
8844 => THEME Blond
8845 @end itemize
8847 @c cincvdoc_node_number_303
8848 @node Plugin authoring
8849 @chapter Plugin authoring
8850 @cindex Plugin authoring
8852 The plugin API in Cinelerra dates back to 1997, before the LADSPA and before
8853 VST became popular.  It is fundamentally the same as it was in 1997, with minor
8854 modifications to handle keyframes and GUI feedback.  The GUI is not abstracted
8855 from the programmer.  This allows the programmer to use whatever toolkit they
8856 want and allows more flexibility in appearance but it costs more.
8858 There are several types of plugins, each with a common procedure of
8859 implementation and specific changes for that particular type.  The easiest way
8860 to implement a plugin is to take the simplest existing one out of the group and
8861 rename the symbols.
8863 @menu
8864 * Introducing the pull method:: The current paradigm for plugin writing
8865 * Common plugin functions:: What all effects have to do.
8866 * Realtime plugins:: What realtime effects have to do.
8867 * Nonrealtime plugins:: What rendered effects have to do.
8868 * Audio plugins:: What audio effects have to do.
8869 * Video plugins:: What video effects have to do.
8870 * Transition plugins:: What transitions have to do.
8871 * Plugin GUI's which update during playback:: How to use currently playing data to draw the GUI.
8872 * Using OpenGL:: How to use hardware to speed up operations.
8873 * Plugin queries:: How plugins get information about the data to be processed.
8874 @end menu
8876 @c cincvdoc_node_number_304
8877 @node Introducing the pull method
8878 @section Introducing the pull method
8879 @cindex Pull method, introducing the
8881 Originally plugins were designed with the push method.  The push method is
8882 intuitive and simple.  A source pushes data to a plugin, the plugin does math
8883 operations on it, and the plugin pushes it to a destination.  For 6 years this
8884 was the way all realtime plugins were driven internally but it did not allow you
8885 to reduce the rate of playback in realtime.  While plugins can still be
8886 designed as if they are pushing data, this is not the way they are processed
8887 internally anymore.
8889 The latest evolution in Cinelerra's plugin design is the pull method.  The
8890 rendering pipeline starts at the final output and the final steps in the
8891 rendering pipeline are reading the data from disk.  Every step in the rendering
8892 chain involves requesting data from the previous step.  When the rendering
8893 pipleline eventually requests data from a plugin chain, each plugin requests
8894 data from the plugin before it.
8896 This is less intuitive than the push method but is much more powerful.
8897 Realtime plugins written using the pull method can not only change the rate data is
8898 presented to the viewer but also the direction of playback.  The pull method also allows
8899 plugins to take in data at a higher rate than they send it out.
8901 To get the power of rate independence, the pull method requires plugins to know
8902 more about the data than they needed to under the push method.  Plugins need to
8903 know what rate the project is at, what rate their output is supposed to be at
8904 and what rate their input is supposed to be at.  These different data rates
8905 have to be correlated for a plugin to configure itself properly.
8907 Keyframes for a plugin are stored relative to the project frame rate.  Queries
8908 from a plugin for the current playback position are given relative to the
8909 project frame rate.  If the plugin's output was requested to be at twice the
8910 project frame rate, the positions need to be converted to the project rate for
8911 keyframes to match up.  Two classes of data rates were created to handle this
8912 problem.
8914 Rate conversions are done in terms of the @b{project rate} and the @b{requested
8915 rate}.  The project rate is identical for all plugins.  It is determined by the
8916 @b{settings->format} window.  The requested rate is determined by the
8917 downstream plugin requesting data from the current plugin.  The requested rate
8918 is arbitrary.  Exactly how to use these rates is described below.
8920 @c cincvdoc_node_number_305
8921 @node Common plugin functions
8922 @section Common plugin functions
8923 @cindex Common plugin functions
8925 All plugins inherit from a derivative of PluginClient.  This PluginClient
8926 derivative implements most of the required methods in PluginClient, but users
8927 must still define methods for PluginClient.  The most commonly used methods are
8928 predefined in macros to reduce the typing yet still allow flexibility.
8930 The files they include depend on the plugin type.  Audio plugins include
8931 @file{pluginaclient.h} and video plugins include @file{pluginvclient.h}.  They
8932 inherit @b{PluginAClient} and @b{PluginVClient} respectively.
8934 Cinelerra instantiates all plugins at least twice when they are used in a
8935 movie.  One instance is the GUI@.  The other instance is the signal processor.
8936 User input, through a complicated sequence, is propogated from the GUI instance
8937 to the signal processor instance.  If the signal processor wants to alter the
8938 GUI, it propogates data back to the GUI instance.  There are utility functions
8939 for doing all this.
8941 All plugins define at least three objects:
8943 @itemize @bullet
8944 @item @b{Processing object} @*
8945 Contains pointers to all the other objects and performs the signal processing.
8946 This object contains a number of queries to identify itself and is the object
8947 you register to register the plugin.
8948 @item @b{User interface object} @*
8949 This is defined according to the programmer's discretion.  It can either use
8950 Cinelerra's toolkit or another toolkit.  It shows data on the screen and
8951 collects parameters from the user. @*
8952 Using Cinelerra's toolkit, the only user interface object a developer needs to
8953 worry about is the Window.  The window has pointers to a number of widgets, a
8954 few initialization methods, and a back pointer to the plugin's processing
8955 object.  The documentation refers to the usage of Cinelerra's toolkit. @*
8956 Depending on the user interface toolkit, a user interface thread may be created
8957 to run the user interface asynchronous of everything else.  Synchronizing the
8958 user interface to changes in the plugin's configuration is the most complicated
8959 aspect of the plugin, so the user interface thread and object are heavily
8960 supported by macros if you use Cinelerra's toolkit.
8961 @item @b{Configuration object} @*
8962 This stores the user parameters and always needs interpolation, copying, and
8963 comparison functions.  Macros for the plugin client automatically call
8964 configuration methods to interpolate keyframes.
8965 @end itemize
8967 @menu
8968 * The processing object::
8969 * The configuration object::
8970 * The user interface object::
8971 @end menu
8973 @c cincvdoc_node_number_306
8974 @node The processing object
8975 @subsection The processing object
8976 @cindex The processing object
8978 Load up a simple plugin like gain to see what this object looks like.  The
8979 processing object should inherit from the intended PluginClient derivative.
8980 Its constructor should take a PluginServer argument.
8981 @verbatim
8982 MyPlugin(PluginServer *server);
8983 @end verbatim
8985 In the implementation, the plugin must contain a registration line with the
8986 name of the processing object like
8987 @verbatim
8988 REGISTER_PLUGIN(MyPlugin)
8989 @end verbatim
8991 The constructor should contain
8992 @verbatim
8993 PLUGIN_CONSTRUCTOR_MACRO
8994 @end verbatim
8995 to initialize the most common variables.
8997 The processing object should have a destructor containing
8998 @verbatim
8999 PLUGIN_DESTRUCTOR_MACRO
9000 @end verbatim
9001 to delete the most common variables.
9003 Another function which is useful but not mandatory is
9004 @verbatim
9005 int is_multichannel();
9006 @end verbatim
9007 It should return 1 if one instance of the plugin handles multiple tracks
9008 simultaneously or 0 if one instance of the plugin only handles one track.  The
9009 default is 0 if it is omitted.
9011 Multichannel plugins in their processing function should refer to a function
9012 called @b{PluginClient::get_total_buffers()} to determine the number of
9013 channels.
9015 To simplify the implementation of realtime plugins, a macro for commonly used
9016 members has been created for the class header, taking the configuration object
9017 and user interface thread object as arguments.  The macro definitions apply
9018 mainly to realtime plugins and are not useful in nonrealtime plugins.
9019 Fortunately, nonrealtime plugins are simpler.
9020 @verbatim
9021 PLUGIN_CLASS_MEMBERS(config_name, thread_name)
9022 @end verbatim
9024 The commonly used members in PLUGIN_CLASS_MEMBERS are described below.
9026 @b{int load_configuration();} @*
9027 Loads the configuration based on surrounding keyframes and current position. @*
9028 The class definition for load_configuration should contain
9029 @verbatim
9030 LOAD_CONFIGURATION_MACRO(plugin_class, config_class)
9031 @end verbatim
9032 to implement the default behavior for load_configuration.  This stores whatever
9033 the current configuration is inside the plugin's configuration object and
9034 returns 1 if the new configuration differs from the previous configuration.
9035 The return value of load_configuration is used by another commonly used
9036 function, update_gui to determine if the GUI really needs to be updated. @*
9037 The plugin's configuration object is always called @b{config} inside
9038 PLUGIN_CLASS_MEMBERS@.
9040 @b{VFrame* new_picon();} @*
9041 Creates a picon for display in the resource window.  Use
9042 @verbatim
9043 #include "picon_png.h"
9044 NEW_PICON_MACRO(plugin_class)
9045 @end verbatim
9046 to implement new_picon.  In addition, the user should create a
9047 @file{picon_png.h} header file from a PNG image using @command{pngtoh}.
9048 @command{pngtoh} is compiled in the @file{guicast/ARCH} directory. @*
9049 The source PNG image should be called @file{picon.png} and can be any format
9050 supported by PNG@.
9052 @b{char* plugin_title();} @*
9053 Returns a text string identifying the plugin in the resource window.  The
9054 string has to be unique.
9056 @b{void update_gui();} @*
9057 Should first load the configuration, test for a return of 1, and then redraw
9058 the GUI with the new parameters.  All the plugins using GuiCast have a format
9059 like
9060 @verbatim
9061     void MyPlugin::update_gui()
9062     {
9063         if(thread)
9064         {
9065         if(load_configuration())
9066         {
9067             thread->window->lock_window();
9068             // update widgets here
9069             thread->window->unlock_window();
9070         }
9071         }
9072     }
9073 @end verbatim
9074 to handle concurrency and conditions of no GUI@.
9076 @b{int show_gui();} @*
9077 Instantiate the GUI and switch the plugin to GUI mode.  This is implemented
9078 with
9079 @verbatim
9080 SHOW_GUI_MACRO(plugin_class, thread_class)
9081 @end verbatim
9083 @b{int set_string();} @*
9084 Changes the title of the GUI window to a certain string.  This is implemented
9085 with
9086 @verbatim
9087 SET_STRING_MACRO(plugin_class)
9088 @end verbatim
9090 @b{void raise_window();} @*
9091 Raises the GUI window to the top of the stack.  This is implemented with
9092 @verbatim
9093 RAISE_WINDOW_MACRO(plugin_class)
9094 @end verbatim
9096 Important functions that the processing object must define are the functions which
9097 load and save configuration data from keyframes.  These functions are called by
9098 the macros so all you need to worry about is accessing the keyframe data.
9099 @verbatim
9100 void save_data(KeyFrame *keyframe);
9101 void read_data(KeyFrame *keyframe);
9102 @end verbatim
9104 The read data functions are only used in realtime plugins.  The read data
9105 functions translate the plugin configuration between the KeyFrame argument and
9106 the configuration object for the plugin.  The keyframes are stored on the
9107 timeline and can change for every project.
9109 Use an object called @b{FileXML} to do the translation and some specific
9110 commands to get the data out of the KeyFrame argument.  See any existing plugin
9111 to see the usage of KeyFrame and FileXML.
9112 @verbatim
9113 int load_defaults();
9114 int save_defaults();
9115 @end verbatim
9117 The load defaults functions are used in realtime and non-realtime plugins.  The
9118 load defaults functions translate the plugin configuration between a BC_Hash
9119 object and the plugin's configuration.  The BC_Hash object stores
9120 configurations in a discrete file on disk for each plugin but does not isolate
9121 different configurations for different projects.
9123 The function overriding @b{load_defaults} also needs to create the BC_Hash
9124 object.  See any existing plugin to see the usage of BC_Hash.
9126 Other standard members may be defined in the processing object, depending on
9127 the plugin type.
9129 @c cincvdoc_node_number_307
9130 @node The configuration object
9131 @subsection The configuration object
9132 @cindex Configuration object
9134 The configuration object is critical for GUI updates, signal processing, and
9135 default settings in realtime plugins.  Be aware it is not used in nonrealtime
9136 plugins.  The configuration object inherits from nothing and has no
9137 dependancies.  It is merely a class containing three functions and variables
9138 specific to the plugin's parameters.
9140 Usually the configuration object starts with the name of the plugin followed by
9141 Config.
9142 @verbatim
9143     class MyPluginConfig
9144     {
9145     public:
9146         MyPluginConfig();
9147 @end verbatim
9149 Following the name of the configuration class, we put in three required
9150 functions and the configuration variables.
9151 @verbatim
9152         int equivalent(MyPluginConfig &that);
9153         void copy_from(MyPluginConfig &that);
9154         void interpolate(MyPluginConfig &prev,
9155         MyPluginConfig &next,
9156         int64_t prev_position,
9157         int64_t next_position,
9158         int64_t current_position);
9159         float parameter1;
9160         float parameter2;
9161         int parameter3;
9162     };
9163 @end verbatim
9165 Now you must define the three functions.  @b{Equivalent} is called by
9166 LOAD_CONFIGURATION_MACRO to determine if the local configuration parameters are
9167 identical to the configuration parameters in the arguement.  If equivalent
9168 returns 0, the LOAD_CONFIGURATION_MACRO causes the GUI to redraw.  If
9169 equivalent returns 1, the LOAD_CONFIGURATION_MACRO does not redraw the GUI@.
9171 Then there is @b{copy_from} which transfers the configuration values from the
9172 argument to the local variables.  This is once again used in
9173 LOAD_CONFIGURATION_MACRO to store configurations in temporaries.  Once
9174 LOAD_CONFIGURATION_MACRO has replicated the configuration, it loads a second
9175 configuration.  Then it interpolates the two configurations to get the current
9176 configuration.  The interpolation function performs the interpolation and
9177 stores the result in the local variables.
9179 Normally the interpolate function calculates a previous and next fraction,
9180 using the arguments.
9181 @verbatim
9182     void MyPluginConfig::interpolate(MyPluginConfig &prev,
9183         MyPluginConfig &next,
9184         int64_t prev_position,
9185         int64_t next_position,
9186         int64_t current_position
9187     {
9188         double next_scale =
9189         (double)(current_position - prev_position)
9190         / (next_position - prev_position);
9191         double prev_scale =
9192         (double)(next_position - current_position) /
9193         (next_position - prev_position);
9194 @end verbatim
9196 Then the fractions are applied to the previous and next configuration variables
9197 to yield the current values.
9198 @verbatim
9199         this->parameter1 =
9200         (float)(prev.parameter1 * prev_scale
9201         + next.parameter1 * next_scale);
9202         this->parameter2 =
9203         (float)(prev.parameter2 * prev_scale
9204         + next.parameter2 * next_scale);
9205         this->parameter3 =
9206         (int)(prev.parameter3 * prev_scale
9207         + next.parameter3 * next_scale);
9208     }
9209 @end verbatim
9211 Alternatively you can copy the values from the previous configuration argument
9212 if no interpolation is desired.
9214 This usage of the configuration object is the same in audio and video plugins.
9215 In video playback, the interpolation function is called for every frame,
9216 yielding smooth interpolation.  In audio playback, the interpolation function
9217 is called only once for every console fragment and once every time the
9218 insertion point moves.  This is good enough for updating the GUI while
9219 selecting regions on the timeline but it may not be accurate enough for really
9220 smooth rendering of the effect.
9222 For really smooth rendering of audio, you can still use load_configuration when
9223 updating the GUI@.  For process_buffer; however, ignore load_configuration and
9224 write your own interpolation routine which loads all the keyframes in a console
9225 fragment and interpolates every sample.  This would be really slow and hard to
9226 debug, yielding improvement which may not be audible.  Then of course, every
9227 country has its own wierdos.
9229 An easier way to get smoother interpolation is to reduce the console fragment
9230 to 1 sample.  This would have to be rendered and played back with the console
9231 fragment back over 2048 of course.  The GNU/Linux sound drivers can not play
9232 fragments of 1 sample.
9234 @c cincvdoc_node_number_308
9235 @node The user interface object
9236 @subsection The user interface object
9237 @cindex User interface object
9239 The user interface object at the very least consists of a pointer to a window
9240 and pointers to all the widgets in the window.  Using Cinelerra's toolkit, it
9241 consists of a @b{BCWindow} derivative and a @b{Thread} derivative.  The Thread
9242 derivative is declared in the plugin header using
9243 @verbatim
9244 PLUGIN_THREAD_HEADER(plugin_class, thread_class, window_class)
9245 @end verbatim
9247 Then it is defined using
9248 @verbatim
9249 PLUGIN_THREAD_OBJECT(plugin_class, thread_class, window_class)
9250 @end verbatim
9252 This, in combination with the SHOW_GUI macro does all the work in instantiating
9253 the Window.  This two-class system is used in realtime plugins but not in
9254 nonrealtime plugins.  Nonrealtime plugins create and destroy their GUI in their
9255 @b{get_parameters} function and there is no need for a Thread.
9257 Now the window class must be declared in the plugin header.  It is easiest to
9258 implement the window by copying an existing plugin and renaming the symbols.
9259 The following is an outline of what happens.  The plugin header must declare
9260 the window's constructor using the appropriate arguments.
9261 @verbatim
9262     #include "guicast.h"
9263     class MyPluginWindow : public BC_Window
9264     {
9265     public:
9266         MyPluginWindow(MyPluginMain *plugin, int x, int y);
9267 @end verbatim
9269 This becomes a window on the screen, positioned at x and y.
9271 It needs two methods
9272 @verbatim
9273 int create_objects();
9274 int close_event();
9275 @end verbatim
9276 and a back pointer to the plugin
9277 @verbatim
9278 MyPlugin *plugin;
9279 @end verbatim
9281 The constructor's definition should contain extents and flags causing the
9282 window to be hidden when first created.  The create_objects member puts widgets
9283 in the window according to GuiCast's syntax.  A pointer to each widget which
9284 you want to synchronize to a configuration parameter is stored in the window
9285 class.  These are updated in the @b{update_gui} function you earlier defined
9286 for the plugin.  The widgets are usually derivatives of a GuiCast widget and
9287 they override functions in GuiCast to handle events.  Finally create_objects
9288 calls
9289 @verbatim
9290 show_window();
9291 flush();
9292 @end verbatim
9293 to make the window appear all at once.
9295 The close_event member should be implemented using
9296 @verbatim
9297 WINDOW_CLOSE_EVENT(window_class)
9298 @end verbatim
9300 Every widget in the GUI needs to detect when its value changes.  In GuiCast the
9301 @b{handle_event} method is called whenever the value changes.  In
9302 @b{handle_event}, the widget then needs to call
9303 @b{plugin->send_configure_change()} to propogate the change to any copies of
9304 the plugin which are processing data.
9306 @c cincvdoc_node_number_309
9307 @node Realtime plugins
9308 @section Realtime plugins
9309 @cindex Realtime plugins
9311 Realtime plugins should use PLUGIN_CLASS_MEMBERS to define the basic set of
9312 members in their headers.  All realtime plugins must define an @b{int
9313 is_realtime()}
9315 member returning 1.  This causes a number of methods to be called during live
9316 playback and the plugin to be usable on the timeline.
9318 Realtime plugins must override a member called @b{process_buffer}
9320 This function takes different arguments depending on if the plugin handles
9321 video or audio.  See an existing plugin to find out which usage applies.
9323 The main features of the process_buffer function are a buffer to store the
9324 output, the starting position of the output, and the requested output rate.
9325 For audio, there is also a size argument for the number of samples.
9327 The starting position of the output buffer is the lowest numbered sample on the
9328 timeline if playback is forward and the highest numbered sample on the timeline
9329 if playback is reverse.  The direction of playback is determined by one of the
9330 plugin queries described below.
9332 The position and size arguments are all relative to the frame rate and sample
9333 rate passed to process_buffer.  This is the requested data rate and may not be
9334 the same as the project data rate.
9336 The process_realtime function should start by calling @b{load_configuration}.
9337 The LOAD_CONFIGURATION_MACRO returns 1 if the configuration changed.
9339 After determining the plugin's configuration, input media has to be loaded for
9340 processing.  Call:
9341 @verbatim
9342     read_frame(VFrame *buffer,
9343         int channel,
9344         int64_t start_position,
9345         double frame_rate)
9347     read_samples(double *buffer,
9348         int channel,
9349         int sample_rate,
9350         int64_t start_position,
9351         int64_t len)
9352 @end verbatim
9354 to request input data from the object which comes before this plugin.  The read
9355 function needs a buffer to store the input data in.  This can either be a
9356 temporary you create in the plugin or the output buffer supplied to
9357 process_buffer if you do not need a temporary.
9359 It also needs a set of position arguments to determine when you want to read
9360 the data from.  The start position, rate, and len passed to a read function
9361 need not be the same as the values recieved by the process_buffer function.
9362 This way plugins can read data at a different rate than they output data.
9364 The channel argument is only meaningful if this is a multichannel plugin.  They
9365 need to read data for each track in the get_total_buffers() value and process
9366 all the tracks.  Single channel plugins should pass 0 for channel.
9368 Additional members are implemented to maintain configuration in realtime
9369 plugins.  Some of these are also needed in nonrealtime plugins.
9371 @itemize @bullet
9372 @item @b{void read_data(KeyFrame *keyframe);} @*
9373 Loads data from a keyframe into the plugin's configuration.  Inside the
9374 keyframe is an XML string.  It is most easily parsed by creating a @b{FileXML}
9375 object.  See an existing plugin to see how the read_data function is
9376 implemented. @*
9377 Read data loads data out of the XML object and stores values in the plugin's
9378 configuration object.  Since configuration objects vary from plugin to plugin,
9379 these functions can not be automated.
9381 @item @b{void save_data(KeyFrame *keyframe);} @*
9382 Saves data from the plugin's configuration to a keyframe.  Inside the keyframe
9383 you will put an XML string which is normally created by a FileXML object.  See an
9384 existing plugin to see how the save_data function is implemented. @*
9385 Save data saves data from the plugin's configuration object into the XML
9386 object.
9388 @item @b{int load_defaults();} @*
9389 Another way the plugin gets parameters is from a defaults file.  The load and
9390 save defaults routines use a BC_Hash object to parse the defaults file.  The
9391 defaults object is created in @b{load_defaults} and destroyed in the plugin's
9392 destructor.  See an existing plugin to see how the BC_Hash object is used.
9394 @item @b{int save_defaults();} @*
9395 Saves the configuration in the defaults object.
9396 @end itemize
9398 @c cincvdoc_node_number_310
9399 @node Nonrealtime plugins
9400 @section Nonrealtime plugins
9401 @cindex Nonrealtime plugins
9403 Some references for non-realtime plugins are @b{Normalize} for audio and
9404 @b{Reframe} for video.
9406 Like realtime plugins, @b{load_defaults} and @b{save_defaults} must be
9407 implemented.  In nonrealtime plugins, these are not just used for default
9408 parameters but to transfer values from the user interface to the signal
9409 processor.  There does not need to be a configuration class in nonrealtime
9410 plugins.
9412 Unlike realtime plugins, the LOAD_CONFIGURATION_MACRO can not be used in the
9413 plugin header.  Instead, the following methods must be defined.
9415 The nonrealtime plugin should contain a pointer to a defaults object.
9416 @verbatim
9417 BC_Hash *defaults;
9418 @end verbatim
9419 It should also have a pointer to a MainProgressBar.
9420 @verbatim
9421 MainProgressBar *progress;
9422 @end verbatim
9424 The progress pointer allows nonrealtime plugins to display their progress in
9425 Cinelerra's main window.
9427 The constructor for a nonrealtime plugin cannot use PLUGIN_CONSTRUCTOR_MACRO
9428 but must call @b{load_defaults} directly.
9430 The destructor, likewise, must call @b{save_defaults} and @b{delete defaults}
9431 directly instead of PLUGIN_DESTRUCTOR_MACRO@.
9433 @itemize @bullet
9434 @item @b{VFrame* new_picon();} @*
9435 @b{char* plugin_title();} @*
9436 The usage of these is the same as realtime plugins.
9438 @item @b{int is_realtime();} @*
9439 This function must return 0 to indicate a nonrealtime plugin.
9441 @item @b{int get_parameters();} @*
9442 Here, the user should create a GUI, wait for the user to hit an OK button or a
9443 cancel button, and store the parameters in plugin variables.  This routine must
9444 return 0 for success and 1 for failure.  This way the user can cancel the
9445 effect from the GUI@. @*
9446 Unlike the realtime plugin, this GUI need not run asynchronously of the plugin.
9447 It should block the get_parameters function until the user selects OK or
9448 Cancel.
9450 @item @b{int load_defaults();} @*
9451 This should create a defaults object and load parameters from the defaults
9452 object into plugin variables.
9454 @item @b{int save_defaults();} @*
9455 This should save plugin variables to the defaults object.
9457 @item @b{int start_loop();} @*
9458 If @b{get_parameters} returned 0 for success, this is called once to give the
9459 plugin a chance to initialize processing.  The plugin should instantiate the
9460 progress object with a line like @*
9461 @code{progress = start_progress("MyPlugin progress...",} @*
9462 @code{PluginClient::get_total_len());} @*
9463 The usage of @b{start_progress} depends on whether the plugin is multichannel
9464 or single channel.  If it is multichannel you always call start_progress.  If
9465 it is single channel, you first need to know whether the progress bar has
9466 already started in another instance of the plugin. @*
9467 If @b{PluginClient::interactive} is 1, you need to start the progress bar.  If
9468 it is 0, the progress bar has already been started. @*
9469 The PluginClient defines @b{get_total_len()} and @b{get_source_start()} to
9470 describe the timeline range to be processed.  The units are either samples or
9471 frames and in the project rate.
9473 @item @b{int process_loop} @*
9474 This is called repeatedly until the timeline range is processed.  It has either
9475 a samples or frames buffer for output and a reference to write_length to store
9476 the number of samples processed.  If this is an audio plugin, the user needs to
9477 call @b{get_buffer_size()} to know how many samples the output buffer can hold.
9479 The plugin must use @b{read_samples} or @b{read_frame} to read the input.
9480 These functions are a bit different for a non realtime plugin than they are for
9481 a realtime plugin. @*
9482 They take a buffer and a position relative to the start of the timeline, in the
9483 timeline's rate.  Then you must process it and put the output in the buffer
9484 argument to process_loop.  write_length should contain the number of samples
9485 generated if it is audio. @*
9486 Finally, process_loop must test @b{PluginClient::interactive} and update the
9487 progress bar if it is 1. @*
9488 @code{progress->update(total_written);} @*
9489 returns 1 or 0 if the progress bar was cancelled.  If it is 1, process_loop
9490 should return 1 to indicate a cancellation.  In addition to progress bar
9491 cancellation, @b{process_loop} should return 1 when the entire timeline range
9492 is processed.
9494 @item @b{int stop_loop();} @*
9495 This is called after process_loop processes its last buffer. @*
9496 If PluginClient::is_interactive is 1, this should call @b{stop_progress} in the
9497 progress bar pointer and delete the pointer.  Then it should delete any objects
9498 it created for processing in @b{start_loop}.
9499 @end itemize
9501 @c cincvdoc_node_number_311
9502 @node Audio plugins
9503 @section Audio plugins
9504 @cindex Audio plugins
9506 The simplest audio plugin is Gain.  The processing object should include
9507 @file{pluginaclient.h} and inherit from @b{PluginAClient}.  Realtime audio
9508 plugins need to define
9509 @verbatim
9510     int process_buffer(int64_t size,
9511         double **buffer,
9512         int64_t start_position,
9513         int sample_rate);
9514 if it is multichannel or
9515     int process_buffer(int64_t size,
9516         double *buffer,
9517         int64_t start_position,
9518         int sample_rate);
9519 @end verbatim
9520 if it is single channel.  These should return 0 on success and 1 on failure.
9521 In the future, the return value may abort failed rendering.
9523 The processing function needs to request input samples with
9524 @verbatim
9525     int read_samples(double *buffer,
9526         int channel,
9527         int sample_rate,
9528         int64_t start_position,
9529         int64_t len);
9530 @end verbatim
9531 It always returns 0.  The user may specify any desired sample rate and start
9532 position.
9534 Nonrealtime audio plugins need to define
9535 @verbatim
9536 int process_loop(double *buffer, int64_t &write_length);
9537 for single channel or
9538 int process_loop(double **buffers, int64_t &write_length);
9539 @end verbatim
9540 for multi channel.  Non realtime plugins use a different set of read_samples
9541 functions to request input data.  These are fixed to the project sample rate.
9543 @c cincvdoc_node_number_312
9544 @node Video plugins
9545 @section Video plugins
9546 @cindex Video plugins
9548 The simplest video plugin is Flip.  The processing object should include
9549 @file{pluginvclient.h} and inherit from @b{PluginVClient}.  Realtime video
9550 plugins need to define
9551 @verbatim
9552     int process_buffer(VFrame **frame,
9553         int64_t start_position,
9554         double frame_rate);
9555 @end verbatim
9556 if it is multichannel or
9557 @verbatim
9558     int process_buffer(VFrame *frame,
9559         int64_t start_position,
9560         double frame_rate);
9561 @end verbatim
9562 if it is single channel.
9564 The nonrealtime video plugins need to define
9565 @verbatim
9566 int process_loop(VFrame *buffer);
9567 for single channel or
9568 int process_loop(VFrame **buffers);
9569 @end verbatim
9570 for multi channel.  The amount of frames generated in a single process_loop is
9571 always assumed to be 1, hence the lack of a write_length argument.  Returning 0
9572 causes the rendering to continue.  Returning 1 causes the rendering to abort.
9574 A set of read_frame functions exist for requesting input frames in non-realtime
9575 video plugins.  These are fixed to the project frame rate.
9577 @c cincvdoc_node_number_313
9578 @node Transition plugins
9579 @section Transition plugins
9580 @cindex Transition plugins
9582 The simplest video transition is @b{wipe} and the simplest audio transition is
9583 @b{crossfade}.  These use a subset of the default class members of realtime
9584 plugins, but so far no analogue to PLUGIN_CLASS_MEMBERS has been done for
9585 transitions.
9587 The processing object for audio transitions still inherits from PluginAClient
9588 and for video transitions it still inherits from PluginVClient.
9590 Transitions may or may not have a GUI@.  If they have a GUI, they must also
9591 manage a thread like realtime plugins.  Do this with the same
9592 PLUGIN_THREAD_OBJECT and PLUGIN_THREAD_HEADER macros as realtime plugins.
9593 Since there is only one keyframe in a transition, you do not need to worry about
9594 updating the GUI from the processing object like you do in a realtime plugin.
9596 If the transition has a GUI, you can use PLUGIN_CONSTRUCTOR_MACRO and
9597 PLUGIN_DESTRUCTOR_MACRO to initialize the processing object.  You will also need
9598 a BC_Hash object and a Thread object for these macros.
9600 Since the GUI is optional, overwrite a function called @b{uses_gui()} to
9601 signifiy whether or not the transition has a GUI@.  Return 1 if it does and 0 if
9602 it does not.
9604 Transitions need a @b{load_defaults} and @b{save_defaults} function so the
9605 first time they are dropped on the timeline they will have useful settings.
9607 A @b{read_data} and @b{save_data} function takes over after insertion to access
9608 data specific to each instance of the transition.
9610 The most important difference between transitions and realtime plugins is the
9611 addition of an @b{is_transition} method to the processing object.
9612 @b{is_transition} should return 1 to signify the plugin is a transition.
9614 Transitions process data in a @b{process_realtime} function.
9615 @verbatim
9616     int process_realtime(VFrame *input,
9617         VFrame *output);
9618     int process_realtime(int64_t size,
9619         double *input_ptr,
9620         double *output_ptr);
9621 @end verbatim
9622 The input argument to process_realtime is the data for the next edit.  The
9623 output argument to process_realtime is the data for the previous edit.
9625 Routines exist for determining where you are relative to the transition's start
9626 and end.
9628 @itemize @bullet
9629 @item
9630 @b{PluginClient::get_source_position()} - returns the current position since
9631 the start of the transition of the lowest sample in the buffers.
9633 @item
9634 @b{PluginClient::get_total_len()} - returns the integer length of the
9635 transition.  The units are either samples or frames, in the data rate requested
9636 by the first plugin.
9637 @end itemize
9639 Users should divide the source position by total length to get the fraction of
9640 the transition the current @b{process_realtime} function is at.
9642 Transitions run in the data rate requested by the first plugin in the track.
9643 This may be different than the project data rate.  Since process_realtime lacks
9644 a rate argument, use @b{get_framerate()} or @b{get_samplerate} to get the
9645 requested rate.
9647 @c cincvdoc_node_number_314
9648 @node Plugin GUI's which update during playback
9649 @section Plugin GUI's which update during playback
9650 @cindex Plugin GUI's which update during playback
9652 Effects like @b{Histogram} and @b{VideoScope} need to update the GUI during
9653 playback to display information about the signal.  This is achieved with the
9654 @b{send_render_gui} and @b{render_gui} methods.  Normally in process_buffer,
9655 when the processing object wants to update the GUI it should call
9656 @b{send_render_gui}.  This should only be called in process_buffer.
9657 Send_render_gui goes through a search and eventually calls @b{render_gui} in
9658 the GUI instance of the plugin.
9660 Render_gui should have a sequence like
9661 @verbatim
9662     void MyPlugin::render_gui(void *data)
9663     {
9664         if(thread)
9665         {
9666         thread->window->lock_window();
9667         // update GUI here
9668         thread->window->unlock_window();
9669         }
9670     }
9671 @end verbatim
9673 Send_render_gui and render_gui use one argument, a void pointer to transfer
9674 information from the processing object to the GUI@.  The user should typecast
9675 this pointer into something useful.
9677 @c cincvdoc_node_number_315
9678 @node Plugin queries
9679 @section Plugin queries
9680 @cindex Plugin queries
9682 There are several useful queries in PluginClient which can be accessed from the
9683 processing object.  Some of them have different meaning in realtime and
9684 non-realtime mode.  They all give information about the operating system or the
9685 project which can be used to improve the quality of the processing.
9687 @menu
9688 * System queries:: Utilities for determining the system resources.
9689 * Timing queries:: Utilities for performing time-dependant processing.
9690 @end menu
9692 @c cincvdoc_node_number_316
9693 @node System queries
9694 @subsection System queries
9695 @cindex System queries
9697 @itemize @bullet
9698 @item @b{get_interpolation_type()} @*
9699 Returns the type of interpolation the user wants for all scaling operations.
9700 This is a macro from overlayframe.inc.  It can be applied to any call to the
9701 @b{OverlayFrame} object.
9703 @item @b{get_project_smp()} @*
9704 Gives the number of CPU's on the system minus 1.  If it is a uniprocessor it is
9705 0.  If it is a dual processor, it is 1.  This number should be used to gain
9706 parallelism.
9708 @item @b{get_total_buffers()} @*
9709 Gives the number of tracks a multichannel plugin needs to process.
9710 @end itemize
9712 @c cincvdoc_node_number_317
9713 @node Timing queries
9714 @subsection Timing queries
9715 @cindex Timing queries
9717 There are two rates for media a realtime plugin has to be aware of: the project
9718 rate and the requested rate.  Functions are provided for getting the project
9719 and requested rate.  In addition, doing time dependant effects requires using
9720 several functions which tell where you are in the effect.
9722 @itemize @bullet
9723 @item @b{get_project_framerate()} @*
9724 Gives the frames per second of the video as defined by the project settings.
9726 @item @b{get_project_samplerate()} @*
9727 Gives the samples per second of the audio as defined by the project settings.
9729 @item @b{get_framerate()} @*
9730 Gives the frames per second requested by the plugin after this one.  This is
9731 the requested frame rate and is the same as the frame_rate argument to
9732 process_buffer.
9734 @item @b{get_samplerate()} @*
9735 Gives the samples per second requested by the plugin after this one.  This is
9736 the requested sample rate and is the same as the sample_rate argument to
9737 process_buffer.
9739 @item @b{get_total_len()} @*
9740 Gives the number of samples or frames in the range covered by the effect,
9741 relative to the requested data rate.
9743 @item @b{get_source_start()} @*
9744 For realtime plugins it gives the lowest sample or frame in the effect range in
9745 the requested data rate.  For nonrealtime plugins it is the start of the range
9746 of the timeline to process.
9748 @item @b{get_source_position()} @*
9749 For realtime plugins it is the lowest numbered sample in the requested region
9750 to process if playing forward and the highest numbered sample in the region if
9751 playing backward.  For video it is the start of the frame if playing forward
9752 and the end of the frame if playing in reverse.  The position is relative to
9753 the start of the EDL and in the requested data rate. @*
9754 For transitions this is always the lowest numbered sample of the region to
9755 process relative to the start of the transition.
9757 @item @b{get_direction()} @*
9758 Gives the direction of the current playback operation.  This is a macro defined
9759 in transportque.inc.  This is useful for calling read functions since the read
9760 functions position themselves at the start or end of the region to read,
9761 depending on the playback operation.
9763 @item @b{local_to_edl()} @*
9764 @b{edl_to_local()} @*
9765 These convert between the requested data rate and the project data rate.  They
9766 are used to convert keyframe positions into numbers which can be interpolated
9767 at the requested data rate.  The conversion is automatically based on frame
9768 rate or sample rate depending on the type of plugin.
9770 @item @b{get_prev_keyframe(int64_t position, int is_local)} @*
9771 @b{get_next_keyframe(int64_t position, int is_local)} @*
9772 These give the nearest keyframe before or after the position given.  The macro
9773 defined version of load_configuration automatically retrieves the right
9774 keyframes but you may want to do this on your own. @*
9775 The position argument can be either in the project rate or the requested rate.
9776 Set is_local to 1 if it is in the requested rate and 0 if it is in the project
9777 rate. @*
9778 In each keyframe, another position value tells the keyframe's position relative
9779 to the start of the timeline and in the project rate. @*
9780 The only way to get smooth interpolation between keyframes is to convert the
9781 positions in the keyframe objects to the requested rate.  Do this by using
9782 edl_to_local on the keyframe positions.
9783 @end itemize
9785 @c cincvdoc_node_number_318
9786 @node Using OpenGL
9787 @section Using OpenGL
9788 @cindex OpenGL, using
9790 Realtime video plugins support OpenGL@.  Using OpenGL to do plugin routines can
9791 speed up playback greatly since it does most of the work in hardware.
9792 Unfortunately, every OpenGL routine needs a software counterpart for rendering,
9793 doubling the amount of software to maintain.  Fortunately, having an OpenGL
9794 routine means the software version does not need to be as optimized as it did
9795 when software was the only way.
9797 As always, the best way to design a first OpenGL plugin is to copy an existing
9798 one and alter it.  The @b{Brightness} plugin is a simple OpenGL plugin to copy.
9799 There are 3 main points in OpenGL rendering and 1 point for optimizing OpenGL
9800 rendering.
9802 @menu
9803 * Getting OpenGL data:: Getting video data in a form usable by OpenGL
9804 * Drawing using OpenGL:: The method of drawing video in OpenGL
9805 * Using shaders:: Routines to simplify shader usage
9806 * Aggregating plugins:: Combining OpenGL routines from different plugins into one.
9807 @end menu
9809 @c cincvdoc_node_number_319
9810 @node Getting OpenGL data
9811 @subsection Getting OpenGL data
9812 @cindex OpenGL, getting data
9814 The first problem is getting OpenGL-enabled plugins to interact with
9815 software-only plugins.  To solve this, all the information required to do
9816 OpenGL playback is stored in the VFrame object which is passed to
9817 @b{process_buffer}.  To support 3D, the VFrame contains a PBuffer and a
9818 texture, in addition to VFrame's original rows.
9820 In OpenGL mode, VFrame has 3 states corresponding to the location of its video
9821 data.  The opengl state is recovered by calling @b{get_opengl_state} and is set
9822 by calling @b{set_opengl_state}.  The states are:
9824 @itemize @bullet
9825 @item @b{VFrame::RAM} @*
9826 This means the video data is stored in the traditional row pointers.  It must
9827 be loaded into a texture before being drawn using OpenGL routines.
9829 @item @b{VFrame::TEXTURE} @*
9830 The video data is stored in texture memory.  It is ready to be drawn using
9831 OpenGL routines.
9833 @item @b{VFrame::SCREEN} @*
9834 The video data is stored in a frame buffer in the graphics card.  For plugins,
9835 the frame buffer is always a PBuffer.  The image on the frame buffer can not be
9836 replicated again unless it is read back into the texture and the opengl state
9837 is reset to TEXTURE@.  The frame buffer is limited to 8 bits per channel.  If
9838 an OpenGL effect is used in a floating point project, it only retains 8 bits.
9839 @end itemize
9841 In the plugin's @b{process_buffer} routine, there is normally a call to
9842 @b{read_frame} to get data from the previous plugin in the chain.
9843 @b{read_frame} takes a new parameter called @b{use_opengl}.
9845 The plugin passes 1 to @b{use_opengl} if it intends to handle the data using
9846 OpenGL@.  It passes 0 to @b{use_opengl} if it can only handle the data using
9847 software.  The value of @b{use_opengl} is passed up the chain to ensure a
9848 plugin which only does software only gets the data in the row pointers.  If
9849 @b{use_opengl} is 0, the opengl state in VFrame is RAM@.
9851 The plugin must not only know if it is software-only but if its output must be
9852 software only.  Call @b{get_use_opengl} to determine if the output can be
9853 handled by OpenGL@.  If @b{get_use_opengl} returns 0, the plugin must pass 0 for
9854 @b{use_opengl} in @b{read_frame} and do its processing in software.  If
9855 @b{get_use_opengl} is 1, the plugin can decide based on its implementation
9856 whether to use OpenGL@.
9858 The main problem with OpenGL is that all the gl... calls need to be run from
9859 the same thread.  To work around this, the plugin interface has routines for
9860 running OpenGL in a common thread.
9862 @b{run_opengl} transfers control to the common OpenGL thread.  This is normally
9863 called by the plugin in @b{process_buffer} after it calls @b{read_frame} and
9864 only if @b{get_use_opengl} is 1.
9866 Through a series of indirections, @b{run_opengl} eventually transfers control
9867 to a virtual function called @b{handle_opengl}.  @b{handle_opengl} must be
9868 overridden with a function to perform all the OpenGL routines.  The contents of
9869 @b{handle_opengl} must be enclosed in @b{#ifdef HAVE_GL} ... @b{#endif} to
9870 allow it to be compiled on systems with no graphics support, like render nodes.
9871 The return value of @b{handle_opengl} is passed back from @b{run_opengl}.
9873 @b{read_frame} can not be called from inside @b{handle_opengl}.  This would
9874 create a recursive lockup because it would cause other objects to call
9875 @b{run_opengl}.
9877 Once inside @b{handle_opengl}, the plugin has full usage of all the OpenGL
9878 features.  VFrame provides some functions to automate common OpenGL sequences.
9880 The VFrame argument to @b{process_buffer} is always available through the
9881 @b{get_output(int layer)} function.  If the plugin is multichannel, the layer
9882 argument retrieves a specific layer of the output buffers.  The PBuffer of the
9883 output buffer is where the OpenGL output must go if any processing is done.
9885 @c cincvdoc_node_number_320
9886 @node Drawing using OpenGL
9887 @subsection Drawing using OpenGL
9888 @cindex Drawing using OpenGL
9890 The sequence of commands to draw on the output PBuffer stars with getting the
9891 video in a memory area where it can be recalled for drawing:
9892 @verbatim
9893 get_output()->to_texture();
9894 get_output()->enable_opengl();
9895 @end verbatim
9897 @itemize @bullet
9898 @item @b{to_texture} transfers the OpenGL data from wherever it is to the
9899 output's texture memory and sets the output state to TEXTURE@.
9900 @item @b{enable_opengl} makes the OpenGL context relative to the output's
9901 PBuffer.
9902 @end itemize
9904 The next step is to draw the texture with some processing on the PBuffer.  The
9905 normal sequence of commands to draw a texture is:
9906 @verbatim
9907 get_output()->init_screen();
9908 get_output()->bind_texture(0);
9909 get_output()->draw_texture();
9910 @end verbatim
9912 @itemize @bullet
9913 @item @b{VFrame::init_screen} sets the OpenGL frustum and parameters to known
9914 values.
9915 @item @b{VFrame::bind_texture(int texture_unit)} binds the texture to the given
9916 texture unit and enables it.
9917 @item @b{VFrame::draw_texture()} calls the vertex functions to draw the texture
9918 normalized to the size of the PBuffer.  Copy this if you want custom vertices.
9919 @end itemize
9921 The last step in the handle_opengl routine, after the texture has been drawn on
9922 the PBuffer, is to set the output's opengl state to SCREEN with a call to
9923 @b{VFrame::set_opengl_state}.  The plugin should not read back the frame buffer
9924 into a texture or row pointers if it has no further processing.  Plugins should
9925 only leave the output in the texture or RAM if its location results from normal
9926 processing.  They should set the opengl state to RAM or TEXTURE if they do.
9928 @b{Colormodels in OpenGL:} @*
9929 The colormodel exposed to OpenGL routines is always floating point since that
9930 is what OpenGL uses, but it may be YUV or RGB depending on the project
9931 settings.  If it is YUV, it is offset by 0.5 just like in software.  Passing
9932 YUV colormodels to plugins was necessary for speed.  The other option was to
9933 convert YUV to RGB in the first step that needed OpenGL@.  Every effect and
9934 rendering step would have needed a YUV to RGB routine.  With the YUV retained,
9935 only the final compositing step needs a YUV to RGB routine.
9937 @c cincvdoc_node_number_321
9938 @node Using shaders
9939 @subsection Using shaders
9940 @cindex OpenGL, using shaders
9942 Very few effects can do anything useful with just a straight drawing of the
9943 texture on the PBuffer.  They normally define a shader.  The shader is a C
9944 program which runs on the graphics card.  Since the graphics card is optimized
9945 for graphics, it can be much faster than running it on the CPU@.
9947 Shaders are written in OpenGL Shading Language.  The shader source code is
9948 contained in a string.  The normal sequence for using a shader comes after a
9949 call to @b{enable_opengl}.
9951 @verbatim
9952 char *shader_source = "...";
9953 unsigned char shader_id = VFrame::make_shader(0, shader_source, 0);
9954 glUseProgram(shader_id);
9955 // Set uniform variables using glUniform commands
9956 @end verbatim
9958 The compilation and linking step for shaders is encapsulated by the
9959 VFrame::make_shader command.  It returns a shader_id which can be passed to
9960 OpenGL functions.  The first and last arguments must always by 0.  And
9961 arbitrary number of source strings may be put between the 0's.  The source
9962 strings are concatenated by make_shader into one huge shader source.  If
9963 multiple main functions are in the sources, the main functions are renamed and
9964 run in order.
9966 There are a number of useful macros for shaders in @file{playback3d.h}.  All
9967 the shaders so far have been fragment shaders.  After the shader is
9968 initialized, draw the texture starting from @b{init_screen}.  The shader
9969 program must be disabled with another call to @b{glUseProgram(0)} and 0 as the
9970 argument.
9972 The shader_id and source code is stored in memory as long as Cinelerra runs.
9973 Future calls to make_shader with the same source code run much faster.
9975 @c cincvdoc_node_number_322
9976 @node Aggregating plugins
9977 @subsection Aggregating plugins
9978 @cindex Aggregating plugins
9980 Further speed improvements may be obtained by combining OpenGL routines from
9981 two plugins into a single handle_opengl function.  This is done when @b{Frame
9982 to Fields} and @b{RGB to 601} are attached in order.  Aggregations of more than
9983 two plugins are possible but very hard to get working.  Aggregation is useful
9984 for OpenGL because each plugin must copy the video from a texture to a PBuffer.
9985 In software there was no copy operation.
9987 In aggregation, one plugin processes everything from the other plugins and the
9988 other plugins fall through.  The fall through plugins must copy their
9989 parameters to the output buffer so they can be detected by the processing
9990 plugin.
9992 The VFrame used as the output buffer contains a parameter table for parameter
9993 passing between plugins and it is accessed with @b{get_output()->get_params()}.
9994 Parameters are set and retrieved in the table with calls to @b{update} and
9995 @b{get} just like with defaults.
9997 The fall through plugins must determine if the processor plugin is attached
9998 with calls to @b{next_effect_is} and @b{prev_effect_is}.  These take the name
9999 of the processor plugin as a string argument and return 1 if the next or
10000 previous plugin is the processor plugin.  If either returns 1, the fall through
10001 plugin must still call @b{read_frame} to propogate the data but return after
10002 that.
10004 The processor plugin must call @b{next_effect_is} and @b{prev_effect_is} to
10005 determine if it is aggregated with a fall through plugin.  If it is, it must
10006 perform the operations of the fall through plugin in its OpenGL routine.  The
10007 parameters for the the fall through plugin should be available by
10008 @b{get_output()->get_params()} if the fall through plugin set them.
10010 @c cincvdoc_node_number_323
10011 @node Keyboard shortcuts
10012 @chapter Keyboard shortcuts
10013 @cindex Keyboard shortcuts
10014 @cindex Shortcuts
10016 Alex Ferrer started summarizing most of the keyboard shortcuts.  Most of the
10017 keys work without any modifier like @key{SHIFT} or @key{CTRL}.  Most windows
10018 can be closed with a @kbd{CTRL-w}.  Most operations can be cancelled with
10019 @key{ESC} and accepted with @key{RET}.
10021 @section Program window
10022 @cindex Program window
10023 @subsection Editing Media
10024 @cindex Media, editing
10026 @multitable @columnfractions .2 .8
10027 @item @kbd{z}
10028 @tab Undo
10029 @item @kbd{SHIFT Z}
10030 @tab Re-Do
10031 @item @kbd{x}
10032 @tab Cut
10033 @item @kbd{c}
10034 @tab Copy
10035 @item @kbd{v}
10036 @tab Paste
10037 @item @kbd{Del}
10038 @tab Clear
10039 @item @kbd{SHIFT Space}
10040 @tab Paste Silence
10041 @item @kbd{m}
10042 @tab Mute region
10043 @item @kbd{a}
10044 @tab Select all
10045 @item @kbd{SHIFT + click}
10046 @tab When done over an edit causes the highlighted selection to extend to the
10047 cursor position.  When done over the boundary of an effect causes the trim
10048 operation to apply to one effect.
10049 @end multitable
10051 @subsection Editing Labels and In/Out Points
10052 @cindex Editing labels and in/out points
10054 @multitable @columnfractions .2 .8
10055 @item @kbd{[}
10056 @tab Toggle In point
10057 @item @kbd{]}
10058 @tab Toggle Out point
10059 @item @kbd{l}
10060 @tab Toggle label at current position
10061 @item @kbd{CTRL <-}
10062 @tab Go to Previous Label
10063 @item @kbd{CTRL ->}
10064 @tab Go to Next Label
10065 @end multitable
10067 @subsection Navigation
10068 @cindex Navigation
10070 @multitable @columnfractions .2 .8
10071 @item @kbd{Right arrow}
10072 @tab Move right *
10073 @item @kbd{Left arrow}
10074 @tab Move left *
10075 @item @kbd{Up arrow}
10076 @tab Zoom out *
10077 @item @kbd{Down arrow}
10078 @tab Zoom in *
10079 @item @kbd{CTRL Up}
10080 @tab Expand current curve amplitude
10081 @item @kbd{CTRL Dn}
10082 @tab Shrink current curve amplitude
10083 @item @kbd{CTRL Alt Up}
10084 @tab Expand all curve amplitude
10085 @item @kbd{Ctrl Alt Dn}
10086 @tab Shrink all curve amplitude
10087 @item @kbd{Alt Up}
10088 @tab Expand curve amplitude
10089 @item @kbd{Alt Dn}
10090 @tab Shrink curve amplitude
10091 @item @kbd{f}
10092 @tab Fit time displayed to selection
10093 @item @kbd{Alt f}
10094 @tab Make the range of all the automation types.  Fit the maximum and minimum
10095 range of the current highlighted selection
10096 @item @kbd{Ctrl Alt f}
10097 @tab Make the range of the currently selected automation type fit the maximum
10098 and minimum range of the current highlighted selection
10099 @item @kbd{Alt Left}
10100 @tab Move left one edit
10101 @item @kbd{Alt Right}
10102 @tab Move right one edit
10103 @item @kbd{Page Up}
10104 @tab Move up *
10105 @item @kbd{Page Dn}
10106 @tab Move down *
10107 @item @kbd{Ctrl Page Up}
10108 @tab Expand track height
10109 @item @kbd{Ctrl Page Dn}
10110 @tab Shrink track height
10111 @item @kbd{Home}
10112 @tab Go to beginning of timeline *
10113 @item @kbd{End}
10114 @tab Go to end of timeline *
10115 @end multitable
10117 * You may have to click on the timeline to deactivate any text boxes
10118 or tumblers before these work.
10120 @subsection File operations
10121 @cindex File operations
10123 @multitable @columnfractions .2 .8
10124 @item @kbd{n}
10125 @tab New project
10126 @item @kbd{o}
10127 @tab Load Files
10128 @item @kbd{s}
10129 @tab Save Project
10130 @item @kbd{r}
10131 @tab Record
10132 @item @kbd{SHIFT R}
10133 @tab Render
10134 @item @kbd{q}
10135 @tab Quit
10136 @item @kbd{SHIFT P}
10137 @tab Preferences
10138 @item @kbd{SHIFT B}
10139 @tab Batch Render
10140 @item @kbd{SHIFT F}
10141 @tab Set Format
10142 @item @kbd{}
10143 @tab
10144 @end multitable
10146 @subsection Key frame editing
10147 @cindex Keyframes, editing
10149 @multitable @columnfractions .2 .8
10150 @item @kbd{SHIFT X}
10151 @tab Cut keyframes
10152 @item @kbd{SHIFT C}
10153 @tab Copy keyframes
10154 @item @kbd{SHIFT V}
10155 @tab Paste keyframes
10156 @item @kbd{SHIFT Del}
10157 @tab Clear keyframes
10158 @item @kbd{Alt c}
10159 @tab Copy default keyframe
10160 @item @kbd{Alt v}
10161 @tab Paste default keyframe
10162 @end multitable
10164 @subsection Track Manipulation
10165 @cindex Track manipulation
10167 @multitable @columnfractions .2 .8
10168 @item @kbd{t}
10169 @tab Add Audio Track
10170 @item @kbd{u}
10171 @tab Insert default Audio Transition
10172 @item @kbd{SHIFT T}
10173 @tab Add Video Track
10174 @item @kbd{SHIFT U}
10175 @tab Insert Default Video Transition
10176 @item @kbd{d}
10177 @tab Delete last Track
10178 @item @kbd{SHIFT L}
10179 @tab Loop playback
10180 @item @kbd{TAB}
10181 @tab Toggle single track arming status
10182 @item @kbd{SHIFT-TAB}
10183 @tab Toggle every other track's arming status
10184 @end multitable
10186 @subsection What is drawn on the timeline
10187 @cindex Timeline, what is drawn on the
10189 @multitable @columnfractions .2 .8
10190 @item @kbd{1}
10191 @tab Show titles
10192 @item @kbd{2}
10193 @tab Show transitions
10194 @item @kbd{3}
10195 @tab Fade keyframes
10196 @item @kbd{4}
10197 @tab Mute keyframes
10198 @item @kbd{5}
10199 @tab Mode keyframes
10200 @item @kbd{6}
10201 @tab Pan keyframes
10202 @item @kbd{7}
10203 @tab Camera keyframes
10204 @item @kbd{8}
10205 @tab Projector keyframes
10206 @item @kbd{9}
10207 @tab Plugin keyframes
10208 @item @kbd{0}
10209 @tab Mask keyframes
10210 @item @kbd{-}
10211 @tab Camera Zoom
10212 @item @kbd{=}
10213 @tab Projector Zoom
10214 @end multitable
10216 @section Viewer and compositor windows
10217 @cindex Viewer and compositor windows
10219 @multitable @columnfractions .2 .8
10220 @item @kbd{x}
10221 @tab Cut
10222 @item @kbd{c}
10223 @tab Copy
10224 @item @kbd{v}
10225 @tab Paste
10226 @item @kbd{v}
10227 @tab Splice
10228 @item @kbd{b}
10229 @tab Overwrite
10230 @item @kbd{[}
10231 @tab Toggle In point
10232 @item @kbd{]}
10233 @tab Toggle Out point
10234 @item @kbd{l}
10235 @tab Toggle label at current position
10236 @item @kbd{Ctrl <-}
10237 @tab Go to Previous Label
10238 @item @kbd{Ctrl ->}
10239 @tab Go to Next Label
10240 @item @kbd{Home}
10241 @tab Go to beginning
10242 @item @kbd{End}
10243 @tab Go to end
10244 @item @kbd{z}
10245 @tab Undo
10246 @item @kbd{SHIFT Z}
10247 @tab Re-Do
10248 @item @kbd{+}
10249 @tab Zoom in
10250 @item @kbd{-}
10251 @tab Zoom out
10252 @end multitable
10254 @section Playback transport
10255 @cindex Playback transport
10257 Transport controls work in any window which has a playback transport.  They are
10258 accessed through the number pad with num lock disabled.
10260 @multitable @columnfractions .08 .17 .08 .17 .08 .17 .08 .17
10261 @item @kbd{4}
10262 @tab Frame back
10263 @tab @kbd{5}
10264 @tab Reverse Slow
10265 @tab @kbd{6}
10266 @tab Reverse
10267 @tab @kbd{+}
10268 @tab Reverse Fast
10269 @item @kbd{1}
10270 @tab Frame Forward
10271 @tab @kbd{2}
10272 @tab Forward Slow
10273 @tab @kbd{3}
10274 @tab Play
10275 @tab @kbd{Enter}
10276 @tab Fast Forward
10277 @item @kbd{0}
10278 @tab Stop
10279 @tab
10280 @tab
10281 @tab
10282 @tab
10283 @tab
10284 @tab
10285 @end multitable
10287 @key{SPACE} is normal Play, Hitting any key twice is Pause.
10289 Hitting any transport control with @key{CTRL} down causes only the region
10290 between the in/out points to be played, if in/out points are defined.
10292 @section Record window
10293 @cindex Record window
10295 @multitable @columnfractions .2 .8
10296 @item @kbd{Space}
10297 @tab Start and pause recording of the current batch
10298 @item @kbd{l}
10299 @tab Toggle label at current position
10300 @end multitable
10302 @include gpl_en.texi
10304 @ifnotplaintext
10305 @ifnothtml
10306 @ifnotdocbook
10307 @c cincvdoc_node_number_324
10308 @node Index
10309 @unnumbered Index
10310 @printindex cp
10311 @end ifnotdocbook
10312 @end ifnothtml
10313 @end ifnotplaintext
10315 @bye