Andrea-s formats and codecs improvements
[goodguy/cin-manual-latex.git] / parts / Quickstart.tex
index e2cd3d012d05212f215fd3c6f40cc5c12896a63e..aaefc14e2f8d54955e60acb9a2e916e0068979b8 100644 (file)
@@ -3,6 +3,7 @@
 
 \section{\CGG{} Quick Start Guide}%
 \label{sec:cin_quick_start_guide}
+\index{quickstart guide}
 
 \CGG{} is a software program NLE, Non-Linear Editor, that provides a way to edit, record, and play audio or video media on Linux.   It can also be used to color correction, retouch photos, motion tracking, watch TV, and create DVDs.
 
@@ -40,18 +41,23 @@ Depending on how you installed the software, you can log in as root or as a user
        \item Or if you installed using the pkg method, click on the \textit{Cin icon}.
 \end{itemize}
 
-You will now see 4 separate windows appear.  The top 2 windows from left to right are the Viewer which is most useful for previewing clips and media and the Compositor which displays the current working frame at the timeline position.  The bottom 2 windows are the \CGG{} Program, also called the timeline, which is where the real work gets done and the Resources window showing a selection of media or effects.
-
 \begin{figure}[htpb]
        \centering
-       \includegraphics[width=1.0\linewidth]{4windows.png}
+       \includegraphics[width=1.0\linewidth]{Fenstergrundposition-en.png}
        \caption{Clockwise: Viewer; Compositor; Resources and Main/Program/Timeline}    
 \end{figure}
 
+You will now see 4 separate windows appear.  The top 2 windows from left to right are the Viewer which is most useful for previewing clips and media and the Compositor which displays the current working frame at the timeline position.  The bottom 2 windows are the \CGG{} Program, also called the timeline, which is where the real work gets done and the Resources window showing a selection of media or effects.
+
 Any of these windows can be resized to better suit your needs.  Note that if your system’s native language is not English, some of the words you see on the screen will be correctly translated for you, others will be in english, and some will have not very good translations.
 
 It is important to know that \CGG{} does not directly change your media.  It writes all changes to what is called the EDL, Edit Decision List.  This way you original media remains completely intact.
 
+Before you get startedi here is a note about \textit{Context Help}. If you need more
+detailed information on a window, menu, button or other particular GUI element than
+is shown in the tooltip, press Alt/h hotkey and the HTML page in your configured web
+browser will display the documentation for the item currently under the mouse.
+
 \subsection{Load Media}%
 \label{sub:load_media}
 
@@ -59,7 +65,7 @@ On the main timeline program window are many pulldowns, the first of which is \t
 
 \begin{figure}[htpb]
        \centering
-       \includegraphics[width=1.0\linewidth]{load_files.png}
+       \includegraphics[width=1.0\linewidth]{load.png}
        \caption{Load media window -- note the icons top right for more options}        
 \end{figure}
 
@@ -105,7 +111,7 @@ You can skip this step if you want the format of your output to be the same as y
 
 \begin{figure}[htpb]
        \centering
-       \includegraphics[width=0.7\linewidth]{format_setting.png}
+       \includegraphics[width=0.7\linewidth]{set-format.png}
        \caption{Format menu to change settings}        
 \end{figure}
 
@@ -125,8 +131,8 @@ You can skip this step if you want the format of your output to be the same as y
 
 \begin{figure}[htpb]
        \centering
-       \includegraphics[width=0.5\linewidth]{magnifier.png}
-       \caption{Effect brown bar with magnifier}       
+       \includegraphics[width=0.8\linewidth]{magnifier.png}
+       \caption{Effect blue bar with magnifier}        
 \end{figure}
 
 \subsection{View and Listen}%
@@ -135,13 +141,13 @@ You can skip this step if you want the format of your output to be the same as y
 \begin{figure}[htpb]
        \centering
        \includegraphics[width=1.0\linewidth]{pulldown_button.png}
-       \caption{Menu pulldowns at the top with Transport buttons below.  Note the yellow tooltips too.}        
+       \caption{Menu pulldowns at the top with Transport buttons below.  Note the colored tooltips too.}       
 \end{figure}
 
 \begin{enumerate}
        \item On the second line, below the pulldowns, are transport buttons to move back and forth on the
        timeline and play forward or reverse, fast or slow, or a single frame.  When you mouse over one of
-       these buttons, a yellow colored tooltip appears to tell you its function along with a key shortcut
+       these buttons, a colored tooltip appears to tell you its function along with a key shortcut
        inside of parenthesis.  When you left click the mouse on the transport button it starts the play and 
        click again to stop it.  As you use these buttons, watch the Compositor to watch your video.
        \item On the timeline, you only see thumbnails and not every single picture.  You may want to
@@ -151,6 +157,11 @@ You can skip this step if you want the format of your output to be the same as y
        large video can be time-consuming.
 \end{enumerate}
 
+If you need more detailed information on a button or other particular GUI
+element than is shown in the tooltip, press Alt/h hotkey and the HTML page
+in your configured web browser will display the documentation for the item
+currently under the mouse.
+
 \subsection{Edit/Compose}%
 \label{sub:edit_compose}
 
@@ -159,7 +170,7 @@ There may be sections of your media that you want to delete, or audio that is ha
 \begin{figure}[htpb]
        \centering
        \includegraphics[width=1.0\linewidth]{some_editing.png}
-       \caption{From left to right:\textit{ Audio 1} is disarmed --  BandSlide transition in \textit{Video 1} -- A highlighted section.}       
+       \caption{From left to right: Audio 1 is disarmed --  BandSlide transition in Video 1 -- A highlighted section.} 
 \end{figure}
 
 \begin{enumerate}
@@ -169,7 +180,7 @@ There may be sections of your media that you want to delete, or audio that is ha
        \item To delete a section of video/audio is described next.  Various ways to do that are available but the
        easiest is to move your mouse and left click at the beginning of the section you want to delete on the
        timeline and while holding down the left mouse button, drag to the end of the section to be deleted. 
-       When you do this, a white colored highlighted section becomes visible.  Use the edit pulldown and
+       When you do this, a white colored highlighted section becomes visible.  Use the \textit{Edit} pulldown and
        choose the \textit{split/cut} option to cut out the highlighted area (note the shortcut of "x").  Remember if you
        cut the wrong thing out you can always use the Edit pulldown to Undo that.
        \item To add a transition where there is deleted section which may make your video look disjointed, do
@@ -192,7 +203,7 @@ There may be sections of your media that you want to delete, or audio that is ha
                button and drag the area to be made into a clip which will turn the color white.  Remember, you
                disarmed the other tracks so only this track is relevant at this time.  On the second line of the main
                window to the right of the transport buttons, are action buttons and as you mouse over them a
-               yellow colored tooltip explains its purpose.  Find the one that says \textit{To clip} which is on the right
+               colored tooltip explains its purpose.  Find the one that says \textit{To clip} which is on the right
                hand side of the right bracket symbol.
                \item Click on \textit{To clip} and a small window comes up which you can comment in, but you do not have
                to, so just click on the green checkmark and now you will have a clip.
@@ -266,54 +277,172 @@ At this time, or even earlier if you think you might make a mistake or if you ar
 
 The file you created in the Render step should now be playable.  You can test this in \CGG{} most easily by going to the Resource window in the lower right corner, clicking on the Media folder, and dragging and dropping the last video to the Viewer window.  There is a separate set of transport buttons on the bottom on that screen to use for playing.
 
-\section{YouTube with \CGG{}}%
-\label{sec:youtube_with_cinelerra}
-
-To create a youtube or dailymotion video, you can easily follow the steps below.  You will have to learn a lot more about \CGG{} to take full advantage of its capabilities and make some really special videos, but this is just to get a start and to see the possibilities.
-
-\begin{enumerate}
-       \item Start \CGG{}; usually you can do this by clicking on \CGG{} icon or key in \texttt{{cin\_path}/bin/cin}.
-       \item In the Program window on the lower left side of your screen, left mouse click the \textit{File} pulldown.
-       \item You will see \textit{Load files} as the second choice so left mouse click this and find your video file to
-       load, highlight it, and check the green checkmark in the lower left hand corner to get it loaded.
-       \item Edit your video in the Program window using the basic commands of:
-       \begin{itemize}
-               \item play and then stop using the space bar
-               \item move the mouse and then left click to move the insertion (location) pointer
-               \item cut a section out by holding down the left mouse and drag, then key in “x” to cut or “c” to copy
-               \item paste a copy or cut section by moving the insertion pointer, then key in “v”
-       \end{itemize}
-    \item Add a title by highlighting the \textit{Video Effects} in the right hand side Resources window; then
-    highlighting the \textit{Title} icon and dragging it to the Program window video track and dropping.
-    \item Click on the middle icon button (looks like a magnifying glass) on the brown colored Title bar to
-    bring up the Title window bottom text box and key in a title.
-    \item Use the \textit{File} pulldown to select \textit{Render} to create the desired video.  In the \textit{Render} window just next to the empty box to the right of the \textit{ffmpeg} file format, click on the down arrow shown there
-    to see the choices and pick \textit{youtube}.  Then move back up to key in the path and filename to render
-    to.  It will pick all of the defaults automatically for you so then just click on the green checkmark to
-    have it start.  There is a progress bar in the main window, very bottom of the right hand side.
-    \item Key in “q” in the main window to get out of \CGG{} and yes or no to save your edit session.
-\end{enumerate}
-
-Youtube will allow the upload of the resulting rendered file as named.  However, Dailymotion requires that the file be named with an acceptable extension so you must rename the output file to have the extension of .webm instead of .youtube
-
-There are currently 6 specific variations within the ffmpeg (file format) / youtube (file type) for different video options.  You see these when you click on the wrench to the right of the word Video and then the Compression down arrow in the Video Preset window.  The first 3 are based on Webm/Vp9\protect\footnote{credit by Frederic Roenitz} and contain basic comments of usage and where to find more information.
-
-The first 3 below, plus any of the VP9 files under the file type of \textit{webm} are the recommended options to use because they are freely usable in any circumstance.
-
-\begin{center}
-       \begin{tabular}{l p{8cm}}
-               sd.youtube & Standard Definition use with default audio/Opus stereo.youtube \\
-               hd.youtube & High Definition “ “ \\
-               uhd.youtube & Ultra High Definition “ “ \\
-       \end{tabular}
-\end{center}
-
-Alternatives based on h264 and for non-commercial use are listed below.  For Dailymotion, these must be renamed to have a different extension of .mp4 instead of .youtube before uploading.
-
-\begin{center}
-       \begin{tabular}{l p{8cm}}
-               sd\_h264.youtube & Standard Definition – must change to audio stereo\_with\_h264.youtube \\
-               hd\_h264.youtube & High Definition -          “ “ \\
-               uhd\_u264.youtube & Ultra High Definition - “ “ \\
-       \end{tabular}
-\end{center}
\ No newline at end of file
+\section{Overview on Formats and Codecs}%
+\label{sec:overview_formats}
+\index{format}
+\index{codec}
+
+
+Here is an overview of the formats (also called containers) and codecs that are used in \CGG{}, by ffmpeg and the internal engine. Roughly speaking these are divided into uncompressed codecs (or codecs with \textit{Intraframe} compression, which can be lossy or lossless) and compressed codecs of \textit{Interframe} type (LongGOP, almost always with lossy compression). The All-I (intraframe) codecs are suitable for editing because a cut or other operation on the timeline corresponds to the exact frame on which you are operating. The interframe types use Groups of Pictures (GOP) and a cut or other operation is accurate (and requires no further calculation) only if it coincides with the beginning of the GOP, and not with an internal frame. There is also color compression: Color Space \textit{bit-depth} and \textit{Chroma-Subsampling} for YUV models. In addition, heavy compression requires the system to do more encoding/decoding work on the timeline. High quality codecs have high bit rates and bit depths but this also affects the performance of the system, not to mention the increased disk space usage. Some formats implement both audio and video streams, others audio only or video only.  
+
+\subsection{FFmpeg Video Formats}%
+\label{sec:FFmpeg_video}
+
+FFmpeg supports hundreds of codecs and formats. Some are proprietary and cannot be implemented in FFmpeg or can be voluntarily compiled as non-free; others are proprietary but their use is free; finally there are the Open formats/codecs, fully supported and well documented. We are only describing here a selection of the most well-known and most frequently used ones.
+
+\subsubsection{High Quality}
+\label{ssub:ffmpeg_video_high_quality}
+
+High quality formats are also called Mezzanine codecs, Digital Intermediate, Preservation codecs or Editing codecs. These  have no compression or intraframe lossless or near-lossless compression and are suitable for editing, post-processing, mastering and archiving. They are also used for the interchange of files between different programs. They take up a lot of disk space and require a powerful system.
+
+\begin{description}
+       \item[MKV] Open, highly configurable and extensively documented. Can have seeking problems. Belongs to the Matroska family.
+       \newline    Presets: \textit{ffv1, ffvyuv}
+       \item[MXF] Created by Avid. It is probably the best and most advanced container for editing.
+       \newline    Presets: \textit{DNxHR, ffv1, AVC\_Intra\_100}
+       \item[MOV] Created by Apple. It is a suitable format for editing because it organizes the files within the container into hierarchically structured \textit{atoms} described in a header. This brings simplicity and compatibility with various software and does not require continuous encoding/decoding in the timeline.
+       \newline    Presets: \textit{DNxHR, ffv1, CineformHD, huffyuv}
+       \item[PRO] Different extension, but it is still mov. Prores is proprietary and there are no official encoders except the original Adobe one. The engine used by ffmpeg is the result of reverse engineering and, according to Adobe, does not guarantee the same quality and performance of the original\protect\footnote{https://support.apple.com/en-us/HT200321}.
+       \newline    Presets: \textit{ProRes}
+       \item[QT] Different extension, but it is always mov.
+       \newline    Presets: \textit{DNxHD, magicyuv, raw, utvideo}
+       \item[MP4] mostly used for General Purpose. It belongs to the large MPEG family.
+       \newline    Presets: \textit{AVC\_Intra\_100}
+       \item[RGB] Raw format.
+       \newline    Presets: \textit{raw}
+       \item[YUV] Raw format.
+       \newline    Presets: \textit{raw}
+       \item[AVI] Old and limited format (no multi streams, no subtitles, limited metadata) but with high compatibility.
+       \newline    Presets: \textit{ffv1}
+\end{description}
+
+\subsubsection{General Purpose}
+\label{ssub:ffmpeg_video_general_purpose}
+
+These are also called Delivery codecs. They are the most used and widespread being suitable for streaming, video sharing, watching TV, smartphones, plus more. Because of lossy compression type Interframe, they produce smaller files with variable quality. They are not suitable for editing, compositing and color correction. Further rendering of these formats worsens the quality exponentially. The most used codecs have hardware support (vaapi, vdpau, nvenc) that make them more efficient.
+
+\begin{description}
+       \item[MOV] Created by Apple. It is a suitable format for editing because it organizes the files within the container into hierarchically structured "atoms" described in a header. This brings simplicity and compatibility with various software and does not require continuous encoding/decoding in the timeline.
+       \newline Presets: \textit{Presets: mov}
+       \item[QT] Different exstension, but it is always mov.
+       \newline Presets: \textit{mjpeg, DV, Div, CinePack}
+       \item[MP4] The most popular. Many other formats belong to this family (MPEG);
+       \newline    h264 is actually x264, open, highly configurable and documented; h265/HEVC is actually x265, open, highly configurable and documented. x264-5 is for encoding only.
+       \newline Presets: \textit{h265, h265, mjpeg, mpeg2, obs2youtube}
+       \item[WEBM] Open; similar to mp4 but not as widespread (it is used by YouTube). In \CGG{} there are specific Presets with \texttt{.youtube} extension, but they are still webm.
+       \newline Presets:  \textit{VP8, VP9, AV1}
+       \item[MKV] Open, highly configurable and widely documented. It might have seeking problems. It belongs to the Matroska family.
+       \newline Presets:  \textit{Theora, VP8, VP9}
+       \item[AVI] Old and limited format (no multistreams, no subtitles, limited metadata) but with high compatibility.
+       \newline Presets:  \textit{asv, DV, mjpeg, xvid}
+       \item[MPG] Parent of the MPEG family, to which MP4 also belongs. Mpeg is used by \CGG{} as default for proxies and mpeg-2 is the standard for Video DVDs.
+       \newline Presets:  \textit{mpeg, mpeg2}
+\end{description}
+
+\subsubsection{Image Sequences}
+\label{ssub:ffmpeg_image_sequences}
+
+The image sequences can be uncompressed, with lossy or lossless compression but always Intraframe. They are suitable for post-processing that is compositing (VFX) and color correction.
+
+\begin{description}
+       \item[DPX] Film standard; uncompressed; high quality. \textit{Log} type.
+       \item[PNG] Uncompressed or lossless compression. Supports alpha channel.
+       \item[WEBP, TIFF, GIF, JPEG, ...] Variable compression, size and quality.
+\end{description}
+
+\subsubsection{Old Pro Formats}
+\label{ssub:ffmpeg_old_pro_formats}
+
+Some formats, though used in the past in the pro field, are disappearing with the evolution of technologies. DVD is becoming more and more niche, while Bluray is still widespread (also as a backup); DV/HDV remains only as a support for old Camcorders with magnetic tapes. DV is still a quality format, with intraframe compression; HDV is mpeg-2 compressed.
+
+\begin{description}
+       \item[AVI] old and limited format but with high compatibility.
+       \newline    Presets: \textit{DV\_pal, DV\_ntsc, mjpeg}
+       \item[QT] belongs to the Apple mov family.
+       \newline    Presets: \textit{DV, mjpeg}
+       \item[M2TS] format for Bluray (mpeg4). Bluray player devices need a standard Bluray disc structure (bdwrite) for playback\protect\footnote{\CGG{} offers specific functionality for creating DVDs/Blurays}.
+       \newline    Presets: \textit{AVC422, Lossless, Bluray, hevc}
+       \item[MP4] Belongs to the MPEG family. Motionjpeg has jpeg compression, then Intraframe, so it maintains good quality and fluidity in editing. It is now an old and limited codec.
+       \newline    Presets: \textit{mjpeg}
+\end{description}
+
+\subsection{FFmpeg Audio Formats}%
+\label{sub:FFmpeg_audio}
+
+Audio formats and codecs take much less resources and space than video ones, so they are often used without compression for maximum quality. However these are compressed formats and codecs widely used in streaming and sharing.
+
+\subsubsection{High Quality}
+\label{ssub:ffmpeg_audio_high_quality}
+
+\begin{description}
+       \item[FLAC] Open; used for storing music. It has lossless compression.
+       \newline    preset: \textit{flac}
+       \item[PCM] Raw format that encodes the signal with \textit{modified pulse modulation} (pcm). FFmpeg does not support pcm audio if you use mp4 as a container.
+       \newline    Presets: \textit{s8, s16, s24, s32}
+       \item[WAV] Raw format created by Microsoft. 32-bit addressing leading to the 4 GB recording limit. It is a widely used standard.
+       \newline    Presets: \textit{s24le, s32le}
+       \item[W64] Wave format created by Sony to override the 4GB recording limit. Poorly supported.
+       \newline    Presets: \textit{s16le, s24le, s32le}
+       \item[MKA] Open, highly configurable and documented. It belongs to the Matroska family. Uncompressed pcm type.
+       \newline    Presets: \textit{s16le, s24le, s32le}
+\end{description}
+
+\subsubsection{General Purpose}
+\label{ssub:ffmpeg_audio_general_purpose}
+
+\begin{description}
+       \item[MP3] Belongs to the MPEG family. The most widely used in streaming and sharing.
+       \newline   preset: \textit{mp3}
+       \item[OGG] Open, highly configurable and documented. It belongs to the Matroska family. Flac has lossless compression; opus is compressed but modern and of good quality, superior to mp3. Vorbis is compressed and dated, but lightweight and compatible.
+       \newline    Presets: \textit{flac, opus, vorbis}
+       \item[PRO] Created by Apple; compressed audio codec, competing with mp3.
+       \newline    Presets: \textit{acc256k}
+\end{description}
+
+\subsection{\CGG{} Internal Engine}%
+\label{sub:internal_engine}
+
+FFmpeg is the default engine, but you can also use its internal engine, which is limited in supported formats but efficient and of high quality.
+
+\subsubsection{Video general purpose}
+\label{ssub:internal_general_purpose}
+
+\begin{description}
+       \item[RAW DV] supports the DV standard.
+       \newline    Presets: \textit{dv}
+       \item[MPEG Video] highly configurable. Extension \texttt{.m2v}.
+       \newline    Presets: \textit{mpeg1, mpeg2}
+       \item[OGG Theora/Vorbis] Open, easily configurable. Theora for video, Vorbis for audio.
+       \newline    Presets: \textit{theora, vorbis}
+\end{description}
+
+\subsubsection{Image Sequences}
+\label{sub:internal_image_sequences}
+
+There are quite a few formats available.
+
+\begin{description}
+       \item[EXR Sequence] OpenEXR (Open Standard) is a competing film standard to DPX, but \textit{Linear} type.
+       \item[Ppm Sequence] is RGB Raw.
+       \item[Tga Sequence] is RGB(A) compressed or uncompressed.
+       \item[Tiff Sequence] is RGB(A) or RGB(A)-Float with various compression types.
+       \item[Jpg, gif Sequences] lossy compressed and limited formats.
+\end{description}
+
+\subsubsection{Audio general purpose}
+\label{sub:internal_audio_general_purpose}
+
+\begin{description}
+       \item[AC3] widely used multichannel standard (Dolby Digital). Format with lossy compression.
+       \newline    Presets: \textit{ac3}
+       \item[Apple/SGI AIFF] Created by Apple; is an uncompressed format (pcm type) or with 32/64-bit floating point compression.
+       \newline    Presets: \textit{aif}
+       \item[Sun/Next AU] created by Sun and used in Unix environment, now in disuse. It can be of pcm type or with lossy compression.
+       \newline    Presets: \textit{au}
+       \item[Flac] Open, lossless compression, very good quality.
+       \newline    preset: \textit{flac}
+       \item[Microsoft WAV]  created by Microsoft. It can have 16-24-32-bit linear or float compression.
+       \newline    Presets: \textit{wav}
+       \item[MPEG Audio] Very widespread standard. Extension \texttt{.mp3}.
+       \newline    Presets: \textit{mp3}
+\end{description}