|
FFmpeg for DekTec: Linux Build Guide This guide provides step-by-step instructions for building FFmpeg with DekTec device support on Linux. The commands below are for Ubuntu and Debian. For other Linux distributions, refer to the official FFmpeg compilation guide for the equivalent packages.
|
Sources - DekTec's FFmpeg
DekTec maintains a version of FFmpeg with support for DekTec devices through CDTAPI.
Sources - CDTAPI
DekTec's FFmpeg accesses DekTec devices through CDTAPI, DekTec's open-source C API.
DekTec Driver
Needed to run FFmpeg with a DekTec device, not to build it.
License
DekTec's FFmpeg accesses DekTec devices through CDTAPI,
DekTec's open-source C API.
Enable it with --enable-libcdtapi. CDTAPI does not require
--enable-nonfree, so the resulting FFmpeg build remains
redistributable under FFmpeg's normal licensing terms.
FFmpeg is LGPL by default; enabling GPL components makes the resulting
build GPL, as with any FFmpeg build.
Step 1: Install Required Packages
Update package information and install the necessary packages:
sudo apt update sudo apt -y install build-essential cmake ninja-build git nasm pkg-config \ libsdl2-dev
CDTAPI needs CMake 3.22 or newer and GCC 11 or newer.
SDL2 is required by ffplay for its display window; without it, ffmpeg
and ffprobe are built but ffplay is not.
Step 2: Build and Install CDTAPI
git clone https://github.com/dektec-com/cdtapi.git cmake -S cdtapi -B cdtapi/build -G Ninja -DCMAKE_BUILD_TYPE=Release cmake --build cdtapi/build cmake --install cdtapi/build --prefix $HOME/cdtapi
Step 3: Build FFmpeg with DekTec Device Support
git clone https://github.com/dektec-com/ffmpeg-dektec.git
cd ffmpeg-dektec
tools/dektec/build.sh --cdtapi $HOME/cdtapi --install
The script configures FFmpeg with --enable-libcdtapi, points pkg-config at CDTAPI,
builds, and installs the programs in build/linux/install/bin. tools/dektec/build.sh
--help lists its options, such as --prefix and --shared.
To run configure yourself instead:
export PKG_CONFIG_PATH=$HOME/cdtapi/lib/pkgconfig ./configure --enable-libcdtapi --prefix=$HOME/ffmpeg_bin make make install
Step 4: Install the Driver and Run
Install the DekTec driver for your card from the Linux SDK, then list the cards'ports:
ffmpeg -sources dektec
The command-line options page describes what DekTec added to 'ffmpeg' and 'ffplay'.
## Alternative: vcpkg
DekTec's vcpkg registry, has a port 'ffmpeg-dektec', which builds CDTAPI and FFmpeg from source in one go. Name the registry in yourvcpkg-configuration.json, as its README shows, and ask for the port in
vcpkg.json:
{
"dependencies": [ "ffmpeg-dektec" ]
}