r1028: Documentation for RGB-601 effect.
[cinelerra_cv/ct.git] / doc / cinelerra_cv_manual_en.texi
blob9f34d0f0d189ed78ed00e435145d1d32b08a6bdb
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 @image{manual_images_en/rgb601,12.5mm}
5894 For analog video or MPEG (including DVD) output, the maximum range for
5895 R,G,B is [16, 235] (8-bit). For YUV, the maximum range for intensity
5896 (Y) is [16, 235] (8-bit). This range corresponds to gray levels from
5897 6% to 92%. When rendering, values outside of these ranges will be
5898 clipped to these limits.
5900 To render to MPEG, add the RGB-601 effect to all video tracks where
5901 material uses the full intensity scale (0-100%), and enable @b{RGB ->
5902 601 compression}. Consider adding the Videoscope effect after RGB-601
5903 to see how RGB-601 affects your dynamic range. @xref{Videoscope}.
5905 (To preview how your rendered MPEG would look @i{without} RGB-to-601
5906 compression, instead enable @b{601 -> RGB expansion} -- you will
5907 observe a noticable contrast increase.)
5909 Although RGB-601 will reduce contrast in your video tracks, the
5910 contrast will be restored during MPEG playback.
5912 @c cincvdoc_node_number_207
5913 @node Radial blur
5914 @subsection Radial blur
5915 @cindex Radial blur
5917 @image{manual_images_en/radialblur,12.5mm}
5919 It creates a whirlpool blur that simulates a swirling camera.  You can vary the
5920 location, type, and quality of the blur.
5922 @c cincvdoc_node_number_208
5923 @node ReframeRT
5924 @subsection ReframeRT
5925 @cindex ReframeRT video effect
5927 @image{manual_images_en/reframert,12.5mm}
5929 ReframeRT changes number of frames in a sequence of video directly from the
5930 timeline.  It has 2 modes, selected by the 2 toggles in the GUI@.
5932 @b{Stretch} mode multiplies the current frame number of its output by the scale
5933 factor to arrive at the frame to read from its input.  If its current output
5934 frame is #55 and the scale factor is 2, frame #110 is read from its input.  The
5935 stretch mode has the effect of changing the length of output video by the
5936 inverse of the scale factor.  If the scale factor is greater than 1, the output
5937 will end before the end of the sequence on the timeline.  If it is less than 1,
5938 the output will end after the end of the sequence on the timeline.  The
5939 ReframeRT effect must be lengthened to the necessary length to accommodate the
5940 scale factor.  Change the length of the effect by clicking on the endpoint of
5941 the effect and dragging.
5943 Although stretch mode changes the number of the frame read from its input, it
5944 does not change the frame rate of the input.  Effects before ReframeRT assume
5945 the same frame rate as ReframeRT@.
5947 @cindex Fast play effect
5948 The ReframeRT in stretch mode can be use to create a @b{fast play effect}.
5949 Select Stretch mode and enter a value greater than 1 to get accelerated
5950 playback.
5952 @cindex Slow motion effect
5953 For @b{slow motion effect}, use a ReframeRT effect in stretch mode with a value
5954 less than 1.  @b{Example}: you have a clip that you want to put in slow motion.
5955 The clip starts at 33.792 seconds and ends at 39.765.  The clip is 5.973
5956 seconds long.  You want to play it at 4/10ths normal speed.  You divide the
5957 clip length by the playback speed (5.973/.4) to get a final clip length of
5958 14.9325 seconds.  You create an in point at the start of your clip: 33.792
5959 seconds.  You put an out point 14.9325 seconds later, at 48.7245 seconds
5960 (33.792 + 14.9325).  You attach a ReframeRT effect, set it to .4 and stretch.
5961 You change the out point at 48.7245 to an in point.  You start your next clip
5962 after the slow motion effect at the 48.7245 out point.
5964 You can also change the frame rate of the clip if you right click on it in the
5965 @b{media viewer} and go to @b{Info}.  If you do not hit the drop down first, you
5966 can type in a desired frame rate as well.  Cinelerra will pick the right frames
5967 out for the project frame rate, effectively doing the time-lapsing as well
5969 @b{Downsample} mode does not change the length of the output sequence.  It
5970 multiplies the frame rate of the output by the scale factor to arrive at a
5971 frame rate to read the input.  This has the effect of replicating the input
5972 frames so that they only change at the scaled frame rate when sent to the
5973 output.  It does not change the length of the sequence.  If the scale factor is
5974 0.5 and the output frame rate is 30 fps, only 15 frames will be shown per
5975 second and the input will be read at 15 fps.  Downsample is only useful for
5976 scalefactors below 1, hence the name downsample.
5978 Downsample mode changes the frame rate of the input as well as the number of
5979 the frame to read, so effects before ReframeRT see the frame rate * the scale
5980 factor as their frame rate.  If the scale factor is 2 and the output frame rate
5981 is 30, the input frame rate will be 60 and the input frame number will by
5982 doubled.  This will not normally do anything but some input effects may behave
5983 differently at the higher frame rate.
5985 @c cincvdoc_node_number_209
5986 @node Reverse video
5987 @subsection Reverse video
5988 @cindex Reverse video effect
5990 @image{manual_images_en/reversevideo,12.5mm}
5992 Media can be reversed on the timeline in realtime.  This is not to be confused
5993 with using the reverse playback on the transport.  The reverse effects reverse
5994 the region covered by the effect regardless of the transport direction.
5996 The region to be reversed is first determined by what part of the track the
5997 effect is under and second by the locations of keyframes in the effect.  The
5998 reverse effects have an @b{enabled} option which allows you to set keyframes.
5999 This allows may possibilities.
6001 Every @b{enabled} keyframe is treated as the start of a new reversed region and
6002 the end of a previous reversed region.  Several @b{enabled} keyframes in
6003 succession yield several regions reversed independent of each other.  An
6004 @b{enabled} keyframe followed by a @b{disabled} keyframe yields one reversed
6005 region followed by a forward region.
6007 @c cincvdoc_node_number_210
6008 @node Rotate
6009 @subsection Rotate
6010 @cindex Rotate
6012 @image{manual_images_en/rotate,13.25mm}
6014 The Rotate filter can rotate the video in 90 degree increments, reverse and
6015 flip the video.
6017 @c cincvdoc_node_number_211
6018 @node SVG via Inkscape
6019 @subsection SVG via Inkscape
6020 @cindex SVG via Inkscape
6022 @image{manual_images_en/svg,12.5mm}
6024 FIXME
6026 @c cincvdoc_node_number_212
6027 @node Scale
6028 @subsection Scale
6029 @cindex Scale
6031 @image{manual_images_en/scale,12.5mm}
6033 FIXME
6035 @c cincvdoc_node_number_213
6036 @node Selective temporal averaging
6037 @subsection Selective temporal averaging
6038 @cindex Selective temporal averaging
6040 @image{manual_images_en/timeavg,12.5mm}
6042 This plugin is designed to smooth out non-moving areas of a video clip.  The
6043 smoothing is performed by averaging the color component for each pixel across a
6044 number of frames.  The smoothed value is used if both the standard deviation
6045 and the difference between the current component value and the average
6046 component value are below a threshold.
6048 The average and standard deviation are calculated for each of the components
6049 of the video.  The type of components averaged is determined by the color model
6050 of the entire project.  The average and standard deviation of the frames can be
6051 examined by selecting the specific radio button in the plugin options window.
6053 The region over which the frames are averaged is determined by either a fixed
6054 offset or a restart marker system.  In a restart marker system, certain
6055 keyframes are marked as beginning of sections.  Then for each section, the
6056 frames surrounding the current frame are used as the frames to average over,
6057 except when approaching the beginning and end of a section, whereby the
6058 averaging is performed over the @i{N} beginning or ending frames respectively.
6060 @b{Common usage:}
6062 If you have to select the number of frames you wish to average.
6064 @enumerate 1
6065 @item Enter a reasonable number of frames to average (e.g. 10).
6066 @item Select the @b{Selective Temporal Averaging} method and enter 1 and 10 for
6067 all the @b{Av. Thres.} and @b{S.D. Thres.} respectively.  This basically causes
6068 all pixels to use the average value.
6069 @item Turn the mask for a the first component on.  This should make the whole
6070 frame have a solid color of that specific component.
6071 @item Slowly reduce the @b{S.D. Thres.} value.  As you do so, you will notice
6072 that the regions vastly different from the average will have a flipped mask
6073 state.  Continue to reduce the threshold until you reach the point at which
6074 non-moving regions of the video have a flipped masked state.  This value is
6075 known as the @b{noise-floor} and is the level of natural noise generated by the
6076 CCD in the camera.
6077 @item Repeat the same procedure for the @b{Av. Thres.}
6078 @item Turn off the mask
6079 @item Repeat this for all channels
6080 @end enumerate
6082 @c cincvdoc_node_number_214
6083 @node Sharpen
6084 @subsection Sharpen
6085 @cindex Sharpen
6087 @image{manual_images_en/sharpen,12.5mm}
6089 FIXME
6091 @c cincvdoc_node_number_215
6092 @node ShiftInterlace
6093 @subsection ShiftInterlace
6094 @cindex ShiftInterlace
6096 @image{manual_images_en/shiftinterlace,12.5mm}
6098 FIXME
6100 @c cincvdoc_node_number_216
6101 @node Swap channels
6102 @subsection Swap channels
6103 @cindex Swap channels
6105 @image{manual_images_en/swapchannels,12.5mm}
6107 FIXME
6109 @c cincvdoc_node_number_217
6110 @node Threshold
6111 @subsection Threshold
6112 @cindex Threshold video effect
6113 @cindex Luminance
6115 @image{manual_images_en/threshold,12.5mm}
6117 Threshold converts the image to pure luminance.  Then luminance values below
6118 and above the threshold range are converted to black and luminance values
6119 inside the threshold range are converted to white.  The threshold window shows
6120 a histogram of luminance values for the current frame.  Click dragging inside
6121 the histogram creates a range to convert to white.  @b{SHIFT-clicking} extends
6122 one border of this range.  Values for the threshold range can also be specified
6123 in the text boxes.
6125 This effect is basically a primitive luminance key.  A second track above the
6126 track with the threshold effect can be multiplied, resulting in only the parts
6127 of the second track within the threshold being displayed.
6129 @c cincvdoc_node_number_218
6130 @node Time average
6131 @subsection Time average
6132 @cindex Time average video effect
6134 @image{manual_images_en/timeavg,12.5mm}
6136 Time average is one effect which has many uses besides creating nifty trail
6137 patterns of moving objects.  It is main use is reducing noise in still images.
6138 Merely point a video camera at a stationary subject for 30 frames, capture the
6139 frames, and average them using @b{time average} and you will have a super high
6140 quality print.  In floating point colormodels, time average can increase the
6141 dynamic range of lousy cameras.
6143 Inside the time average effect is an accumulation buffer and a divisor.  A
6144 number of frames are accumulated in the accumulation buffer and divided by the
6145 divisor to get the average.
6147 Because the time average can consume enormous amounts of memory, it is best
6148 applied by first disabling playback for the track, dropping the time average in
6149 it, configuring time average for the desired number of frames, and re-enabling
6150 playback for the track.
6152 @itemize @bullet
6153 @item @b{Frames to average} @*
6154 This determines the number of frames to be accumulated in the accumulation
6155 buffer.  For extremely large integrations it is easier to edit the EDL in a
6156 text editor and put in the number of frames.
6158 @item @b{Accumulate} @*
6159 This outputs the accumulation buffer without dividing it.
6161 @item @b{Average} @*
6162 This causes the accumulation buffer to be divided before being output.
6163 This results in the average of all the frames.
6165 @item @b{Inclusive Or} @*
6166 This causes the accumulation buffer to be replaced by any pixels which
6167 are not transparent.  In combination with motion tracking it allows entire
6168 sequences to be combined to form panoramas.
6170 @item @b{Reprocess frame again} @*
6171 If an effect before the time average is adjusted the time average normally
6172 does not reread the accumulation buffer to get the change.  This forces it to
6173 reread the accumulation buffer when other effects change.
6175 @item @b{Disable subtraction} @*
6176 In order to represent the accumulation of only the specified number of
6177 frames, the time average retains all the previous frames in memory and
6178 subtracts them out as it plays forward.  It would run out of memory if it had
6179 to accumulate thousands of frames.  By disabling subtraction the previous
6180 frames are not stored in memory and only the average function is affected by
6181 the frame count.
6182 @end itemize
6184 @c cincvdoc_node_number_219
6185 @node TimeFront
6186 @subsection TimeFront
6187 @cindex TimeFront
6189 @image{manual_images_en/timefront,12.5mm}
6191 This is a warping framework plugin based on this article: @*
6192 @uref{http://www.vision.huji.ac.il/videowarping/HUJI-CSE-LTR-2005-10_etf-tr.pdf}
6194 @c cincvdoc_node_number_220
6195 @node Title
6196 @subsection Title
6197 @cindex Title
6198 @cindex Gimp
6200 @image{manual_images_en/titler,12.5mm}
6202 While it is possible to add text to movies by importing still images from The
6203 Gimp and compositing them, the Titler allows you to add text from within
6204 Cinelerra.
6206 The titler has standard options for @b{font, size, and style}.  The best font
6207 is a generic, normal font like Arial in a large size.
6209 The titler also has options you will only find in moving pictures.  The
6210 @b{Justify} operation justifies the text relative to the entire frame.  Once
6211 justified, the @b{X and Y} offset is applied.  This allows text to be justified
6212 while at the same time letting you push it within the title safe region.
6214 The @b{motion type} scrolls the text in any of the four directions.  When using
6215 this, the text may disappear.  Move the insertion point along the timeline
6216 until the text is far enough along the animation to reappear.  The text scrolls
6217 on and scrolls off.
6219 Setting @b{loop} causes the text to scroll completely off and repeat.  Without
6220 @b{loop} the text scrolls off and never reappears.
6222 The speed of the animation is determined by @b{speed}.  Set it higher to speed
6223 up the animation.
6225 @b{Drop shadow} draws a black copy of the text to the bottom right of the
6226 original text.  This is useful when drawing text over changing video to keep
6227 the border always visible.
6229 In addition to the scrolling, @b{Fade in/Fade out} are a second type of
6230 animation.  If the fade seconds are 0, no fading is done.
6232 @b{Color} picks the color to draw the text in.  Usually white is the only
6233 practical color.
6235 @b{Stamp timecode} replaces the text with the current position on the timeline
6236 in seconds and frames.
6238 @menu
6239 * Adding fonts to the titler:: How to add fonts to the titler
6240 * The title-safe region::      How to keep text visible on output
6241 @end menu
6243 @c cincvdoc_node_number_221
6244 @node Adding fonts to the titler
6245 @subsubsection Adding fonts to the titler
6247 @cindex Fonts, adding to the titler
6248 @cindex TTF fonts
6249 The X Window system originally did not have a suitable font renderer for video.
6250 It also is restricted to the current bit depth.  It does not have a convenient
6251 way to know which fonts work with the suitable font renderer in the desired bit
6252 depth.  The easiest way we have found to support fonts in the titler is to have a
6253 directory for them at @file{/usr/lib/cinelerra/fonts}.
6255 The titler supports mainly @b{TTF}, true type fonts.  It supports others but
6256 TTF are the most reliable.  To add true type fonts, copy the @file{.TTF} files
6257 to the @file{/usr/lib/cinelerra/fonts} directory.  In that directory run
6258 @command{ttmkfdir && mv fonts.scale fonts.dir} and restart Cinelerra.  The new
6259 fonts should appear.  The usage of ttmkfdir changes frequently so this
6260 technique might not work.
6262 @c cincvdoc_node_number_222
6263 @node The title-safe region
6264 @subsubsection The title-safe region
6265 @cindex Title-safe region
6266 @cindex TV display
6268 If the video is displayed on a consumer TV, the outer border is going to be
6269 cropped by 5% on each side.  Moreover, text which is too close to the edge
6270 looks sloppy.  Make sure when adding titles to have the @b{title-safe}
6271 @image{manual_images_en/titlesafe} tool active in the @b{compositor} window.  The text
6272 should not cross the inner rectangle.
6274 @c cincvdoc_node_number_223
6275 @node Translate
6276 @subsection Translate
6277 @cindex Translate
6279 @image{manual_images_en/translate,12.5mm}
6281 FIXME
6283 @c cincvdoc_node_number_224
6284 @node Unsharp
6285 @subsection Unsharp
6286 @cindex Unsharp
6288 @image{manual_images_en/unsharp,12.5mm}
6290 This effect unsharps the video.  Its parameters are:
6291 @itemize @bullet
6292 @item @b{Amount} @*
6293 Moving the slider to the right makes dark areas get darker and light areas
6294 get lighter.
6296 @item @b{Radius} @*
6297 This slider controls how much blurring is used in the edge-finding stage.
6298 The practical effect of this is to specify how large a region is darkened or
6299 lightened.
6301 @item @b{Threshold} @*
6302 This slider permits to control how big is a difference between a pixel in
6303 the blurred copy and the original copy is needed before any darkening or
6304 lightening will be applied.
6305 @end itemize
6307 @c cincvdoc_node_number_225
6308 @node Videoscope
6309 @subsection Videoscope
6310 @cindex Videoscope
6312 @menu
6313 * The Waveform Scope::
6314 * The Vectorscope::
6315 @end menu
6317 @image{manual_images_en/videoscope,12.5mm}
6319 The Videoscope summarizes intensity and color on a calibrated display.
6320 The Videoscope can be used in conjunction with other Cinelerra plugins
6321 such as YUV, HUE, Brightness, Color Balance or Histogram to accurately
6322 correct video for contrast, clarity, conformance (to normalize various
6323 videos shot under different light settings), or for cinematic
6324 purposes. The human eye is not specialized to match precise level of
6325 light and color, but Videoscope is.
6327 Some thought is being given to having a video scope for recording.
6328 Unfortunately, this would require a lot of variations of the video scope for
6329 all the different video drivers.
6331 The Videoscope contains two displays: the @b{Waveform Scope} and the
6332 @b{Vectorscope}.
6334 @c cincvdoc_node_number_226
6335 @node The Waveform Scope
6336 @subsubsection The Waveform Scope
6337 @cindex Waveform Scope
6339 The Waveform Scope displays image intensity (luminance) versus image X
6340 position. The Waveform Scope appears on the left side of the
6341 Videoscope window.
6343 The display is calibrated vertically from 0% intensity (black) at the
6344 bottom up to 100% intensity at the top. Each column of pixels in the
6345 image corresponds to one column of pixels in the Waveform Scope.
6347 @center @image{manual_images_en/videoscope_waveform_bars,64mm}
6349 The color bar test image is plotted in the waveform display as a stair
6350 step set of lines. In this example, the waveform display and the test
6351 image are aligned to show that each stair step corresponds with one
6352 color bar.
6354 The waveform display shows the white bar at the 75% level because the
6355 colors in the test image are 75% values. The white bar has the highest
6356 luminance because it contains all color components. In more complex
6357 images, multiple levels in the same column are represented with
6358 multiple pixels on the scope.
6360 The Waveform scope helps correct image light levels for contrast range or for
6361 conforming light levels on various scenes originally shot on different light
6362 settings.
6364 Adjusting light levels (adjusting luminance):
6365 @enumerate 1
6366 @item Insert the Brightness/Contrast, YUV, or another video adjustment effect
6367 on your track.
6368 @item Insert the Videoscope effect on the track below. Make sure that it is
6369 placed below so it can see the adjustment effect's results. If it is not,
6370 right-click and move it down.
6371 @item Show both the effect and Videoscope.
6372 @item Adjust the effect while observing the waveform to match the desired
6373 light level.
6374 @end enumerate
6376 If you are looking for maximum contrast range, adjust the
6377 Brightness/Contrast levels to align the darkest point on the scope
6378 with the 0% level and the brightest portion with 100%. Anything above
6379 100% is over saturated. Limits which may be highlighted with checkbox
6380 controls:
6382 @itemize @bullet
6384 @item @b{HDTV or sRGB (ITU-R BT.709)} @*
6385 The maximum pixel range for HDTV or sRGB is [0, 255]. This range
6386 corresponds with levels 0% and 100%.
6388 @item @b{MPEG or analog video (ITU-R BT.601)} @*
6389 For analog video or MPEG (including DVD), the maximum range for RGB is
6390 [16, 235] (8-bit). For YUV, the maximum range for intensity (Y) is
6391 [16, 235] (8-bit). This range corresponds to gray levels from 6% to
6392 92%. @xref{RGB-601}.
6394 @item @b{NTSC television broadcast} @*
6395 If you are producing a video for NTSC television broadcast, keep the
6396 intensity between 7.5% and 100%. The minimum black value which can be
6397 broadcast is IRE 7.5% (indicated by the ``7.5'' level), and values
6398 below this level are no darker.
6400 @end itemize
6402 @c cincvdoc_node_number_227
6403 @node The Vectorscope
6404 @subsubsection The Vectorscope
6405 @cindex Vectorscope
6407 The Vectorscope displays color and color saturation. Each pixel in the
6408 source image is drawn as a point on the color wheel. The distance from
6409 the center is the color saturation. Gray values are close to the
6410 center, and high saturation values are near the perimeter.
6412 The Vectorscope is used with other plugins to correct color, adjust image
6413 tint, and apply other effects for cinematic effects, image correction, or to
6414 conform images to look the same.
6416 @center @image{manual_images_en/videoscope_vectorscope_color_correct,169mm}
6418 In this example, the top image is white balanced. Vectorscope shows
6419 many pixels in the yellow region and few in the white region. To
6420 remove the yellow tint, the Color Balance effect is used to first
6421 shift the vectorscope plot towards magenta (Mg), and then towards
6422 blue (B) until the region previously near the center surrounds the
6423 center. In the bottom image, yellow highlights have become white
6424 highlights (arrows). Note that the corresponding features in waveform
6425 also appear whiter (arrows).
6427 The Vectorscope can also be used to verify that the video output will
6428 display properly on various monitors.  Any points along the inner radius will
6429 be displayed as pure white and any points above the 100% radius, will probably
6430 not be correctly displayed on the screen.
6432 @c cincvdoc_node_number_228
6433 @node Wave
6434 @subsection Wave
6435 @cindex Wave
6437 @image{manual_images_en/wave,12.5mm}
6439 The wave effect adds waves on the image.
6441 @center @image{manual_images_en/effect_wave_before_after,120mm}
6443 You can adjust the following parameters:
6445 @center @image{manual_images_en/effect_wave_window,60mm}
6447 @c cincvdoc_node_number_229
6448 @node Whirl
6449 @subsection Whirl
6450 @cindex Whirl
6452 @image{manual_images_en/whirl,12.5mm}
6454 FIXME
6456 @c cincvdoc_node_number_230
6457 @node YUV
6458 @subsection YUV
6459 @cindex YUV
6461 @image{manual_images_en/yuv,12.5mm}
6463 FIXME
6465 @c cincvdoc_node_number_231
6466 @node Zoom blur
6467 @subsection Zoom blur
6468 @cindex Zoom blur
6470 @image{manual_images_en/zoomblur,12.5mm}
6472 FIXME
6474 @c cincvdoc_node_number_232
6475 @node Rendered effects
6476 @chapter Rendered effects
6477 @cindex Rendered effects
6478 @cindex Effects, rendered
6479 Another type of effect is performed on a section of the track and the result
6480 stored somewhere before it is played back.  The result is usually pasted into
6481 the track to replace the original data.
6483 The rendered effects are not listed in the resource window but instead are
6484 accessed through the @b{Audio->Render effect} and @b{Video->Render effect} menu
6485 options.  Each of these menu options brings up a dialog for the rendered
6486 effect.  Rendered effects apply to only one type of track, either audio or
6487 video.  If no tracks of the type exist, an error pops up.
6489 A region of the timeline to apply the effect to must be defined before
6490 selecting @b{Render effect...}.  If no in/out points and no highlighted region
6491 exist, the entire region after the insertion point is treated as the affected
6492 region.  Otherwise, the region between the in/out points or the highlighted
6493 region is the affected region.
6495 Secondly, the tracks to apply the rendered affect to need to be @b{armed}.  All
6496 other tracks are ignored.
6498 Finally, the rendered affect processes certain track attributes when it reads
6499 its input data but not others.  Transitions in the affected track are applied.
6500 Nudge is not and effects are not.  This allows the new data to be pasted into
6501 the existing position without changing the nudge value.
6503 In the render effect dialog is a list of all the realtime and all the rendered
6504 effects.  The difference here is that the realtime effects are rendered to disk
6505 and not applied under the track.  Highlight an effect in the list to designate
6506 it as the one being performed.
6508 Define a file to render the effect to in the @b{Select a file to render to}
6509 box.  The @image{manual_images_en/magnify,7mm} magnifying glass allows file selection
6510 from a list.
6512 Select a file format which can handle the track type.  The
6513 @image{manual_images_en/wrench,4.33mm} wrench allows configuration specific to the
6514 file format.
6516 There is also an option for creating a new file at each label.  If you have a
6517 CD rip on the timeline which you want to divide into different files, the
6518 labels would become dividing points between the files if this option were
6519 selected.  When the timeline is divided by labels, the effect is re-initialized
6520 at every label.  Normalize operations take the peak in the current file and not
6521 in the entire timeline.
6523 Finally there is an insertion strategy just like in the render dialog.  It
6524 should be noted that even though the effect applies only to audio or video, the
6525 insertion strategy applies to all tracks just like a clipboard operation.
6527 When you click @b{OK} in the effect dialog, it calls the GUI of the effect.  If
6528 the effect is also a realtime effect, a second GUI appears to prompt for
6529 acceptance or rejection of the current settings.  After accepting the settings,
6530 the effect is processed.
6532 @menu
6533 * Rendered audio effects::     Rendered audio effects
6534 * Rendered video effects::     Rendered video effects
6535 @end menu
6537 @c cincvdoc_node_number_233
6538 @node Rendered audio effects
6539 @section Rendered audio effects
6540 @cindex Rendered audio effects
6542 @menu
6543 * Resample::        How to reduce the dynamic range of audio.
6544 @end menu
6546 @c cincvdoc_node_number_234
6547 @node Resample
6548 @subsection Resample
6549 @cindex Resample effect
6551 This multiplies the number of each output sample by a scale factor to arrive at
6552 the number of the input sample.  The output file's sample rate is set to the
6553 project sample rate but its length is changed to reflect the scaled number of
6554 samples.  It also filters the resampled audio to remove aliasing.
6556 If the scale factor is 2, every 2 input samples will be reduced to 1 output
6557 sample and the output file will have half as many samples as the input
6558 sequence.  If it is 0.5, every 0.5 input samples will be stretched to 1 output
6559 sample and the output file will have twice as many samples as the input
6560 sequence.
6562 @c cincvdoc_node_number_235
6563 @node Rendered video effects
6564 @section Rendered video effects
6565 @cindex Rendered video effects
6567 @menu
6568 * Reframe::        Reframe
6569 @end menu
6571 @c cincvdoc_node_number_236
6572 @node Reframe
6573 @subsection Reframe
6574 @cindex Reframe video effect
6576 This does exactly the same thing as @b{ReframeRT} in @b{Stretch} mode.  It
6577 multiplies the output frame number by the scale factor to arrive at the input
6578 frame number and changes the length of the sequence.  Unlike ReframeRT, this
6579 must run from the @b{Video} menu and render its output.
6581 Be aware @b{Reframe} does not write the scaled frame rate as the frame rate of
6582 the rendered file.  It produces a file of scaled length and equal frame rate as
6583 the project.  The new length is 1/scale factor as big as the original sequence.
6585 @b{To create a slow-motion of fast moving video:}
6586 @enumerate 1
6587 @item Select the video clip you wish to re-frame and put it on a
6588 video track
6589 @item Select the area you wish to reframe
6590 @item From the Video menu, select the Render Effect option
6591 @item From the effect list, select Reframe
6592 @item Enter the output format and insertion strategy for the new
6593 clip to be created
6594 @item Press ok
6595 @item At the popup menu, enter the scale factor 2 to run twice as
6596 fast, and .5 to run at half speed
6597 @end enumerate
6599 @c cincvdoc_node_number_237
6600 @node Ladspa effects
6601 @chapter Ladspa effects
6602 @cindex Ladspa effects
6604 LADSPA effects are supported in realtime and rendered mode for audio.  The
6605 LADSPA plugins you get from the internet vary in quality.  Most can not be
6606 tweeked in realtime very easily and work better when rendered.  Some crash and
6607 some can only be applied to one track due to a lack of re-entrancy.  Although
6608 Cinelerra implements the LADSPA interface as accurately as possible, multiple
6609 tracks of realtime, simultaneous processing go beyond the majority of LADSPA
6610 users.  LADSPA effects appear in the audio folder as the hammer and
6611 screwdriver, to signify that they are Plugins for GNU/Linux Audio Developers.
6613 LADSPA Effects are enabled merely by setting the @env{LADSPA_PATH} environment
6614 variable to the location of your LADSPA plugins or putting them in the
6615 @file{/usr/lib/cinelerra} directory.
6617 If you use Debian, you can get a lot of plugins using apt: @*
6618 @command{apt-cache search ladspa} @*
6619 @command{apt-get install jack-rack cmt blop swh-plugins}
6621 @c cincvdoc_node_number_238
6622 @node Transitions
6623 @chapter Transitions
6624 @cindex Transitions
6626 @menu
6627 * Using transitions::
6628 * Dissolve video transition::
6629 @end menu
6631 @c cincvdoc_node_number_239
6632 @node Using transitions
6633 @section Using transitions
6634 @cindex Using transitions
6636 When one edit ends and another edit begins, the default behavior is to have
6637 the first edit's output immediately become the output of the second edit when
6638 played back.  Transitions are a way for the first edit is output to become the
6639 second edit is output with different variations.
6641 Cinelerra supports audio and video transitions, all of which are listed in the
6642 resource window.
6644 @center @image{manual_images_en/resources_video_transitions,70mm}
6645 @center @b{Video transitions in the resources window}
6647 Transitions may only apply to the matching track type.  Transitions under
6648 @b{audio transitions} can only apply to audio tracks.  Transitions under
6649 @b{video transitions} can only apply to video tracks.
6651 Load a video file and cut a section from the center so the edit point is
6652 visible on the timeline.  Go the resource window and click on the @b{Video
6653 transitions} folder.  Drag a transition from the transition list onto the
6654 second video edit on the timeline.  A box highlights over where the transition
6655 will appear.  Releasing it over the second edit applies the transition between
6656 the first and second edit.
6658 @center @image{manual_images_en/drop_transition}
6659 @center @b{Dragging a dissolve transition to the timeline}
6661 You can now scrub@footnote{Scrubbing refers to moving backwards and forwards in
6662 time across a video or audio clip.} over the transition with the transport
6663 controls and watch the output in the @b{Compositor window}.  Scrubbing with the
6664 insertion point does not normally show transitions because the transition
6665 durations are usually too short.
6667 @cindex Detach Transitions
6668 @cindex Edit Transitions
6669 Once the transition is in place, it can be edited similarly to an effect.  Move
6670 the pointer over the transition and right click to bring up the transition
6671 menu.  The @b{show} option brings up specific parameters for the transition in
6672 question if there are any.  The @b{length} option adjusts the length of the
6673 transition in seconds.  Once these two parameters are set, they are applied to
6674 future transitions until they are changed again.  Finally, the @b{detach}
6675 option removes the transition from the timeline.
6677 Dragging and dropping transitions from the Resource window to the Program
6678 window can be really slow and tiring.  Fortunately, once you drag a transition
6679 from the Resource window, the @b{U} and @b{u} keys will paste the same
6680 transition.  The @b{U} key pastes the last video transition and the @b{u} key
6681 pastes the last audio transition on all the recordable tracks.  If the
6682 insertion point or in point is over an edit, the beginning of the edit is
6683 covered by the transition.
6685 It should be noted that when playing transitions from the timeline to hardware
6686 accelerated video device, the hardware acceleration will usually be turned off
6687 momentarily during the transition and on after the transition in order to
6688 render the transition.  Using an un-accelerated video device for the entire
6689 timeline normally removes the disturbance.
6691 @b{Important:} The exact point in time when the transition takes effect is not
6692 straightforward.  It starts when the second edit begins and lasts a certain
6693 amount of time into the second edit.  Therefore, the first asset needs to have
6694 enough data after the edit point to fill the transition into the second edit.
6696 For example, the dissolve transition starts at the exact position where it is
6697 located on the timeline.  If you set a duration of 1 second for a dissolve
6698 transition, it @b{will not} start 0.5 second before the transition and continue
6699 0.5 second after that point.  In fact, it will start exactly where the
6700 transition is located on the timeline, and last for 1 second from that
6701 position.
6703 It is a common error to put a dissolve transition just after the last frame of
6704 an asset.  Let's imagine a dissolve transition is put between asset A and asset
6705 B, just after the last frame of asset A@.
6707 Since the dissolve effect starts exactly at the position where it is located,
6708 there is no more frames from asset A to display when the dissolve transition
6709 starts.  Therefore, there is no other choice for Cinelerra than freezing the
6710 last frame of asset A and dissolving it with asset B@.
6712 You have to make sure there is enough frames of asset A to be displayed when
6713 the dissolve transition starts.  The duration of those frames should be equal
6714 or greater than the length of the transition effect.
6716 @c cincvdoc_node_number_240
6717 @node Dissolve video transition
6718 @section Dissolve video transition
6719 @cindex Dissolve video transition
6721 @image{manual_images_en/video_disolve_icon}
6723 This is a soft dissolve transition between two video segments, which we call in
6724 and out segments.  The in segment turns increasingly transparent while the out
6725 segment materializes into its place.  The length of time for the full effect to
6726 take place can be controlled by the "Transition Length" control.
6728 @b{Available controls:} @*
6729 By right-clicking on the transition icon in the timeline, a menu will pop-up
6730 with the following controls
6731 @itemize @bullet
6732 @item @b{Show:} Pop up the transition specific menu (not available on this
6733 transition)
6734 @item @b{On:} Toggle on/off the transition effect
6735 @item @b{Transition length:} Set the span in seconds for the transition to
6736 complete
6737 @item @b{Detach:} Remove the transition from the timeline
6738 @end itemize
6740 @c cincvdoc_node_number_241
6741 @node Keyframes
6742 @chapter Keyframes
6743 @cindex Keyframes
6745 When you change the fade, camera, projector, or other parameters for a track,
6746 they stay by default the same for the entire duration of the timeline.  Setting
6747 static parameters is not very useful sometimes.  Normally you need to move the
6748 camera around over time or change mask positions.  Masks need to follow
6749 objects.  We create dynamic changes by defining keyframes.  A keyframe is a
6750 certain point in time when the settings for one operation change.  In
6751 Cinelerra, there are keyframes for almost every compositing parameter and
6752 effect parameter.
6754 @cindex Default keyframe
6755 @cindex Keyframe, default
6756 Whenever you adjust any parameter, the value is stored in a keyframe.  If the
6757 value is stored in a keyframe, why does not it always change?  The keyframe it
6758 is stored in by default is known as the @b{default keyframe}.  The default
6759 keyframe applies to the entire duration if no other keyframes are present.  The
6760 default keyframe is not drawn anywhere because it always exists.  The only way
6761 change occurs over time is if non-default keyframes are created.
6763 Display keyframes for any parameter by using the @b{view} menu.  A faster way
6764 to toggle multiple keyframe types is to bring up @b{window->overlays}.  This
6765 window allows toggling of every parameter in the view menu.  When keyframes are
6766 selected, they are drawn on the timeline over the tracks they apply to.
6768 Keyframes come in many forms: curves, toggles, modes, and so on.  How to handle
6769 the different types of keyframes is described here.
6771 @menu
6772 * Curve keyframes::
6773 * Toggle keyframes::
6774 * Automatic keyframes::
6775 * Compositor keyframes::
6776 * Editing keyframes::
6777 @end menu
6779 @c cincvdoc_node_number_242
6780 @node Curve keyframes
6781 @section Curve keyframes
6782 @cindex Curve keyframes
6783 @cindex Keyframes, curve
6785 Many parameters are stored in Bezier curves.  Go to @b{view->fade} or
6786 @b{view->...zoom} to show curves on the timeline for those parameters.  In
6787 either arrow editing mode or i-beam editing mode, move the cursor over the
6788 curves in the timeline until it changes shape.  Then merely by clicking and
6789 dragging on the curve you can create a keyframe at the position.
6791 After the keyframe is created, click drag on it again to reposition it.  When
6792 you click-drag a second keyframe on the curve, it creates a smooth ramp.
6793 @b{CTRL-dragging} on a keyframe changes the value of either the input control
6794 or the output control.  This affects the sharpness of the curve.  While the
6795 input control and the output control can be moved horizontally as well as
6796 vertically, the horizontal movement is purely for legibility and is not used in
6797 the curve value.
6799 You may remember that The Gimp and the Compositing masks all use @key{SHIFT} to
6800 select control points so why does the timeline use @key{CTRL}?  When you
6801 @b{SHIFT-drag} on a timeline curve, the keyframe snaps to the value of either
6802 the next or previous keyframe, depending on which exists.  This lets you set a
6803 constant curve value without having to copy the next or previous keyframe.
6805 @menu
6806 * Navigating curve keyframes::
6807 @end menu
6809 @c cincvdoc_node_number_243
6810 @node Navigating curve keyframes
6811 @subsection Navigating curve keyframes
6812 @cindex Navigating curve keyframes
6814 There is not much room on the timeline for a wide range of curve values.  You
6815 need to zoom the curves in and out vertically to have any variability.  This is
6816 done by 2 tools: the automation fit button and automation zoom menu
6817 @image{manual_images_en/autozoom}.
6819 The automation fit button scales and offsets the vertical range so the selected
6820 curve area appears in the timeline.  If a region of the timeline is highlighted
6821 by the cursor, only that region is scaled.  In/out points do not affect the
6822 zoomed region.  @kbd{ALT-f} also performs automation fitting.
6824 The automation zoom menu manually changes the vertical scaling of the curves in
6825 multiples of 2.  Click on its tumbler to change the zoom.  @kbd{ALT-UP} and
6826 @kbd{ALT-DOWN} change the automation zoom from the keyboard.
6828 @c cincvdoc_node_number_244
6829 @node Toggle keyframes
6830 @section Toggle keyframes
6831 @cindex Toggle keyframes
6832 @cindex Keyframes, toggle
6834 Mute is the only toggle keyframe.  Mute keyframes determine where the track is
6835 processed but not rendered to the output.  Click-drag on these curves to create
6836 a keyframe.  Unlike curves, the toggle keyframe has only two values: on or off.
6837 @key{CTRL} and @key{SHIFT} do nothing on toggle keyframes.
6839 @c cincvdoc_node_number_245
6840 @node Automatic keyframes
6841 @section Automatic keyframes
6842 @cindex Automatic keyframes
6843 @cindex Keyframes, automatic
6845 You may have noticed when a few fade curves are set up, moving the insertion
6846 point around the curves causes the faders to reflect the curve value under the
6847 insertion point.  This is not just to look cool.  The faders themselves can set
6848 keyframes in automatic keyframe mode.  Automatic keyframe mode is usually more
6849 useful than dragging curves.
6851 Enable automatic keyframe mode by enabling the automatic keyframe toggle
6852 @image{manual_images_en/autokeyframe}.  In automatic keyframe mode, every time you tweek
6853 a key-framable parameter it creates a keyframe on the timeline.  Since
6854 automatic keyframes affect many parameters, it is best enabled just before you
6855 need a keyframe and disabled immediately thereafter.
6857 It is useful to go into the @b{View} menu and make the desired parameter
6858 visible before performing a change.  The location where the automatic keyframe
6859 is generated is under the insertion point.  If the timeline is playing back
6860 during a tweek, several automatic keyframes will be generated as you change the
6861 parameter.
6863 When automatic keyframe mode is disabled, a similarly strange thing happens.
6864 Adjusting a parameter adjusts the keyframe immediately preceding the insertion
6865 point.  If two fade keyframes exist and the insertion point is between them,
6866 changing the fader changes the first keyframe.
6868 There are many parameters which can only be keyframed in automatic keyframe
6869 mode.  These are parameters for which curves would take up too much space on
6870 the track or which can not be represented easily by a curve.
6872 Effects are only key-framable in automatic mode because of the number of
6873 parameters in each individual effect.
6875 Camera and projector translation can only be keyframed in automatic keyframe
6876 mode while camera and projector zoom can be keyframed with curves.  It is here
6877 that we conclude the discussion of compositing, since compositing is highly
6878 dependant on the ability to change over time.
6880 @c cincvdoc_node_number_246
6881 @node Compositor keyframes
6882 @section Compositor keyframes
6883 @cindex Compositor keyframes
6884 @cindex Keyframes, compositor
6886 Camera and projector translation is represented by two parameters: x and y.
6887 Therefore it is cumbersome to adjust with curves.  Cinelerra solves this
6888 problem by relying on automatic keyframes.  With a video track loaded, move the
6889 insertion point to the beginning of the track and enable automatic keyframe
6890 mode.
6892 Move the projector slightly in the compositor window to create a keyframe.
6893 Then go forward several seconds.  Move the projector a long distance to create
6894 another keyframe and emphasize motion.  This creates a second projector box in
6895 the compositor, with a line joining the two boxes.  The joining line is the
6896 motion path.  If you create more keyframes, more boxes are created.  Once all
6897 the desired keyframes are created, disable automatic keyframe mode.
6899 Now when scrubbing around with the compositor window's slider, the video
6900 projection moves over time.  At any point between two keyframes, the motion
6901 path is red for all time before the insertion point and green for all time
6902 after the insertion point.  It is debatable if this is a very useful feature
6903 but it makes you feel good to know what keyframe is going to be affected by the
6904 next projector tweek.
6906 Click-drag when automatic keyframes are off to adjust the preceding keyframe.
6907 If you are halfway between two keyframes, the first projector box is adjusted
6908 while the second one stays the same.  Furthermore, the video does not appear to
6909 move in step with the first keyframe.  This is because halfway between two
6910 keyframes the projector translation is interpolated.  In order to set the
6911 second keyframe you will need to scrub after the second keyframe.
6913 By default the motion path is a straight line, but it can be curved with
6914 control points.  @b{CTRL-drag} to set either the in or out control point of the
6915 preceding keyframe.  Once again, we depart from The Gimp because @key{SHIFT} is
6916 already used for zoom.  After the in or out control points are extrapolated
6917 from the keyframe, @b{CTRL-dragging} anywhere in the video adjusts the nearest
6918 control point.  A control point can be out of view entirely yet still
6919 controllable.
6921 When editing the camera translation, the behavior of the camera boxes is
6922 slightly different.  Camera automation is normally used for still photo
6923 panning.  The current camera box does not move during a drag, but if multiple
6924 keyframes are set, every camera box except the current keyframe appears to
6925 move.  This is because the camera display shows every other camera position
6926 relative to the current one.
6928 The situation becomes more intuitive if you bend the motion path between two
6929 keyframes and scrub between the two keyframes.  The division between red and
6930 green, the current position between the keyframes, is always centered while the
6931 camera boxes move.
6933 @c cincvdoc_node_number_247
6934 @node Editing keyframes
6935 @section Editing keyframes
6936 @cindex Editing keyframes
6937 @cindex Keyframes, editing
6939 @b{IMPORTANT:} when copying and pasting keyframes, make sure there is @b{no IN
6940 or OUT point defined on the timeline}.
6942 Keyframes can be shifted around and moved between tracks on the timeline using
6943 similar cut and paste operations to editing media.  Only the keyframes selected
6944 in the @b{view} menu are affected by keyframe editing operations, however.
6946 The most popular keyframe editing operation is replication of some curve from
6947 one track to the other, to make a stereo pair.  The first step is to solo the
6948 source track's record @image{manual_images_en/recordpatch_up} patch by
6949 @b{SHIFT-clicking} on it.  Then either set in/out points or highlight the
6950 desired region of keyframes.  Go to @b{keyframes->copy keyframes} to copy them
6951 to the clipboard.  Solo the destination track's record
6952 @image{manual_images_en/recordpatch_up} patch by @b{SHIFT-clicking} on it and go to
6953 @b{keyframes->paste keyframes} to paste the clipboard.
6955 The media editing commands are mapped to the keyframe editing commands by using
6956 the @key{SHIFT} key instead of just the keyboard shortcut.
6958 This leads to the most complicated part of keyframe editing, the default
6959 keyframe.  Remember that when no keyframes are set at all, there is still a
6960 default keyframe which stores a global parameter for the entire duration.  The
6961 default keyframe is not drawn because it always exists.  What if the default
6962 keyframe is a good value which you want to transpose between other non-default
6963 keyframes?  The @b{keyframes->copy default keyframe} and @b{keyframes->paste
6964 default keyframe} allow conversion of the default keyframe to a non-default
6965 keyframe.
6967 @b{Keyframes->copy default keyframe} copies the default keyframe to the
6968 clipboard, no matter what region of the timeline is selected.  The
6969 @b{keyframes->paste keyframes} function may then be used to paste the clipboard
6970 as a non-default keyframe.
6972 If you have copied a non-default keyframe, it can be stored as the default
6973 keyframe by calling @b{keyframes->paste default keyframe}.  After using paste
6974 default keyframe to convert a non-default keyframe into a default keyframe, you
6975 will not see the value of the default keyframe reflected until all the
6976 non-default keyframes are removed.
6978 Finally, there is a convenient way to delete keyframes besides selecting a
6979 region and calling @b{keyframes->clear keyframes}.  Merely click-drag a
6980 keyframe before its preceding keyframe or after its following keyframe on the
6981 track.
6983 @c cincvdoc_node_number_248
6984 @node Capturing media
6985 @chapter Capturing media
6986 @cindex Capturing media
6987 @cindex Media, capturing
6989 @menu
6990 * Capturing using Cinelerra::
6991 * Capturing using dvgrab::
6992 @end menu
6994 @c cincvdoc_node_number_249
6995 @node Capturing using Cinelerra
6996 @section Capturing using Cinelerra
6998 @menu
6999 * Cinelerra recording functions::
7000 * Batch recording::
7001 * Editing tuner information::
7002 @end menu
7004 @c cincvdoc_node_number_250
7005 @node Cinelerra recording functions
7006 @subsection Cinelerra recording functions
7007 @cindex Cinelerra recording functions
7009 Ideally, all media would be stored on hard drives, CD-ROM, flash, or DVD and
7010 loading it into Cinelerra would be a matter of loading a file.  In reality,
7011 very few sources of media can be accessed like a filesystem but instead rely on
7012 tape transport mechanisms and dumb I/O mechanisms to transfer the data to
7013 computers.  These media types are imported into Cinelerra through the Record
7014 dialog.
7016 The first step in recording is to configure the input device.  In
7017 @b{Settings->preferences} are a number of recording parameters described in
7018 configuration @xref{Recording}.  These parameters apply to recording no matter
7019 what the project settings are, because the recording parameters are usually the
7020 maximum capability of the recording hardware while project settings come and
7023 Go to @b{File->record} to record a dumb I/O source.  This prompts for an output
7024 format much like rendering does.  Once that is done, the record window and the
7025 record monitor pop up.
7027 The record window has discrete sections.  While many parameters change
7028 depending on if the file has audio or video, the discrete sections are always
7029 the same.
7031 @itemize @bullet
7032 @item The output format area describes the format of the output file and the
7033 current position within it.
7034 @item The edit batch area lets you change parameters in the current batch.
7035 @item The transport controls start and stop recording different ways.
7036 @item The batch list displays all the defined batches.
7037 @item The confirmation area lets you determine how the output files are
7038 imported into the timeline and quit.
7039 @end itemize
7041 @center @image{manual_images_en/recording,140mm}
7042 @center @b{Recording window areas}
7044 Recording in Cinelerra is organized around batches.  A batch essentially
7045 defines a distinct output file for the recording.  For now you can ignore the
7046 batch concept entirely and record merely by hitting the record button
7047 @image{manual_images_en/record}.
7049 The record button opens the current output file if it is not opened and writes
7050 captured data to it.  Use the stop button to stop the recording.  Recording can
7051 be resumed with the record button without erasing the file at this point.  In
7052 the case of a video file, there is a single frame record button
7053 @image{manual_images_en/singleframe} which records a single frame.
7055 When enough media is recorded, choose an insertion method from the @b{Insertion
7056 Strategy} menu and hit @b{close}.
7058 @c cincvdoc_node_number_251
7059 @node Batch recording
7060 @subsection Batch recording
7061 @cindex Batch recording
7063 Now we come to the concept of batches.  Batches try to make the dumb I/O look
7064 more like a filesystem.  Batches are traditionally used to divide tape into
7065 different programs and save the different programs as different files instead
7066 of recording straight through an entire tape.  Because of the high cost of
7067 developing frame-accurate deck control mechanisms, the only use of batches now
7068 is recording different programs during different times of day.  This is still
7069 useful for recording TV shows or time lapse movies as anyone who can not afford
7070 proper appliances knows.
7072 The record window supports a list of batches and two recording modes:
7073 interactive and batch recording.  Interactive recording happens when the record
7074 button is pressed.  Interactive recording starts immediately and uses the
7075 current batch to determine everything except start time.  By default, the
7076 current batch is configured to behave like tape.
7078 Batch recording happens when the @b{start} button is pressed.  In batch
7079 recording, the @b{start time} is the time the batch starts recording.
7081 First, you will want to create some batches.  Each batch has certain parameters
7082 and methods of adjustment.
7084 @itemize @bullet
7086 @item @b{On} @*
7087 Determines whether the batch is included in batch recording operations.  Click
7088 the list row under @b{On} to enable or disable batches.
7090 @item @b{Path} @*
7091 It is the file the batch is going to be recorded to.  The filename specified in
7092 the record dialog is the name of the first batch, to simplify interactive
7093 recording, but the filename may be changed in the record window for any batch
7094 in the @b{edit batch} area.
7096 @item @b{News} @*
7097 Shows whether the file exists or not.  This is a very important attribute since
7098 there is no confirmation dialog if the file exists.  The first time you hit
7099 record, the file is opened.  If the file exists at this point it is erased.
7100 News says @b{File exists} if it exists and @b{OK} if it does not.  Every time
7101 you resume recording in the same batch, the news should say @b{Open},
7102 indicating the file is already opened and will not be erased in the next record
7103 button press. @*
7104 If you change out of the current batch after recording, the file is closed.
7105 Next time you change into the batch, the file will be erased.
7107 @item @b{Start time} @*
7108 It is the 24 hour time of day the batch will start recording if in batch mode.
7109 The start time may become a time of tape and reel number if deck control is
7110 implemented but for now it is a time of day.
7112 @item @b{Duration} @*
7113 This is the length of the batch.  It only has meaning if the @b{Mode} of the
7114 batch is @b{Timed}.  Once the recording length reaches @b{duration} the
7115 recording stops, whether in interactive or batch mode.
7117 @item @b{Source} @*
7118 This has meaning only when the capturing hardware has multiple sources.
7119 Usually the source is a tuner channel or input.  When the current batch
7120 finishes and the next batch begins recording, the source is changed to what the
7121 next batch is set to.  This way multiple TV stations can be recorded at
7122 different times.
7123 @end itemize
7125 The record window has a notion of the @b{current batch}.  The current batch is
7126 not the same as the batch which is highlighted in the batch list.  The current
7127 batch text is colored red in the batch list.  The highlighted batch is merely
7128 displayed in the edit batch section for editing.
7130 By coloring the current batch red, any batch can be edited by highlighting it,
7131 without changing the batch to be recorded.
7133 All recording operations take place in the current batch.  If there are
7134 multiple batches, highlight the desired batch and hit @b{activate} to make it
7135 the current batch.  If the @b{start} button is pressed, the current batch
7136 flashes to indicate it is waiting for the start time in batch mode.  If the
7137 @b{record} button is pressed, the current batch is recorded immediately in
7138 interactive mode.
7140 In batch and interactive recording modes, when the current batch finishes
7141 recording the next batch is activated and performed.  All future recording is
7142 done in batch mode.  When the first batch finishes, the next batch flashes
7143 until its start time is reached.
7145 Interrupt either the batch or the interactive operation by hitting the stop
7146 button.
7148 Finally there is the @image{manual_images_en/rewind} rewind button.  In either
7149 interactive or batch recording, the rewind button causes the current batch to
7150 close its file.  The next recording operation in the current batch deletes the
7151 file.
7153 @c cincvdoc_node_number_252
7154 @node Editing tuner information
7155 @subsection Editing tuner information
7156 @cindex Editing tuner information
7157 @cindex Tuner, editing information
7159 Sometimes in the recording process and the configuration process, you will need
7160 to define and select tuner channels to either record or play back to.  In the
7161 case of the Video4Linux and Buz recording drivers, tuner channels define the
7162 source.  When the Buz driver is also used for playback, tuner channels define
7163 the destination.
7165 Defining tuner channels is accomplished by pushing the @image{manual_images_en/channel}
7166 channel button.  This brings up the channel editing window.  In this window you
7167 add, edit, and sort channels.  Also, for certain video drivers, you can adjust
7168 the picture quality.
7170 The @b{add} operation brings up a channel editing box.  The title of the
7171 channel appears in the channel list.  The source of the channel is the entry in
7172 the physical tuner's frequency table corresponding to the title.
7174 Fine tuning in the channel edit dialog adjusts the physical frequency slightly
7175 if the driver supports it.  The norm and frequency table together define which
7176 frequency table is selected for defining sources.  If the device supports
7177 multiple inputs, the input menu selects these.
7179 To sort channels, highlight the channel in the list and push @b{move up} or
7180 @b{move down} to move it.
7182 Once channels are defined, the @b{source} item in the record window can be used
7183 to select channels for recording.  The same channel selecting ability also
7184 exists in the record monitor window.  Be aware channel selections in the record
7185 monitor window and the record window are stored in the current batch.
7187 For some drivers an option to @b{swap fields} may be visible.  These drivers
7188 do not get the field order right every time without human intervention.  Toggle
7189 this to get the odd and even lines to record in the right order.
7191 @c cincvdoc_node_number_253
7192 @node Capturing using dvgrab
7193 @section Capturing using dvgrab
7194 @cindex Dvgrab, capturing using
7196 dvgrab is great and simple to use a command line tool to capture videos from a
7197 DV camcorder.  When invoked it will automatically put your camera in play
7198 mode, and start storing the videos on your hard disk.  Video files will be
7199 labeled sequentially, as: @file{001.avi}, @file{002.avi} and so on.
7201 To install dvgrab, use your distribution preferred installation mechanism (apt,
7202 rpm, deb, etc) or refer to the dvgrab webpage.
7204 Capturing videos in four easy steps:
7205 @enumerate 1
7206 @item Create a directory where you want the capture videos to be stored
7207 @item @command{cd} to that directory
7208 @item Type: @command{dvgrab --buffers 500} and @kbd{RETURN}
7209 @item Press @kbd{CTRL-C} to stop capturing video
7210 @end enumerate
7212 The @option{--autosplit} option is very useful. It splits scenes according to
7213 the timecode. However, that only works when grabbing from a DV camcorder. It
7214 will not work when grabbing from a analog/digital converter such as a Canopus
7215 ADVC110.
7217 Read the dvgrab manual to get more information about dvgrab features.
7219 @c cincvdoc_node_number_254
7220 @node Rendering files
7221 @chapter Rendering files
7222 @cindex Rendering files
7223 @cindex Files, rendering
7225 Rendering takes a section of the timeline, performs all the editing, effects
7226 and compositing, and stores it in a pure movie file.  You can then delete all
7227 the source assets, play the rendered file in a movie player, or bring it back
7228 into Cinelerra for more editing.  It is very difficult to retouch any editing
7229 decisions in the pure movie file, however, so keep the original assets and XML
7230 file around several days after you render it.
7232 All rendering operations are based on a region of the timeline to be rendered.
7233 You need to define this region on the timeline.  The navigation section
7234 describes methods of defining regions.  @xref{Timebar}.  The
7235 rendering functions define the region based on a set of rules.  When a region
7236 is highlighted or in/out points are set, the affected region is rendered.  When
7237 no region is highlighted, everything after the insertion point is rendered.
7238 Merely by positioning the insertion point at the beginning of a track and
7239 unsetting all in/out points, the entire track is rendered.
7241 @menu
7242 * Single file rendering::      Rendering a single file
7243 * Separate files rendering::
7244 * Insertion strategy of rendered files::
7245 * Batch rendering::            Rendering several files unattended
7246 * The render farm::            Rendering using many computers
7247 * Command line rendering::     Rendering from the command line without a GUI
7248 * Rendering options and encoding tips::
7249 * Using background rendering::
7250 @end menu
7252 @c cincvdoc_node_number_255
7253 @node Single file rendering
7254 @section Single file rendering
7255 @cindex Single file rendering
7257 The fastest way to get media to disk is to use the single file rendering
7258 function.
7260 Go to @b{File->render} or press @kbd{SHIFT-R} to bring up the render dialog.
7261 Select the magnifying glass @image{manual_images_en/magnify,7mm} to bring up a file
7262 selection dialog.  This determines the filename to write the rendered file to
7263 and the encoding parameters.
7265 @center @image{manual_images_en/render_window,80mm}
7266 @center @b{The render window}
7268 In the render dialog select a format from the @b{File Format} menu.  The format
7269 of the file determines whether you can render audio or video or both.  Select
7270 the @b{Render audio tracks} toggle to generate audio tracks and @b{Render video
7271 tracks} to generate video tracks.
7273 Select the wrench @image{manual_images_en/wrench,4.33mm} next to each toggle to set
7274 compression parameters.  If the file format can not store audio or video the
7275 compression parameters will be blank.  If @b{Render audio tracks} or @b{Render
7276 video tracks} is selected and the file format does not support it, trying to
7277 render will pop up an error.
7279 @c cincvdoc_node_number_256
7280 @node Separate files rendering
7281 @section Separate files rendering
7282 @cindex Separate files rendering
7284 The @b{Create new file at each label} option causes a new file to be created
7285 when every label in the timeline is encountered.  This is useful for dividing
7286 long audio recordings into individual tracks.  When using the renderfarm,
7287 @b{Create new file at each label} causes one renderfarm job to be created at
7288 every label instead of using the internal load balancing algorithm to space
7289 jobs.
7291 When @b{Create new file at each label} is selected, a new filename is created
7292 for every output file.  If the filename given in the render dialog has a 2
7293 digit number in it, the 2 digit number is overwritten with a different
7294 incremental number for every output file.  If no 2 digit number is given,
7295 Cinelerra automatically concatenates a number to the end of the given filename
7296 for every output file.
7298 In the filename @file{/hmov/track01.wav} the @samp{01} would be overwritten for
7299 every output file.  The filename @file{/hmov/track.wav}; however, would become
7300 @file{/hmov/track.wav001} and so on and so forth.  Filename regeneration is
7301 only used when either renderfarm mode is active or creating new files for every
7302 label is active.
7304 @c cincvdoc_node_number_257
7305 @node Insertion strategy of rendered files
7306 @section Insertion strategy of rendered files
7307 @cindex Insertion strategy of rendered files
7309 Finally the render dialog lets you select an insertion mode.  The insertion
7310 modes are the same as with loading files.  In this case if you select @b{insert
7311 nothing} the file will be written out to disk without changing the current
7312 project.  For other insertion strategies be sure to prepare the timeline to
7313 have the output inserted at the right position before the rendering operation
7314 is finished.  @xref{Editing}.  Editing describes how to cause output to be
7315 inserted at the right position.
7317 It should be noted that even if you only have audio or only have video
7318 rendered, a @b{paste} insertion strategy will behave like a normal paste
7319 operation, erasing any selected region of the timeline and pasting just the
7320 data that was rendered.  If you render only audio and have some video tracks
7321 armed, the video tracks will get truncated while the audio output is pasted
7322 into the audio tracks.
7324 @c cincvdoc_node_number_258
7325 @node Batch rendering
7326 @section Batch rendering
7327 @cindex Batch rendering
7329 If you want to render many projects to media files without having to repeatedly
7330 attend to the @b{Render} dialog, @b{batch rendering} is the function to use.
7331 In this function, you specify many EDL files to render and the unique output
7332 files for each.  Then Cinelerra loads each EDL file and renders it
7333 automatically, without any user intervention.  Each EDL file and its output to
7334 be rendered are called a @b{batch}.  This allows a huge amount of media to be
7335 processed and greatly increases the value of an expensive computer.
7337 The first thing to do when preparing to do batch rendering is define projects
7338 to be rendered.  The batch renderer requires a separate EDL file for every
7339 batch to be rendered.  Set up a project and define the region to be rendered
7340 either by highlighting it, setting in/out points around it, or positioning the
7341 insertion point before it.  Then save the project as an EDL@.  Define as many
7342 projects as needed this way.  The batch renderer takes the active region from
7343 the EDL file for rendering.
7345 With all the EDL files prepared with active regions, go to @b{File->batch
7346 render}.  This brings up the batch rendering dialog.  The interface for batch
7347 rendering is a bit more complex than for single file rendering.
7349 A list of batches must be defined before starting a batch rendering operation.
7350 The table of batches appears on the bottom of the batch render dialog and is
7351 called @b{batches to render}.  Above this are the configuration parameters for
7352 a single batch.
7354 Set the @b{output path}, @b{file format}, @b{Audio}, @b{Video}, and @b{Create
7355 new file at each label} parameters as if it was a single file.  These
7356 parameters apply to only one batch.  In addition to the standard rendering
7357 parameters, you must select the source EDL to use in the batch.  Do this by
7358 setting the @b{EDL path}.
7360 If the @b{batches to render} list is empty or nothing is highlighted, click
7361 @b{New} to create a new batch.  The new batch will contain all the parameters
7362 you just set.
7364 Repeatedly press the @b{New} button to create more batches with the same
7365 parameters.  Highlight any batch and edit the configuration on the top of the
7366 batch render window.  The highlighted batch is always synchronized to the
7367 information displayed.
7369 Click and drag batches to change the order in which they are rendered.  Hit
7370 @b{delete} to permanently remove the highlighted batch.
7372 In the list box is a column which enables or disables the batch.  This way
7373 batches can be skipped without being deleted.  Click on the @b{Enabled} column
7374 in the list box to enable or disable a batch.  If it is checked, the batch is
7375 rendered.  If it is blank, the batch is skipped.
7377 The other columns in the batch list are informative.
7378 @itemize @bullet
7379 @item @b{Output} The output path of the batch.
7380 @cindex EDL
7381 @item @b{EDL} The source EDL of the batch.
7382 @item @b{Elapsed} The amount of time taken to render the batch if it is
7383 finished.
7384 @end itemize
7386 To start rendering from the first enabled batch, hit @b{Start}.
7388 Once rendering, the main window shows the progress of the batch.  Once the
7389 batch finishes, the elapsed column in the batch list is updated and the next
7390 batch is rendered until all the enabled batches are finished.  The currently
7391 rendering batch is always highlighted red.
7393 To stop rendering before the batches are finished without closing the batch
7394 render dialog, hit @b{Stop}.
7396 To stop rendering before the batches are finished and close the batch render
7397 dialog, hit @b{Cancel}.
7399 To exit the batch render dialog whether or not anything is being rendered, hit
7400 @b{Cancel}.
7402 @c cincvdoc_node_number_259
7403 @node The render farm
7404 @section The render farm
7405 @cindex Render farm
7407 When bicubic interpolation and HDTV was first done on Cinelerra, the time
7408 needed to produce the simplest output became unbearable even on the fastest
7409 dual 1.7 GHz Xeon of the time.  Renderfarm support even in the simplest form
7410 brings HDTV times back in line with SD while making SD faster than real-time.
7412 While the renderfarm interface is not spectacular, it is simple enough to use
7413 inside an editing suite with less than a dozen nodes without going through the
7414 same amount of hassle you would with a several hundred node farm.  Renderfarm
7415 is invoked transparently for all file->render operations when it is enabled in
7416 the preferences.
7418 Cinelerra divides the selected region of the timeline into a certain number of
7419 jobs which are then dispatched to the different nodes depending on the load
7420 balance.  The nodes process the jobs and write their output to individual files
7421 on the filesystem.  The output files are not concatenated.  It is important for
7422 all the nodes to have access to the same filesystem on the same mount point for
7423 assets.
7425 If a node can not access an input asset it will display error messages to its
7426 console but probably not die.  If it can not access an output asset it will cause
7427 the rendering to abort.
7429 It should be noted that in the render dialog, the @b{Create new file at each
7430 label} option causes a new renderfarm job to be created at each label instead
7431 of by the load balancer.  If this option is selected when no labels exist, only
7432 one job will be created.
7434 A Cinelerra renderfarm is organized into a master node and any number of slave
7435 nodes.  The master node is the computer which is running the GUI@.  The slave
7436 nodes are anywhere else on the network and are run from the command line.  Run
7437 a slave node from the command line with @command{cinelerra -d}
7439 That is the simplest configuration.  Type @command{cinelerra -h} to see more
7440 options.  The default port number may be overridden by passing a port number
7441 after the @option{-d}.
7443 Most of the time you will want to bring in the rendered output and fine tune the
7444 timing on the timeline.  Also some file formats like MPEG can not be direct
7445 copied.  Because of this, the jobs are left in individual files.
7447 You can load these by creating a new track and specifying @b{concatenate to
7448 existing tracks} in the load dialog.  Files which support direct copy can be
7449 concatenated into a single file by rendering to the same file format with
7450 renderfarm disabled.  Also to get direct copy, the track dimensions, output
7451 dimensions, and asset dimensions must be equal.
7453 MPEG files or files which do not support direct copy have to be concatenated
7454 with a command line utility.  MPEG files can be concatenated with @b{cat}.
7456 Configuration of the renderfarm is described in the configuration chapter
7457 @xref{Renderfarm}.  The slave nodes traditionally read and write data to a
7458 common filesystem over a network, thus they do not need hard drives.
7460 Ideally all the nodes on the renderfarm have similar CPU performance.
7461 Cinelerra load balances on a first come first serve basis.  If the last segment
7462 is dispatched to the slowest node, all the fastest nodes may end up waiting for
7463 the slowest node to finish while they themselves could have rendered it faster.
7465 @c cincvdoc_node_number_260
7466 @node Command line rendering
7467 @section Command line rendering
7468 @cindex Command line rendering
7469 @cindex Rendering, command line
7471 The command line rendering facility consists of a way to load the current set
7472 of batch rendering jobs and process them without a GUI@.  This is useful if
7473 you are planning on crashing X repeatedly or want to do rendering on the other
7474 side of a low bandwidth network.  You might have access to a supercomputer in
7475 India but still be stuck in America, exiled you might say.  A command line
7476 interface is ideal for this.
7478 To perform rendering from the command line, first run Cinelerra in graphical
7479 mode.  Go to @b{file->batch render}.  Create the batches you intend to render
7480 in the batch window and close the window.  This saves the batches in a file.
7481 Set up the desired renderfarm attributes in @b{settings->preferences} and exit
7482 Cinelerra.  These settings are used the next time command line rendering is
7483 used.
7485 On the command line run: @command{cinelerra -r}
7487 to processes the current batch jobs without a GUI@.  Setting up all the
7488 parameters for this operation is hard.  That is why the command line aborts if
7489 any output files already exist.
7491 Other parameters exist for specifying alternative files for the preferences and
7492 the batches.  Attempting to use anything but the defaults is very involved so
7493 it has not been tested.
7495 @c cincvdoc_node_number_261
7496 @node Rendering options and encoding tips
7497 @section Rendering options and encoding tips
7498 @cindex Rendering options and encoding tips
7500 @menu
7501 * Rendering to Quicktime4linux to re-encode using mencoder::
7502 * Making a DVD::
7503 @end menu
7505 @c cincvdoc_node_number_262
7506 @node Rendering to Quicktime4linux to re-encode using mencoder
7507 @subsection Rendering to Quicktime4linux to re-encode using mencoder
7508 @cindex Rendering to Quicktime4linux to re-encode using mencoder
7510 If you want to reencode your rendered file with mencoder, you should export it
7511 as a Quicktime4linux file:
7513 @itemize @bullet
7514 @item Audio option Two Complements 16bits (Pcm)
7515 @item Video option DV
7516 @end itemize
7518 @b{Mencoder encoding options:}
7520 @itemize @bullet
7521 @item @b{Avi (mpeg4/divx) not for upload purposes:} @*
7522 @command{mencoder -of avi -o cinelerra.avi -oac mp3lame -ovc lavc -lavcopts
7523 vcodec=mpeg4:vbitrate=2500 cinelerra_render.mov}
7525 @item @b{Internet (download):} @*
7526 @command{mencoder -of avi -o cinelerra_render.avi -oac mp3lame -ovc lavc
7527 -lavcopts vcodec=mpeg4:vbitrate=400 -vf scale=320:240 cinelerra_render.mov} @*
7528 or @*
7529 First pass: @*
7530 @command{mencoder input.mov -ovc xvid -xvidencopts bitrate=600:pass=1 -vf
7531 scale=320:240 -oac mp3lame -lameopts abr:br=64 -o output.avi} @*
7532 Second pass: @*
7533 @command{mencoder input.mov -ovc xvid -xvidencopts bitrate=600:pass=2 -vf
7534 scale=320:240 -oac mp3lame -lameopts abr:br=64 -o output.avi}
7535 @end itemize
7537 Scott Frase wrote a Quicktime for GNU/Linux Compatibility Chart.  It contains an
7538 exhaustive list of all the Quicktime compression schemes available and their
7539 compatibility in Cinelerra, Mplayer and some other media players.  That
7540 document has two main sections, one based on an HDV resolution-formatted
7541 project and another based on a DV resolution-format project.
7543 It is available here: @*
7544 @uref{http://content.serveftp.net/video/qtcompatibility.ods}
7546 Some interesting notes:
7547 @itemize @bullet
7548 @item Mplayer does behave better with smaller, DV resolution video
7549 @item Cinelerra compatibility with files rendered from a DV project is not much
7550 different than its compatibility with files rendered from an HDV project.
7551 @item Comparison chart of DV/HDV mplayer/cinelerra compatibility included
7552 @end itemize
7554 @c cincvdoc_node_number_263
7555 @node Making a DVD
7556 @subsection Making a DVD
7557 @cindex Making a DVD
7558 @cindex DVD, making a
7560 @menu
7561 * Rendering to mpeg2::
7562 * Making a DVD menu::
7563 * Authoring a DVD::
7564 * Burning a DVD::
7565 @end menu
7567 @c cincvdoc_node_number_264
7568 @node Rendering to mpeg2
7569 @subsubsection Rendering to mpeg2
7570 @cindex Rendering to mpeg2
7571 @cindex Mpeg2, rendering to
7573 Here is a method to export mpeg2 video and make a single chapter DVD@.  This
7574 method allows you to precisely set the encoding option you want and produces an
7575 mpeg2 file which is 100% compatible with all DVD standalone players.
7577 The mplex program from @b{mjpegtools} must be installed.  The mjpegtools
7578 package is built in the hvirtual distribution and the mplex utility may be
7579 extracted from there.
7581 First, make sure you properly defined your cinelerra project format before
7582 rendering your video (menu @b{Settings->Format}).  PAL is 720x576 at 25 frames
7583 per second, and NTSC is 720x480 at 29.97 frames per second.
7585 @enumerate 1
7586 @item Create a script @file{~/cine_render.sh}
7587 @item Copy in @file{~/cine_render.sh file} the following lines: @*
7588 @command{#/bin/bash} @*
7589 @command{mpeg2enc -v 0 -K tmpgenc -r 16 -4 1 -2 1 -D 10 -E 10 -g 15 -G 15 -q 6
7590 -b 8600 -f 8 -o $1}
7591 @item Put the execute permissions on that file:
7592 @command{chmod 777 ~/cine_render.sh}
7593 @item Open cinelerra, and select the part of the video you want to render with
7594 the [ and ] points
7595 @item Press @kbd{SHIFT-R}
7596 @item Select the @b{YUV4MPEG Stream} file format
7597 @item Deselect @b{Render audio tracks} and select @b{Render video tracks}
7598 @item Click on the wrench
7599 @item In the newly opened window, indicate the name of the @file{m2v} file you
7600 want to create.  That file will contain video only.
7601 @item Click on @b{Use pipe} and write this command:
7602 @command{/home/<your_user>/cine_render.sh %}
7603 @item Click OK to close the second window, and OK again to render your
7604 @file{m2v} file
7605 @item When the m2v file is rendered, open the rendering window again, and
7606 render an AC3 file at 224kbits
7607 @item Finally, combine video and audio with this command:
7608 @command{mplex -f 8 your_video_file.m2v your_audio_file.ac3 -o
7609 video_audio_file.mpeg}
7610 @end enumerate
7612 You can modify the mpeg2enc parameters if you want to.  Look at the mpeg2enc
7613 manpage.  Some details about the settings:
7614 @itemize
7615 @item @option{-b 8600} : This is the maximum bitrate of your @file{m2v} file (it
7616 does not include the audio bitrate).  We recommend you to do not increase that
7617 value or you could get errors when mplexing the video and the audio.
7618 @item @option{-q 6} : This is the quantizer setting.  If you reduce it (do not go
7619 below 3), the quality increases.  But the bitrate will increase.  It's
7620 recommended to keep the medium bitrate achieved (that's displayed when mplexing
7621 the audio and video files) around 10% lower than the bitrate defined with the
7622 @option{-b} setting.
7623 @end itemize
7625 If your material is noisy (Hi8 analog material for example), you can add some
7626 mjpegtools in the command line written in @file{~/cine_render.sh}:
7627 @itemize @bullet
7628 @item @command{y4mshift} and @command{y4mscaler} can be used to remove the
7629 noisy borders around the video.  For example, those commands added at the
7630 beginning of the command line in @file{cine_render.sh} remove the black borders
7631 around a Hi8 video: @*
7632 @command{y4mshift -n -2 | yuvscaler -I USE_744x560+12+8 -O DVD -M BICUBIC |}
7633 @item @command{yuvdenoise} and @command{yuvmedianfilter} can help removing
7634 noise.  Example: @*
7635 @command{yuvdenoise -F | yuvmedianfilter -T 3 |} @*
7636 Denoising is a complex task, and the options given above are just an example.
7637 Please read the mjpegtools'manual and subscribe to its mailing-list for more
7638 information.
7639 @end itemize
7641 @c cincvdoc_node_number_265
7642 @node Making a DVD menu
7643 @subsubsection Making a DVD menu
7644 @cindex Making a DVD menu
7646 A DVD menu is composed of:
7648 @itemize @bullet
7649 @item a background (still image or video)
7650 @item buttons
7651 @item sound/music
7652 @end itemize
7654 You can build a menu with a GUI such as qdvdauthor, dvdstyler, dvdwizard or
7655 tovid.  However, using those GUI is not perfect for the moment, since they are
7656 bugged or limited for the moment.
7658 The method we explain below is more complicated than using a GUI, however it:
7660 @itemize @bullet
7661 @item produces DVD playable on all standalone players
7662 @item is not subject to bugs
7663 @item will save you a lot of time since all you have to do to author a new DVD
7664 is to modify text files
7665 @end itemize
7667 If you prefer to use a GUI, we recommend you to try tovid: @*
7668 @uref{http://tovid.wikia.com/wiki/Main_Page}
7670 Here are the steps needed to create your DVD menu:
7672 @itemize @bullet
7673 @item create the menu background with cinelerra
7674 @item add the buttons by creating PNG images
7675 @item combine the menu and the buttons with spumux
7676 @end itemize
7678 We suppose that you want to create a menu with an animated background.  Launch
7679 Cinelerra and create a project containing what you want to be the background of
7680 the menu.  You can add a music if you wish to.  Pay attention to the fact that
7681 this menu will play in loop.
7683 To draw the buttons, you have two possibilities:
7685 @itemize @bullet
7686 @item display them in Cinelerra.  That way, you will be able to make animated
7687 buttons, such as a video thumbnail for each part of your video.
7688 @item do not draw the buttons in Cinelerra.  You will add them later on, from
7689 PNG images "added" to the mpeg2 menu file.  This is the simpliest method, but
7690 you won't be able to display animated buttons.
7691 @end itemize
7693 Render that video into m2v and ac3 using the @command{cine_render.sh} method
7694 explain above.  Combine the audio and video with mplex as you would do with any
7695 "normal" video.
7697 You obtain a mpeg2 file containing the menu background, and some buttons
7698 displayed above it if you added them in Cinelerra.
7700 We have to use spumux to define each button position in that mpeg2 file.  If
7701 you did not draw the buttons in Cinelerra, you will be able to put them in with
7702 spumux.
7704 Spumux is a command line utility which takes 2 arguments:
7706 @itemize @bullet
7707 @item an XML file explaining where the buttons are
7708 @item the mpeg2 file name (the one you rendered for the menu)
7709 @end itemize
7711 Here is a spumux example XML file:
7712 @verbatim
7713 <subpictures>
7714  <stream>
7715   <spu start="00:00:00.0" image="buttons_normal.png" highlight=
7716   "buttons_highlight.png" select="buttons_select.png">
7717    <button name="1" x0="94 " y0="234 " x1="253 " y1="278"
7718    down="2" right="4" />
7719    <button name="2" x0="63 " y0="287 " x1="379 " y1="331" up="1"
7720    down="3" right="5" />
7721   </spu>
7722  </stream>
7723 </subpictures>
7724 @end verbatim
7726 @itemize @bullet
7727 @item @b{image="buttons_normal.png"} This png image contains the buttons as
7728 they should appear when they are not selected nor highlighted.
7729 @item @b{highlight="buttons_highlight.png"} This png image contains the buttons
7730 in their highlighted state.
7731 @item @b{select="buttons_select.png} This png image contains the buttons in
7732 their selected state.
7733 @end itemize
7735 If you already made the buttons in Cinelerra, you have to specify empty (100%
7736 transparent) PNG images here.
7738 The PNG images used in spumux must:
7740 @itemize @bullet
7741 @item contain an @b{alpha channel} (ie support transparency)
7742 @item be in @b{4 indexed colors}. You can easily convert an image to 4 indexed
7743 colors using Gimp.
7744 @end itemize
7746 There is one line per button. Each line contains the button coordinates, a
7747 button having a rectangular shape:
7749 @itemize @bullet
7750 @item @b{x0, y0}: upper left corner
7751 @item @b{x1, y1}: bottom right corner
7752 @end itemize
7754 You also have to set which button to move to when using the up, down, left and
7755 right buttons of the DVD remote.  Here is an example:
7757 @verbatim
7758 <button name="3" ...coordinates... up="1" down="5" left="2" right="4" />
7759 @end verbatim
7761 When button 3 is selected, if the "Up" key is pressed on the remote then the
7762 button 1 will be highlighted.  If the "Right" key is pressed on the remote,
7763 then button 4 will be highlighted.
7765 When you have finished editing your spumux XML file, you have to type this
7766 command: @*
7767 @command{spumux menu.xml < menu.mpeg > menu_with_buttons.mpeg} @*
7768 That will make a @file{menu_with_buttons.mpeg}. It is an mpeg2 files with
7769 buttons.
7771 @c cincvdoc_node_number_266
7772 @node Authoring a DVD
7773 @subsubsection Authoring a DVD
7774 @cindex Authoring a DVD
7776 After having rendered to mpeg2 your video files, and having prepared a menu
7777 with spumux, you need to "author" the DVD with dvdauthor.
7779 Dvdauthor uses XML files to describe the DVD structure.  The syntax is
7780 rigorous, and one should really pay a lot of attention to the .xml file syntax.
7781 The risk is the DVD to be readable on some standalone players, but not all of
7782 them.
7784 To help you start using dvdauthor, we will show you some example XML files.
7786 @verbatim
7787 <dvdauthor dest="/path/to/the/folder/which/will/contain/the/dvd">
7788     <vmgm />
7789     <titleset>
7790         <titles>
7791             <pgc>
7792                 <vob file="/the/mpeg/file.mpeg" />
7793                 <post>
7794                     jump chapter 1;
7795                 </post>
7796             </pgc>
7797         </titles>
7798     </titleset>
7799 </dvdauthor>
7800 @end verbatim
7802 This is a very simple dvdauthor XML file. There are no menus, so the video file
7803 @file{/the/mpeg/file.mpeg} will be played as soon as you insert the DVD in the
7804 player.
7806 The command in <post> tag means the video should be played in a loop.  When the
7807 DVD player reaches the end of the video, it will jump to the first chapter of
7808 the video (which dvdautor assumes to be the beginning of the video since
7809 chapters haven't been defined).
7811 To author the DVD, just type the following command: @*
7812 @command{dvdauthor -x simple_example.xml}
7814 Now, let's have a look at a more complex example. When the DVD is inserted, a
7815 menu is displayed and you can choose to play any of 4 videos.
7817 @verbatim
7818 <dvdauthor dest="/path/to/the/folder/which/will/contain/the/dvd" jumppad="yes" >
7819 <vmgm>
7820  <fpc> jump menu 1; </fpc>
7821   <menus>
7822    <video format="pal" aspect="4:3" resolution="720x576" />
7823    <pgc entry="title" >
7824     <vob file="menu.mpeg" pause="0" />
7825     <button name="1" > { g3=1; jump titleset 1 menu entry root; } </button>
7826     <button name="2" > { g3=2; jump titleset 1 menu entry root; } </button>
7827     <button name="3" > { g3=3; jump titleset 1 menu entry root; } </button>
7828     <button name="4" > { g3=4; jump titleset 1 menu entry root; } </button>
7829      <post> { jump cell 1; } </post>
7830    </pgc>
7831   </menus>
7832  </vmgm>
7833  <titleset>
7834   <menus>
7835    <pgc entry="root" >
7836     <pre> { if ( g3 gt 0 )  {
7837                 if ( g3 eq 1 ) { g3=0; jump title 1  chapter 1; }
7838                 if ( g3 eq 2 ) { g3=0; jump title 1  chapter 3; }
7839                 if ( g3 eq 3 ) { g3=0; jump title 1  chapter 5; }
7840                 if ( g3 eq 4 ) { g3=0; jump title 1  chapter 7; }
7841                 jump vmgm menu entry title;
7842                 }
7843         } </pre>
7844     <post> { jump vmgm menu entry title; } </post>
7845    </pgc>
7846   </menus>
7847   <titles>
7848    <video format="pal" aspect="4:3" resolution="720x576" />
7849    <pgc pause="0" >
7850     <vob file="video_1.mpeg" pause="0" />
7851     <vob file="blackvideo.mpg" pause="0" />
7852     <vob file="video_2.mpeg" pause="0" />
7853     <vob file="blackvideo.mpg" pause="0" />
7854     <vob file="video_3.mpeg" pause="0" />
7855     <vob file="blackvideo.mpg" pause="0" />
7856     <vob file="video_4.mpeg" pause="0" />
7857     <post> { call vmgm menu entry title; } </post>
7858    </pgc>
7859   </titles>
7860  </titleset>
7861 </dvdauthor>
7862 @end verbatim
7864 The file @file{blackvideo.mpg} is used to add a 2 second black screen between
7865 each video. Here is how to create it: @*
7866 @command{convert -size 720x576 xc:black -depth 8 blackframe.ppm} @*
7867 @command{dd if=/dev/zero bs=4 count=960000 | toolame -b 128 -s 48 /dev/stdin
7868 emptyaudio.mpa} @*
7869 @command{ppmtoy4m -S 420mpeg2 -n 50 -F 25:1 -r blackframe.ppm | mpeg2enc -a 2
7870 -n p -f 8 -o blackvideo.mpv} @*
7871 @command{mplex -f 8 -o blackvideo.mpg blackvideo.mpv emptyaudio.mpa}
7873 @c cincvdoc_node_number_267
7874 @node Burning a DVD
7875 @subsubsection Burning a DVD
7876 @cindex Burning a DVD
7878 When you have finished authoring the DVD, you will find in the destination folder the
7879 following directories: @file{AUDIO_TS} and @file{VIDEO_TS}.  To test your DVD
7880 before burning it, cd into this folder, and type: @*
7881 @command{xine dvd:`pwd`}
7883 If your DVD plays fine on your computer, it is time to burn it.  When you are
7884 in the folder containing @file{AUDIO_TS} and @file{VIDEO_TS}, type this
7885 command (adjusting for your dvd burner device, eg /dev/dvdrw): @*
7886 @command{nice -n -20 growisofs -dvd-compat -speed=2 -Z /dev/dvd -dvd-video -V
7887 VIDEO ./ && eject /dev/dvd}
7889 If you have a lot of copies to do, you can first make an .iso master using this
7890 command: @*
7891 @command{nice -n -20 mkisofs -dvd-video -V VIDEO -o ../dvd.iso .} @*
7892 This @file{../dvd.iso} file can be burnt using this command: @*
7893 @command{nice -n -20 growisofs -dvd-compat -speed=2 -Z /dev/dvd=../dvd.iso &&
7894 eject /dev/cdrom}
7896 We recommend you do not burn at a speed higher than 4x.  Use good quality DVD-R
7897 only.
7899 To test your DVD on a standalone player without wasting several DVD-R, you can
7900 burn on DVD-RW@.  First, format your DVD-RW using this command: @*
7901 @command{dvd+rw-format -lead-out /dev/dvd} @*
7902 Then, burn the DVD-RW using the commands above.
7904 @c cincvdoc_node_number_268
7905 @node Using background rendering
7906 @section Using background rendering
7907 @cindex Background rendering
7908 @cindex Rendering, background
7910 Background rendering allows impossibly slow effects to play back in real-time
7911 shortly after the effect is pasted in the timeline.  It continuously renders
7912 temporary output.  When renderfarm is enabled, background rendering uses the
7913 renderfarm continuously.  This way, any size video can be seen in real-time
7914 merely by creating a fast enough network with enough nodes.
7916 Background rendering is enabled in settings->preferences->performance.  It has
7917 one interactive function: @b{settings->set background render}.  This sets the
7918 point where background rendering begins to where the in point is.  If any video
7919 exists, a red bar appears in the timeline showing what has been background
7920 rendered.
7922 It is often useful to insert an effect or a transition and then select
7923 settings->set background render right before the effect to preview it at full
7924 framerates.
7926 @c cincvdoc_node_number_269
7927 @node Tips
7928 @chapter Tips
7929 @cindex Tips
7931 In this section, you will find ways to solve common problems using Cinelerra.
7932 This section is arranged in order of the problems and what tools are used to
7933 solve them.  Following sections are arranged in order of the tools and their
7934 uses.
7936 @menu
7937 * Encoding into Dolby Pro Logic::
7938 * Cleaning analog TV::
7939 * Defeating interlacing::
7940 * Making video look like film::
7941 * Clearing out haze::
7942 * Making a ringtone::
7943 * Time stretching audio::
7944 * Video screen captures::
7945 * Improving performance::             Making Cinelerra run better on GNU/Linux.
7946 * Translating Cinelerra::             How to translate Cinelerra to different languages.
7947 * Panning and zooming still images::
7948 @end menu
7950 @c cincvdoc_node_number_270
7951 @node Encoding into Dolby Pro Logic
7952 @section Encoding into Dolby Pro Logic
7953 @cindex Dolby Pro Logic, encoding into
7955 Dolby pro logic is an easy way to output 6 channel audio from a 2-channel
7956 soundcard with degraded but useful results.  Rudimentary Dolby pro logic
7957 encoding can be achieved with clever usage of the effects.
7959 First, create the front left and right channels. Create 2 audio tracks, each
7960 carrying either the left or right channel. Pan the left channel to the left and
7961 the right channel to the right with @b{pan}.
7963 Next, create the rear left and right channels. Create another 2 audio tracks as
7964 above: the left channel panned left and the right channel panned right.  Then
7965 apply @b{invert audio} to both new channels and the signals will come out of
7966 the rear speakers.
7968 Next, create the center channel by creating a single audio track with monaural
7969 audio from a different source.  Center it with the @b{pan} control and the
7970 signal will come out of the center speaker.
7972 If a copy of the signal in the back speakers is desired in any single
7973 front speaker, the signal in the back speakers must be delayed by at least 0.05
7974 seconds and a single new track should be created.  Pan the new track to orient
7975 the signal in the front speakers.
7977 If the same signal is desired in all the speakers except the center speaker,
7978 delay the back speakers by 0.5 seconds and delay either the front left or front
7979 right by 0.2 seconds.
7981 If you want to hear something from the subwoofer, create a new track, select a
7982 range, drop a synthesizer effect, and set the frequency below 60 Hz.  The
7983 subwoofer merely plays anything below 60Hz or so.
7985 Other tricks you can perform to separate the speakers are parametric
7986 equalization to play only selected ranges of frequencies through different
7987 speakers and lowpass filtering to play signals through the subwoofer.
7989 @c cincvdoc_node_number_271
7990 @node Cleaning analog TV
7991 @section Cleaning analog TV
7992 @cindex Cleaning analog TV
7993 @cindex TV, cleaning analog
7995 Unless you live in a rich nation like China or are a terrorist, you probably
7996 record analog TV more than you record digital TV@.  The picture quality on
7997 analog TV is horrible but you can do things in Cinelerra to make it look more
7998 like it did in the studio.
8000 First, when capturing the video, capture it in the highest resolution possible.
8001 For Europeans it is 720x576 and for North Americans it is 720x480.  Do not bother
8002 adjusting the brightness or contrast in the recording monitor, although maxing
8003 out the color is useful.  Capture it using MJPEG or uncompressed Component
8004 Video if possible.  If those are too demanding, then capture it using JPEG@.
8005 RGB should be a last resort.
8007 Now on the timeline use @b{Settings->Format} to set a YUV colorspace.  Drop a
8008 @b{Downsample} effect on the footage.  Set it for
8009 @verbatim
8010 Horizontal:        2
8011 Horizontal offset: 0
8012 Vertical:          2
8013 Vertical offset:   0
8014       red
8015   x   green
8016   x   blue
8017       alpha
8018 @end verbatim
8020 Use the camera tool to shift the picture up or down a line to remove the most
8021 color interference from the image.  This is the difference we are looking for:
8023 @center @image{manual_images_en/cleaning1}
8025 If you have vertical blanking information or crawls which constantly change in
8026 each frame, block them out with the @b{Mask} tool.  This improves compression
8027 ratios.
8029 This is about all you can do without destroying more data than you would
8030 naturally lose in compression.  The more invasive cleaning techniques involve
8031 deinterlacing.
8033 @c cincvdoc_node_number_272
8034 @node Defeating interlacing
8035 @section Defeating interlacing
8036 @cindex Interlacing, defeating
8038 Interlacing is done on most video sources because it costs too much to build
8039 progressive scanning cameras and progressive scanning CRT's.  Many a consumer
8040 has been disappointed to spend 5 paychecks on a camcorder and discover what
8041 horrible jagged images it produces on a computer monitor.
8043 As for progressive scanning camcorders, forget it.  Cost factors are probably
8044 going to keep progressive scanning cameras from ever equaling the spatial
8045 resolution of interlaced cameras.  Interlacing is here to stay.  That is why
8046 they made deinterlacing effects in Cinelerra.
8048 We do not believe there has ever been a perfect deinterlacing effect.  They are
8049 either irreversible or do not work.  Cinelerra cuts down the middle by providing
8050 deinterlacing tools that are irreversible sometimes and do not work sometimes
8051 but are neither one or the other.
8053 @itemize @bullet
8054 @item
8055 @cindex Interlacing, line doubling
8056 @b{Line Doubling}
8057 This one is done by the @b{Deinterlace} effect when set to @b{Odd lines} or
8058 @b{Even lines}.  When applied to a track it reduces the vertical resolution by
8059 1/2 and gives you progressive frames with stairstepping.  This is only useful
8060 when followed by a scale effect which reduces the image to half its size.
8062 @item
8063 @cindex Interlacing, line averaging
8064 @b{Line averaging}
8065 The @b{Deinterlace} effect when set to @b{Average even lines} or @b{Average odd
8066 lines} does exactly what line doubling does except instead of making straight
8067 copies of the lines it makes averages of the lines.  This is actually useful
8068 for all scaling. @*
8069 There is an option for adaptive line averaging which selects which lines to line
8070 average and which lines to leave interlaced based on the difference between the
8071 lines.  It does not work.
8073 @item
8074 @cindex Interlacing, inverse telecine
8075 @b{Inverse Telecine}
8076 This is the most effective deinterlacing tool when the footage is an NTSC TV
8077 broadcast of a film.  @xref{Inverse telecine}.
8079 @item
8080 @cindex Interlacing, time base correction
8081 @b{Time base correction}
8082 The first three tools either destroy footage irreversibly or do not work
8083 at times.  @b{Time base correction} is last because it is the perfect
8084 deinterlacing tool.  It leaves the footage intact.  It does not reduce
8085 resolution, perceptually at least.  It does not cause jittery timing.
8087 @item
8088 @cindex Interlacing, frames to fields
8089 The @b{Frames to Fields} effect converts each frame to two frames, so it must
8090 be used on a timeline whose project frame rate is twice the footage's frame
8091 rate.  In the first frame it puts a line-averaged copy of the even lines.  In
8092 the second frame it puts a line-averaged copy of the odd lines.  When played
8093 back at full framerates it gives the illusion of progressive video with no loss
8094 of detail. @*
8095 Best of all, this effect can be reversed with the @b{Fields to frames} effect.
8096 That one combines two frames of footage back into the one original interlaced
8097 frame of half the framerate. @*
8098 Be aware that frames to fields inputs frames at half the framerate as the
8099 project.  Effects before frames to fields process at the reduced framerate. @*
8100 Unfortunately, the output of @b{Frames to Fields} can not be compressed as
8101 efficiently as the original because it introduces vertical twitter and a super
8102 high framerate. @*
8103 Interlaced 29.97 fps footage can be made to look like film by applying
8104 @b{Frames to Fields} and then reducing the project frame rate of the resulting
8105 59.94 fps footage to 23.97 fps.  This produces no timing jitter and the
8106 occasional odd field gives the illusion of more detail than there would be if
8107 you just line averaged the original.
8108 @end itemize
8110 @cindex Interlacing, HDTV exceptions
8111 @cindex HDTV interlacing
8112 @b{HDTV exceptions} @*
8113 1920x1080 HDTV is encoded a special way.  If it is a broadcast of original HDTV
8114 film, an inverse telecine works fine.  If it is a rebroadcast of a 720x480
8115 source, you need to use a time base and line doubling algorithm to deinterlace
8116 it, @xref{1080 to 480}.
8118 @c cincvdoc_node_number_273
8119 @node Making video look like film
8120 @section Making video look like film
8121 @cindex Making video look like film
8122 @cindex Film look
8124 Video sweetening is constantly getting better.  Lately the best thing you can
8125 do for dirt cheap consumer camcorder video is to turn it into progressive 24
8126 fps output.  While you can not really do that, you can get pretty close for the
8127 money.  Mind you, since this procedure can degrade high quality video just as easily
8128 as it improves low quality video, it should only be used for low quality
8129 video.
8131 @enumerate 1
8132 @item Set project framerate to twice the video framerate.
8133 @item Apply a @b{Sharpen} effect.  Set it to sharpness: 25, no interlacing, and
8134 horizontal only.
8135 @item Drop a @b{Frame to Fields} effect on the same track.  Set Average Empty
8136 Rows to on and play through the video a few times to figure out which field is
8137 first.  If the wrong field is first, the motion is shaky.  Secondly, any
8138 editing in the doubled frame rate may now screw up the field order.  We are
8139 still figuring out the easiest way to support warnings for field glitches but
8140 for now you need to go back to the normal framerate to do editing or play test
8141 to make sure the fields are right.
8142 @item Render just the video to the highest quality file possible.
8143 @item Import the video back to a new track.  Set the project framerate to
8144 24.  The new track should now display more filmish and sharper images than the
8145 original footage.
8146 @end enumerate
8148 This entire procedure could be implemented in one non-realtime effect, but the
8149 biggest problem with that is you will most often want to keep the field based
8150 output and the 24 fps output for posterity.  A non-realtime effect would
8151 require all that processing just for the 24 fps copy.  Still debating that one.
8153 @c cincvdoc_node_number_274
8154 @node Clearing out haze
8155 @section Clearing out haze
8156 @cindex Clearing out haze
8157 @cindex Haze, clearing out
8158 @cindex Gradient effect
8160 You probably photograph a lot of haze and never see blue sky.  Even if you
8161 can afford to briefly go somewhere where there is blue sky, horizon shots
8162 usually can stand for more depth.  This is what the @b{gradient effect} is for.
8164 Drop the gradient effect on hazy tracks.  Set the following parameters:
8165 @itemize @bullet
8166 @item Angle: 0
8167 @item Inner radius: 0
8168 @item Outer radius: 40
8169 @item Inner color: blue 100% alpha
8170 @item Outer color: blue 0% alpha
8171 @end itemize
8173 It is important to set the 0% alpha color to blue even though it is 0% alpha.
8174 The color of the outer alpha is still interpolated with the inner color.  This
8175 is a generally applicable setting for the gradient.  Some scenes may work
8176 better with orange or brown for an evening feel.
8178 @c cincvdoc_node_number_275
8179 @node Making a ringtone
8180 @section Making a ringtone
8181 @cindex Ringtone, making a
8183 This is how we made ringtones for the low end Motorola V180's and it will
8184 probably work with any new phone.  Go to @b{File->Load files...} and load a
8185 sound file with Insertion strategy: @b{Replace current project}.  Go to
8186 @b{Settings->Format} change @b{Channels} to 1 and @b{Samplerate} to 16000 or
8187 22050.
8189 Either highlight a region of the timeline or set in/out points to use for the
8190 ringtone.  To improve sound quality on the cell phone, you need the maximum
8191 amplitude in as many parts of the sound as possible.  Right click on track
8192 Audio 1 and select @b{Attach effect..}.  Highlight the @b{Compressor} effect
8193 and hit @b{Attach} in the attachment popup.
8195 Make sure the insertion point or highlighted area is in the region with the
8196 Compressor effect.  Right click on track Audio 2 and select @b{Attach
8197 effect..}.  Highlight @b{Audio 1: Compressor} and hit @b{Attach}.  Click the
8198 Audio1 Compressor's magnifying glass @image{manual_images_en/magnify,7mm} to bring up
8199 the compressor GUI@.
8201 Set the following parameters:
8202 @itemize @bullet
8203 @item Reaction secs: @b{-0.1}
8204 @item Decay secs: @b{0.1}
8205 @item Trigger Type: @b{Total}
8206 @item Trigger: @b{0}
8207 @item Smooth only: @b{No}
8208 @end itemize
8210 Click @b{Clear} to clear the graph.  Click anywhere in the grid area and drag a
8211 new point to 0 Output and -50 Input.  The graph should look like this.
8213 @center @image{manual_images_en/compress,70mm}
8215 Go to @b{File->Render}.  Specify the name of an mp3 file to output to.  Set the
8216 file format to @b{MPEG Audio}.  Click the wrench
8217 @image{manual_images_en/wrench,4.33mm} for Audio and set @b{Layer} to @b{III} and
8218 @b{Kbits per second} to @b{24} or @b{32}.  Check @b{Render audio tracks} and
8219 uncheck @b{Render video tracks}.  Hit OK to render the file.
8221 The resulting @file{.mp3} file must be uploaded to a web server.  Then, the
8222 phone's web browser must download the @file{.mp3} file directly from the URL@.
8223 There also may be a size limit on the file.
8225 @c cincvdoc_node_number_276
8226 @node Time stretching audio
8227 @section Time stretching audio
8228 @cindex Time stretching audio
8229 @cindex Audio, time stretching
8231 It may appear that time stretching audio is a matter of selecting a region of
8232 the audio tracks, enabling recording for the desired tracks, going to
8233 @b{Audio->Render Effect}, and applying @b{Time Stretch}.  In actuality there
8234 are 3 audio effects for time stretching: @b{Time Stretch}, @b{Resample}, and
8235 @b{Asset info dialog}.
8237 Time Stretch applies a fast Fourier transform to try to change the duration
8238 without changing the pitch, but this introduces windowing artifacts to the
8239 audio.  It is only useful for large changes in time because obvious changes in
8240 duration make windowing artifacts less obtrusive.
8242 For smaller changes in duration, in the range of 5%, @b{Resample} should be
8243 used.  This changes the pitch of the audio but small enough changes are not
8244 noticeable.  Resample does not introduce any windowing artifacts, so this is
8245 most useful for slight duration changes where the listener is not supposed to
8246 know what is going on.
8248 Another way to change duration slightly is to go to the @b{Resources} window,
8249 highlight the @b{media} folder, right click on an audio file, click on
8250 @b{Info}.  Adjust the sample rate in the @b{Info} dialog to adjust the
8251 duration.  This method also requires left clicking on the right boundary of the
8252 audio tracks and dragging left or right to correspond to the length changes.
8254 @c cincvdoc_node_number_277
8255 @node Video screen captures
8256 @section Video screen captures
8257 @cindex Video screen captures
8259 We explain here how to record video screen captures and edit them in Cinelerra.
8261 First, you have to record the video with xvidcap.  You can find that utility in
8262 most distributions' repositories, or download it here: @*
8263 @uref{http://xvidcap.sourceforge.net}
8265 First, capture the screen: @*
8266 @command{xvidcap --fps 10 --cap_geometry 1280x1024+0+0 --file "file1.mpeg"
8267 --gui no --audio no}
8269 Do not forget to change the geometry option according to your screen size.
8270 Then, convert the @file{file1.mpeg} file you obtained into an mpeg file
8271 suitable for Cinelerra: @*
8272 @command{ffmpeg -r 10 -i file1.mpeg -s 1280x1024 -b 3000 -aspect 1.33 -r 25
8273 file2.mpeg}
8275 You can now load that file into Cinelerra.  Make sure you properly set the
8276 video format of your project (size, frame-rate, aspect-ratio)
8278 When you have finished editing your video, you have to render it.  Render it as
8279 a jpeg-sequence. It is recommended to write the jpeg files in a new folder,
8280 since there probably will have a lot of files created.
8282 Then, open a shell window, and cd into that folder.  Encode the jpeg files
8283 using those commands:
8285 First pass: @*
8286 @command{mencoder "mf://*.jpg" -mf fps=25 -oac pcm -sws 2 -vf
8287 scale=1280:1024,hqdn3d=2:1:2 -ovc lavc -lavcopts
8288 vcodec=mpeg4:vbitrate=800:aspect=4/3:vpass=1 -ofps 10 -of avi -o /dev/null
8289 -ffourcc DIVX} @*
8290 Second pass: @*
8291 @command{mencoder "mf://*.jpg" -mf fps=25 -oac pcm -sws 2 -vf
8292 scale=1280:1024,hqdn3d=2:1:2 -ovc lavc -lavcopts
8293 vcodec=mpeg4:vbitrate=800:aspect=4/3:vpass=2 -ofps 10 -of avi -o
8294 ../rendered_file.avi -ffourcc DIVX}
8296 You can also render the video to mpeg4 directly from Cinelerra if you wish to.
8298 @c cincvdoc_node_number_278
8299 @node Improving performance
8300 @section Improving performance
8301 @cindex Performance, improving
8303 For the moment GNU/Linux is not an excellent desktop.  It is more of a server.
8304 Most of what you will find on modern GNU/Linux distributions are faceless,
8305 network-only programs strategically designed to counteract one Microsoft server
8306 feature or another and not to perform very well at user interaction.  There are
8307 a number of parameters on GNU/Linux, which ordinary people can adjust to make
8308 it behave more like a thoroughbred in desktop usage.
8310 @menu
8311 * Disabling swap space::
8312 * Enlarging sound buffers::
8313 * Freeing more shared memory::
8314 * Speeding up the hard drive::
8315 * Disabling cron::
8316 * Reducing USB mouse sensitivity::
8317 * Assorted X tweeks::
8318 * Speeding up the file system::
8319 * Improving Zoran video::
8320 @end menu
8322 @c cincvdoc_node_number_279
8323 @node Disabling swap space
8324 @subsection Disabling swap space
8325 @cindex Disabling swap space
8326 @cindex Swap space, disabling
8328 On systems with lots of memory, Cinelerra sometimes runs better without a swap
8329 space.  If you have 4 GB of RAM, you are probably better off without a swap
8330 space.  If you have 512MB of RAM, you should keep the swap.  If you want to do
8331 recording, you should probably disable swap space in any case.  There is a
8332 reason for this.  GNU/Linux only allows half the available memory to be used.
8333 Beyond that, it starts searching for free pages to swap, in order to cache more
8334 disk access.  In a 4 GB system, you start waiting for page swaps after using
8335 only 2 GB@.
8337 The question then is how to make GNU/Linux run without a swap space.
8338 Theoretically it should be a matter of running @*
8339 @command{swapoff -a}
8341 Unfortunately, without a swap space the kswapd tasklet normally spins at 100%.
8342 To eliminate this problem, edit @file{linux/mm/vmscan.c}.  In this file, put a
8343 line saying @command{return 0;} before it says
8344 @verbatim
8345     /*
8346      * Kswapd main loop.
8347      */
8348 @end verbatim
8350 Then recompile the kernel.
8352 @c cincvdoc_node_number_280
8353 @node Enlarging sound buffers
8354 @subsection Enlarging sound buffers
8355 @cindex Sound buffers, enlarging
8357 In order to improve realtime performance, the audio buffers for all the
8358 GNU/Linux sound drivers were limited from 128k to 64k.  For recording audio and
8359 video simultaneously and for most audio recording this causes dropouts.
8360 Application of low latency and preemptible kernel patches make it possible to
8361 record more audio recordings but it does not improve recording video with audio.
8362 This is where you need to hack the kernel.
8364 To see if your sound buffers are suitable, run the included soundtest program
8365 with nothing playing or recording.  This allocates the largest possible buffers
8366 and displays them.  If the @b{Total bytes available} is under 131072, you need
8367 to see about getting the buffers enlarged in the driver.  While many drivers
8368 differ, we have a hack for at least one driver.
8370 This only applies to the OSS version of the Soundblaster Live driver.  Since
8371 every sound card and every sound driver derivative has a different
8372 implementation you will need to do some searching for other sound cards.  Edit
8373 @file{linux/drivers/sound/emu10k1/audio.c}
8375 Where it says
8376 @verbatim
8377 if (bufsize >= 0x10000)
8378 @end verbatim
8379 change it to:
8380 @verbatim
8381 if (bufsize > 0x40000)
8382 @end verbatim
8384 Where it says
8385 @verbatim
8386     for (i = 0; i < 8; i++)
8387         for (j = 0; j < 4; j++)
8388 @end verbatim
8389 change it to:
8390 @verbatim
8391     for (i = 0; i < 16; i++)
8392         for (j = 0; j < 4; j++)
8393 @end verbatim
8395 In @file{linux/drivers/sound/emu10k1/hwaccess.h}, change
8396 @verbatim
8397 #define MAXBUFSIZE 65536
8398 @end verbatim
8400 @verbatim
8401 #define MAXBUFSIZE 262144
8402 @end verbatim
8404 Finally, in @file{linux/drivers/sound/emu10k1/cardwi.h}, change
8405 @verbatim
8406 #define WAVEIN_MAXBUFSIZE         65536
8407 @end verbatim
8409 @verbatim
8410 #define WAVEIN_MAXBUFSIZE         262144
8411 @end verbatim
8413 Then recompile the kernel modules.
8415 @c cincvdoc_node_number_281
8416 @node Freeing more shared memory
8417 @subsection Freeing more shared memory
8418 @cindex Freeing more shared memory
8419 @cindex Shared memory, freeing
8420 @cindex Memory, freeing
8422 The GNU/Linux kernel only allows 32MB of shared memory to be allocated by
8423 default.  This needs to be increased to do anything useful.  Run the following
8424 command: @*
8425 @command{echo "0x7fffffff" > /proc/sys/kernel/shmmax}
8427 @c cincvdoc_node_number_282
8428 @node Speeding up the hard drive
8429 @subsection Speeding up the hard drive
8430 @cindex Speeding up the hard drive
8431 @cindex Hard drive, speeding up the
8432 @cindex hdparm
8434 This is a very popular command sequence among GNU/Linux gurus, which is not
8435 done by default on GNU/Linux distributions. @*
8436 @command{hdparm -c3 -d1 -u1 -k1 /dev/hda}
8438 @itemize @bullet
8439 @item @option{-c3} puts the hard drive into 32 bit I/O with sync.  This
8440 normally does not work due to inept kernel support for most IDE controllers.
8441 If you get lost interrupt or SeekComplete errors, quickly use @option{-c0}
8442 instead of @option{-c3} in your command.
8443 @item @option{-d1} enables DMA of course.  This frees up the CPU partially
8444 during data transfers.
8445 @item @option{-u1} allows multiple interrupts to be handled during hard drive
8446 transactions.  This frees up even more CPU time.
8447 @item @option{-k1} prevents GNU/Linux from resetting your settings in case of a
8448 glitch.
8449 @end itemize
8451 @c cincvdoc_node_number_283
8452 @node Disabling cron
8453 @subsection Disabling cron
8454 @cindex Disabling cron
8455 @cindex Cron, disabling
8457 GNU/Linux runs some daily operations like compressing man pages.  These may be
8458 acceptable background tasks while compiling or word processing but not while
8459 playing video.  Disable these operations by editing
8460 @file{/etc/rc.d/init.d/anacron}.
8462 Put @command{exit} before the first line not beginning in @command{#}.
8464 In @file{/etc/rc.d/init.d/crond} put @command{exit} before the first line not
8465 beginning in @command{#}.  Then reboot.
8467 You can not use the @command{at} command anymore, but who uses that command
8468 anyways?
8470 @c cincvdoc_node_number_284
8471 @node Reducing USB mouse sensitivity
8472 @subsection Reducing USB mouse sensitivity
8473 @cindex Reducing USB mouse sensitivity
8474 @cindex Mouse, reducing sensitivity
8475 @cindex USB mouse, reducing sensitivity
8477 Gamers like high resolution mice, but this can be painful for precisely
8478 positioning the mouse on a timeline or video screen.  XFree86 once allowed you
8479 to reduce PS/2 mouse sensitivity using commands like @command{xset m 1 1} but
8480 you are out of luck with USB mice or KVM's.
8482 We have a way to reduce USB mouse sensitivity but it requires editing the
8483 kernel source code.  Even though USB mice have been supported for years, the
8484 kernel source code for USB mice is constantly being rewritten.  These
8485 instructions were relevant for 2.6.12.3.  Edit
8486 @file{/usr/src/linux/drivers/input/mousedev.c}.
8488 After the line saying
8489 @verbatim
8490 struct mousedev_hw_data {
8491 @end verbatim
8493 @verbatim
8494 #define DOWNSAMPLE_N 100
8495 #define DOWNSAMPLE_D 350
8496 int x_accum, y_accum;}
8497 @end verbatim
8499 Next, the section which says something like:
8500 @verbatim
8501 switch (code) {
8502     case REL_X: mousedev->packet.dx += value; break;
8503     case REL_Y: mousedev->packet.dy -= value; break;
8504     case REL_WHEEL:     mousedev->packet.dz -= value; break;
8506 @end verbatim
8507 must be replaced by
8508 @verbatim
8509 switch (code) {
8510     case REL_X:
8511     mousedev->packet.x_accum += value * DOWNSAMPLE_N;
8512     mousedev->packet.dx += (int)mousedev->packet.x_accum
8513     / (int)DOWNSAMPLE_D;
8514     mousedev->packet.x_accum -=
8515     ((int)mousedev->packet.x_accum / (int)DOWNSAMPLE_D)
8516     * (int)DOWNSAMPLE_D;
8517     break;
8518     case REL_Y:
8519     mousedev->packet.y_accum += value * DOWNSAMPLE_N;
8520     mousedev->packet.dy -= (int)mousedev->packet.y_accum
8521     / (int)DOWNSAMPLE_D;
8522     mousedev->packet.y_accum -=
8523     ((int)mousedev->packet.y_accum
8524     / (int)DOWNSAMPLE_D) * (int)DOWNSAMPLE_D;
8525     break;
8526     case REL_WHEEL: mousedev->packet.dz -= value; break;
8528 @end verbatim
8530 Change the value of @b{DOWNSAMPLE_N} to change the mouse sensitivity.
8532 @c cincvdoc_node_number_285
8533 @node Assorted X tweeks
8534 @subsection Assorted X tweeks
8535 @cindex X, assorted tweeks
8537 XFree86 by default can not display Cinelerra's advanced pixmap rendering very
8538 fast.  The X server stalls during list box drawing.  Fix this by adding a line
8539 to your XF86Config* files.
8541 In the @b{Section "Device"} area, add a line saying:
8542 @verbatim
8543 Option "XaaNoOffscreenPixmaps"
8544 @end verbatim
8545 and restart the X server.
8547 Screen blanking is really annoying, unless you are fabulously rich and can
8548 afford to leave your monitor on 24 hours a day without power saving mode.  In
8549 @file{/etc/X11/xinit/xinitrc} put
8550 @verbatim
8551 xset s off
8552 xset s noblank
8553 @end verbatim
8554 before the first @command{if} statement.
8556 How about those windows keys which no GNU/Linux distribution even thinks to
8557 use.  You can make the window keys provide ALT functionality by editing
8558 @file{/etc/X11/Xmodmap}.  Append the following to it.
8559 @verbatim
8560 keycode 115 = Hyper_L
8561 keycode 116 = Hyper_R
8562 add mod4 = Hyper_L
8563 add mod5 = Hyper_R
8564 @end verbatim
8566 The actual changes to a window manager to make it recognize window keys for
8567 @key{ALT} are complex.  In @b{FVWM} at least, you can edit
8568 @file{/etc/X11/fvwm/system.fvwm2rc} and put
8569 @verbatim
8570 Mouse 0 T A move-and-raise-or-raiselower
8571 #Mouse 0 W M move
8572 Mouse 0 W 4 move
8573 Mouse 0 W 5 move
8574 Mouse 0 F A resize-or-raiselower
8575 Mouse 0 S A resize-or-raiselower
8576 @end verbatim
8578 in place of the default section for moving and resizing.  Your best performance
8579 is going to be on FVWM@.  Other window managers seem to slow down video with
8580 extra event trapping and are not as efficient in layout.
8582 @c cincvdoc_node_number_286
8583 @node Speeding up the file system
8584 @subsection Speeding up the file system
8585 @cindex Speeding up the file system
8586 @cindex File system, speeding up the
8588 You will often store video on an expensive, gigantic disk array separate from
8589 your boot disk.  You will thus have to manually install an EXT filesystem on this
8590 disk array, using the @command{mke2fs} command.  By far the fastest file system
8591 is @*
8592 @cindex mke2fs
8593 @cindex tune2fs
8594 @command{mke2fs -i 65536 -b 4096 my_device} @*
8595 @command{tune2fs -r0 -c10000 my_device}
8597 This has no journaling, reserves as few blocks as possible for filenames, and
8598 accesses the largest amount of data per block possible.  A slightly slower file
8599 system, which is easier to recover after power failures is @*
8600 @command{mke2fs -j -i 65536 -b 4096 my_device} @*
8601 @command{tune2fs -r0 -c10000 my_device}
8603 This adds a journal which slows down the writes but makes filesystem checks
8604 faster.
8606 @c cincvdoc_node_number_287
8607 @node Improving Zoran video
8608 @subsection Improving Zoran video
8609 @cindex Zoran video, improving
8611 Video recorded from the ZORAN inputs is normally unaligned or not completely
8612 encoded on the right.  This can be slightly compensated by adjusting parameters
8613 in the driver sourcecode.
8615 In @file{/usr/src/linux/drivers/media/video/zr36067.c} the structures defined
8616 near line 623 affect alignment.  At least for NTSC, the 2.4.20 version of the
8617 driver could be improved by changing
8618 @verbatim
8619     static struct tvnorm f60ccir601 = { 858, 720, 57, 788, 525, 480, 16 };
8621     static struct tvnorm f60ccir601 = { 858, 720, 57, 788, 525, 480, 17 };
8622 @end verbatim
8624 In @file{/usr/src/linux/drivers/media/video/bt819.c} more structures near line
8625 76 affect alignment and encoding. @*
8626 For NTSC
8627 @verbatim
8628     {858 - 24, 2, 523, 1, 0x00f8, 0x0000},
8629 could be changed to
8630     {868 - 24, 2, 523, 1, 0x00f8, 0x0000},
8631 @end verbatim
8632 Adjusting these parameters may or may not move your picture closer to the
8633 center.  More of the time, they will cause the driver to lock up before capturing
8634 the first frame.
8636 @b{New in 2.6.5:} @*
8637 In the 2.6 kernels, the video subsystem was rewritten again from scratch.  To
8638 adjust the Zoran parameters go to @file{drivers/media/video/zoran_card.c} and
8639 look for a group of lines like
8640 @verbatim
8641     static struct tvnorm f50sqpixel = { 944, 768, 83, 880, 625, 576, 16 };
8642     static struct tvnorm f60sqpixel = { 780, 640, 51, 716, 525, 480, 12 };
8643     static struct tvnorm f50ccir601 = { 864, 720, 75, 804, 625, 576, 18 };
8644     static struct tvnorm f60ccir601 = { 858, 720, 57, 788, 525, 480, 16 };
8646     static struct tvnorm f50ccir601_lml33 = { 864, 720, 75+34, 804, 625, 576, 18 };
8647     static struct tvnorm f60ccir601_lml33 = { 858, 720, 57+34, 788, 525, 480, 16 };
8649     /* The DC10 (57/16/50) uses VActive as HSync, so HStart must be 0 */
8650     static struct tvnorm f50sqpixel_dc10 = { 944, 768, 0, 880, 625, 576, 0 };
8651     static struct tvnorm f60sqpixel_dc10 = { 780, 640, 0, 716, 525, 480, 12 };
8653     /* FIXME: I cannot swap U and V in saa7114, so i do one
8654      * pixel left shift in zoran (75 -> 74)
8655      * (Maxim Yevtyushkin <max@linuxmedialabs.com>) */
8656     static struct tvnorm f50ccir601_lm33r10 = { 864, 720, 74+54, 804, 625, 576, 18 };
8657     static struct tvnorm f60ccir601_lm33r10 = { 858, 720, 56+54, 788, 525, 480, 16 };
8658 @end verbatim
8660 These seem to control the image position.  At least for the LML33 the following
8661 definition for @b{f60ccir601_lml33} does the trick.
8662 @verbatim
8663 static struct tvnorm f60ccir601_lml33 = { 858, 720, 67+34, 788, 525, 480, 13 };
8664 @end verbatim
8666 @c cincvdoc_node_number_288
8667 @node Translating Cinelerra
8668 @section Translating Cinelerra
8669 @cindex Translating Cinelerra
8671 @menu
8672 * Available localizations::
8673 * Updating an existing translation::
8674 * Creating a new translation::
8675 @end menu
8677 This information is needed if you wish to partipate in translating Cinelerra.
8678 @xref{Environment variables}, for running Cinelerra in your own language.
8680 @c cincvdoc_node_number_289
8681 @node Available localizations
8682 @subsection Available localizations
8683 @cindex Localizations, available
8685 There are some existing localizations for cinelerra:
8686 @itemize @bullet
8687 @item @b{DE} - German
8688 @item @b{ES} - Spanish
8689 @item @b{EU} - Basque
8690 @item @b{FR} - French
8691 @item @b{IT} - Italian
8692 @item @b{PT_BR} - Brazilian Portuguese
8693 @item @b{SL} - Slovenian
8694 @end itemize
8696 @c cincvdoc_node_number_290
8697 @node Updating an existing translation
8698 @subsection Updating an existing translation
8699 @cindex Updating an existing translation
8701 To generate an updated @file{*.po} file with the newer strings of Cinelerra
8702 source code not yet present in the @file{.po} file, run after
8703 @command{./configure}: @*
8704 @command{cd po && make}
8706 Then, edit the @file{.po} file located in @file{po/} directory of your target
8707 language and submit the diff file to the Cinelerra-CV team.
8709 @c cincvdoc_node_number_291
8710 @node Creating a new translation
8711 @subsection Creating a new translation
8712 @cindex Creating a new translation
8714 To create a new translation, run after @command{./configure}: @*
8715 @command{cd po && make}
8717 Then, edit the @file{cinelerra.pot} file located in @file{po/} and add the
8718 appropriate translated strings.  Rename the file to @file{(lang_prefix).po} and
8719 add the language prefix to @file{po/LINGUAS}.  Finally, submit the diff file to
8720 the cinelerra-CV team.
8722 @c cincvdoc_node_number_292
8723 @node Panning and zooming still images
8724 @section Panning and zooming still images
8725 @cindex Panning and zooming still images
8726 @cindex Still images, panning and zooming
8728 Cinelerra's powerful keyframe features allow you to use pan and zoom
8729 effects on still pictures.
8730 @enumerate 1
8731 @item Load and create a clip from a still image as described above.  Make the
8732 clip 10 seconds long.
8733 @item Activate the @b{automatic generation of keyframes}
8734 @item Using the @b{transport controls}, go to the beginning of the clip
8735 @item Using the @b{compositing camera control} set the clip's initial position
8736 @item Using the @b{transport controls}, move forward a couple of seconds on the
8737 clip
8738 @item Dragging on the @b{compositing camera} move the camera center to a new
8739 position further
8740 @item Now, rewind to the beginning of the clip and play it.
8741 @end enumerate
8742 You can see that the camera smoothly flows from keyframe point to next keyframe
8743 point, as Cinelerra automatically adjusts the camera movement in straight lines
8744 from point to point.
8746 @c cincvdoc_node_number_293
8747 @node Troubleshooting
8748 @chapter Troubleshooting
8749 @cindex Troubleshooting
8751 @menu
8752 * Reporting bugs::
8753 * Buz driver crashes::
8754 * Dragging in and out points does not work::
8755 * Locking up when loading files::
8756 * Synchronization lost while recording::
8757 * Applying gamma followed by blur does not work::
8758 * Copy/Paste of track selections does not work in the timeline::
8759 * Cinelerra often crashes::
8760 * Theme Blond not found error::
8761 @end menu
8763 @c cincvdoc_node_number_294
8764 @node Reporting bugs
8765 @section Reporting bugs
8766 @cindex Reporting bugs
8767 @cindex Bugs, reporting
8769 When you notice a bug, the first thing to do is to go to
8770 @uref{http://bugs.cinelerra.org} and check if it has not been already reported.
8771 If there is no bug report for the bug you noticed, you can file a bug report.
8772 Open an account on @uref{http://bugs.cinelerra.org} if you do not have one.
8773 Then, file the bug report, including the following information:
8775 @itemize @bullet
8776 @item Revision number of Cinelerra CV@.  Example: r959
8778 @item Distribution name and version.  Example: Debian SID
8780 @item Steps to replicate the bug.  That is very important since it really helps
8781 people trying to fix bugs.  Example:
8782 @enumerate 1
8783 @item launch cinelerra
8784 @item open the recording window
8785 @item click on OK
8786 @item Cinelerra crashes
8787 @end enumerate
8789 @item When Cinelerra CV crashes, a debugger output is welcome.  Run: @*
8790 @command{gdb cinelerra} @*
8791 @command{run} @*
8792 (You trigger the bug and Cinelerra CV crashes) @*
8793 @command{thread apply all bt} @*
8794 Then copy all of the information displayed into your bug report.
8795 @end itemize
8797 Do not hesitate to attach any file which you think could be useful, such as a
8798 screenshot for example.  The gdb output is more useful when Cinelerra is
8799 compiled with debugging symbols.  @xref{Compiling with debugging symbols}, for
8800 compilation instructions.
8802 Moreover, if the bug you noticed concerns a problem loading a specific file
8803 into Cinelerra-CV, uploading a small sample of such a file on the internet is
8804 appreciated.  That would allow people fixing bugs to load that file themselves
8805 in Cinelerra and look at what happens.
8807 @c cincvdoc_node_number_295
8808 @node Buz driver crashes
8809 @section Buz driver crashes
8810 @cindex Buz, driver crashes
8812 First, Zoran capture boards must be accessed using the @b{Buz} video driver in
8813 @b{Preferences->Recording} and @b{Preferences->Playback}.  Some performance
8814 tweeks are available in another section.  @xref{Improving performance}.
8816 Once tweeked, the Buz driver seems to crash if the number of recording buffers
8817 is too high.  Make sure @b{Preferences->Recording->Frames to buffer in device}
8818 is below 10.
8820 @c cincvdoc_node_number_296
8821 @node Dragging in and out points does not work
8822 @section Dragging in and out points does not work
8823 @cindex Dragging in and out points does not work
8824 @cindex In/out points, dragging does not work
8826 Sometimes there will be two edits really close together.  The point selected
8827 for dragging may be next to the indended edit if those edits are too small to see at
8828 the current zoom level.  Zoom in horizontally.
8830 @c cincvdoc_node_number_297
8831 @node Locking up when loading files
8832 @section Locking up when loading files
8833 @cindex Locking up when loading files
8834 @cindex Files, locking up when loading
8836 The most common reason loading files locks up Cinelerra is because the codec is not
8837 supported.  Another reason is because Cinelerra is building picons for the
8838 Resources window.  If you load a large number of images, it needs to decompress
8839 every single image to build a picon.  Go into
8840 @b{settings->preferences->interface} and disable @b{Use thumbnails in resource
8841 window} to skip this process.
8843 @c cincvdoc_node_number_298
8844 @node Synchronization lost while recording
8845 @section Synchronization lost while recording
8846 @cindex Synchronization lost while recording
8847 @cindex Recording, synchronization
8849 If the rate at which frames are captured during recording is much lower than the framerate of the
8850 source, the video will accumulate in the recording buffers over time and the
8851 audio and video will become well out of sync.  Decrease the @b{number of frames to
8852 buffer in the device} in @b{preferences->recording} so the excess frames are
8853 dropped instead of buffered.
8855 @c cincvdoc_node_number_299
8856 @node Applying gamma followed by blur does not work
8857 @section Applying gamma followed by blur does not work
8859 The gamma effect uses the pow function while the blur effect uses a number of
8860 exp functions in the math library.  For some reason, using the pow function
8861 breaks later calls to the exp functions in the math library.  You need to apply
8862 gamma after blur to get it to work.
8864 @c cincvdoc_node_number_300
8865 @node Copy/Paste of track selections does not work in the timeline
8866 @section Copy/Paste of track selections does not work in the timeline
8867 @cindex Copy/Paste of track selections does not work in the timeline
8869 If you are running the KDE Klipper application, either disable it, or
8870 right-click its taskbar icon, select @b{Configure Klipper} and ensure
8871 @b{Prevent empty clipboard} is not selected.
8873 @c cincvdoc_node_number_301
8874 @node Cinelerra often crashes
8875 @section Cinelerra often crashes
8876 @cindex Crashes
8878 Do a clean install.  Be sure that you do not have libraries from previous
8879 installations.  Delete your @file{$HOME/.bcast/} directory too. @*
8880 @command{rm -f /usr/local/lib/libguicast*} @*
8881 @command{rm -f /usr/lib/libguicast*} @*
8882 @command{rm -f /usr/local/lib/libquicktimehv*} @*
8883 @command{rm -f /usr/lib/libquicktimehv*} @*
8884 @command{rm -f /usr/local/lib/libmpeg3hv*} @*
8885 @command{rm -f /usr/lib/libmpeg3hv*}
8887 @c cincvdoc_node_number_302
8888 @node Theme Blond not found error
8889 @section Theme Blond not found error
8890 @cindex Theme Blond not found error
8892 If the following error message appears: @command{Aborted, MWindow::init_theme:
8893 Theme Blond not found}, then:
8894 @itemize @bullet
8895 @item You should check for the file @file{defaulttheme.*} in
8896 @file{/usr/lib/cinelerra} or @file{/usr/local/lib/cinelerra}.  If it does not
8897 exist, you need to install the plugins again.
8898 @item Try to delete the @file{$HOME/.bcast/} directory
8899 @item Look into @file{$HOME/.bcast/Cinelerra_rc} and find THEME, it should be
8900 => THEME Blond
8901 @end itemize
8903 @c cincvdoc_node_number_303
8904 @node Plugin authoring
8905 @chapter Plugin authoring
8906 @cindex Plugin authoring
8908 The plugin API in Cinelerra dates back to 1997, before the LADSPA and before
8909 VST became popular.  It is fundamentally the same as it was in 1997, with minor
8910 modifications to handle keyframes and GUI feedback.  The GUI is not abstracted
8911 from the programmer.  This allows the programmer to use whatever toolkit they
8912 want and allows more flexibility in appearance but it costs more.
8914 There are several types of plugins, each with a common procedure of
8915 implementation and specific changes for that particular type.  The easiest way
8916 to implement a plugin is to take the simplest existing one out of the group and
8917 rename the symbols.
8919 @menu
8920 * Introducing the pull method:: The current paradigm for plugin writing
8921 * Common plugin functions:: What all effects have to do.
8922 * Realtime plugins:: What realtime effects have to do.
8923 * Nonrealtime plugins:: What rendered effects have to do.
8924 * Audio plugins:: What audio effects have to do.
8925 * Video plugins:: What video effects have to do.
8926 * Transition plugins:: What transitions have to do.
8927 * Plugin GUI's which update during playback:: How to use currently playing data to draw the GUI.
8928 * Using OpenGL:: How to use hardware to speed up operations.
8929 * Plugin queries:: How plugins get information about the data to be processed.
8930 @end menu
8932 @c cincvdoc_node_number_304
8933 @node Introducing the pull method
8934 @section Introducing the pull method
8935 @cindex Pull method, introducing the
8937 Originally plugins were designed with the push method.  The push method is
8938 intuitive and simple.  A source pushes data to a plugin, the plugin does math
8939 operations on it, and the plugin pushes it to a destination.  For 6 years this
8940 was the way all realtime plugins were driven internally but it did not allow you
8941 to reduce the rate of playback in realtime.  While plugins can still be
8942 designed as if they are pushing data, this is not the way they are processed
8943 internally anymore.
8945 The latest evolution in Cinelerra's plugin design is the pull method.  The
8946 rendering pipeline starts at the final output and the final steps in the
8947 rendering pipeline are reading the data from disk.  Every step in the rendering
8948 chain involves requesting data from the previous step.  When the rendering
8949 pipleline eventually requests data from a plugin chain, each plugin requests
8950 data from the plugin before it.
8952 This is less intuitive than the push method but is much more powerful.
8953 Realtime plugins written using the pull method can not only change the rate data is
8954 presented to the viewer but also the direction of playback.  The pull method also allows
8955 plugins to take in data at a higher rate than they send it out.
8957 To get the power of rate independence, the pull method requires plugins to know
8958 more about the data than they needed to under the push method.  Plugins need to
8959 know what rate the project is at, what rate their output is supposed to be at
8960 and what rate their input is supposed to be at.  These different data rates
8961 have to be correlated for a plugin to configure itself properly.
8963 Keyframes for a plugin are stored relative to the project frame rate.  Queries
8964 from a plugin for the current playback position are given relative to the
8965 project frame rate.  If the plugin's output was requested to be at twice the
8966 project frame rate, the positions need to be converted to the project rate for
8967 keyframes to match up.  Two classes of data rates were created to handle this
8968 problem.
8970 Rate conversions are done in terms of the @b{project rate} and the @b{requested
8971 rate}.  The project rate is identical for all plugins.  It is determined by the
8972 @b{settings->format} window.  The requested rate is determined by the
8973 downstream plugin requesting data from the current plugin.  The requested rate
8974 is arbitrary.  Exactly how to use these rates is described below.
8976 @c cincvdoc_node_number_305
8977 @node Common plugin functions
8978 @section Common plugin functions
8979 @cindex Common plugin functions
8981 All plugins inherit from a derivative of PluginClient.  This PluginClient
8982 derivative implements most of the required methods in PluginClient, but users
8983 must still define methods for PluginClient.  The most commonly used methods are
8984 predefined in macros to reduce the typing yet still allow flexibility.
8986 The files they include depend on the plugin type.  Audio plugins include
8987 @file{pluginaclient.h} and video plugins include @file{pluginvclient.h}.  They
8988 inherit @b{PluginAClient} and @b{PluginVClient} respectively.
8990 Cinelerra instantiates all plugins at least twice when they are used in a
8991 movie.  One instance is the GUI@.  The other instance is the signal processor.
8992 User input, through a complicated sequence, is propogated from the GUI instance
8993 to the signal processor instance.  If the signal processor wants to alter the
8994 GUI, it propogates data back to the GUI instance.  There are utility functions
8995 for doing all this.
8997 All plugins define at least three objects:
8999 @itemize @bullet
9000 @item @b{Processing object} @*
9001 Contains pointers to all the other objects and performs the signal processing.
9002 This object contains a number of queries to identify itself and is the object
9003 you register to register the plugin.
9004 @item @b{User interface object} @*
9005 This is defined according to the programmer's discretion.  It can either use
9006 Cinelerra's toolkit or another toolkit.  It shows data on the screen and
9007 collects parameters from the user. @*
9008 Using Cinelerra's toolkit, the only user interface object a developer needs to
9009 worry about is the Window.  The window has pointers to a number of widgets, a
9010 few initialization methods, and a back pointer to the plugin's processing
9011 object.  The documentation refers to the usage of Cinelerra's toolkit. @*
9012 Depending on the user interface toolkit, a user interface thread may be created
9013 to run the user interface asynchronous of everything else.  Synchronizing the
9014 user interface to changes in the plugin's configuration is the most complicated
9015 aspect of the plugin, so the user interface thread and object are heavily
9016 supported by macros if you use Cinelerra's toolkit.
9017 @item @b{Configuration object} @*
9018 This stores the user parameters and always needs interpolation, copying, and
9019 comparison functions.  Macros for the plugin client automatically call
9020 configuration methods to interpolate keyframes.
9021 @end itemize
9023 @menu
9024 * The processing object::
9025 * The configuration object::
9026 * The user interface object::
9027 @end menu
9029 @c cincvdoc_node_number_306
9030 @node The processing object
9031 @subsection The processing object
9032 @cindex The processing object
9034 Load up a simple plugin like gain to see what this object looks like.  The
9035 processing object should inherit from the intended PluginClient derivative.
9036 Its constructor should take a PluginServer argument.
9037 @verbatim
9038 MyPlugin(PluginServer *server);
9039 @end verbatim
9041 In the implementation, the plugin must contain a registration line with the
9042 name of the processing object like
9043 @verbatim
9044 REGISTER_PLUGIN(MyPlugin)
9045 @end verbatim
9047 The constructor should contain
9048 @verbatim
9049 PLUGIN_CONSTRUCTOR_MACRO
9050 @end verbatim
9051 to initialize the most common variables.
9053 The processing object should have a destructor containing
9054 @verbatim
9055 PLUGIN_DESTRUCTOR_MACRO
9056 @end verbatim
9057 to delete the most common variables.
9059 Another function which is useful but not mandatory is
9060 @verbatim
9061 int is_multichannel();
9062 @end verbatim
9063 It should return 1 if one instance of the plugin handles multiple tracks
9064 simultaneously or 0 if one instance of the plugin only handles one track.  The
9065 default is 0 if it is omitted.
9067 Multichannel plugins in their processing function should refer to a function
9068 called @b{PluginClient::get_total_buffers()} to determine the number of
9069 channels.
9071 To simplify the implementation of realtime plugins, a macro for commonly used
9072 members has been created for the class header, taking the configuration object
9073 and user interface thread object as arguments.  The macro definitions apply
9074 mainly to realtime plugins and are not useful in nonrealtime plugins.
9075 Fortunately, nonrealtime plugins are simpler.
9076 @verbatim
9077 PLUGIN_CLASS_MEMBERS(config_name, thread_name)
9078 @end verbatim
9080 The commonly used members in PLUGIN_CLASS_MEMBERS are described below.
9082 @b{int load_configuration();} @*
9083 Loads the configuration based on surrounding keyframes and current position. @*
9084 The class definition for load_configuration should contain
9085 @verbatim
9086 LOAD_CONFIGURATION_MACRO(plugin_class, config_class)
9087 @end verbatim
9088 to implement the default behavior for load_configuration.  This stores whatever
9089 the current configuration is inside the plugin's configuration object and
9090 returns 1 if the new configuration differs from the previous configuration.
9091 The return value of load_configuration is used by another commonly used
9092 function, update_gui to determine if the GUI really needs to be updated. @*
9093 The plugin's configuration object is always called @b{config} inside
9094 PLUGIN_CLASS_MEMBERS@.
9096 @b{VFrame* new_picon();} @*
9097 Creates a picon for display in the resource window.  Use
9098 @verbatim
9099 #include "picon_png.h"
9100 NEW_PICON_MACRO(plugin_class)
9101 @end verbatim
9102 to implement new_picon.  In addition, the user should create a
9103 @file{picon_png.h} header file from a PNG image using @command{pngtoh}.
9104 @command{pngtoh} is compiled in the @file{guicast/ARCH} directory. @*
9105 The source PNG image should be called @file{picon.png} and can be any format
9106 supported by PNG@.
9108 @b{char* plugin_title();} @*
9109 Returns a text string identifying the plugin in the resource window.  The
9110 string has to be unique.
9112 @b{void update_gui();} @*
9113 Should first load the configuration, test for a return of 1, and then redraw
9114 the GUI with the new parameters.  All the plugins using GuiCast have a format
9115 like
9116 @verbatim
9117     void MyPlugin::update_gui()
9118     {
9119         if(thread)
9120         {
9121         if(load_configuration())
9122         {
9123             thread->window->lock_window();
9124             // update widgets here
9125             thread->window->unlock_window();
9126         }
9127         }
9128     }
9129 @end verbatim
9130 to handle concurrency and conditions of no GUI@.
9132 @b{int show_gui();} @*
9133 Instantiate the GUI and switch the plugin to GUI mode.  This is implemented
9134 with
9135 @verbatim
9136 SHOW_GUI_MACRO(plugin_class, thread_class)
9137 @end verbatim
9139 @b{int set_string();} @*
9140 Changes the title of the GUI window to a certain string.  This is implemented
9141 with
9142 @verbatim
9143 SET_STRING_MACRO(plugin_class)
9144 @end verbatim
9146 @b{void raise_window();} @*
9147 Raises the GUI window to the top of the stack.  This is implemented with
9148 @verbatim
9149 RAISE_WINDOW_MACRO(plugin_class)
9150 @end verbatim
9152 Important functions that the processing object must define are the functions which
9153 load and save configuration data from keyframes.  These functions are called by
9154 the macros so all you need to worry about is accessing the keyframe data.
9155 @verbatim
9156 void save_data(KeyFrame *keyframe);
9157 void read_data(KeyFrame *keyframe);
9158 @end verbatim
9160 The read data functions are only used in realtime plugins.  The read data
9161 functions translate the plugin configuration between the KeyFrame argument and
9162 the configuration object for the plugin.  The keyframes are stored on the
9163 timeline and can change for every project.
9165 Use an object called @b{FileXML} to do the translation and some specific
9166 commands to get the data out of the KeyFrame argument.  See any existing plugin
9167 to see the usage of KeyFrame and FileXML.
9168 @verbatim
9169 int load_defaults();
9170 int save_defaults();
9171 @end verbatim
9173 The load defaults functions are used in realtime and non-realtime plugins.  The
9174 load defaults functions translate the plugin configuration between a BC_Hash
9175 object and the plugin's configuration.  The BC_Hash object stores
9176 configurations in a discrete file on disk for each plugin but does not isolate
9177 different configurations for different projects.
9179 The function overriding @b{load_defaults} also needs to create the BC_Hash
9180 object.  See any existing plugin to see the usage of BC_Hash.
9182 Other standard members may be defined in the processing object, depending on
9183 the plugin type.
9185 @c cincvdoc_node_number_307
9186 @node The configuration object
9187 @subsection The configuration object
9188 @cindex Configuration object
9190 The configuration object is critical for GUI updates, signal processing, and
9191 default settings in realtime plugins.  Be aware it is not used in nonrealtime
9192 plugins.  The configuration object inherits from nothing and has no
9193 dependancies.  It is merely a class containing three functions and variables
9194 specific to the plugin's parameters.
9196 Usually the configuration object starts with the name of the plugin followed by
9197 Config.
9198 @verbatim
9199     class MyPluginConfig
9200     {
9201     public:
9202         MyPluginConfig();
9203 @end verbatim
9205 Following the name of the configuration class, we put in three required
9206 functions and the configuration variables.
9207 @verbatim
9208         int equivalent(MyPluginConfig &that);
9209         void copy_from(MyPluginConfig &that);
9210         void interpolate(MyPluginConfig &prev,
9211         MyPluginConfig &next,
9212         int64_t prev_position,
9213         int64_t next_position,
9214         int64_t current_position);
9215         float parameter1;
9216         float parameter2;
9217         int parameter3;
9218     };
9219 @end verbatim
9221 Now you must define the three functions.  @b{Equivalent} is called by
9222 LOAD_CONFIGURATION_MACRO to determine if the local configuration parameters are
9223 identical to the configuration parameters in the arguement.  If equivalent
9224 returns 0, the LOAD_CONFIGURATION_MACRO causes the GUI to redraw.  If
9225 equivalent returns 1, the LOAD_CONFIGURATION_MACRO does not redraw the GUI@.
9227 Then there is @b{copy_from} which transfers the configuration values from the
9228 argument to the local variables.  This is once again used in
9229 LOAD_CONFIGURATION_MACRO to store configurations in temporaries.  Once
9230 LOAD_CONFIGURATION_MACRO has replicated the configuration, it loads a second
9231 configuration.  Then it interpolates the two configurations to get the current
9232 configuration.  The interpolation function performs the interpolation and
9233 stores the result in the local variables.
9235 Normally the interpolate function calculates a previous and next fraction,
9236 using the arguments.
9237 @verbatim
9238     void MyPluginConfig::interpolate(MyPluginConfig &prev,
9239         MyPluginConfig &next,
9240         int64_t prev_position,
9241         int64_t next_position,
9242         int64_t current_position
9243     {
9244         double next_scale =
9245         (double)(current_position - prev_position)
9246         / (next_position - prev_position);
9247         double prev_scale =
9248         (double)(next_position - current_position) /
9249         (next_position - prev_position);
9250 @end verbatim
9252 Then the fractions are applied to the previous and next configuration variables
9253 to yield the current values.
9254 @verbatim
9255         this->parameter1 =
9256         (float)(prev.parameter1 * prev_scale
9257         + next.parameter1 * next_scale);
9258         this->parameter2 =
9259         (float)(prev.parameter2 * prev_scale
9260         + next.parameter2 * next_scale);
9261         this->parameter3 =
9262         (int)(prev.parameter3 * prev_scale
9263         + next.parameter3 * next_scale);
9264     }
9265 @end verbatim
9267 Alternatively you can copy the values from the previous configuration argument
9268 if no interpolation is desired.
9270 This usage of the configuration object is the same in audio and video plugins.
9271 In video playback, the interpolation function is called for every frame,
9272 yielding smooth interpolation.  In audio playback, the interpolation function
9273 is called only once for every console fragment and once every time the
9274 insertion point moves.  This is good enough for updating the GUI while
9275 selecting regions on the timeline but it may not be accurate enough for really
9276 smooth rendering of the effect.
9278 For really smooth rendering of audio, you can still use load_configuration when
9279 updating the GUI@.  For process_buffer; however, ignore load_configuration and
9280 write your own interpolation routine which loads all the keyframes in a console
9281 fragment and interpolates every sample.  This would be really slow and hard to
9282 debug, yielding improvement which may not be audible.  Then of course, every
9283 country has its own wierdos.
9285 An easier way to get smoother interpolation is to reduce the console fragment
9286 to 1 sample.  This would have to be rendered and played back with the console
9287 fragment back over 2048 of course.  The GNU/Linux sound drivers can not play
9288 fragments of 1 sample.
9290 @c cincvdoc_node_number_308
9291 @node The user interface object
9292 @subsection The user interface object
9293 @cindex User interface object
9295 The user interface object at the very least consists of a pointer to a window
9296 and pointers to all the widgets in the window.  Using Cinelerra's toolkit, it
9297 consists of a @b{BCWindow} derivative and a @b{Thread} derivative.  The Thread
9298 derivative is declared in the plugin header using
9299 @verbatim
9300 PLUGIN_THREAD_HEADER(plugin_class, thread_class, window_class)
9301 @end verbatim
9303 Then it is defined using
9304 @verbatim
9305 PLUGIN_THREAD_OBJECT(plugin_class, thread_class, window_class)
9306 @end verbatim
9308 This, in combination with the SHOW_GUI macro does all the work in instantiating
9309 the Window.  This two-class system is used in realtime plugins but not in
9310 nonrealtime plugins.  Nonrealtime plugins create and destroy their GUI in their
9311 @b{get_parameters} function and there is no need for a Thread.
9313 Now the window class must be declared in the plugin header.  It is easiest to
9314 implement the window by copying an existing plugin and renaming the symbols.
9315 The following is an outline of what happens.  The plugin header must declare
9316 the window's constructor using the appropriate arguments.
9317 @verbatim
9318     #include "guicast.h"
9319     class MyPluginWindow : public BC_Window
9320     {
9321     public:
9322         MyPluginWindow(MyPluginMain *plugin, int x, int y);
9323 @end verbatim
9325 This becomes a window on the screen, positioned at x and y.
9327 It needs two methods
9328 @verbatim
9329 int create_objects();
9330 int close_event();
9331 @end verbatim
9332 and a back pointer to the plugin
9333 @verbatim
9334 MyPlugin *plugin;
9335 @end verbatim
9337 The constructor's definition should contain extents and flags causing the
9338 window to be hidden when first created.  The create_objects member puts widgets
9339 in the window according to GuiCast's syntax.  A pointer to each widget which
9340 you want to synchronize to a configuration parameter is stored in the window
9341 class.  These are updated in the @b{update_gui} function you earlier defined
9342 for the plugin.  The widgets are usually derivatives of a GuiCast widget and
9343 they override functions in GuiCast to handle events.  Finally create_objects
9344 calls
9345 @verbatim
9346 show_window();
9347 flush();
9348 @end verbatim
9349 to make the window appear all at once.
9351 The close_event member should be implemented using
9352 @verbatim
9353 WINDOW_CLOSE_EVENT(window_class)
9354 @end verbatim
9356 Every widget in the GUI needs to detect when its value changes.  In GuiCast the
9357 @b{handle_event} method is called whenever the value changes.  In
9358 @b{handle_event}, the widget then needs to call
9359 @b{plugin->send_configure_change()} to propogate the change to any copies of
9360 the plugin which are processing data.
9362 @c cincvdoc_node_number_309
9363 @node Realtime plugins
9364 @section Realtime plugins
9365 @cindex Realtime plugins
9367 Realtime plugins should use PLUGIN_CLASS_MEMBERS to define the basic set of
9368 members in their headers.  All realtime plugins must define an @b{int
9369 is_realtime()}
9371 member returning 1.  This causes a number of methods to be called during live
9372 playback and the plugin to be usable on the timeline.
9374 Realtime plugins must override a member called @b{process_buffer}
9376 This function takes different arguments depending on if the plugin handles
9377 video or audio.  See an existing plugin to find out which usage applies.
9379 The main features of the process_buffer function are a buffer to store the
9380 output, the starting position of the output, and the requested output rate.
9381 For audio, there is also a size argument for the number of samples.
9383 The starting position of the output buffer is the lowest numbered sample on the
9384 timeline if playback is forward and the highest numbered sample on the timeline
9385 if playback is reverse.  The direction of playback is determined by one of the
9386 plugin queries described below.
9388 The position and size arguments are all relative to the frame rate and sample
9389 rate passed to process_buffer.  This is the requested data rate and may not be
9390 the same as the project data rate.
9392 The process_realtime function should start by calling @b{load_configuration}.
9393 The LOAD_CONFIGURATION_MACRO returns 1 if the configuration changed.
9395 After determining the plugin's configuration, input media has to be loaded for
9396 processing.  Call:
9397 @verbatim
9398     read_frame(VFrame *buffer,
9399         int channel,
9400         int64_t start_position,
9401         double frame_rate)
9403     read_samples(double *buffer,
9404         int channel,
9405         int sample_rate,
9406         int64_t start_position,
9407         int64_t len)
9408 @end verbatim
9410 to request input data from the object which comes before this plugin.  The read
9411 function needs a buffer to store the input data in.  This can either be a
9412 temporary you create in the plugin or the output buffer supplied to
9413 process_buffer if you do not need a temporary.
9415 It also needs a set of position arguments to determine when you want to read
9416 the data from.  The start position, rate, and len passed to a read function
9417 need not be the same as the values recieved by the process_buffer function.
9418 This way plugins can read data at a different rate than they output data.
9420 The channel argument is only meaningful if this is a multichannel plugin.  They
9421 need to read data for each track in the get_total_buffers() value and process
9422 all the tracks.  Single channel plugins should pass 0 for channel.
9424 Additional members are implemented to maintain configuration in realtime
9425 plugins.  Some of these are also needed in nonrealtime plugins.
9427 @itemize @bullet
9428 @item @b{void read_data(KeyFrame *keyframe);} @*
9429 Loads data from a keyframe into the plugin's configuration.  Inside the
9430 keyframe is an XML string.  It is most easily parsed by creating a @b{FileXML}
9431 object.  See an existing plugin to see how the read_data function is
9432 implemented. @*
9433 Read data loads data out of the XML object and stores values in the plugin's
9434 configuration object.  Since configuration objects vary from plugin to plugin,
9435 these functions can not be automated.
9437 @item @b{void save_data(KeyFrame *keyframe);} @*
9438 Saves data from the plugin's configuration to a keyframe.  Inside the keyframe
9439 you will put an XML string which is normally created by a FileXML object.  See an
9440 existing plugin to see how the save_data function is implemented. @*
9441 Save data saves data from the plugin's configuration object into the XML
9442 object.
9444 @item @b{int load_defaults();} @*
9445 Another way the plugin gets parameters is from a defaults file.  The load and
9446 save defaults routines use a BC_Hash object to parse the defaults file.  The
9447 defaults object is created in @b{load_defaults} and destroyed in the plugin's
9448 destructor.  See an existing plugin to see how the BC_Hash object is used.
9450 @item @b{int save_defaults();} @*
9451 Saves the configuration in the defaults object.
9452 @end itemize
9454 @c cincvdoc_node_number_310
9455 @node Nonrealtime plugins
9456 @section Nonrealtime plugins
9457 @cindex Nonrealtime plugins
9459 Some references for non-realtime plugins are @b{Normalize} for audio and
9460 @b{Reframe} for video.
9462 Like realtime plugins, @b{load_defaults} and @b{save_defaults} must be
9463 implemented.  In nonrealtime plugins, these are not just used for default
9464 parameters but to transfer values from the user interface to the signal
9465 processor.  There does not need to be a configuration class in nonrealtime
9466 plugins.
9468 Unlike realtime plugins, the LOAD_CONFIGURATION_MACRO can not be used in the
9469 plugin header.  Instead, the following methods must be defined.
9471 The nonrealtime plugin should contain a pointer to a defaults object.
9472 @verbatim
9473 BC_Hash *defaults;
9474 @end verbatim
9475 It should also have a pointer to a MainProgressBar.
9476 @verbatim
9477 MainProgressBar *progress;
9478 @end verbatim
9480 The progress pointer allows nonrealtime plugins to display their progress in
9481 Cinelerra's main window.
9483 The constructor for a nonrealtime plugin cannot use PLUGIN_CONSTRUCTOR_MACRO
9484 but must call @b{load_defaults} directly.
9486 The destructor, likewise, must call @b{save_defaults} and @b{delete defaults}
9487 directly instead of PLUGIN_DESTRUCTOR_MACRO@.
9489 @itemize @bullet
9490 @item @b{VFrame* new_picon();} @*
9491 @b{char* plugin_title();} @*
9492 The usage of these is the same as realtime plugins.
9494 @item @b{int is_realtime();} @*
9495 This function must return 0 to indicate a nonrealtime plugin.
9497 @item @b{int get_parameters();} @*
9498 Here, the user should create a GUI, wait for the user to hit an OK button or a
9499 cancel button, and store the parameters in plugin variables.  This routine must
9500 return 0 for success and 1 for failure.  This way the user can cancel the
9501 effect from the GUI@. @*
9502 Unlike the realtime plugin, this GUI need not run asynchronously of the plugin.
9503 It should block the get_parameters function until the user selects OK or
9504 Cancel.
9506 @item @b{int load_defaults();} @*
9507 This should create a defaults object and load parameters from the defaults
9508 object into plugin variables.
9510 @item @b{int save_defaults();} @*
9511 This should save plugin variables to the defaults object.
9513 @item @b{int start_loop();} @*
9514 If @b{get_parameters} returned 0 for success, this is called once to give the
9515 plugin a chance to initialize processing.  The plugin should instantiate the
9516 progress object with a line like @*
9517 @code{progress = start_progress("MyPlugin progress...",} @*
9518 @code{PluginClient::get_total_len());} @*
9519 The usage of @b{start_progress} depends on whether the plugin is multichannel
9520 or single channel.  If it is multichannel you always call start_progress.  If
9521 it is single channel, you first need to know whether the progress bar has
9522 already started in another instance of the plugin. @*
9523 If @b{PluginClient::interactive} is 1, you need to start the progress bar.  If
9524 it is 0, the progress bar has already been started. @*
9525 The PluginClient defines @b{get_total_len()} and @b{get_source_start()} to
9526 describe the timeline range to be processed.  The units are either samples or
9527 frames and in the project rate.
9529 @item @b{int process_loop} @*
9530 This is called repeatedly until the timeline range is processed.  It has either
9531 a samples or frames buffer for output and a reference to write_length to store
9532 the number of samples processed.  If this is an audio plugin, the user needs to
9533 call @b{get_buffer_size()} to know how many samples the output buffer can hold.
9535 The plugin must use @b{read_samples} or @b{read_frame} to read the input.
9536 These functions are a bit different for a non realtime plugin than they are for
9537 a realtime plugin. @*
9538 They take a buffer and a position relative to the start of the timeline, in the
9539 timeline's rate.  Then you must process it and put the output in the buffer
9540 argument to process_loop.  write_length should contain the number of samples
9541 generated if it is audio. @*
9542 Finally, process_loop must test @b{PluginClient::interactive} and update the
9543 progress bar if it is 1. @*
9544 @code{progress->update(total_written);} @*
9545 returns 1 or 0 if the progress bar was cancelled.  If it is 1, process_loop
9546 should return 1 to indicate a cancellation.  In addition to progress bar
9547 cancellation, @b{process_loop} should return 1 when the entire timeline range
9548 is processed.
9550 @item @b{int stop_loop();} @*
9551 This is called after process_loop processes its last buffer. @*
9552 If PluginClient::is_interactive is 1, this should call @b{stop_progress} in the
9553 progress bar pointer and delete the pointer.  Then it should delete any objects
9554 it created for processing in @b{start_loop}.
9555 @end itemize
9557 @c cincvdoc_node_number_311
9558 @node Audio plugins
9559 @section Audio plugins
9560 @cindex Audio plugins
9562 The simplest audio plugin is Gain.  The processing object should include
9563 @file{pluginaclient.h} and inherit from @b{PluginAClient}.  Realtime audio
9564 plugins need to define
9565 @verbatim
9566     int process_buffer(int64_t size,
9567         double **buffer,
9568         int64_t start_position,
9569         int sample_rate);
9570 if it is multichannel or
9571     int process_buffer(int64_t size,
9572         double *buffer,
9573         int64_t start_position,
9574         int sample_rate);
9575 @end verbatim
9576 if it is single channel.  These should return 0 on success and 1 on failure.
9577 In the future, the return value may abort failed rendering.
9579 The processing function needs to request input samples with
9580 @verbatim
9581     int read_samples(double *buffer,
9582         int channel,
9583         int sample_rate,
9584         int64_t start_position,
9585         int64_t len);
9586 @end verbatim
9587 It always returns 0.  The user may specify any desired sample rate and start
9588 position.
9590 Nonrealtime audio plugins need to define
9591 @verbatim
9592 int process_loop(double *buffer, int64_t &write_length);
9593 for single channel or
9594 int process_loop(double **buffers, int64_t &write_length);
9595 @end verbatim
9596 for multi channel.  Non realtime plugins use a different set of read_samples
9597 functions to request input data.  These are fixed to the project sample rate.
9599 @c cincvdoc_node_number_312
9600 @node Video plugins
9601 @section Video plugins
9602 @cindex Video plugins
9604 The simplest video plugin is Flip.  The processing object should include
9605 @file{pluginvclient.h} and inherit from @b{PluginVClient}.  Realtime video
9606 plugins need to define
9607 @verbatim
9608     int process_buffer(VFrame **frame,
9609         int64_t start_position,
9610         double frame_rate);
9611 @end verbatim
9612 if it is multichannel or
9613 @verbatim
9614     int process_buffer(VFrame *frame,
9615         int64_t start_position,
9616         double frame_rate);
9617 @end verbatim
9618 if it is single channel.
9620 The nonrealtime video plugins need to define
9621 @verbatim
9622 int process_loop(VFrame *buffer);
9623 for single channel or
9624 int process_loop(VFrame **buffers);
9625 @end verbatim
9626 for multi channel.  The amount of frames generated in a single process_loop is
9627 always assumed to be 1, hence the lack of a write_length argument.  Returning 0
9628 causes the rendering to continue.  Returning 1 causes the rendering to abort.
9630 A set of read_frame functions exist for requesting input frames in non-realtime
9631 video plugins.  These are fixed to the project frame rate.
9633 @c cincvdoc_node_number_313
9634 @node Transition plugins
9635 @section Transition plugins
9636 @cindex Transition plugins
9638 The simplest video transition is @b{wipe} and the simplest audio transition is
9639 @b{crossfade}.  These use a subset of the default class members of realtime
9640 plugins, but so far no analogue to PLUGIN_CLASS_MEMBERS has been done for
9641 transitions.
9643 The processing object for audio transitions still inherits from PluginAClient
9644 and for video transitions it still inherits from PluginVClient.
9646 Transitions may or may not have a GUI@.  If they have a GUI, they must also
9647 manage a thread like realtime plugins.  Do this with the same
9648 PLUGIN_THREAD_OBJECT and PLUGIN_THREAD_HEADER macros as realtime plugins.
9649 Since there is only one keyframe in a transition, you do not need to worry about
9650 updating the GUI from the processing object like you do in a realtime plugin.
9652 If the transition has a GUI, you can use PLUGIN_CONSTRUCTOR_MACRO and
9653 PLUGIN_DESTRUCTOR_MACRO to initialize the processing object.  You will also need
9654 a BC_Hash object and a Thread object for these macros.
9656 Since the GUI is optional, overwrite a function called @b{uses_gui()} to
9657 signifiy whether or not the transition has a GUI@.  Return 1 if it does and 0 if
9658 it does not.
9660 Transitions need a @b{load_defaults} and @b{save_defaults} function so the
9661 first time they are dropped on the timeline they will have useful settings.
9663 A @b{read_data} and @b{save_data} function takes over after insertion to access
9664 data specific to each instance of the transition.
9666 The most important difference between transitions and realtime plugins is the
9667 addition of an @b{is_transition} method to the processing object.
9668 @b{is_transition} should return 1 to signify the plugin is a transition.
9670 Transitions process data in a @b{process_realtime} function.
9671 @verbatim
9672     int process_realtime(VFrame *input,
9673         VFrame *output);
9674     int process_realtime(int64_t size,
9675         double *input_ptr,
9676         double *output_ptr);
9677 @end verbatim
9678 The input argument to process_realtime is the data for the next edit.  The
9679 output argument to process_realtime is the data for the previous edit.
9681 Routines exist for determining where you are relative to the transition's start
9682 and end.
9684 @itemize @bullet
9685 @item
9686 @b{PluginClient::get_source_position()} - returns the current position since
9687 the start of the transition of the lowest sample in the buffers.
9689 @item
9690 @b{PluginClient::get_total_len()} - returns the integer length of the
9691 transition.  The units are either samples or frames, in the data rate requested
9692 by the first plugin.
9693 @end itemize
9695 Users should divide the source position by total length to get the fraction of
9696 the transition the current @b{process_realtime} function is at.
9698 Transitions run in the data rate requested by the first plugin in the track.
9699 This may be different than the project data rate.  Since process_realtime lacks
9700 a rate argument, use @b{get_framerate()} or @b{get_samplerate} to get the
9701 requested rate.
9703 @c cincvdoc_node_number_314
9704 @node Plugin GUI's which update during playback
9705 @section Plugin GUI's which update during playback
9706 @cindex Plugin GUI's which update during playback
9708 Effects like @b{Histogram} and @b{VideoScope} need to update the GUI during
9709 playback to display information about the signal.  This is achieved with the
9710 @b{send_render_gui} and @b{render_gui} methods.  Normally in process_buffer,
9711 when the processing object wants to update the GUI it should call
9712 @b{send_render_gui}.  This should only be called in process_buffer.
9713 Send_render_gui goes through a search and eventually calls @b{render_gui} in
9714 the GUI instance of the plugin.
9716 Render_gui should have a sequence like
9717 @verbatim
9718     void MyPlugin::render_gui(void *data)
9719     {
9720         if(thread)
9721         {
9722         thread->window->lock_window();
9723         // update GUI here
9724         thread->window->unlock_window();
9725         }
9726     }
9727 @end verbatim
9729 Send_render_gui and render_gui use one argument, a void pointer to transfer
9730 information from the processing object to the GUI@.  The user should typecast
9731 this pointer into something useful.
9733 @c cincvdoc_node_number_315
9734 @node Plugin queries
9735 @section Plugin queries
9736 @cindex Plugin queries
9738 There are several useful queries in PluginClient which can be accessed from the
9739 processing object.  Some of them have different meaning in realtime and
9740 non-realtime mode.  They all give information about the operating system or the
9741 project which can be used to improve the quality of the processing.
9743 @menu
9744 * System queries:: Utilities for determining the system resources.
9745 * Timing queries:: Utilities for performing time-dependant processing.
9746 @end menu
9748 @c cincvdoc_node_number_316
9749 @node System queries
9750 @subsection System queries
9751 @cindex System queries
9753 @itemize @bullet
9754 @item @b{get_interpolation_type()} @*
9755 Returns the type of interpolation the user wants for all scaling operations.
9756 This is a macro from overlayframe.inc.  It can be applied to any call to the
9757 @b{OverlayFrame} object.
9759 @item @b{get_project_smp()} @*
9760 Gives the number of CPU's on the system minus 1.  If it is a uniprocessor it is
9761 0.  If it is a dual processor, it is 1.  This number should be used to gain
9762 parallelism.
9764 @item @b{get_total_buffers()} @*
9765 Gives the number of tracks a multichannel plugin needs to process.
9766 @end itemize
9768 @c cincvdoc_node_number_317
9769 @node Timing queries
9770 @subsection Timing queries
9771 @cindex Timing queries
9773 There are two rates for media a realtime plugin has to be aware of: the project
9774 rate and the requested rate.  Functions are provided for getting the project
9775 and requested rate.  In addition, doing time dependant effects requires using
9776 several functions which tell where you are in the effect.
9778 @itemize @bullet
9779 @item @b{get_project_framerate()} @*
9780 Gives the frames per second of the video as defined by the project settings.
9782 @item @b{get_project_samplerate()} @*
9783 Gives the samples per second of the audio as defined by the project settings.
9785 @item @b{get_framerate()} @*
9786 Gives the frames per second requested by the plugin after this one.  This is
9787 the requested frame rate and is the same as the frame_rate argument to
9788 process_buffer.
9790 @item @b{get_samplerate()} @*
9791 Gives the samples per second requested by the plugin after this one.  This is
9792 the requested sample rate and is the same as the sample_rate argument to
9793 process_buffer.
9795 @item @b{get_total_len()} @*
9796 Gives the number of samples or frames in the range covered by the effect,
9797 relative to the requested data rate.
9799 @item @b{get_source_start()} @*
9800 For realtime plugins it gives the lowest sample or frame in the effect range in
9801 the requested data rate.  For nonrealtime plugins it is the start of the range
9802 of the timeline to process.
9804 @item @b{get_source_position()} @*
9805 For realtime plugins it is the lowest numbered sample in the requested region
9806 to process if playing forward and the highest numbered sample in the region if
9807 playing backward.  For video it is the start of the frame if playing forward
9808 and the end of the frame if playing in reverse.  The position is relative to
9809 the start of the EDL and in the requested data rate. @*
9810 For transitions this is always the lowest numbered sample of the region to
9811 process relative to the start of the transition.
9813 @item @b{get_direction()} @*
9814 Gives the direction of the current playback operation.  This is a macro defined
9815 in transportque.inc.  This is useful for calling read functions since the read
9816 functions position themselves at the start or end of the region to read,
9817 depending on the playback operation.
9819 @item @b{local_to_edl()} @*
9820 @b{edl_to_local()} @*
9821 These convert between the requested data rate and the project data rate.  They
9822 are used to convert keyframe positions into numbers which can be interpolated
9823 at the requested data rate.  The conversion is automatically based on frame
9824 rate or sample rate depending on the type of plugin.
9826 @item @b{get_prev_keyframe(int64_t position, int is_local)} @*
9827 @b{get_next_keyframe(int64_t position, int is_local)} @*
9828 These give the nearest keyframe before or after the position given.  The macro
9829 defined version of load_configuration automatically retrieves the right
9830 keyframes but you may want to do this on your own. @*
9831 The position argument can be either in the project rate or the requested rate.
9832 Set is_local to 1 if it is in the requested rate and 0 if it is in the project
9833 rate. @*
9834 In each keyframe, another position value tells the keyframe's position relative
9835 to the start of the timeline and in the project rate. @*
9836 The only way to get smooth interpolation between keyframes is to convert the
9837 positions in the keyframe objects to the requested rate.  Do this by using
9838 edl_to_local on the keyframe positions.
9839 @end itemize
9841 @c cincvdoc_node_number_318
9842 @node Using OpenGL
9843 @section Using OpenGL
9844 @cindex OpenGL, using
9846 Realtime video plugins support OpenGL@.  Using OpenGL to do plugin routines can
9847 speed up playback greatly since it does most of the work in hardware.
9848 Unfortunately, every OpenGL routine needs a software counterpart for rendering,
9849 doubling the amount of software to maintain.  Fortunately, having an OpenGL
9850 routine means the software version does not need to be as optimized as it did
9851 when software was the only way.
9853 As always, the best way to design a first OpenGL plugin is to copy an existing
9854 one and alter it.  The @b{Brightness} plugin is a simple OpenGL plugin to copy.
9855 There are 3 main points in OpenGL rendering and 1 point for optimizing OpenGL
9856 rendering.
9858 @menu
9859 * Getting OpenGL data:: Getting video data in a form usable by OpenGL
9860 * Drawing using OpenGL:: The method of drawing video in OpenGL
9861 * Using shaders:: Routines to simplify shader usage
9862 * Aggregating plugins:: Combining OpenGL routines from different plugins into one.
9863 @end menu
9865 @c cincvdoc_node_number_319
9866 @node Getting OpenGL data
9867 @subsection Getting OpenGL data
9868 @cindex OpenGL, getting data
9870 The first problem is getting OpenGL-enabled plugins to interact with
9871 software-only plugins.  To solve this, all the information required to do
9872 OpenGL playback is stored in the VFrame object which is passed to
9873 @b{process_buffer}.  To support 3D, the VFrame contains a PBuffer and a
9874 texture, in addition to VFrame's original rows.
9876 In OpenGL mode, VFrame has 3 states corresponding to the location of its video
9877 data.  The opengl state is recovered by calling @b{get_opengl_state} and is set
9878 by calling @b{set_opengl_state}.  The states are:
9880 @itemize @bullet
9881 @item @b{VFrame::RAM} @*
9882 This means the video data is stored in the traditional row pointers.  It must
9883 be loaded into a texture before being drawn using OpenGL routines.
9885 @item @b{VFrame::TEXTURE} @*
9886 The video data is stored in texture memory.  It is ready to be drawn using
9887 OpenGL routines.
9889 @item @b{VFrame::SCREEN} @*
9890 The video data is stored in a frame buffer in the graphics card.  For plugins,
9891 the frame buffer is always a PBuffer.  The image on the frame buffer can not be
9892 replicated again unless it is read back into the texture and the opengl state
9893 is reset to TEXTURE@.  The frame buffer is limited to 8 bits per channel.  If
9894 an OpenGL effect is used in a floating point project, it only retains 8 bits.
9895 @end itemize
9897 In the plugin's @b{process_buffer} routine, there is normally a call to
9898 @b{read_frame} to get data from the previous plugin in the chain.
9899 @b{read_frame} takes a new parameter called @b{use_opengl}.
9901 The plugin passes 1 to @b{use_opengl} if it intends to handle the data using
9902 OpenGL@.  It passes 0 to @b{use_opengl} if it can only handle the data using
9903 software.  The value of @b{use_opengl} is passed up the chain to ensure a
9904 plugin which only does software only gets the data in the row pointers.  If
9905 @b{use_opengl} is 0, the opengl state in VFrame is RAM@.
9907 The plugin must not only know if it is software-only but if its output must be
9908 software only.  Call @b{get_use_opengl} to determine if the output can be
9909 handled by OpenGL@.  If @b{get_use_opengl} returns 0, the plugin must pass 0 for
9910 @b{use_opengl} in @b{read_frame} and do its processing in software.  If
9911 @b{get_use_opengl} is 1, the plugin can decide based on its implementation
9912 whether to use OpenGL@.
9914 The main problem with OpenGL is that all the gl... calls need to be run from
9915 the same thread.  To work around this, the plugin interface has routines for
9916 running OpenGL in a common thread.
9918 @b{run_opengl} transfers control to the common OpenGL thread.  This is normally
9919 called by the plugin in @b{process_buffer} after it calls @b{read_frame} and
9920 only if @b{get_use_opengl} is 1.
9922 Through a series of indirections, @b{run_opengl} eventually transfers control
9923 to a virtual function called @b{handle_opengl}.  @b{handle_opengl} must be
9924 overridden with a function to perform all the OpenGL routines.  The contents of
9925 @b{handle_opengl} must be enclosed in @b{#ifdef HAVE_GL} ... @b{#endif} to
9926 allow it to be compiled on systems with no graphics support, like render nodes.
9927 The return value of @b{handle_opengl} is passed back from @b{run_opengl}.
9929 @b{read_frame} can not be called from inside @b{handle_opengl}.  This would
9930 create a recursive lockup because it would cause other objects to call
9931 @b{run_opengl}.
9933 Once inside @b{handle_opengl}, the plugin has full usage of all the OpenGL
9934 features.  VFrame provides some functions to automate common OpenGL sequences.
9936 The VFrame argument to @b{process_buffer} is always available through the
9937 @b{get_output(int layer)} function.  If the plugin is multichannel, the layer
9938 argument retrieves a specific layer of the output buffers.  The PBuffer of the
9939 output buffer is where the OpenGL output must go if any processing is done.
9941 @c cincvdoc_node_number_320
9942 @node Drawing using OpenGL
9943 @subsection Drawing using OpenGL
9944 @cindex Drawing using OpenGL
9946 The sequence of commands to draw on the output PBuffer stars with getting the
9947 video in a memory area where it can be recalled for drawing:
9948 @verbatim
9949 get_output()->to_texture();
9950 get_output()->enable_opengl();
9951 @end verbatim
9953 @itemize @bullet
9954 @item @b{to_texture} transfers the OpenGL data from wherever it is to the
9955 output's texture memory and sets the output state to TEXTURE@.
9956 @item @b{enable_opengl} makes the OpenGL context relative to the output's
9957 PBuffer.
9958 @end itemize
9960 The next step is to draw the texture with some processing on the PBuffer.  The
9961 normal sequence of commands to draw a texture is:
9962 @verbatim
9963 get_output()->init_screen();
9964 get_output()->bind_texture(0);
9965 get_output()->draw_texture();
9966 @end verbatim
9968 @itemize @bullet
9969 @item @b{VFrame::init_screen} sets the OpenGL frustum and parameters to known
9970 values.
9971 @item @b{VFrame::bind_texture(int texture_unit)} binds the texture to the given
9972 texture unit and enables it.
9973 @item @b{VFrame::draw_texture()} calls the vertex functions to draw the texture
9974 normalized to the size of the PBuffer.  Copy this if you want custom vertices.
9975 @end itemize
9977 The last step in the handle_opengl routine, after the texture has been drawn on
9978 the PBuffer, is to set the output's opengl state to SCREEN with a call to
9979 @b{VFrame::set_opengl_state}.  The plugin should not read back the frame buffer
9980 into a texture or row pointers if it has no further processing.  Plugins should
9981 only leave the output in the texture or RAM if its location results from normal
9982 processing.  They should set the opengl state to RAM or TEXTURE if they do.
9984 @b{Colormodels in OpenGL:} @*
9985 The colormodel exposed to OpenGL routines is always floating point since that
9986 is what OpenGL uses, but it may be YUV or RGB depending on the project
9987 settings.  If it is YUV, it is offset by 0.5 just like in software.  Passing
9988 YUV colormodels to plugins was necessary for speed.  The other option was to
9989 convert YUV to RGB in the first step that needed OpenGL@.  Every effect and
9990 rendering step would have needed a YUV to RGB routine.  With the YUV retained,
9991 only the final compositing step needs a YUV to RGB routine.
9993 @c cincvdoc_node_number_321
9994 @node Using shaders
9995 @subsection Using shaders
9996 @cindex OpenGL, using shaders
9998 Very few effects can do anything useful with just a straight drawing of the
9999 texture on the PBuffer.  They normally define a shader.  The shader is a C
10000 program which runs on the graphics card.  Since the graphics card is optimized
10001 for graphics, it can be much faster than running it on the CPU@.
10003 Shaders are written in OpenGL Shading Language.  The shader source code is
10004 contained in a string.  The normal sequence for using a shader comes after a
10005 call to @b{enable_opengl}.
10007 @verbatim
10008 char *shader_source = "...";
10009 unsigned char shader_id = VFrame::make_shader(0, shader_source, 0);
10010 glUseProgram(shader_id);
10011 // Set uniform variables using glUniform commands
10012 @end verbatim
10014 The compilation and linking step for shaders is encapsulated by the
10015 VFrame::make_shader command.  It returns a shader_id which can be passed to
10016 OpenGL functions.  The first and last arguments must always by 0.  And
10017 arbitrary number of source strings may be put between the 0's.  The source
10018 strings are concatenated by make_shader into one huge shader source.  If
10019 multiple main functions are in the sources, the main functions are renamed and
10020 run in order.
10022 There are a number of useful macros for shaders in @file{playback3d.h}.  All
10023 the shaders so far have been fragment shaders.  After the shader is
10024 initialized, draw the texture starting from @b{init_screen}.  The shader
10025 program must be disabled with another call to @b{glUseProgram(0)} and 0 as the
10026 argument.
10028 The shader_id and source code is stored in memory as long as Cinelerra runs.
10029 Future calls to make_shader with the same source code run much faster.
10031 @c cincvdoc_node_number_322
10032 @node Aggregating plugins
10033 @subsection Aggregating plugins
10034 @cindex Aggregating plugins
10036 Further speed improvements may be obtained by combining OpenGL routines from
10037 two plugins into a single handle_opengl function.  This is done when @b{Frame
10038 to Fields} and @b{RGB to 601} are attached in order.  Aggregations of more than
10039 two plugins are possible but very hard to get working.  Aggregation is useful
10040 for OpenGL because each plugin must copy the video from a texture to a PBuffer.
10041 In software there was no copy operation.
10043 In aggregation, one plugin processes everything from the other plugins and the
10044 other plugins fall through.  The fall through plugins must copy their
10045 parameters to the output buffer so they can be detected by the processing
10046 plugin.
10048 The VFrame used as the output buffer contains a parameter table for parameter
10049 passing between plugins and it is accessed with @b{get_output()->get_params()}.
10050 Parameters are set and retrieved in the table with calls to @b{update} and
10051 @b{get} just like with defaults.
10053 The fall through plugins must determine if the processor plugin is attached
10054 with calls to @b{next_effect_is} and @b{prev_effect_is}.  These take the name
10055 of the processor plugin as a string argument and return 1 if the next or
10056 previous plugin is the processor plugin.  If either returns 1, the fall through
10057 plugin must still call @b{read_frame} to propogate the data but return after
10058 that.
10060 The processor plugin must call @b{next_effect_is} and @b{prev_effect_is} to
10061 determine if it is aggregated with a fall through plugin.  If it is, it must
10062 perform the operations of the fall through plugin in its OpenGL routine.  The
10063 parameters for the the fall through plugin should be available by
10064 @b{get_output()->get_params()} if the fall through plugin set them.
10066 @c cincvdoc_node_number_323
10067 @node Keyboard shortcuts
10068 @chapter Keyboard shortcuts
10069 @cindex Keyboard shortcuts
10070 @cindex Shortcuts
10072 Alex Ferrer started summarizing most of the keyboard shortcuts.  Most of the
10073 keys work without any modifier like @key{SHIFT} or @key{CTRL}.  Most windows
10074 can be closed with a @kbd{CTRL-w}.  Most operations can be cancelled with
10075 @key{ESC} and accepted with @key{RET}.
10077 @section Program window
10078 @cindex Program window
10079 @subsection Editing Media
10080 @cindex Media, editing
10082 @multitable @columnfractions .2 .8
10083 @item @kbd{z}
10084 @tab Undo
10085 @item @kbd{SHIFT Z}
10086 @tab Re-Do
10087 @item @kbd{x}
10088 @tab Cut
10089 @item @kbd{c}
10090 @tab Copy
10091 @item @kbd{v}
10092 @tab Paste
10093 @item @kbd{Del}
10094 @tab Clear
10095 @item @kbd{SHIFT Space}
10096 @tab Paste Silence
10097 @item @kbd{m}
10098 @tab Mute region
10099 @item @kbd{a}
10100 @tab Select all
10101 @item @kbd{SHIFT + click}
10102 @tab When done over an edit causes the highlighted selection to extend to the
10103 cursor position.  When done over the boundary of an effect causes the trim
10104 operation to apply to one effect.
10105 @end multitable
10107 @subsection Editing Labels and In/Out Points
10108 @cindex Editing labels and in/out points
10110 @multitable @columnfractions .2 .8
10111 @item @kbd{[}
10112 @tab Toggle In point
10113 @item @kbd{]}
10114 @tab Toggle Out point
10115 @item @kbd{l}
10116 @tab Toggle label at current position
10117 @item @kbd{CTRL <-}
10118 @tab Go to Previous Label
10119 @item @kbd{CTRL ->}
10120 @tab Go to Next Label
10121 @end multitable
10123 @subsection Navigation
10124 @cindex Navigation
10126 @multitable @columnfractions .2 .8
10127 @item @kbd{Right arrow}
10128 @tab Move right *
10129 @item @kbd{Left arrow}
10130 @tab Move left *
10131 @item @kbd{Up arrow}
10132 @tab Zoom out *
10133 @item @kbd{Down arrow}
10134 @tab Zoom in *
10135 @item @kbd{CTRL Up}
10136 @tab Expand current curve amplitude
10137 @item @kbd{CTRL Dn}
10138 @tab Shrink current curve amplitude
10139 @item @kbd{CTRL Alt Up}
10140 @tab Expand all curve amplitude
10141 @item @kbd{Ctrl Alt Dn}
10142 @tab Shrink all curve amplitude
10143 @item @kbd{Alt Up}
10144 @tab Expand curve amplitude
10145 @item @kbd{Alt Dn}
10146 @tab Shrink curve amplitude
10147 @item @kbd{f}
10148 @tab Fit time displayed to selection
10149 @item @kbd{Alt f}
10150 @tab Make the range of all the automation types.  Fit the maximum and minimum
10151 range of the current highlighted selection
10152 @item @kbd{Ctrl Alt f}
10153 @tab Make the range of the currently selected automation type fit the maximum
10154 and minimum range of the current highlighted selection
10155 @item @kbd{Alt Left}
10156 @tab Move left one edit
10157 @item @kbd{Alt Right}
10158 @tab Move right one edit
10159 @item @kbd{Page Up}
10160 @tab Move up *
10161 @item @kbd{Page Dn}
10162 @tab Move down *
10163 @item @kbd{Ctrl Page Up}
10164 @tab Expand track height
10165 @item @kbd{Ctrl Page Dn}
10166 @tab Shrink track height
10167 @item @kbd{Home}
10168 @tab Go to beginning of timeline *
10169 @item @kbd{End}
10170 @tab Go to end of timeline *
10171 @end multitable
10173 * You may have to click on the timeline to deactivate any text boxes
10174 or tumblers before these work.
10176 @subsection File operations
10177 @cindex File operations
10179 @multitable @columnfractions .2 .8
10180 @item @kbd{n}
10181 @tab New project
10182 @item @kbd{o}
10183 @tab Load Files
10184 @item @kbd{s}
10185 @tab Save Project
10186 @item @kbd{r}
10187 @tab Record
10188 @item @kbd{SHIFT R}
10189 @tab Render
10190 @item @kbd{q}
10191 @tab Quit
10192 @item @kbd{SHIFT P}
10193 @tab Preferences
10194 @item @kbd{SHIFT B}
10195 @tab Batch Render
10196 @item @kbd{SHIFT F}
10197 @tab Set Format
10198 @item @kbd{}
10199 @tab
10200 @end multitable
10202 @subsection Key frame editing
10203 @cindex Keyframes, editing
10205 @multitable @columnfractions .2 .8
10206 @item @kbd{SHIFT X}
10207 @tab Cut keyframes
10208 @item @kbd{SHIFT C}
10209 @tab Copy keyframes
10210 @item @kbd{SHIFT V}
10211 @tab Paste keyframes
10212 @item @kbd{SHIFT Del}
10213 @tab Clear keyframes
10214 @item @kbd{Alt c}
10215 @tab Copy default keyframe
10216 @item @kbd{Alt v}
10217 @tab Paste default keyframe
10218 @end multitable
10220 @subsection Track Manipulation
10221 @cindex Track manipulation
10223 @multitable @columnfractions .2 .8
10224 @item @kbd{t}
10225 @tab Add Audio Track
10226 @item @kbd{u}
10227 @tab Insert default Audio Transition
10228 @item @kbd{SHIFT T}
10229 @tab Add Video Track
10230 @item @kbd{SHIFT U}
10231 @tab Insert Default Video Transition
10232 @item @kbd{d}
10233 @tab Delete last Track
10234 @item @kbd{SHIFT L}
10235 @tab Loop playback
10236 @item @kbd{TAB}
10237 @tab Toggle single track arming status
10238 @item @kbd{SHIFT-TAB}
10239 @tab Toggle every other track's arming status
10240 @end multitable
10242 @subsection What is drawn on the timeline
10243 @cindex Timeline, what is drawn on the
10245 @multitable @columnfractions .2 .8
10246 @item @kbd{1}
10247 @tab Show titles
10248 @item @kbd{2}
10249 @tab Show transitions
10250 @item @kbd{3}
10251 @tab Fade keyframes
10252 @item @kbd{4}
10253 @tab Mute keyframes
10254 @item @kbd{5}
10255 @tab Mode keyframes
10256 @item @kbd{6}
10257 @tab Pan keyframes
10258 @item @kbd{7}
10259 @tab Camera keyframes
10260 @item @kbd{8}
10261 @tab Projector keyframes
10262 @item @kbd{9}
10263 @tab Plugin keyframes
10264 @item @kbd{0}
10265 @tab Mask keyframes
10266 @item @kbd{-}
10267 @tab Camera Zoom
10268 @item @kbd{=}
10269 @tab Projector Zoom
10270 @end multitable
10272 @section Viewer and compositor windows
10273 @cindex Viewer and compositor windows
10275 @multitable @columnfractions .2 .8
10276 @item @kbd{x}
10277 @tab Cut
10278 @item @kbd{c}
10279 @tab Copy
10280 @item @kbd{v}
10281 @tab Paste
10282 @item @kbd{v}
10283 @tab Splice
10284 @item @kbd{b}
10285 @tab Overwrite
10286 @item @kbd{[}
10287 @tab Toggle In point
10288 @item @kbd{]}
10289 @tab Toggle Out point
10290 @item @kbd{l}
10291 @tab Toggle label at current position
10292 @item @kbd{Ctrl <-}
10293 @tab Go to Previous Label
10294 @item @kbd{Ctrl ->}
10295 @tab Go to Next Label
10296 @item @kbd{Home}
10297 @tab Go to beginning
10298 @item @kbd{End}
10299 @tab Go to end
10300 @item @kbd{z}
10301 @tab Undo
10302 @item @kbd{SHIFT Z}
10303 @tab Re-Do
10304 @item @kbd{+}
10305 @tab Zoom in
10306 @item @kbd{-}
10307 @tab Zoom out
10308 @end multitable
10310 @section Playback transport
10311 @cindex Playback transport
10313 Transport controls work in any window which has a playback transport.  They are
10314 accessed through the number pad with num lock disabled.
10316 @multitable @columnfractions .08 .17 .08 .17 .08 .17 .08 .17
10317 @item @kbd{4}
10318 @tab Frame back
10319 @tab @kbd{5}
10320 @tab Reverse Slow
10321 @tab @kbd{6}
10322 @tab Reverse
10323 @tab @kbd{+}
10324 @tab Reverse Fast
10325 @item @kbd{1}
10326 @tab Frame Forward
10327 @tab @kbd{2}
10328 @tab Forward Slow
10329 @tab @kbd{3}
10330 @tab Play
10331 @tab @kbd{Enter}
10332 @tab Fast Forward
10333 @item @kbd{0}
10334 @tab Stop
10335 @tab
10336 @tab
10337 @tab
10338 @tab
10339 @tab
10340 @tab
10341 @end multitable
10343 @key{SPACE} is normal Play, Hitting any key twice is Pause.
10345 Hitting any transport control with @key{CTRL} down causes only the region
10346 between the in/out points to be played, if in/out points are defined.
10348 @section Record window
10349 @cindex Record window
10351 @multitable @columnfractions .2 .8
10352 @item @kbd{Space}
10353 @tab Start and pause recording of the current batch
10354 @item @kbd{l}
10355 @tab Toggle label at current position
10356 @end multitable
10358 @include gpl_en.texi
10360 @ifnotplaintext
10361 @ifnothtml
10362 @ifnotdocbook
10363 @c cincvdoc_node_number_324
10364 @node Index
10365 @unnumbered Index
10366 @printindex cp
10367 @end ifnotdocbook
10368 @end ifnothtml
10369 @end ifnotplaintext
10371 @bye