#
Blu-ray from Multiple CINELERRA-GG Output

Writing prepared multiple CINELERRA-GG output files, bd.m2ts, to a single bluray video 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 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 blu-ray video media. If using AppImage, you will have to first extract the bdwrite program as explained in the NOTE at B.10.1. You can use any other software program that works instead.

Usage of the final preparation taken from the bdwrite program comments:

    ./bdwrite <tgt_dir_path> <playlist-0> <sep> <playlistp1> <sep> ... <sep> <playlist-n>

    <sep> == -<pgm_pid> | --<pgm_pid> | ---<pgm_pid>
    <pgm_pid> may be empty string, or a numeric pgm_pid for current title clip
    <pgm_pid> defaults to first pgm probed
    <playlist-x> == <clip-0.m2ts> <clip-1.m2ts> ... <clip-n.m2ts>

One title is built for each playlist; playlist-0 is used as first-play item. The separators (<sep> represented by the dash character) have unique roles. The double “- -” means stop after playing, and the triple “- - -” means pause.

For example:

    ./bdwrite /tmp/dir /path/menu_titles.m2ts --- /path/clip0.m2ts -- /path/clip1.m2ts -- /path/clip2.m2ts

The basic idea is to use playlist-0 as a menu or directions to use the bluray player remote control to select the desired Title and start the play, avoiding the need for a menu system. Planning in advance to get the desired results is necessary. The following steps provide an outline to get started.

1. Create all of the bd.m2ts files that you want to put on the Bluray.
2. Using CINELERRA-GG, design your Title page using a few seconds of video and the Title plugin.
3. Use BD Create to render your short Title video.
4. Next is the most complicated part which is to run mkudffs with a sufficient amount of disk space to hold all of the bd.m2ts files plus a little more! To calculate this, you can record the sizes from having run BD Create mkudffs. This number is displayed on the terminal screen when using the command line interface each time and add them together. Or recalculate the size of each bd.m2ts using the formula below and adding them all together. This is the number of blocks used to make a bluray image space for bdwrite to use. For many files, this could require a huge amount of space, so check first.

           Total size = File0 size in bytes / 2048 + 4094  "+"   File1 size in bytes / 2048 + 4094  "+" ...

   Now create the image file via: mkudffs image <Total size> where image or udfs is the image name.
5. Loop mount the disk image (refer to Section 13.7).
6. Then actually write your multiple bd.m2ts type files onto the image where <cin_path> is the location of the CINELERRA-GG binary bdwrite file and <path> is your directory path. Below is a single line that wrapped around with 4 Titles.

           <cin_path>/bin/bdwrite image /<path>menu_titles.m2ts --- /<path>/bd1.m2ts -- /<path>/bd2.m2ts -- /<path>/bd3.m2ts -- /<path>bd4.m2ts

   Note that the 3 dashes after the menu_titles.m2ts lets the bluray player know to pause after playing the few seconds video which contains the index to the rest of the files. The 2 dashes after each of the bd.m2ts signify stop. That is when you will have to use your remote to Search Titles in order to play the next one you want to see. In addition, if for some reason you just want to play all, you will have to add another line to the Title menu as a choice and list all of the 4 files in a row at the end of your bdwrite line without any dashes in between.
7. Umount the loopback disk.
8. Use your favorite dd or growisofs tool to write to a formatted bluray disc.

Figure 14.8 demonstrates an example of setting up a Title menu on a 5 second video. There is a list of 4 menu title options that can be searched via remote control using the Title search option for your player.

Figure 14.8: Title menu for DVD/BD