DekTec logo
FFmpeg + DekTec Devices: Build Guide for Windows  

FFmpeg + DekTec Devices: Build Guide for Windows

This guide provides step-by-step instructions for compiling FFmpeg with support for DekTec devices on Windows. It builds upon the official FFmpeg instructions. If you encounter issues during the process, please consult the FFmpeg MSVC Compilation Guide.

 

Step 1: Install Dependencies

Compilation on Windows requires Visual Studio. Cygwin, MinGW and cross compilation are not supported.

Install dependencies:

Step 2: Install SDL2

  1. Open a 64-bit Visual Studio 2022 prompt or manually execute 'vcvars64.bat' in a CMD window.
  2. Install SDL2 through vcpkg:
    "C:\vcpkg\vcpkg.exe" install SDL2:x64-windows-static

Step 3: Launch MSYS2 and Install Utilities

  1. Launch MSYS2:
    "C:\msys64\msys2_shell.cmd" -full-path
  2. Install the required utilities:
    pacman -S pkg-config diffutils yasm make

Step 4: Prepare FFmpeg Sources and Environment

  1. Download the DekTec-extended FFmpeg sources and unpack them to '/c/ffmpeg_sources'.
  2. Install the Windows SDK.
  3. Update 'PKG_CONFIG_PATH' to include vcpkg and the Windows SDK:
    ln -s /c/Program\ Files\ \(x86\)/DekTec/SDKs/WinSDK $HOME/WinSDK
    export PKG_CONFIG_PATH=$HOME/WinSDK/DTAPI/Lib/VC17/pkgconfig:\
           /c/vcpkg/installed/x64-windows-static/lib/pkgconfig

Step 5: Build FFmpeg

  1. Create a build directory and navigate to it:
    mkdir /c/ffmpeg_build
    cd /c/ffmpeg_build
  2. Configure and build FFmpeg:
    /c/ffmpeg_sources/configure --target-os=win64 --arch=x86_64       \
                                --toolchain=msvc --enable-dektec      \
                                --enable-nonfree --prefix=/c/ffmpeg_bin
    make
    make install