mipops / dvrescue

Archivist-made software that supports data migration from DV tapes into digital files suitable for long-term preservation. Snapshot daily builds are at https://mediaarea.net/download/snapshots/binary/dvrescue/.
BSD 3-Clause "New" or "Revised" License
93 stars 20 forks source link

conditionally adjust capture ui for decklink inputs #735

Closed dericed closed 9 months ago

dericed commented 12 months ago

Here's the current capture GUI with a DV deck attached and a decklink card attached.

image

To support decklink capture, some additions are needed. These are only for the capture interface when the device type=decklink

  1. control selector With DV, the same cable receives audiovisual data and transmits deck control signals, but for decklink inputs the audiovisual data and control signals take different routes. So for the play of the decklink audiovisual input, the user must select which controller to use. The options are given via (dvrescue --list_controls or dvrescue --list_controls_json).

Also note that in addition to the options that may be available from dvrescue --list_controls, an extra option of "No control" should be default and available. If the device's control is set to "No control" then all buttons expect for the record one should be hidden or grayed out.

If two devices share a selected controller, then there should be a visible warning with a mouseover saying that the user picked the same controller for two different devices.

For implementing the option this correlates to the cli with

    --control <port>
        Set the serial port used to control the DeckLink capture device through sony9pin interface.
        Use "native" to request control through DeckLink serial inteface.

...

    --list_controls
        List detected serial ports and their indices.

So if

$ dvrescue --list_controls
/dev/tty.wlan-debug: tty.wlan-debug
/dev/tty.debug-console: tty.debug-console
/dev/tty.Bluetooth-Incoming-Port: tty.Bluetooth-Incoming-Port
/dev/tty.JaybirdVista2-SerialPort: tty.JaybirdVista2-SerialPort
/dev/tty.RS422 Deck Control: tty.RS422 Deck Control

and the user selects tty.RS422 Deck Control, then the capture should add --control "/dev/tty.RS422 Deck Control" or to rewind, do dvrescue --control "/dev/tty.RS422 Deck Control" -cmd rew.

@libbyhopfauf, any advice on how this control selector and/or warning should appear? Some sort of dropdown?

  1. device input settings If the device type is decklink, then we need to control some input settings. The settings and their picklist values are in the cli as:

    --decklink-video-mode <mode>
        Select DeckLink video mode.
        value may be:
        ntsc      Set video mode to NTSC (default).
        pal       Set video mode to PAL.
    
    --decklink-video-source <source>
        Select DeckLink video source.
        value may be:
        sdi        Set video source to SDI.
        hdmi       Set video source to HDMI.
        optical    Set video source to optical SDI.
        component  Set video source to component input.
        composite  Set video source to composite input (default).
        s_video    Set video source to S-Video input.
    
    --decklink-audio-source <source>
        Select DeckLink audio source.
        value may be:
        embedded    Set audio source to embedded input.
        aes_ebu     Set audio source to AES-EBU input.
        analog      Set audio source to analog input (default).
        analog_xlr  Set audio source to analog(XLR) input.
        analog_rca  Set audio source to analog(RCA) input.
        microphone  Set audio source to microphone input.
    
    --decklink-timecode-format <source>
        Select DeckLink timecode source.
        value may be:
        none        Disable timecode capture.
        rp188vitc   Set timecode format to RP188(VITC1).
        rp188vitc2  Set timecode format to RP188(VITC2).
        rp188ltc    Set timecode format to RP188(LTC).
        rp188hfr    Set timecode format to RP188(HFR).
        rp188any    Set timecode format to RP188(first valid RP188 format).
        vitc        Set timecode format to VITC (default).
        vitc2       Set timecode format to VITC Field 2.
        serial      Set timecode source to serial input.

So an example capture if

$ dvrescue --list_devices
0x800460104f1243e: DV-VCR (Sony HVR-M15U) [DV]
84:3c0a102a:00000000: UltraStudio HD Mini [DeckLink]

dvrescue device://84:3c0a102a:00000000 --decklink-video-mode ntsc --decklink-video-source sdi --decklink-audio-source embedded --decklink-timecode-format vitc -m test.mkv

Note that as the recording filename ui, adds .dv to recording filename if the provided value doesn't end with .dv, if the device type is decklink then the extension must be .mkv.

libbyhopfauf commented 11 months ago

@libbyhopfauf, any advice on how this control selector and/or warning should appear? Some sort of dropdown?

@dericed I think a drop down would be ideal! I also think that, if possible, the warning should appear below the viewer until the issue is resolved vs. a mouseover, just because I think that will be more obvious to users and they can correct the problem. Something like, "Oops! You are already using this device. Please select a different device for capture."

dericed commented 11 months ago

@ElderOrb here's a sample of the output of --list-devices_json.

$ /usr/local/bin/dvrescue  --list_controls_json
[{"name":"/dev/tty.wlan-debug: tty.wlan-debug"},{"name":"/dev/tty.RS422 Deck Control: tty.RS422 Deck Control"},{"name":"/dev/tty.Bluetooth-Incoming-Port: tty.Bluetooth-Incoming-Port"},{"name":"/dev/tty.usbserial-A10KXF88: tty.usbserial-A10KXF88"}]

So potentially I'd want to pick either /dev/tty.usbserial-A10KXF88 or "/dev/tty.RS422 Deck Control" to control an attached device.

ElderOrb commented 11 months ago

https://github.com/mipops/dvrescue/pull/744

dericed commented 11 months ago

If the device type is DV, then the extension of a recording must be '.dv'. if the device type is Decklink, then the extension of the recording must be '.mkv'.

ElderOrb commented 11 months ago

https://github.com/mipops/dvrescue/pull/751

dericed commented 10 months ago

@ElderOrb if no extension is used, but the input is decklink, then the output filename is suffixed with '.mkv' but the hint-name in the ui is still '.dv'

image

dericed commented 9 months ago

last comment is fixed in https://github.com/mipops/dvrescue/pull/791