Dependency installation guidelines
In this document we aim to provide guidelines for installing the GIFT-Grab dependencies. A full list of the required and optional dependencies is available in the required tools and libraries section. If you encounter problems installing any dependency, please have a look at the known issues and limitations.
Epiphan DVI2PCIe Duo
- When using this frame-grabber card,
/dev/video1will be probed for connecting to its DVI and SDI ports respectively.
- The Linux user account used for capturing video must be in the group these two devices belong to. For instance if these belong to the
sudo usermod -a -G video myuser.
- Due to the use of the generic OpenCV VideoCapture API, GIFT-Grab can currently not distinguish Epiphan frame-grabbers from others (i.e. in the case where multiple frame-grabber cards are installed on a system).
- Due to hardware-specific limitations, capturing video at 60 fps is possible only if the I420 colour space is used instead of BGRA.
Epiphan Video Grabbing SDK
- Download Epiphan video grabbing SDK from Epiphan support and unpack it, e.g.
wget https://www.epiphan.com/downloads/products/epiphan_sdk-3.30.3.0007.zip; unzip epiphan_sdk-3.30.3.0007.zip.
- Change into the sub-folder
make. This should create a
- (Optional) Move the top folder (i.e. the one resulting from unpacking the archive) to a system folder, e.g.
/opt, for easy access by all users.
- Specify this folder's absolute path as the
EpiphanSDK_DIRenvironment variable, e.g.
Blackmagic Drivers and Blackmagic Desktop Video SDK
- Download and unpack Blackmagic Desktop Video SDK.
- If the resulting folder name has spaces e.g.
Blackmagic DeckLink SDK 10.4, replace spaces with an underscore, e.g.
- (Optional) Move the resulting folder to a system folder, e.g.
/opt, for easy access by all users.
- Specify the absolute path of the
SDKsub-folder of this folder as the
BlackmagicSDK_DIRenvironment variable, e.g.
export BlackmagicSDK_DIR="/opt/Blackmagic DeckLink SDK 10.4/SDK".
- Install the driver package appropriate for your system (e.g.
/opt/Blackmagic DeckLink SDK 10.4/deb/amd64/desktopvideo_10.8.4a4_amd64.debfor a 64-bit Ubuntu Linux).
- (Optional) Install the MediaExpress application using the package appropriate for your system (e.g.
/opt/Blackmagic DeckLink SDK 10.4/deb/amd64/mediaexpress_3.5.3a1_amd64.debfor a 64-bit Ubuntu Linux).
- Check your Blackmagic card's firmware status, and update it if necessary.
Please see the OpenCV website for possible installation routes. If using FFmpeg, make sure your OpenCV is properly linked against your FFmpeg installation.
Ubuntu 14.04 and 16.04
On Ubuntu, FFmpeg needs to be compiled from source code and installed:
git clone https://github.com/FFmpeg/FFmpeg.git
git checkout n3.1.2
- If using kvazaar:
../FFmpeg/configure --enable-shared --enable-avresample --enable-libkvazaar --enable-muxer=mp4
- If using x265:
../FFmpeg/configure --enable-shared --enable-avresample --enable-libx265 --enable-gpl --enable-muxer=mp4
- If using NVENC:
../FFmpeg/configure --enable-shared --enable-avresample --enable-nvenc --enable-nonfree --enable-muxer=mp4
- If using libvpx:
../FFmpeg/configure --enable-shared --enable-avresample --enable-libvpx --enable-muxer=webm
Note: In case you install FFmpeg in a non-standard location, you will need to appropriately augment your
PKG_CONFIG_PATH for GIFT-Grab to be able to locate FFmpeg.
On Debian 9, the APT versions of the FFmpeg libraries can be used. Simply install them using:
apt install libavfilter-dev
apt install libavutil-dev
apt install libswscale-dev
apt install libavcodec-dev
apt install libavformat-dev
- Download the SDK
- Extract its contents and copy
nvidia_video_sdk_6.0.1/Samples/common/inc/nvEncodeAPI.hto a standard system include folder (e.g.
git clone https://github.com/ultravideo/kvazaar.git
git checkout v0.8.3
- If you encounter an error of the form
error while loading shared libraries: libkvazaar.so.3: cannot open shared object file: No such file or directory:
- Create a file
- Put only the following line into it:
- Create a file
hg clone https://bitbucket.org/multicoreware/x265
hg checkout 1.9
cmake -D ENABLE_SHARED:bool=on ../x265/source/
apt-get install libvpx-dev.
Note: Capturing network video streams in the I420 colour space works only with the stable libVLC releases that can be installed via
apt-get install libvlc-dev (only on Ubuntu 14.04 LTS).
We are working to get this feature operational on Ubuntu 16.04 LTS as well.
The instructions below are for other features that require libVLC such as acquiring video using Epiphan cards.
- Download a nighly build, e.g.
tar xf vlc-3.0.0-20160913-0237-git.tar.xz
NumPy support and Boost.Python
NB: Video data can be exposed as a flat as well as structured
The latter currently works only for BGRA data and the resulting
ndarray's shape is compatible with the axis ordering used in SciPy routines.
Support for this feature with the other colour spaces GIFT-Grab uses is under construction.
The current Boost.Python version installable from the Ubuntu repositories does not provide the functionality GIFT-Grab needs for its NumPy support. However you can install the 1.63.0 beta version as follows:
tar xvfj boost_1_63_0_b1.tar.bz2
--with-libraries=pythondeactivates all other Boost components, ensuring minimum compilation time)
./b2 install(running this without the
./b2step above might result in the Boost components being installed even if the build fails)