[Libav-user] BlackMagic DeckLink devices using libav

Julien Ayrault Julien.Ayrault at ampvisualtv.tv
Thu Feb 4 12:13:28 CET 2016


Hi libav users,

I'm trying to use BlackMagic Decklink Capture/Output cards with libav but I've got problem with avformat_open_input.
I'm using the following ffmpeg wrapper project in C# (which works flawlessly with all libav functions but not using decklink input or output) :
https://github.com/Ruslan-B/FFmpeg.AutoGen

I've compiled by myself a shared version of ffmpeg 2.8.5 with the decklink extra lib (also tried with git-37db3e8 from zeranoe) and run the following ffmpeg command and it was ok :
                ffmpeg -f decklink -i "DeckLink SDI (1)@3" -pix_fmt yuv420p -f sdl "DeckLink Input"

But not using libav directly ("ffmpeg." prefix before all libav functions is just a namespace created by "FFmpeg.Autogen" export) :

//I've alredy registrered libav functions
AVFormatContext* dlk_in_ctx = ffmpeg.avformat_alloc_context();

//this function is working well
AVInputFormat* dlk_in_fmt = ffmpeg.av_find_input_format("decklink");
if (dlk_in_fmt == null)
{
goto end;
}

//this function return an error
if ((ret = ffmpeg.avformat_open_input(&dlk_in_ctx, "DeckLink SDI (1)@3", dlk_in_fmt, null)) != 0)
{
goto end;
}

I always get an error code equals to -5 (don't know how to get a description of the error code).
I've search a lot on the web for a decklink example in C/C++ to adapt it in C# (like I did with transcoding and filtering without any problem), but could not find anything.

Did someone already tried this?
Can someone send an example on how to do it in a "normal way" (in C/C++)?

Thanks for your comments,
Julien
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20160204/924147ad/attachment.html>


More information about the Libav-user mailing list