\chapter{DVD and Bluray Creation}%
\label{cha:dvd_bluray_creation}
+\index{DVD}
+\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.
\begin{itemize}
\item Format frame rates choices are $29.97$ or $25$ for SD, based on the user's timezone, with NTSC 29.97/US or PAL 25 /EU. For BD, the media input will be analyzed to automatically pick the default format or if unknown, the user's timezone will be used to default to $1920/29.97i$ for US or $1920/25i$ for EU. Be sure to set the rendering parameters in the \texttt{settings $\rightarrow$ format} menu.
\item Choose audio stereo or 5.1, again depending on your media.
- \item Target Geometry will be $720\times480$ (US) or $720\time576$ (EU) for SD.
+ \item Target Geometry will be $720\times480$ (US) or $720\times576$ (EU) for SD.
\end{itemize}
\textit{Step 2}: From the main window, select \texttt{file $\rightarrow$ BD Render} or select \texttt{file $\rightarrow$ DVD Render} (figure~\ref{fig:bluray_dvd}). Then:
\subsubsection*{Blu-ray Media}
\label{ssub:bluray_media}
+\index{BluRay}
For rewritable blu-ray (recommended) (BD-RE):
\subsubsection*{DVD Media}
\label{ssub:dvd_media}
+\index{DVD}
For rewritable DVD (DVD+RW):
\subsubsection*{SD Example: Partial Output during \CGG{} run}
\label{ssub:sd_example_partial_output}
+\index{DVD!partial output messages run}
\begin{lstlisting}[style=sh]
...
\subsubsection*{BD Example: Partial Output during \CGG{} run}
\label{ssub:bd_example_partial_output}
+\index{BluRay!partial output messages run}
\begin{lstlisting}[style=sh]
...
\subsubsection*{SD Example – Partial Output during writing disc media}
\label{ssub:sd_example_partial_output_writing}
+\index{DVD!partial output messages writing}
\begin{lstlisting}[style=sh]
growisofs -dvd-compat -Z /dev/sr0 -dvd-video /tmp/dvd_20161224-160756/iso
\subsubsection*{BD Example – Partial Output during writing disc media}
\label{ssub:bd_example_partial_output_writing}
+\index{BluRay!partial output messages writing}
\begin{lstlisting}[style=sh]
growisofs -dvd-compat -Z /dev/sr0=/tmp/bd_20161224-155658/bd.udfs
\section{Debugging DVDs Creation}%
\label{sec:debugging_dvd_creation}
+\index{DVD!debugging}
+\index{BluRay!debugging}
This section contains helpful hints, how to initially check the results, and some information on determining what might have gone wrong and how to address it.
\subsubsection*{Checklist for Troubleshooting}
\label{ssub:checklist_troubleshooting}
+\index{DVD!troubleshooting}
+\index{BluRay!troubleshooting}
\begin{itemize}
\item Are you logged in as root? This is required in order to loopback mount files for bluray and to write media on \texttt{/dev/hardware}. See section \hyperref[sec:bluray_workaround_mount_umount]{13.7} for a workaround for normal user mode.
\section{Subtitles}%
\label{sec:subtitles}
+\index{DVD!subtitles}
DVD (not blu-ray... yet) subtitles are added by using the main window pulldown \texttt{File $\rightarrow$ Subtitle} which brings up a window allowing you to type the filename of a previously generated text file containing the desired words/lines, the script. After entering the filename, click \texttt{Load} to read in your script. By creating a script file ahead of time, it lets you easily add dialog that was already written out and carefully edited for spelling and proper grammar.
Editing in the Line Text box can be used to change the active script line. By double clicking the timeline over the subtitle track, you can reselect the active script line. The subtitle text will be reloaded into the Line Text box and can be edited and re-pasted as the new active subtitle text. You can also highlight multiple lines in the Script Text box and paste them (using the usual window paste methodology) into the Line Text box. After pasting to the timeline, the Line Text box will be updated with the next script line. In addition, if you triple click a line in the \textit{Script Text} box, it will automatically become the current line in the \textit{Line Text} box.
-When you are finished, before clicking \textit{Save}, you must supply a legitimate filename in the \textit{Path} box; your current directory will be used if only a filename but no directory path is supplied. The filename used will automatically have a "--" after it followed by the \textit{track label} and then \textit{udvd} extension added; any extension in the filename will be removed.. If you click OK before saving, the subtitle script position is saved with the session. This is convenient for continuing where you left off.
+When you are finished, before clicking on \textit{Save}, you can specify the output format using the \textit{Format} drop-down button. You can choose between the classic \texttt{.udvd} (micro DVD) and the more universally supported \texttt{.srt} (subrip) and \texttt{.sub} (subviewer). The next step is to provide a legitimate filname in the \textit{Path} box; your current directory will be used if only a filename but no directory path is supplied. The filename used will automatically have a "--" after it followed by the \textit{track label} and then \textit{udvd} extension added; any extension in the filename will be removed.. If you click OK before saving, the subtitle script position is saved with the session. This is convenient for continuing where you left off.
-\noindent To reposition the script, use the slider or tumbler buttons:
+To reposition the script, use the slider or tumbler buttons:
\textit{Slider} bar to move through the text entries quickly. \\
\textit{Prev} or \textit{Next} buttons to go to the previous or next script line.
\label{fig:subtitle02}
\end{figure}
-\noindent Figure~\ref{fig:subtitle02} shows what the pasted subtitle script looks like in a portion of the main window.
+Figure~\ref{fig:subtitle02} shows what the pasted subtitle script looks like in a portion of the main window.
\section{Dvd Interlaced Chroma}%
\label{sec:dvd_interlaced_chroma}
+\index{DVD!yuv420p interlace mode}
\CGG{} uses 4:4:4 colorspace to edit, so it is necessary to convert interlaced 4:2:0 video to 4:4:4.
But you can run into problems, referred to as the \textit{chroma bug}, which you see in DVD media displayed on higher resolution monitors -- streaks or spiky horizontal lines are visible in the chroma channel, especially on diagonal edges. The Chroma Bug is specific to MPEG and 4:2:0 encoding.
\section{HDV on a Blu-ray Disc Without Re-encoding}%
\label{sec:hdv_bd_without_reencoding}
+\index{BluRay!HDV without re-encoding}
An MTS file is a video file saved in the high-definition (HD) MPEG Transport Stream video format, commonly called \textit{AVCHD}. It contains HD video compatible with Blu-ray disc format and is based on the MPEG-2 transport stream. MTS files are often used by Sony, Panasonic, Canon and other HD camcorders. Legal input for Video -- MPEG1VIDEO, MPEG2VIDEO, H264; Audio -- MP1, MP2, AC3, AC3PLUS, DTS, TRUHD.
\section{Blu-ray from Multiple \CGG{} Output}%
\label{sec:bluray_multiple_cinelerra_output}
+\index{BluRay!multiple output}
Writing prepared multiple \CGG{} output files, \texttt{bd.m2ts}, to a single bluray disc is relatively easy to do but is not done automatically. You can render all of the desired files via the Create BD menu, save each individual \texttt{bd.m2ts} file with a unique name, construct a Menu Title that reflects the contents of each of these files, then manually use a few commands to create a udfs file to be written to BD.