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.
- When using this frame-grabber card,
/dev/video0
and/dev/video1
will 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
video
group: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.
These instructions are provided for convenience only. Always check the manufacturer's manuals before proceeding.
- 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
epiphan/samples/v2u
and runmake
. This should create abuild
folder here. - (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_DIR
environment variable, e.g.export EpiphanSDK_DIR="/opt/epiphan_sdk-3.30.3.0007"
.
These instructions are provided for convenience only. Always check the manufacturer's manuals before proceeding.
- Download and unpack Blackmagic Desktop Video SDK.
- If the resulting folder name has spaces e.g.
Blackmagic DeckLink SDK 10.11.1
, replace spaces with an underscore, e.g.Blackmagic_DeckLink_SDK_10.11.1
. - (Optional) Move the resulting folder to a system folder, e.g.
/opt
, for easy access by all users. - Specify the absolute path of this folder as the
BlackmagicSDK_DIR
environment variable, e.g.export BlackmagicSDK_DIR="/opt/Blackmagic_DeckLink_SDK_10.11.1"
. - Download and unpack Blackmagic Desktop Video.
- Install the driver package appropriate for your system, e.g.
dpkg -i Blackmagic_Desktop_Video_Linux_10.11.1/deb/x86_64/desktopvideo_10.11.1a4_amd64.deb
- (Optional) Install the GUI components, e.g.
dpkg -i Blackmagic_Desktop_Video_Linux_10.11.1/deb/x86_64/desktopvideo-gui_10.11.1a4_amd64.deb
anddpkg -i Blackmagic_Desktop_Video_Linux_10.11.1/deb/x86_64/mediaexpress_3.5.6a2_amd64.deb
- Check your Blackmagic card's firmware status:
BlackmagicFirmwareUpdater status
, and update if necessary, e.g.BlackmagicFirmwareUpdater update 0
Please see the OpenCV website for possible installation routes. If using FFmpeg, make sure your OpenCV is properly linked against your FFmpeg installation.
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
mkdir ffmpeg-build
andcd ffmpeg-build
- 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
make -j
andmake install
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
Installation instructions:
- Download the SDK
- Extract its contents and copy
nvidia_video_sdk_6.0.1/Samples/common/inc/nvEncodeAPI.h
to a standard system include folder (e.g./usr/local/include
)
Installation instructions:
git clone https://github.com/ultravideo/kvazaar.git
cd kvazaar
git checkout v0.8.3
./autogen.sh
./configure
make -j
andmake install
Caveats:
- 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
/etc/ld.so.conf.d/kvazaar.conf
- Put only the following line into it:
/usr/local/lib
- Run
ldconfig
- Create a file
Installation instructions:
hg clone https://bitbucket.org/multicoreware/x265
cd x265
hg checkout 1.9
cd ..
andmkdir x265-build
andcd x265-build
cmake -D ENABLE_SHARED:bool=on ../x265/source/
make -j
andmake install
Install by 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.
wget http://nightlies.videolan.org/build/source/vlc-3.0.0-20160913-0237-git.tar.xz
tar xf vlc-3.0.0-20160913-0237-git.tar.xz
mkdir vlc-3-build
andcd vlc-3-build
../vlc-3.0.0-git/bootstrap
../vlc-3.0.0-git/configure
./compile
andmake install
NB: Video data can be exposed as a flat as well as structured ndarray
.
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:
wget https://sourceforge.net/projects/boost/files/boost/1.63.0.beta.1/boost_1_63_0_b1.tar.bz2
tar xvfj boost_1_63_0_b1.tar.bz2
cd boost_1_63_0
./bootstrap.sh --with-libraries=python
(--with-libraries=python
deactivates all other Boost components, ensuring minimum compilation time)./b2
./b2 install
(running this without the./b2
step above might result in the Boost components being installed even if the build fails)