GIFT-Grab is an open-source C++ and Python API for acquiring, processing and encoding video streams in real time. GIFT-Grab supports several frame-grabber cards, standard-compliant network streams and video files. The Python API is compatible with NumPy and SciPy. Please note that currently only Python 2 is supported.

This site only contains Python examples for getting started with GIFT-Grab. The full API documentation is available on CodeDocs. For further details including known issues, please also see GIFT-Grab on GitHub.

Important installation note

To be able to run each example below, GIFT-Grab must have been installed with the corresponding feature(s) enabled. All features are disabled by default and can be enabled via pip install options. In summary this is done by appending the corresponding install options when calling pip, e.g.:

pip install gift-grab --install-option="--feature-1" --install-option="--feature-2"

The relevant install options for each example below are outlined on the respective example page. Multiple install options can be specified, provided that these are not mutually exclusive. Mutually exclusive features are noted in the documentation on GitHub.

The examples were tested after installing GIFT-Grab with the install options directly following this paragraph. If you would like to use this single command, please make sure all dependencies listed on the GIFT-Grab Python API installation instructions have been installed. Alternatively you can install a “smaller” GIFT-Grab by using the install option(s) needed for the example(s) you’d like to run.

pip install gift-grab --install-option="--files" --install-option="--epiphan-dvi2pcie-duo" --install-option="--enable-nonfree" --install-option="--epiphansdk" --install-option="--network-sources" --install-option="--numpy" --install-option="--hevc" --install-option="--enable-nonfree" --install-option="--nvenc"

Citing GIFT-Grab

If you use GIFT-Grab in your work, please cite Shakir et al. (2017):

Shakir DI, García-Peraza-Herrera LC, Daga P, Doel T, Clarkson MJ, Ourselin S, and Vercauteren T. GIFT-Grab: Real-time C++ and Python multi-channel video capture, processing and encoding API. Journal of Open Research Software. 2017;5(1):27. DOI:

BibTeX entry:

  author = {Dzhoshkun Ismail Shakir and Luis Carlos Garc\'{i}a-Peraza-Herrera and Pankaj Daga and Tom Doel and Matthew J. Clarkson and S\'{e}bastien Ourselin and Tom Vercauteren},
  title = {{GIFT-Grab: Real-time C++ and Python multi-channel video capture, processing and encoding API}},
  journal = {{Journal of Open Research Software}},
  year = {2017},
  number = {1},
  pages = {27},
  month = {10},
  day = {9},
  volume = {5},
  url = {},
  doi = {},