minor bluray creation notes
authorGood Guy <good1.2guy@gmail.com>
Sat, 10 Dec 2022 22:19:35 +0000 (15:19 -0700)
committerGood Guy <good1.2guy@gmail.com>
Sat, 10 Dec 2022 22:19:35 +0000 (15:19 -0700)
parts/DVD.tex

index 23db143ef6ad7ea7fe3cf121c6db925aec56dc9f..f417d20892cc27f20eaabbbabaf39d2caf216f7b 100644 (file)
@@ -58,7 +58,9 @@ Any problems encountered will require that you read more information in this sec
 
 The general design of the DVD/blu-ray generation operations is to first render media using batch rendering and then terminate \CGG{} to start a script which creates the target device filesystem data.  These scripts are the \texttt{dvd.sh} and \texttt{bd.sh} scripts written into the target directory.  For DVD, the general plan is to write a directory \texttt{<target>/iso} with the dvd filesystem via \textit{dvdauthor} and then generate an iso9660 filesystem and write it to a dvd via \textit{growisofs}.  
 
-For blu-ray, the filesystem generation is slightly harder.  First, it creates an empty filesystem image \texttt{<target>/bd.udfs} using \textit{mkudffs} which makes a big hole for the filesystem data. The hole is made just a little bigger than the data written by \textit{bdwrite} so that you don't have to write an entire $25GB$ or $50GB$ disc even if no data exists. This empty filesystem is loopback mounted to make it writable, and the linux kernel manages the filesystem image. The bdwrite program applies the blu-ray structure to the UDF filesystem by creating the needed BDMV blu-ray filesystem, which the kernel stores onto the image file \texttt{bd.udfs}.  When udfs is unmounted, the kernel finalizes the disk image on bd.udfs.  The bd.udfs image can be written directly to a blu-ray disk via \textit{dd} or \textit{growisofs}. 
+For blu-ray, the filesystem generation is slightly harder.  First, it creates an empty filesystem image \texttt{<target>/bd.udfs} using \textit{mkudffs} which makes a big hole for the filesystem data. The hole is made just a little bigger than the data written by \textit{bdwrite} so that you don't have to write an entire $25GB$ or $50GB$ disc even if no data exists.
+The actual calculation for the mkudffs size is yourfile.m2ts size-in-bytes/2048 + 4096.
+This empty filesystem is loopback mounted to make it writable, and the linux kernel manages the filesystem image. The bdwrite program applies the blu-ray structure to the UDF filesystem by creating the needed BDMV blu-ray filesystem, which the kernel stores onto the image file \texttt{bd.udfs}.  When udfs is unmounted, the kernel finalizes the disk image on bd.udfs.  The bd.udfs image can be written directly to a blu-ray disk via \textit{dd} or \textit{growisofs}. 
 
 NOTE of IMPORTANCE: there is a serious situation with the interaction between the Operating System (OS) and bdwrite when creating blu-ray, that requires automount to be turned off.  The blu-ray automatic script unmounts the blu-ray/UDF filesystem but the system has not finalized the directories so the OS creates a new loop file device and the data is loaded and cached for use by the new loop but it is stale.  Consequences is that not all of the data is written where it should be.  The solution is for the OS not to mount this second mount so we have to make sure it doesn't.  There are 2 methods to fix this.  The first and easiest is by using the following command to disable automount:
 
@@ -549,6 +551,8 @@ For some time, DVD manufacturers have been employing  a variety of measures to m
 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. 
 
 For creating a blu-ray disc, if you have HDV MPEG-2 media that is in blu-ray format, you can save the original quality of your work, rather than rendering it to another format.  Follow the steps below directly instead of going through \CGG{}.  It has been tested on 10 different MTS files.
+For older media or media which used MP1 or MP2 audio codecs which will not work on blu-ray discs, it may be necessary to transcode the audio while leaving video intact.  An example of the transcode line to use is: \newline
+\hspace*{2mm}ffmpeg -i hdv -c:v copy -c:a pcm\_bluray -mpegts\_m2ts\_mode 1 new\_hdv.mts
 
 \begin{lstlisting}[style=sh]
 du -sb /yourHDVfile.MTS                # Determine the size of your file in bytes.