single character fix in Plugins for corrected punctuation of subsampling
[goodguy/cin-manual-latex.git] / parts / DVD.tex
index b8668573c262585c0423b221dc00a4bab214e1de..08c59c5abba3994732a020fa83259a92fe4c939e 100644 (file)
@@ -4,13 +4,16 @@
 \index{BluRay}
 
 This section describes how to create a blu-ray DVD, or \textcolor{red}{BD} referring to a \textcolor{red}{B}lu-ray \textcolor{red}{D}VD, and a regular DVD, or \textcolor{red}{SD} referring to a \textcolor{red}{S}tandard \textcolor{red}{D}VD.  The DVDs (plural usage of DVD means either BD or SD) created are unencrypted, unlike commercially available movie DVDs.  This \CGG{} version conceivably can create different variations of DVD/Blu-ray media but for the casual user the most standard usages are readily usable and will be described here.
+In \CGG{} DVD and Bluray creation is a convenience for users who want to edit and then just make basic media without having to work too hard, therefore
+all features will not be available.
 
 Some preliminary information follows.  For NTSC, SD media is almost always $720\times480$ interlaced (the format in the United States, US).  For PAL, SD media is almost always $720\times576$ interlaced (Europe, EU, and most of the world).  An SD can conceivably be created with a lower resolution – for example $352\times240$ MPEG-1 -- but it is not useful.  Aspect ratio for either NTSC or PAL can be $4:3$ or $16:9$.  
 
 Frames per seconds is usually $29.97$ for NTSC and $25$ fps for PAL.  The standard SD dvd generally uses the MPEG-2 program stream with a filename extension of \texttt{m2v}.  BD blu-ray media is not normally interlaced, but you can leave it interlaced.  Blu-ray uses the MPEG transport stream which contains 1 or more program streams with a default filename extension of \texttt{m2ts}.
 
 Requirements for creating DVDs is the hardware device to write the media on and, obviously, the blank media for either BD or SD.  When generating SD media, you will have to install \textit{dvdauthor} and for BD media, install \textit{udftools} if they are not on your system.  Also, keep in mind that to mount filesystems for creating files and to burn DVDs, you will have to be root since you have to have privileges, unless special permissions have been provided for a non-root user.  It is also highly recommended to
-run the \CGG{} startup from a terminal window, instead of the icon, in order to see informative messages of how to actually write the output (at prompt: keyin \texttt{<install\_directory\_path/bin/cin}).
+run the \CGG{} startup from a terminal window, instead of the icon, in order to see informative messages of how to actually write the output (at prompt: keyin \texttt{<install\_directory\_path/bin/cin} or 
+ \texttt{<install\_directory\_path/<your\_version>.AppImage}).
 
 A warning here -- writing blu-ray BDs and  regular SDs can take a large amount of clock time.  Keep in mind that a blu-ray can contain 25 hours of viewing, so would take multiple hours to just write one.
 
@@ -33,6 +36,7 @@ A quick set of basic steps to create DVDs is immediately below and usually just
     \item If not logged in as root, you will get an error message in order to avoid doing a lot of work and then failing out because root is required for automount and to write on DVD hardware.
     \item Load your input source media via: \texttt{File $\rightarrow$ Load files}.
     \item Choose PAL or NTSC for SD/dvd or 1080P/24 for blu-ray in \texttt{Settings $\rightarrow$ Format}.
+    \item If DVD "Interlace Mode" of Bottom Field First is wanted, you MUST set that in \texttt{Settings $\rightarrow$ Format}. If you do, then also remember to change it when you no longer want BFF.
     \item For blu-ray, choose BD Render or for PAL/NTSC, choose DVD \textit{Render} in  \textit{File} menu.
     \item Designate a \textit{work path} with sufficient disk space and then Chk-OK.
     \item When the Batch Render window comes up, click on \textit{Start} and the batch jobs will run.
@@ -127,6 +131,8 @@ Explanation of the choice boxes as seen in figure~\ref{fig:bluray_dvd} for both
 
 \begin{description}
     \item[Deinterlace] remove the interlace.  Interlacing is a video scanning system in which alternating lines are transmitted so that half a picture is displayed each time the scanning beam moves down the screen.  You lose a lot and the quality is bad when you view interlacing on a progressive TV.  You might not really want to use deinterlace, because if you deinterlace non-interlaced media, it will look awful.
+In the case of DVD only, for interlaced media when you do not check the Deinterlace option, it will always be done as Top Field First.  
+To get DVD media to be Bottom Field First, you MUST set the "Interlace Mode" in \texttt{Settings $\rightarrow$ Format}.
     \item[Scale] alter the spatial mapping of an image to increase or reduce the size; modifies the picture.  When some programs scale from $4:3$ to $16:9$ they will automatically cut off the appropriate section of the image for you.  It is necessary to keep in mind, that \textit{square pixels} is the true end goal of scaling, not the aspect ratio which could result in squished or stretched output.  More information about scaling will be provided on a subsequent page with usage of the \textit{Scale Ratio} plugin.
     \item[Profile] for bluray only, use the default bluray.m2ts or choose bluray\_lpcm.m2ts for linear pulse code modulation for digitally encoding uncompressed audio information.
     \item[use tsmuxer] for bluray only, to use tsMuxer as a transport stream muxer for remuxing/muxing elementary streams, check this box.  Usage of tsmuxer requires that your computer have the tsmuxer software installed along with any of its prerequisites. The default is do not use tsmuxer.
@@ -491,13 +497,56 @@ With this option enabled, improved chroma results will be obtained from your DV
 Editing DV or HDV and rendering it back to the same format does not require any special handling.
 In order to perform colorspace conversions correctly in \CGG{} and avoid Chroma errors for interlaced 4:2:0 video, check the box as follows:
 
-\texttt{Settings $\rightarrow$ Performance $\rightarrow$ YUV420P DVD Interlace Mode}
+\texttt{Settings $\rightarrow$ Preferences, Interface tab, Operation section, Use yuv420p dvd interlace format}
 
 This option maintains the interlacing in Chroma sample addressing, which ordinarily would be deleted
 because the upsampling of interlaced chroma fields is normally done using a progressive algorithm.
 With this mode enabled, the MPEG decoder uses a different algorithm for interlaced frames so that the
 4:2:0 format chroma interlacing is preserved.
 
+\section{DVD with LPCM or MP2 audio}%
+\label{sec:dvd_lpcm_audio}
+
+By default, the audio when creating a DVD is always \textit{AC3}. However you can switch to \textit{PCM} (Pulse Code Modulator) or MP2 with just a few additional steps as outlined below.
+Note that Audio must be $48Khz$ or $96Khz$, nothing else is supported, even by ffmpeg's dvd pcm encoder.
+
+\begin{enumerate}
+       \item Start \CGG{} from a terminal window so you will be able to see what is happening. Only the final step when you actually want to write to a
+DVD media writer, requires privileges of either root or the system has
+granted the user this privilege.
+       \item Make sure you have your video with audio loaded and edited to your satisfaction and you are positioned at the start of the video.
+       \item Use the \texttt{File} pulldown and select the \textit{DVD Render} option.
+       \item In the\textit{Create DVD} window, accept the defaults or select different values and then click \texttt{OK}.  Do not check "Use FFMPEG" as that may not work.
+       \item When the \textit{Batch Render} window pops up, in the big box towards the bottom will be 2 lines with the first line for \textit{Video} already highlighted.  Instead, click on the second line, which is for \textit{Audio}, so that it is highlighted.
+       \item On the top left, you will see the \textit{File Format} set as AC3.  Use the down arrow next to    the box and change it to \textit{Raw PCM} or \textit{MPEG Audio} by clicking on it.
+       \item When you switch to Raw PCM or MPEG Audio, you see the extension in the \texttt{Output path} above change to pcm or mp3
+       instead of ac3.  Now just reset the extension from pcm to lpcm or mp2 as that is required. In most cases if you click on the \texttt{Audio} wrench to see the settings, you will find that the standard settings of 16 bit Linear / Signed / Hi Lo work for Raw PCM.  For mp2, you will have to click
+on the Audio wrench and change the default Layer III to Layer II.
+       \item Now click on the \texttt{Start} box in the bottom left hand corner and \CGG{}     will process what it can of the job and put you back at your terminal startup window.
+       \item You will see a few lines of output, some of which are shown below, to include the ERROR:
+       \begin{lstlisting}[style=sh]
+               running /dev/shm//dvd_20240116-182336/dvd.sh
+               INFO: [mplex] mplex version 2.1.0 (2.2.7 $Date: 2012/11/17 01:55:16 $)
+               **ERROR: [mplex] Unable to open file
+               /dev/shm/dvd_20240116-182336/dvd.ac3 for reading.
+       \end{lstlisting}
+       \item Change directory to the location as shown on the terminal window of \texttt{dvd.sh}.
+       \item Using an editor, modify the line in dvd.sh to change \texttt{dvd.ac3} to \texttt{dvd.lpcm} or to \texttt{dvd.mp2} for mp2.  In addition ONLY for Raw PCM you have to change the mplex parameter to include:
+       \begin{lstlisting}[style=sh]
+               -L  48000:2:16
+       \end{lstlisting}
+       The full line will look like this:
+       \begin{lstlisting}[style=sh]
+               mplex -f 8 -L 48000:2:16 -o $dir/dvd.mpg $dir/dvd.m2v $dir/dvd.lpcm
+       \end{lstlisting}
+       \item Now the script is ready to run in the same manner it would have had it been ac3. That is just run via:
+       \begin{lstlisting}[style=sh]
+               ./dvd.sh
+       \end{lstlisting}
+       \item Check to make sure there are no errors in the output shown on the window and proceed as usual.
+\end{enumerate}
+
+
 \section{MPEG utility programs}%
 \label{sec:mpeg_utility_programs}