Results 1 to 11 of 11

Thread: Windows & Zeranoe FFmpeg Builds with NewTek NDI Built-In

  1. #1
    Registered User
    Join Date
    Jan 2018
    Location
    UK
    Posts
    3

    Windows & Zeranoe FFmpeg Builds with NewTek NDI Built-In

    I was pleased to see the announcement that as of the 3.4.1 release of FFmpeg, NDI is built in for both read and write. I would very much like to make use of these capabilities via FFmpeg both using a Windows build and my own custom build.

    For a Windows build I normally source my builds from the very popular Zeranoe web-site (https://ffmpeg.zeranoe.com/builds/). Where one can download a static, dynamic or developer build with most popular features enabled.

    Do you plan to work with Zeranoe to make this available? At the moment I don't think your SDK includes the correct type of lib/symbol file to support this.

    In addition I use the Media-AutoBuild_Suite (https://github.com/jb-alvarado/media-autobuild_suite) to actually build my own custom versions of FFmpeg.

    As someone mentioned here:
    https://github.com/jb-alvarado/media...ite/issues/721

    This requires libs built with mingw GCC rather than MSVC.

    AFAIK building full versions of FFmpeg with MSVC is quite tricky and poorly supported. If there's a recommended way to build a custom version of FFmpeg with NDI builtin using MSVC that would be an alternative for me.

    Thanks

    Jules

  2. #2
    NewTek Engineering ACross's Avatar
    Join Date
    Jul 2003
    Location
    San Antonio
    Posts
    782
    Actually, I do not think that to use the FFMPEG version of NDI you need any kind of support for MSVC. If I remember correctly they implemented it using dynamic binding (i.e. LoadLibrary) which means that they should be able to include it as part of the standard builds. Whats more, we released our SDK header files under the MIT license so that they can even be included in the FFMPEG source code if they want to facilitate building. If someone wants to work with us on this, just have them email [email protected] and we'll help make this happen.

  3. #3
    >>f I remember correctly they implemented it using dynamic binding (i.e. LoadLibrary)
    >>which means that they should be able to include it as part of the standard builds.

    Unfortunately, they use static linking (https://github.com/FFmpeg/FFmpeg/com...7f77458f5c4bc5)
    Moreover as you can see feature implemented with not the last NDI SDK release (which have really significant changes, stability and several very important features )
    So, only way to have NDI with ffmpeg -> build with custom options + NDI SDK by yourself.

  4. #4
    Registered User
    Join Date
    Aug 2015
    Location
    london
    Posts
    209
    Quote Originally Posted by ORFAST View Post
    >>f I remember correctly they implemented it using dynamic binding (i.e. LoadLibrary)
    >>which means that they should be able to include it as part of the standard builds.

    Unfortunately, they use static linking (https://github.com/FFmpeg/FFmpeg/com...7f77458f5c4bc5)
    Moreover as you can see feature implemented with not the last NDI SDK release (which have really significant changes, stability and several very important features )
    So, only way to have NDI with ffmpeg -> build with custom options + NDI SDK by yourself.
    On macOS, all you do is build FFMPEG from the regular source, but with a couple of extra configuration strings to inform FFMPEG you want NDI and it works just fine, runtime linking with the libNDI .dylib you have installed in /usr/... from the NewTek NDI end user Tools like their NDI Monitor.

    Doesn't require any code changes. Also, if libNDI isn't available it seems to fail gently when running and trying to access NDI.

    its also possible to make self contained app bundles which include the ndi dylib, by changing the rpath in FFMPEG to point locally, or even a local companion folder for non-bundle based apps. This is pretty much self contained, particularly the bundle method.

    It might be nice to get static libraries for NDI on more platforms, and I would support that idea.
    However, meanwhile the current situation is quite workable, but requires some care and knowledge of library linking.

  5. #5
    Registered User
    Join Date
    Jan 2018
    Location
    UK
    Posts
    3
    I've asked on the Zeranoe forum and the media-autobuild_suite about integration into build of FFmpeg.

    The primary feedback from Zeranoe is that the license terms do not allow free distribution. I would guess that in particular this statement:

    "Unless otherwise stated in the SDK, no files within the SDK and the Specific SDK may be distributed."

    is a problem. The headers and libs (as opposed to DLLs) need to be licensed in such a way as to allow free redistribution in binaries and as build-able source.

    The main contact at the media-autobuild_suite said the following:

    don't put the SDK behind a **** registration wall, put it somewhere publicly and anonymously accessible; also, don't put it inside an installer, that's unusable for redistribution and building automation
    FFmpeg expects ndi.lib or libndi.[dll.]a, because that's the normal name of a library and is what's available in both macOS and Linux versions of the SDK.
    MinGW GCC doesn't set MSC_VER (nor should it set it, for very obvious reasons), so this is broken in Processing.NDI.Lib.h and probably other headers:
    #ifdef _WIN32
    #define PROCESSINGNDILIB_DEPRECATED __declspec(deprecated)
    #ifdef PROCESSINGNDILIB_EXPORTS
    #ifdef __cplusplus
    #define PROCESSINGNDILIB_API extern "C" __declspec(dllexport)
    #else
    #define PROCESSINGNDILIB_API __declspec(dllexport)
    #endif
    #else
    #ifdef __cplusplus
    #define PROCESSINGNDILIB_API extern "C" __declspec(dllimport)
    #else
    #define PROCESSINGNDILIB_API __declspec(dllimport)
    #endif
    #ifdef _MSC_VER
    #ifdef _WIN64
    #define NDILIB_LIBRARY_NAME "Processing.NDI.Lib.x64.dll"
    #define NDILIB_REDIST_FOLDER "NDI_RUNTIME_DIR_V3"
    #define NDILIB_REDIST_URL "http://new.tk/NDIRedistV3"
    #else
    #define NDILIB_LIBRARY_NAME "Processing.NDI.Lib.x86.dll"
    #define NDILIB_REDIST_FOLDER "NDI_RUNTIME_DIR_V3"
    #define NDILIB_REDIST_URL "http://new.tk/NDIRedistV3"
    #endif
    #endif
    #endif
    #else

    Most importantly, like Decklink's SDK, this clause makes the SDK nonfree, so FFmpeg compiled with it will never be legally redistributable:

    d. Unless otherwise stated in the SDK, no files within the SDK and the Specific SDK may be distributed.


    Threads referenced:
    https://ffmpeg.zeranoe.com/forum/vie...f0753a824cd935
    https://github.com/jb-alvarado/media...ite/issues/721

  6. #6
    NewTek Engineering ACross's Avatar
    Join Date
    Jul 2003
    Location
    San Antonio
    Posts
    782
    I think that there must be some confusion here, the wording "Unless otherwise stated in the SDK, no files within the SDK and the Specific SDK may be distributed." is entirely correct and is there for the specific purpose of allowing people to use the SDK in open source projects (indeed this approach was suggested to us by the author of another large open source project). We have placed all our header files under the MIT license so that it may be freely used in open source projects; we have also made dynamic linking possible for the exact same reason. This means that it is possible to build without any download from NewTek; this is an identical approach to that followed by nVEnc, etc... all of which are included in ffmpeg builds.

  7. #7
    Registered User
    Join Date
    Nov 2017
    Location
    switzerland
    Posts
    6
    Where do I find information about how to compile FFMEG with NDI*support enabled?

    Using Linux with FFMPEG*3.4, Installed NDI SDK 3.5, when trying to run ffmpeg to show a NDI source, I get:*
    Unknown input format: libndi_newtek
    Failed to set value 'libndi_newtek' for option 'f': Invalid argument

  8. #8
    Registered User
    Join Date
    Apr 2017
    Location
    Massachusetts
    Posts
    180
    Any update on this, or anything from NewTek about a better distribution method for their libraries?

    Edit: Better yet, a pre-compiled ffmpeg for macos. PLEASE.
    Last edited by lukerctv; 10-16-2018 at 04:44 PM.
    TriCaster TC1 #1
    TriCaster TC1 #2
    NC1 Studio I/O Module
    TriCaster Mini SDI Advanced #1
    TriCaster Mini SDI Advanced #2
    Video Nerd

  9. #9
    There is a complied Windows version of FFMPEG with NDI support include with thed NDI SDK. Just sign up.

    https://www.newtek.com/ndi/sdk/
    Kane Peterson
    Key Accounts Sales Engineer
    NewTek, Inc.

  10. #10
    Registered User
    Join Date
    Apr 2017
    Location
    Massachusetts
    Posts
    180
    Yeah but Windows sucks...
    TriCaster TC1 #1
    TriCaster TC1 #2
    NC1 Studio I/O Module
    TriCaster Mini SDI Advanced #1
    TriCaster Mini SDI Advanced #2
    Video Nerd

  11. #11
    Registered User
    Join Date
    Oct 2018
    Location
    Ottawa
    Posts
    1
    Quote Originally Posted by kanep View Post
    There is a complied Windows version of FFMPEG with NDI support include with thed NDI SDK. Just sign up.

    https://www.newtek.com/ndi/sdk/
    Any chance that we can get this version of FFMPEG with nvenc support? The libx264 support included is not up to handling HD video streams.

    Thanks

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •