1 \chapter{Project and Media Attributes}%
2 \label{cha:project_and_media_attributes}
4 When you play media files in Cinelerra, the media files have a certain number of tracks, frame size, sample size, and so on.
5 No matter what attributes the media file has, it is played back according to the project attributes.
6 So, if an audio file's sample rate is different than the project attributes, it is resampled.
7 Similarly, if a video file's frame size is different than the project attributes, the video is composited on a black frame, either cropped or bordered with black.
9 The project attributes are adjusted in Settings $\rightarrow$ Set Format (figure~\ref{fig:set-format}) or can be created in File $\rightarrow$ New.
10 When you adjust project settings in File $\rightarrow$ New, a new empty timeline is created.
11 Every timeline created from this point on uses the same settings.
12 When you adjust settings in Settings $\rightarrow$ Format, media on the timeline is left unchanged.
13 But every timeline created from this point uses the same settings.
17 \includegraphics[width=0.5\linewidth]{images/set-format.png}
18 \caption{Set Format window - note the Audio Channel positions}
19 \label{fig:set-format}
22 In addition to the standard settings for sample rate, frame rate, and frame size, Cinelerra uses some less traditional settings like channel positions, color model, and aspect ratio.
23 The aspect ratio refers to the screen aspect ratio.
25 Edit decision lists , the EDL stored in XML, save the project settings.
26 Formats which contain media but no edit decisions just add data to the tracks.
27 Keep in mind details such as if your project sample rate is 48\,kHz and you load a sound file with 96\,kHz, you will still be playing it at 48\,kHz.
28 Or if you load an EDL file at 96\,kHz and the current project sample rate is 48\,kHz, you will change it to 96\,kHz.
30 The New Project window has some options that are different than the Set Format window as you can see by comparing figure~\ref{fig:set-format} above with this figure~\ref{fig:new-project}.
31 Mostly notably is the field for a directory path and a Project Name.
35 \includegraphics[width=0.5\linewidth]{images/new-project.png}
36 \caption{New Project dialog window}
37 \label{fig:new-project}
40 Explanation of the various fields is described next.
42 \section{Audio attributes}%
43 \label{sec:audio_attributes}
48 select an option from this menu to have all the project settings set to one of the known standards. Some of the options are 1080P/24, 1080I, 720P/60, PAL, NTSC, YouTube, and CD audio.
51 (in New Project menu only) sets the number of audio tracks for the new project. Tracks can be added or deleted later, but this option is on the New Project menu for convenience.
54 sets the samplerate of the audio. The project samplerate does not have to be the same as the media sample rate that you load. Media is resampled to match the project sample rate.
57 sets the number of audio channels for the new project. The number of audio channels does not have to be the same as the number of tracks.
59 \item[Channel positions:]
60 the currently enabled audio channels and their positions in the audio panning boxes in the track patchbay are displayed in the channel position widget in the Set Format window.
61 You can see this display on the left side in figure~\ref{fig:set-format} above.
62 Channel positions are not in New Project window.
64 The channels are numbered.
65 When rendered, the output from channel 1 is rendered to the first output track in the file or the first sound card channel of the sound card.
66 Later channels are rendered to output tracks numbered consecutively.
67 The audio channel positions correspond to where in the panning widgets each of the audio outputs is located.
68 The closer the panning position is to one of the audio outputs, the more signal that speaker gets.
69 Click on a speaker icon and drag to change the audio channel location.
70 The speakers can be in any orientation.
71 A different speaker arrangement is stored for every number of audio channels since normally you do not want the same speaker arrangement for different numbers of channels.
73 Channel positions is the only setting that does not affect the output necessarily.
74 It is merely a convenience, so that when more than two channels are used, the pan controls on the timeline can distinguish between them.
75 It has nothing to do with the actual arrangement of speakers.
76 Different channels can be positioned very close together to make them have the same output.
80 \section{Video attributes}%
81 \label{sec:video_attributes}
85 (in New Project menu only) sets the number of video tracks the new project is assigned.
86 Tracks can be added or deleted later, but options are provided here for convenience.
89 sets the framerate of the video.
90 The project framerate does not have to be the same as an individual media file frame rate that you load.
91 Media is reframed to match the project framerate.
94 sets the size of the video output.
95 In addition, each track also has its own frame size.
96 Initially, the New Project dialog creates video tracks whose size match the video output.
97 The video track sizes can be changed later without changing the video output.
100 sets the aspect ratio; this aspect ratio refers to the screen aspect ratio.
101 The aspect ratio is applied to the video output.
102 The aspect ratio can be different than the ratio that results from the formula: $\dfrac{h}{v}$ (the number of horizontal pixels divided into the number of vertical pixels).
103 If the aspect ratio differs from the results of the formula above, your output will be in non-square pixels.
105 \item[Auto aspect ratio:]
106 if this option is checked, the Set Format dialog always recalculates the Aspect ratio setting based upon the given Canvas size. This ensures pixels are always square.
109 the internal color space of Cinelerra GG is X11 sRGB without color profile. Cinelerra always switches to sRGB when applying filters or using the compositing engine. Different case for decoding/playback or encoding/output; the project will be stored in the color model video that is selected in the dropdown.
110 Color model is important for video playback because video has the disadvantage of being slow compared to audio.
111 Video is stored on disk in one colormodel, usually a YUV derivative.
112 When played back, Cinelerra decompresses it from the file format directly into the format of the output device.
113 If effects are processed, the program decompresses the video into an intermediate colormodel first and then converts it to the format of the output device.
114 The selection of an intermediate colormodel determines how fast and accurate the effects are.
115 A list of the current colormodel choices follows.
119 Allocates 8\,bits for the R, G, and B channels and no alpha. This is normally used for uncompressed media with low dynamic range.
121 Allocates an alpha channel to the 8\,bit RGB colormodel. It can be used for overlaying multiple tracks.\\
123 Allocates a 32\,bit float for the R, G, and B channels and no alpha. This is used for high dynamic range processing with no transparency.
125 This adds a 32\,bit float for alpha to RGB-Float. It is used for high dynamic range processing with transparency. Or when we don't want to lose data during workflow, for example in color correction, key extraction and motion tracking. \\
127 Allocates 8\,bits for Y, U, and V. This is used for low dynamic range operations in which the media is compressed in the YUV color space. Most compressed media is in YUV and this derivative allows video to be processed fast with the least color degradation.
129 Allocates an alpha channel to the 8\,bit YUV colormodel for transparency.
131 In order to do effects which involve alpha channels, a colormodel with an alpha channel must be selected.
132 These are RGBA-8 bit, YUVA-8 bit, and RGBA-Float.
133 The 4 channel colormodels are slower than 3\,channel colormodels, with the slowest being RGBA-Float.
134 Some effects, like fade, work around the need for alpha channels while other effects, like chromakey, require an alpha channel in order to be functional.
135 So in order to get faster results, it is always a good idea to try the effect without alpha channels to see if it works before settling on an alpha channel and slowing it down.
137 When using compressed footage, YUV colormodels are usually faster than RGB colormodels.
138 They also destroy fewer colors than RGB colormodels.
139 If footage stored as JPEG or MPEG is processed many times in RGB, the colors will fade whereas they will not fade if processed in YUV.
140 Years of working with high dynamic range footage has shown floating point RGB to be the best format for high dynamic range.
141 16 bit integers were used in the past and were too lossy and slow for the amount of improvement.
142 RGB float does not destroy information when used with YUV source footage and also supports brightness above 100\,\%.
143 Be aware that some effects, like Histogram, still clip above 100\,\% when in floating point.
145 \item[Interlace mode:]
146 this is mostly obsolete in the modern digital age, but may be needed for older media such as that from broadcast TV. Interlacing uses two fields to create a frame. One field contains all odd-numbered lines in the image; the other contains all even-numbered lines. Interlaced fields are stored in alternating lines of interlaced source footage. The alternating lines missing on each output frame are interpolated.