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
94 stars 20 forks source link

capture decklink via dvrescue #700

Closed dericed closed 1 year ago

dericed commented 1 year ago

dvrescue device://x -m decklink.mkv

would be similar to:

/usr/local/opt/ffmpegdecklink/bin/ffmpeg-dl -hide_banner -f decklink -video_input composite -audio_input analog -format_code ntsc -raw_format yuv422p10 -channels 2 -audio_depth 32 -i "UltraStudio Express" -map 0 -f matroska out.mkv

This should work on the prototype machine (if another process rewinds and plays the tape first).

I used % /usr/local/opt/ffmpegdecklink/bin/ffmpeg-dl -sources decklink to get the value for -i which here is "UltraStudio Express".

To get the code nuts I used:

% /usr/local/opt/ffmpegdecklink/bin/ffmpeg-dl -hide_banner -f decklink -list_formats 1 -i "UltraStudio Express"
[decklink @ 0x7fb370e0c480] Supported formats for 'UltraStudio Express':
    format_code description
    ntsc        720x486 at 30000/1001 fps (interlaced, lower field first)
    nt23        720x486 at 24000/1001 fps
    pal         720x576 at 25000/1000 fps (interlaced, upper field first)
    23ps        1920x1080 at 24000/1001 fps
    24ps        1920x1080 at 24000/1000 fps
    Hp25        1920x1080 at 25000/1000 fps
    Hp29        1920x1080 at 30000/1001 fps
    Hp30        1920x1080 at 30000/1000 fps
    Hi50        1920x1080 at 25000/1000 fps (interlaced, upper field first)
    Hi59        1920x1080 at 30000/1001 fps (interlaced, upper field first)
    Hi60        1920x1080 at 30000/1000 fps (interlaced, upper field first)
    hp50        1280x720 at 50000/1000 fps
    hp59        1280x720 at 60000/1001 fps
    hp60        1280x720 at 60000/1000 fps
UltraStudio Express: Immediate exit requested

to see what options are supported for this particular decklink device.

The options for -video_input, -audio_input, -raw_format, -channels, -audio_depth are set in this example to what works on the prototype computer, but vocabularies for those options are at https://ffmpeg.org/ffmpeg-devices.html#decklink. If helpful a start implementation using the decklink API is at https://github.com/bavc/deckcontrol.