schema_version: 0.1
type: producer
identifier: decklink
title: Blackmagic Design DeckLink Capture
version: 1
copyright: Copyright (C) 2011-2018 Meltytech, LLC
license: LGPL
language: en
creator: Dan Dennedy
tags:
  - Audio
  - Video
description: >
  Capture video and audio using Blackmagic Design DeckLink SDI or Intensity
  HDMI cards.
notes: >
  Please ensure that you use a MLT profile that is compatible with a broadcast
  standard which the card you are using supports. If you must use an interlaced
  profile but wish to deinterlace or scale the input, then you must use the
  consumer producer, e.g.:
  melt -profile square_pal consumer:decklink: profile=dv_pal
bugs:
  - It is incompatible with the yadif deinterlacer.
  - Transport controls such as seeking has no affect.
  - External deck control is not implemented.
  - Only 8-bit Y'CbCr is supported at this time.
parameters:
  - identifier: argument
    title: Card
    type: integer
    default: 0
    minimum: 0
    widget: spinner

  - identifier: channels
    title: Audio channels
    type: integer
    default: 2
    minimum: 2
    maximum: 16
    widget: spinner

  - identifier: buffer
    title: Maximum buffer
    description: >
      There is a queue of frames between this plugin and its consumer.
      If the consumer has a little, intermittent delay then it reduces the
      risk of dropping a frame. However, this provides a maximum number of
      frames that can be buffered to prevent consuming memory unbounded in
      the case of frequent or sustained delays.
    type: integer
    default: 25
    minimum: 0
    unit: frames
    widget: spinner

  - identifier: prefill
    title: Initial buffer
    description: Initially fill the buffer with a number of frames.
    type: integer
    default: 25
    minimum: 0
    unit: frames
    widget: spinner

  - identifier: vanc
    title: Vertical ancillary capture
    description: >
      Captures vertical ancillary data as image data and places it at the top
      of the visible/active image.
      You can either set the number of lines to capture or use -1 for automatic
      (32 lines) mode.
    type: integer
    minimum: -1
    default: 0
    unit: lines
    widget: spinner

  - identifier: preview
    title: Enable preview
    description: Support preview monitoring when paused (speed = 0).
    type: integer
    minimum: 0
    maximum: 1
    default: 0
    widget: checkbox

  - identifier: devices
    title: Number of devices
    type: integer
    readonly: yes
    minimum: 0

  - identifier: device.*
    title: Device model
    description: The model name of each device that accepts input.
    type: string
    readonly: yes

  - identifier: priority
    title: Thread priority
    description: Set the DeckLink thread's scheduling class to realtime and its priority.
    type: integer
    minimum: 1
    maximum: 99
    default: 20

  - identifier: vitc_in
    title: Start timecode
    type: integer
    description: >
      The vertical interval timecode (VITC) in binary-coded decimal (BCD) format.
      It skips frames that has VITC timecode less then specified.
      After reaching first frame with timecode greater or equal then specified this
      property is reset to zero.

  - identifier: bitdepth
    title: Bitdepth for capturing
    description: Enable capturing in 10-bit native SDI signal
    type: integer
    values:
      - 8 # 8-bit data
      - 10 # 10-bit data
