Compiling on windows with decklink. cannot detect decklink device

Questions that occur when trying to compile FFmpeg.
Post Reply
larnold7
Posts: 5
Joined: Wed Sep 23, 2015 8:39 pm

Compiling on windows with decklink. cannot detect decklink device

Post by larnold7 »

I have successfully recompiled ffmpeg for debugging using msys64 and msvc, with the following configure: ( that took some bu??hurt, but it works)

./configure --prefix="/c/ffmpeg" --disable-static --enable-shared --extra-cflags="-I$HOME/include -I/usr/local/include -Z7" --extra-ldflags="-L$HOME/include -L/usr/local/bin -DEBUG" --bindir="$HOME/bin" --extra-libs=-ldl --enable-gpl --enable-nonfree --enable-decklink --enable-ffplay --enable-debug=3 --disable-stripping --toolchain=msvc

I can use the resulting ffmpeg_g, from the command line and successfully sent a video out to the hdsdi port on my decklink duo ("DeckLink SDI (1)")

I have built a QT5 wrapper around the muxer.c example from ffmpeg. It works, creating a colorful mpg file.

trying to send the same created image to the decklink device, it fails on

avformat_alloc_output_context(&oc, NULL, "decklink", "DeckLink SDI (1)");

Zooming in with the QT debugger, I find that av_guess_format does not find a decklink device using av_format_next()
It does find all the regular formats:

Code: Select all

void MainWindow::on_actionList_triggered()
{
   AVFormatContext *oc;
    AVOutputFormat *fmt = NULL, *fmt_found;
    QEventLoop evt;

    avcodec_register_all();
    avdevice_register_all();
    av_register_all();

    /* Find the proper file type. */
    fmt_found = NULL;
    score_max = 0;
    while ((fmt = av_oformat_next(fmt))){
        ui->list->addItem(fmt->name);  // here I get a nice list. unfortunately no "decklink"
        evt.processEvents();
    }
looking at config.mak I see:

Code: Select all

Line 541: CONFIG_DECKLINK=yes
Line 1870: !CONFIG_DECKLINK_INDEV=yes
Line 2035: !CONFIG_DECKLINK_OUTDEV=yes
Spelunking a little I find that the list is created based on these lines lines in config.h:

Code: Select all

#define CONFIG_DECKLINK  1
#define CONFIG_DECKLINK_INDEV 0
#define CONFIG_DECKLINK_OUTDEV 0
And indeed these are the defines checked for as the list is being generated.
I still haven't figured out why the ffmpeg_g.exe will stream to the decklink; It uses the same functions.

It also fails on the stock zeranoe build at the same place ( I can trace through my code), but I am only guessing that it is for the same reason.

I haven't tried running the code on a MAC yet, still trying to keep everything organized.

Is there some command line switch screwed up? How do I compile for "decklink pthreads"? Is the decklink code somehow missing from the libraries?

I'd hate to have to stream the created file to the SDI card using ffmpeg command line.

Thanks for any assistance you can provide.

rogerdpack
Posts: 1882
Joined: Fri Aug 05, 2011 9:56 pm

Re: Compiling on windows with decklink. cannot detect decklink device

Post by rogerdpack »

I believe there's an --enable-decklink option to configure?
https://github.com/rdp/ffmpeg-windows-b ... g.sh#L1291

larnold7
Posts: 5
Joined: Wed Sep 23, 2015 8:39 pm

Re: Compiling on windows with decklink. cannot detect decklink device

Post by larnold7 »

"I believe there's an --enable-decklink option to configure?".....


Why yes, yes there is. Exactly my point. When compiled with --enable-decklink on msvc, with the enable-debug flag, and stripping turned off, the decklink card is not enabled if I link against the dlls. ( you can see it in my configure string). I'll keep hacking at it, but right now I am reduced to debugging on an imac, which seems to work.

Post Reply