Skip to content

Working with multiple discs

Simon Inns edited this page Jan 27, 2020 · 24 revisions

Overview

Working with multiple disc sources allows the use of some specific ld-decode features that can greatly enhance the final video produced from LaserDisc sources. This wiki page aims to explain the available tools and how to use them.

Working with multiple sources is a relatively complicated task. You will need a basic understanding of the structure of NTSC and PAL LaserDiscs with regards to VBI data, field/frame structure as well as 2:3 pulldown and what it's used for. The multiple disc source tools are largely new and experimental and may not work for all types and formats of discs (especially NTSC CAV sources).

It is important that all disc sources are made from the same 'master plate' i.e. they have to be identical. Some discs have multiple revisions and it can be hard to spot. Typically mint-marks on the disc will show if physical discs really came from the same source.

Preparing disc images

All required sources must first be decoded using ld-decode. It's recommended that you clearly label source .tbc files to make it clear which disc is which. In this example we will use 4 copies of the Dragon's Lair (NTSC CAV with pulldown) discs named as follows:

dragonslair_ds1.tbc
dragonslair_ds2.tbc
dragonslair_ds3.tbc
dragonslair_ds4.tbc

Once you have the disc images decoded it is possible to use ld-analyse (specifically the SNR and DO graphs) to work out how good each copy is. Rank them in order of best to worse. In this wiki we will assume that ds1 is the best copy and ds4 is the worst.

Process the VBI

It is very important that the VBI metadata is as good as possible for any discs used with combinational tools. Ensure that ld-process-vbi is used with all source .tbc files:

ld-process-vbi dragonslair_ds1.tbc
ld-process-vbi dragonslair_ds2.tbc
ld-process-vbi dragonslair_ds3.tbc
ld-process-vbi dragonslair_ds4.tbc

Disc mapping

Overview

Disc mapping is the process of mapping out a source disc to ensure that the VBI frame numbering is correct and there are no missing or repeating frames in the .tbc. Basically all source copies must be 'aligned' so the tool chain knows which frames are identical across all source copies.

As there can be many capture issues (especially with damaged/rotten discs) combined with complexities such as pulldown frames (which are not numbered in the VBI) - disc mapping is not a fool-proof task. The ld-discmap tool is designed to warn you if things don't look right, but it can't spot every possible issue.

Another important note is around VBI frame number rewriting. If a disc contains pulldown frames (i.e. NTSC CAV discs) the disc mapper will rewrite all frame numbers to ensure that even the pulldown frames are numbered in sequence. This will mean that the resulting VBI isn't the same as the original disc.

All sources must be successfully disc mapped before any other combinational tool can be used:

ld-discmap dragonslair_ds1.tbc dragonslair_ds1_mapped.tbc
ld-discmap dragonslair_ds2.tbc dragonslair_ds2_mapped.tbc
ld-discmap dragonslair_ds3.tbc dragonslair_ds3_mapped.tbc
ld-discmap dragonslair_ds4.tbc dragonslair_ds4_mapped.tbc

Troublesome discs

Odd pulldown sequences

If you are unlucky you will find a disc source that doesn't follow the normal 1-in-5 pulldown sequence. The disc mapper hunts for pulldown frames by examining the phase of the NTSC field and ensuring that, for frames with no VBI frame number, the phases from the last and next frame fields match the unnumbered frame (this helps to distinguish between a pulldown frame with no VBI frame number and a out-of-sequence frame with a missing or corrupt VBI frame number caused by a skip or jump during capture).

Once a likely pulldown frame is identified, the disc mapper looks 5 frames back and 5 frames forward for another pulldown. If either is present the current frame is also marked as a pulldown. This second 'double-check' can fail for discs that do not follow the 1-in-5 pattern causing pulldown frames to be marked incorrectly as normal frames (and therefore the disc mapper does not correctly map the disc).

For sources where this occurs it may be possible to use the --nostrict option which disables the double-check. If the source is poor (and has multiple skips/jumps) this can have the opposite effect of marking non-pulldown frames as pulldown... If you use the --nostrict option be sure to manually check the disc map results in ld-analyse for errors.

Un-mappable frames

In certain cases it may not be possible for the disc mapper to map certain frames; for example, if the player gets stuck on a pulldown frame the resulting .tbc will contain repeating frames with no VBI frame number, so the mapper cannot tell where the frames belong.

The normal action when there are un-mappable frames is to abort the disc mapping process and report the error. It is possible to override this with the --delete-unmappable-frames which will tell the disc mapper to simply delete any frames that can't be successfully mapped. If you use the --delete-unmappable-frames option be sure to manually check the disc map results in ld-analyse for errors.

Differential Dropout Detection

Basic usage

Differential dropout detection works by looking at the difference between multiple copies of the same disc. Each matching field in the source .tbc files is compared to all other matching fields to produce a difference map. The differences between the fields is caused only by errors - and these errors are marked as dropouts in the metadata.

The process becomes more accurate as the number of sources increase. With only 3 sources, 2 frames should match with 1 in error, with 4 sources 3 should match with 1 in error. If multiple sources have dropouts in the same place (or dropouts that overlap in the same place) this will produce false-positives.

Although differential dropout detection will work with 3 sources, 4 is the recommended minimum (as this exponentially decreases the chances of false-positive detection).

Since all disc sources must be compared against all other disc sources for the differential comparison to work, ld-diffdod will rewrite the dropout metadata for all sources in a single process. Therefore, to perform differential dropout detection on the four example sources, the following command is used:

ld-diffdod dragonslair_ds1_mapped.tbc dragonslair_ds2_mapped.tbc \
dragonslair_ds3_mapped.tbc dragonslair_ds4_mapped.tbc

Note that all sources must be processed with ld-discmap otherwise ld-diffdod will refuse to process the .tbc files.

Once ld-diffdod has processed the source .tbc files you can use ld-analyse to examine the result and check the quality of the dropout detection.

Note that ld-diffdod rewrites all of the dropout metadata and therefore removes any dropout detection performed by the original ld-decode process.

ld-diffdod provides an additional check called luma-clip detection (this is invoked by the --lumaclip option from the example above). With luma checking on the tool will filter each field to remove the chroma information (i.e. the colour) and then check that the luma signal is within 0IRE to 100IRE. If parts of the luma are clipped outside the expected range, the field areas will be marked as dropouts. This method allows the tool to detect dropouts that are in the original master. Dropouts in the original master will be present on all sources and therefore will not be detected by the differential comparison.

There are two schools of thought around master dropouts. One is 'they degrade the picture and should be removed', the other is 'they are part of the master and therefore shouldn't be corrected'. The --noluma option allows you to make your own choice.

Tuning the differential comparison

The differential comparison works by comparing each picture 'dot' in the NTSC or PAL field to the equivalent fields in the other sources. If the compared dots are over a certain threshold of difference, the dot is marked as a dropout (i.e. an error).

ld-decode's .tbc files output the NTSC/PAL field information as a 16-bit unsigned gray-scale in the range of 0 to 65,535. The default tolerance is 1000, meaning that the compared dots need to have a difference of 1000 or above to get marked. Clearly this is a balance; too low and any minor variation between captures will trigger it, too high and the detection won't be sensitive enough to spot all the errors.

You can override the default tolerance using the --dod-threshold option with a value between 100 to 65,435. Since the diffdod process is quite time consuming it can be useful to use the --length option to limit the process to a specified number of frames. This allows you to quickly process and check the results using ld-analyse without having to process the complete number of frames. Note that a --start option is also provided if you want to check from a particular start frame (using a combination of --start and --length allows you to examine a particular bit of the disc if required).

Dropout Correction

The ld-dropout-correct tool supports both single source correction and multi-source correction. The advantage of multi-source correction is that dropouts can be corrected by copying in good data from another source so, unlike single disc correction, the data is actually corrected (rather than being substituted using a similar field line).

Note that single-source correction is still possible even with multiple sources. In the unlikely event that a good replacement can't be found from the other sources (such as errors detected by the luma clip detection mentioned above) the corrector will use the normal inter-field correction within the same source.

The dropout correction tool corrects only one source at a time; so the first source provided is the 'master' and the following sources are used to correct it (the last specified file is the output .tbc filename). For example, to dropout correct the ds1 source, you would use the following command:

ld-dropout-correct dragonslair_ds1_mapped.tbc dragonslair_ds2_mapped.tbc \
dragonslair_ds3_mapped.tbc dragonslair_ds4_mapped.tbc \
dragonslair_ds1_mapped_doc.tbc

Note that it is not necessary to perform differential dropout detection before using multi-source correction; in that case the original dropout detection from ld-decode will be used. This is useful if you only have 2 sources available (but is greatly inferior to using the recommended 4 sources). Again, all sources must be mapped before use (even in the case of only 2 sources being available).

Stacking

Stacking is not currently provided by the tool-chain. When it is, it will be documented here.

Clone this wiki locally