Skip to content

ld analyse User Guide

Harry Munday edited this page Mar 2, 2022 · 8 revisions

Introduction

ld-analyse is a graphical application designed to assist with the analysis of LaserDisc images decoded by ld-decode. The primary file-type is .tbc (time-base corrected) video files containing the raw NTSC or PAL fields. The application also presents video metadata (supplied by JSON files) that provide additional details about the .tbc file.

Note! No colour on VHS-decode on the current version.

As Luminance & Chrominance are separated into separate .tbc files i.e digital S-Video as it were however LD-Analyse was meant for single .tbc file composite signals, so VHS-Decode files need to be converted currently, you can do this in Debian/Ubuntu or Debian/Ubuntu under WSL2 on windows 10/11 installs.

Note! This is a very janky and not a quality preserving method but it's better than nothing for allowing full-colour analysis & demonstration.

PAL:

sox -m -r 17778400 -b 16 -c 1 -e unsigned -t raw olncolorbars.tbc -r 17778400 -b 16 -c 1 -e unsigned -t raw olncolorbars_chroma.tbc -r 17778400 -b 16 -c 1 -e unsigned -t raw soxtest.tbc gain 5.75

NTSC:

sox -m -r 14318181 -b 16 -c 1 -e unsigned -t raw olncolorbars.tbc -r 17778400 -b 16 -c 1 -e unsigned -t raw olncolorbars_chroma.tbc -r 17778400 -b 16 -c 1 -e unsigned -t raw soxtest.tbc gain 5.75

Then just copy the original ‘’tapename.tbc.json’’ file to match the new file.

Opening a time-base corrected video file (.tbc)

To open a .tbc file for analysis, click on the File menu and select open

This will display a list of available files filtered by the .tbc extension

The ld-analyse main window

Once a .tbc file is opened the main window provides a view of the currently selected video frame as well as information about the current frame. There are three primary frame views selected by the 'Source' button which changes to 'Chroma' and then 'LPF' to indicate the currently selected mode.

When 'Source' is selected the main window displays the raw frame data (which is grey-scale) including both visible and non-visible picture information:

When 'Chroma' is selected the main window displays the frame data after processing with the chroma-decoder (the chroma-decoder is responsible for processing the raw frame into a colour image):

When 'LPF' is selected the main window displays the frame data after processing with a low-pass filter (which turns the frame into a black and white image):

The displayed frame (source, chroma-decoder or LPF) is made up of two fields that form alternate 'lines' of the image. These fields are referred to as 'first' and 'second' fields denoting the order in which they should be interlaced in order to form the desired image.

The main window shows information about the first and second field including the field numbers in the main window's status bar.

The decoded frame is made up of several distinct areas. The following diagram shows the location of the main areas (please see the PAL and NTSC specification documents for more detailed descriptions of the frame contents):

The most common controls are present on the main window under the frame slider-bar. The functions of the various buttons are shown in the following diagram:

If the source disc contains chapter numbers the start and end frame buttons will move back/forth one chapter at a time.

Note that clicking on the 'interactive oscilloscope' button opens the line scope. When the interactive oscilloscope button is activated it is possible to click in the frame viewer to highlight the required line in the line scope. It is also possible to click-drag the mouse to interactively display video lines.

Highlight dropouts

Dropouts are temporary losses of signal caused by dirt, damage, scratches or other defects on the originally sampled LaserDisc. ld-decode detects areas of dropouts during the decoding process. These detected areas are shown in the currently selected frame. Red lines represent drop-outs in the first field of the frame and blue lines represent drop-outs in the second field.

Dropouts are highlighted by clicking on the 'Dropouts Off' button which will then change to 'Dropouts On' (clicking again reverses this action):

Normal/Reverse field order

Some LaserDiscs discs are mastered with the expected field order reversed. This causes ld-analyse to combine the wrong fields and the resulting frame is a mix of two adjacent frames. Clicking on the 'Normal Field-order' button reverses the displayed field order:

Clicking again on the same button will revert back to normal field order. Note that switching the field order will cause ld-analyse to return to the first frame of the TBC file.

The File menu

The file menu contains options for handling the loading and saving of various files.

Open TBC file

This option opens a new TBC file as described above.

Reload TBC

This option reloads the current TBC file (this is useful when checking a TBC file that is still being decoded in order to view any new frames that have decoded since the file was originally loaded).

Save frame as PNG

This option saves the currently selected frame as a PNG image. The image saved contains both the visible and non-visible frame image. The option saves the currently displayed image (however, drop-out highlighting is not included).

Exit

This option quits ld-analyse and closes all windows.

The View Menu

The view menu contains a number of options used to control the main window's frame view.

Zoom in

This option zooms into the frame image. Note: if dropout highlighting is selected, highlighting will also zoom to make it easier to see DO areas.

Zoom out

This option zooms out of the frame image.

Zoom to original size

The zoom to original size option causes the main window to resize the frame viewer to the actual size of the captured frame (i.e. a 1:1 pixel representation).

Zoom to 2x size

This option zooms the frame viewer to 2 times the original size.

Zoom to 3x size

This option zooms the frame viewer to 3 times the original size.

The Window Menu

The Window menu contains a number of options that open additional windows to assist with analysis.

Dropout analysis

The dropout analysis window shows a graph of dropouts detected in the whole TBC file. The dropouts are averaged over multiple fields to simplify the view (the number of fields used per average increases as the total number of fields increases). The graph shows the dropouts on the X axis (represented by the total length in picture 'dots' of all detected dropouts in the field) and the field number on the Y axis:

SNR analysis

The SNR analysis window shows the reported black peak SNR across the whole TBC video file. SNR (Signal to Noise Ratio) gives a view of the quality of the original disc (and the capture player). Higher values represent a better source signal.

  • 35-40 - Good signal
  • 30-35 - Ok signal
  • 25-30 - Poor signal
  • 25 and below - rotten or badly damaged disc

Generally the signal will be worst at the beginning of a disc (due to the MTF effect on the optics) and then reach a peak quality around frame 15,000. Some discs exhibit quality loss towards the end of the disc (as this area is most likely damaged by both handling and edge-rot issues).

VBI

The VBI (Vertical Banking Interval) contains a number of metadata fields providing information about the current frame and LaserDisc such as frame number, audio type and disc type.

  • Disc type - CAV or CLV
  • Picture number - The current frame number (only for CAV discs)
  • CLV time code - The current time code (only for CLV discs)
  • Chapter number - The current chapter number
  • Lead in - a special flag found at the start of LaserDiscs
  • Lead out - a special flag found at the end of LaserDiscs
  • User code - a code included by the mastering process
  • Picture stop code - a flag indicating the player should pause on the current frame

Original specification VBI

The original specification VBI tab shows the interpretation of the raw VBI data according to the original LaserDisc specification. This generally applies to very early LaserDiscs (pre-1986).

  • CX - CX audio mode is on/off
  • Disc size - 12 or 8 inches
  • Disc side - 1 or 2
  • Teletext - True if teletext is present anywhere on the disc
  • Programme dump - Not defined
  • FM/FM Multiplex - Not defined
  • Digital - Not defined
  • Sound mode - Mainly mono, stereo or bilingual (dual-mono)
  • Parity correct - a parity flag for the VBI (programme status part only)

Amendment 2 specification VBI

The amendment 2 tab shows the VBI according to the amendment 2 version of the LaserDisc specifications (and generally covers most LaserDiscs).

  • CX - CX audio mode is on/off
  • Disc size - 12 or 8 inches
  • Disc side - 1 or 2
  • Teletext - True if teletext is present anywhere on the disc
  • Copy allowed - True if copying is allowed
  • Standard video - True if main content is standard video
  • Sound mode - Mainly mono, stereo or bilingual (dual-mono)

Line scope

The line scope provides an oscilloscope style view of a video line. The current video line can be selected by clicking on the current frame (this will also open the line scope window if required). Once the line scope window is open you can also use the 'previous' and 'next' buttons to select another line or simply type the required line in the spin-box provided.

The view is divided into sections by several vertical lines. The sections are as follows:

  • Pilot/Vertical Sync
  • Colour burst
  • Front-porch
  • Visible line
  • Back porch

The top horizontal line represents the expected white-level IRE and the bottom horizontal line represents the expected black level IRE.

When in interactive mode a green line shows the position on the line that is selected in the main frame view window.

The YC tick-box shows the combined Y (Luminance) and C (Chrominance) values (the combined YC signal is the actual signal present in the original TBC video):

The 'dropouts' tick-box will highlight any drop-outs detected on the line in red (in the YC view). Unticking this box removes the highlighting:

The Y tick-box filters the original signal to present just the Luminance signal:

The C tick-box filters the original signal to present just the Chrominance signal:

If you select YC and Y or C, the YC line will dim to allow easier viewing of the sub-signals:

Closed Captions

On some NTSC discs closed caption subtitle information is included. When the closed caption window is open it is possible to scroll through a contiguous sequence of frames (using the next frame button) - if CC information is present it will be typed out into the closed caption window. Text in the CC window can be cut and pasted into another application if required.

Chroma decoder configuration

This window lets you adjust the chroma decoder's settings. Most of the options here correspond to command-line arguments to the ld-chroma-decoder tool, so you can use it prior to decoding to find the best settings.

The 'Chroma gain' slider adjusts the overall strength of the colour information in the image; it's like the Colour control on a monitor. (If you need to adjust this very far away from 1.0, then your video source probably needs frequency equalisation; look at the VITS multiburst signal if present.)

There are separate tabs for PAL- and NTSC-specific options. In both cases, there are some options that control how chroma (colour) and luma (brightness) information are separated - the chroma filter - and then some that control how chroma information is turned into actual colours.

PAL

The 'Chroma filter' radio buttons let you select between three different chroma filters, corresponding to pal2d, transform2d and transform3d at the command line. PalColour is a simple PAL-D decoder, like most monitors, that will give reasonably good results on very poor quality or nonstandard video. The others use the BBC's high-quality Transform PAL algorithm: Transform PAL 2D uses a single field, and Transform PAL 3D uses multiple fields for better quality (but is slower).

'Use threshold comparison mode' and 'Transform threshold' control how Transform PAL identifies chroma information; you can adjust the threshold to make it treat more or less information as chroma, which may be useful on noisy video. (The command-line tool has an additional mode that lets you specify per-frequency thresholds; this isn't supported in ld-analyse yet.)

'Overlay FFT visualisation' draws a visualisation of the Transform PAL frequency bins on top of the video. If you know a bit about how the Transform PAL algorithm works, you can use this to see how much chroma information it's detecting (brighter colours mean more chroma) and where the symmetries are.

Normally the output of Transform PAL is fed through PalColour's PAL-D decoder to produce colour output. 'Use Simple PAL decoder' uses a PAL-S decoder instead - it produces better colour resolution, but it's sensitive to phase errors in the input (producing "Hanover bars"), so at present it's only useful for very high quality input video.

NTSC

The 'Chroma filter' radio betters let you choose between three different chroma filters, corresponding to ntsc1d, ntsc2d and ntsc3d at the command line. The 1D decoder is a simple notch filter, producing very poor quality output. The 2D decoder is an adaptive 3-line decoder that uses a heuristic to combine information from adjacent lines within a single field. The 3D decoder uses a heuristic that combines information from lines across five fields. 3D will give the best results, particularly for material like animation that often has repeated content between fields, but it's much slower than 2D.

The 3D filter uses the output from the 2D filter, which in turn uses the output of the 1D filter. So if you're seeing an artefact in the 3D output, you can often check the 2D output and the 1D output to see where it came from.

Unticking 'Enable adaptive filter' disables the 3D filter's heuristic, making it always compute chroma based on the difference from the previous frame. This will produce horrible results for moving images, but essentially perfect output for a still image, so you can use it to get the best quality output if there is absolutely no motion between this frame and the previous one.

'Overlay adaptive filter visualisation' shows you what source the 3D heuristic is using for each sample in the image. Red means the same line, yellow the same field, green field -1 or +1, blue field -2 and purple field +2.

'Use 75 IRE white point' is for (extremely uncommon) video where white corresponds to 75 IRE rather than 100 IRE.

'Use chroma post-filter' applies a low-pass filter to the chroma information after separation (visually: it deliberately blurs the colour information a bit). Most traditional monitors always do this as a byproduct of how their chroma decoders work. ld-analyse's chroma decoder doesn't require it, but it's there as an option if you want to deliberately reduce the chroma bandwidth (e.g. for very noisy video). By default this additional filter uses the modern NTSC convention of the I and Q channels having the same bandwidth; if you want the early NTSC standard with a narrower Q channel, untick 'Use full bandwidth Q channel filter'.

'Chroma noise reduction' and 'Luma noise reduction' apply a simple noise reduction algorithm to the chroma and luma signals -- high-frequency signals will be discarded unless they're larger than the value set here. Many LaserDisc players use this kind of noise reduction. (For command-line decoding, you usually want to disable both of these and use a better-quality external noise reduction algorithm; e.g. ffmpeg provides several.)

The Help menu

The help menu contains an about option that displays information about the application.

Notes

This is 1:1 with LD-Decode wiki aside from noations on VHS-Decode only use.

Clone this wiki locally