Skip to content
Harry Munday edited this page May 2, 2023 · 9 revisions

ld-chroma-decoder

This application takes the PAL or NTSC TBC input video and performs chroma decoding (i.e colourises it).

Output is a sequence of RGB 16-16-16 video frames suitable for pipelining to an external application such as ffmpeg.

The output can also be easily encoded to a y4m or YUV codecs with such example commands.

Syntax:

ld-chroma-decoder <options> <input TBC file name> (<output RGB file name>)

The output RGB file name is optional. If omitted the output will be sent to stdout (for pipe-lining).

Most of the options here correspond to settings in ld-analyse's 'Chroma decoder configuration' window, so you can experiment with them interactively using ld-analyse. For more information on what the settings mean, see the ld-analyse manual.

The mono filter isn't available in ld-analyse. It treats the whole signal as being luma, so it's the best choice when you know that the input video doesn't contain any colour information (e.g. black-and-white films).

Options:
  -h, --help                                  Displays help on commandline
                                              options.
  --help-all                                  Displays help including Qt
                                              specific options.
  -v, --version                               Displays version information.
  -d, --debug                                 Show debug
  -q, --quiet                                 Suppress info and warning
                                              messages
  --input-json <filename>                     Specify the input JSON file
                                              (default input.json)
  -s, --start <number>                        Specify the start frame number
  -l, --length <number>                       Specify the length (number of
                                              frames to process)
  -r, --reverse                               Reverse the field order to
                                              second/first (default
                                              first/second)
  --chroma-gain <number>                      Gain factor applied to chroma
                                              components (default 1.0)
  --chroma-phase <number>                     Phase rotation applied to chroma
                                              components (degrees; default 0.0)
  -p, --output-format <output-format>         Output format (rgb, yuv, y4m;
                                              default rgb); RGB48, YUV444P16,
                                              GRAY16 pixel formats are supported
  -b, --blackandwhite                         Output in black and white
  --pad, --output-padding <number>            Pad the output frame to a
                                              multiple of this many pixels on
                                              both axes (1 means no padding,
                                              maximum is 32)
  -f, --decoder <decoder>                     Decoder to use (pal2d,
                                              transform2d, transform3d, ntsc1d,
                                              ntsc2d, ntsc3d, ntsc3dnoadapt,
                                              mono; default automatic)
  -t, --threads <number>                      Specify the number of concurrent
                                              threads (default number of logical
                                              CPUs)
  --ffll, --first_active_field_line <number>  The first visible line of a
                                              field. Range 1-259 for NTSC
                                              (default: 20), 2-308 for PAL
                                              (default: 22)
  --lfll, --last_active_field_line <number>   The last visible line of a field.
                                              Range 1-259 for NTSC (default:
                                              259), 2-308 for PAL (default: 308)
  --ffrl, --first_active_frame_line <number>  The first visible line of a
                                              frame. Range 1-525 for NTSC
                                              (default: 40), 1-620 for PAL
                                              (default: 44)
  --lfrl, --last_active_frame_line <number>   The last visible line of a frame.
                                              Range 1-525 for NTSC (default:
                                              525), 1-620 for PAL (default: 620)
  -o, --oftest                                NTSC: Overlay the adaptive filter
                                              map (only used for testing)
  --chroma-nr <number>                        NTSC: Chroma noise reduction
                                              level in dB (default 0.0)
  --luma-nr <number>                          Luma noise reduction level in dB
                                              (default 1.0)
  --ntsc-phase-comp                           NTSC: Adjust phase per-line using
                                              burst phase
  --simple-pal                                Transform: Use 1D UV filter
                                              (default 2D)
  --transform-threshold <number>              Transform: Uniform similarity
                                              threshold (default 0.4)
  --transform-thresholds <file>               Transform: File containing
                                              per-bin similarity thresholds
  --show-ffts                                 Transform: Overlay the input and
                                              output FFTs

Arguments:
  input                                       Specify input TBC file (- for piped input)
  output                                      Specify output file (omit or - for piped output)

Clone this wiki locally