Andrea Color stuff in lieu of Color Management
[goodguy/cin-manual-latex.git] / parts / Attributes.tex
index 8709c5f03214fedc830f1b2489245e1a7466b91f..f116e20ad745253ffa1cd04c1d61521c6d5a7f31 100644 (file)
@@ -1,5 +1,8 @@
 \chapter{Project and Media Attributes}%
 \label{cha:project_and_media_attributes}
 \chapter{Project and Media Attributes}%
 \label{cha:project_and_media_attributes}
+\index{project attributes}
+\index{format}
+\index{settings}
 
 When you play media files in \CGG{}, the media files have a certain
 number of tracks, frame size, sample size, and so on.  No matter
 
 When you play media files in \CGG{}, the media files have a certain
 number of tracks, frame size, sample size, and so on.  No matter
@@ -10,8 +13,8 @@ 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.
 
 attributes, the video is composited on a black frame, either cropped
 or bordered with black.
 
-The project attributes are adjusted in \texttt{file $\rightarrow$
-Set Format} (figure~\ref{fig:set-format}) or can be created in
+The project attributes are adjusted in \texttt{Settings $\rightarrow$
+Format} (figure~\ref{fig:set-format}) or can be created in
 \texttt{File $\rightarrow$ New}.  When you adjust project settings
 in \texttt{File $\rightarrow$ New}, a new empty timeline is created.
 Every timeline created from this point on uses the same settings.
 \texttt{File $\rightarrow$ New}.  When you adjust project settings
 in \texttt{File $\rightarrow$ New}, a new empty timeline is created.
 Every timeline created from this point on uses the same settings.
@@ -28,9 +31,9 @@ from this point uses the same settings.
 In addition to the standard settings for sample rate, frame rate,
 and frame size, \CGG{} uses some less traditional settings like
 channel positions, color model, and aspect ratio.  The aspect ratio
 In addition to the standard settings for sample rate, frame rate,
 and frame size, \CGG{} uses some less traditional settings like
 channel positions, color model, and aspect ratio.  The aspect ratio
-refers to the screen aspect ratio.
+refers to the screen aspect ratio (SAR).
 
 
-Edit decision lists , the EDL stored in XML, save the project
+Edit decision lists , the EDL \index{EDL} stored in XML, save the project
 settings.  Formats which contain media but no edit decisions just
 add data to the tracks.  Keep in mind details such as if your
 project sample rate is 48\,kHz and you load a sound file with
 settings.  Formats which contain media but no edit decisions just
 add data to the tracks.  Keep in mind details such as if your
 project sample rate is 48\,kHz and you load a sound file with
@@ -54,6 +57,7 @@ Explanation of the various fields is described next.
 
 \section{Audio attributes}%
 \label{sec:audio_attributes}
 
 \section{Audio attributes}%
 \label{sec:audio_attributes}
+\index{audio!attributes}
 
 
 \begin{description}
 
 
 \begin{description}
@@ -66,11 +70,11 @@ audio.
 tracks for the new project. Tracks can be added or deleted later,
 but this option is on the New Project menu for convenience.
 
 tracks for the new project. Tracks can be added or deleted later,
 but this option is on the New Project menu for convenience.
 
-\item[Samplerate:] sets the samplerate of the audio. The project
+\item[Samplerate:] \index{sample rate} 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.
 
 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.
 
-\item[Channels:] sets the number of audio channels for the new
+\item[Channels:] \index{audio!channels} 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.
 
 project. The number of audio channels does not have to be the same
 as the number of tracks.
 
@@ -105,24 +109,25 @@ close together to make them have the same output.
 
 \section{Video attributes}%
 \label{sec:video_attributes}
 
 \section{Video attributes}%
 \label{sec:video_attributes}
+\index{video!attributes}
 
 \begin{description}
 \item[Tracks:] (in New Project menu only) sets the number of video
 tracks the new project is assigned.  Tracks can be added or deleted
 later, but options are provided here for convenience.
 
 
 \begin{description}
 \item[Tracks:] (in New Project menu only) sets the number of video
 tracks the new project is assigned.  Tracks can be added or deleted
 later, but options are provided here for convenience.
 
-\item[Framerate:] sets the framerate of the video.  The project
+\item[Framerate:] \index{framerate} sets the framerate of the video.  The project
 framerate does not have to be the same as an individual media file
 frame rate that you load.  Media is reframed to match the project
 framerate.
 
 framerate does not have to be the same as an individual media file
 frame rate that you load.  Media is reframed to match the project
 framerate.
 
-\item[Canvas size:] sets the size of the video output.  In addition,
+\item[Canvas size:] \index{canvas size} sets the size of the video output \index{output size}.  In addition,
 each track also has its own frame size.  Initially, the New Project
 dialog creates video tracks whose size match the video output.  The
 video track sizes can be changed later without changing the video
 output.
 
 each track also has its own frame size.  Initially, the New Project
 dialog creates video tracks whose size match the video output.  The
 video track sizes can be changed later without changing the video
 output.
 
-\item[Aspect ratio:] sets the aspect ratio; this aspect ratio refers
+\item[Aspect ratio:] \index{aspect ratio} sets the aspect ratio; this aspect ratio refers
 to the screen aspect ratio.  The aspect ratio is applied to the
 video output.  The aspect ratio can be different than the ratio that
 results from the formula: $\dfrac{h}{v}$ (the number of horizontal
 to the screen aspect ratio.  The aspect ratio is applied to the
 video output.  The aspect ratio can be different than the ratio that
 results from the formula: $\dfrac{h}{v}$ (the number of horizontal
@@ -134,7 +139,7 @@ will be in non-square pixels.
 dialog always recalculates the Aspect ratio setting based upon the
 given Canvas size. This ensures pixels are always square.
 
 dialog always recalculates the Aspect ratio setting based upon the
 given Canvas size. This ensures pixels are always square.
 
-\item[Color model:] the internal color space of \CGG{} is X11 sRGB
+\item[Color model:] \index{color!model} the internal color space of \CGG{} is X11 sRGB
 without color profile. \CGG{} 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
 without color profile. \CGG{} 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
@@ -170,8 +175,10 @@ derivative allows video to be processed fast with the least color
 degradation.
   \item[YUVA-8 bit] Allocates an alpha channel to the 8\,bit YUV
 colormodel for transparency.
 degradation.
   \item[YUVA-8 bit] Allocates an alpha channel to the 8\,bit YUV
 colormodel for transparency.
-  \end{description} In order to do effects which involve alpha
-channels, a colormodel with an alpha channel must be selected.
+  \end{description}
+
+In order to do effects which involve alpha
+channels \index{alpha channel}, a colormodel with an alpha channel must be selected.
 These are RGBA-8 bit, YUVA-8 bit, and RGBA-Float.  The 4 channel
 colormodels are slower than 3\,channel colormodels, with the slowest
 being RGBA-Float.  Some effects, like fade, work around the need for
 These are RGBA-8 bit, YUVA-8 bit, and RGBA-Float.  The 4 channel
 colormodels are slower than 3\,channel colormodels, with the slowest
 being RGBA-Float.  Some effects, like fade, work around the need for
@@ -181,8 +188,8 @@ 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.
 
 channels to see if it works before settling on an alpha channel and
 slowing it down.
 
-  When using compressed footage, YUV colormodels are usually faster
-than RGB colormodels.  They also destroy fewer colors than RGB
+  When using compressed footage, YUV colormodels \index{yuv} are usually faster
+than RGB colormodels \index{RGB}.  They also destroy fewer colors than RGB
 colormodels.  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\@.  Years of working with high dynamic range footage
 colormodels.  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\@.  Years of working with high dynamic range footage
@@ -193,7 +200,7 @@ information when used with YUV source footage and also supports
 brightness above 100\,\%.  Be aware that some effects, like
 Histogram, still clip above 100\,\% when in floating point.
 
 brightness above 100\,\%.  Be aware that some effects, like
 Histogram, still clip above 100\,\% when in floating point.
 
-\item[Interlace mode:] this is mostly obsolete in the modern digital
+\item[Interlace mode:] \index{interlacing} 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
 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
@@ -202,6 +209,46 @@ lines of interlaced source footage. The alternating lines missing on
 each output frame are interpolated.
 \end{description}
 
 each output frame are interpolated.
 \end{description}
 
+\section{Best practice in pre-editing}%
+\label{sec:best_practice_pre_editing}
+
+\CGG{} supports the simultaneous presence in the Timeline of sources with different frame sizes and frame rates. However, audio/video synchronization problems may occur due to their different timing.\protect\footnote{credit to sge and Andrew Randrianasulu}
+Plugins that rely on the timing of each frame, for example \textit{Motion} and \textit{Interpolate} plugins, may have problems when used at the same time with engines which increase frame rate. Frame rate per definition cannot be increased without either duplicating some frames or generating them in some intelligent way. But to work reliably, the \textit{Motion} plugin requires access to all actual frames. These kinds of plugins (and also the rare cases of audio/video desync) explicitly require the \textit{Play every frame} option.
+
+There is no problem as long as the source fps, project fps, and destination fps are identical. In most cases, high frame rates such as 120 or 144 or any fps, will be just fine for \textit{Motion} provided that source footage all has the same frame rate.
+
+But when \textit{project} and \textit{source} frame rates are different (or \textit{project} and
+\textit{rendered} fps), then the \CGG{} engine has to either duplicate (interpolate) some frames or throw some away. Because of this, the audio tracks and the timeline get out of sync with such accelerated (or slowed down) video. And to make \textit{Motion} plugins reliably calculate interframe changes, you have to ensure the consistent frame numbers and frame properties.
+
+Generally, best practice is to perform the following sequence of preparations for video editing.
+
+\begin{enumerate}
+       \item Motion stabilization, and maybe some other preparations, to improve the quality of the source video is best done under the properties identical to the properties of the original video; it may be different codec, but same frame size and same frame rate.
+       \item If you need to alter the frame rate, for example because different source clips have different frame rates, then recode all the necessary clips to the same future project frame rate. Here frame sizes can still have different sizes, but frame rates should be all the same.
+       \item Whole editing: if you need to change frame rate of some restricted part, particularly when smooth acceleration/deceleration is needed, it can be done here. But if frame rate has to be changed only due to different source fps, it is better to do it during the preparation stage.
+\end{enumerate}
+
+\CGG{} does not have color management \index{color management}, but we can still give some general advice on how to set color spaces:
+
+\begin{enumerate}
+       \item Profiling and setting the monitor: \\
+       source: \textit{sRGB} $\rightarrow$ monitor: \textit{sRGB}  (we get a correct color reproduction) \\
+       source: \textit{sRGB} $\rightarrow$ monitor: \textit{rec709} (we get slightly dark colors) \\
+       source: \textit{sRGB} $\rightarrow$ monitor: \textit{DCI-P3} (we get over-saturated colors) \\
+       
+       source: \textit{rec709} $\rightarrow$ monitor: \textit{rec709} (we get a correct color reproduction) \\
+       source: \textit{rec709} $\rightarrow$ monitor: \textit{sRGB} (we get slightly faded colors) \\
+       source: \textit{rec709} $\rightarrow$ monitor: \textit{DCI-P3} (we get over-saturated colors)
+       \item It would be better to set the project as RGB(A)-FLOAT, allowing system performance, because it collects all available data and does not make rounding errors. If we can't afford it, starting from YUV type media it is better to set the project as YUV(A)8, so as not to have a darker rendering in the timeline. On the contrary, if we start from RGB signals, it is better to use RGB(A)8. If we don't display correctly on the timeline, we'll make adjustments from the wrong base (metamerism) and get false results.
+       \item Among the rendering options always set the values \\
+       \texttt{colorspace=...} (color model); \\
+       \texttt{color\_trc=...} (gamma correction) \\
+       \texttt{color\_primaries=...} (gamut).
+       
+       These are only metadata that do not affect rendering but when the file is read by a player later they are used to reproduce the colors without errors.
+\end{enumerate}
+
+
 %%% Local Variables:
 %%% mode: latex
 %%% TeX-master: "../CinelerraGG_Manual"
 %%% Local Variables:
 %%% mode: latex
 %%% TeX-master: "../CinelerraGG_Manual"