<commit_before># Building GIFT-Grab from source

1. Configure using CMake and the `src` sub-directory of the cloned repository as the CMake source directory: `cmake <GIFT-Grab-clone>/src`
    * All GIFT-Grab features are inactive by default.
    * Use the below-listed options to choose features to install.
    * The list below indicates the requirements for each option.
1. Run the build process: `make -j`
1. Run the install process: `make install`

Please note that **due to incompatibilities in dependency licences, options requiring proprietary libraries are mutually exclusive with options requiring GPL libraries.**
If mutually exclusive options are activated, CMake will give an error and GIFT-Grab will not be built.


# Reading video files

`-D USE_FILES=ON` (requires [FFmpeg](doc/tips.md#ffmpeg))


# Writing video files

## Xvid

`-D USE_XVID=ON` (requires [OpenCV](doc/tips.md#opencv))


## HEVC

`-D USE_HEVC=ON` (requires [FFmpeg](doc/tips.md#ffmpeg), pkg-config and [kvazaar](doc/tips.md#kvazaar))

In addition, also the following two **BSD-3-incompatible** options are available:

1. `-D USE_HEVC=ON -D ENABLE_GPL=ON -D USE_X265=ON`: use x265 instead of kvazaar (requires [FFmpeg](doc/tips.md#ffmpeg), pkg-config and [x265](doc/tips.md#x265)), **upgrades GIFT-Grab licence to GPL**
2. `-D USE_HEVC=ON -D ENABLE_NONFREE=ON -D USE_NVENC=ON`: hardware-accelerated HEVC (requires [a supported GPU](https://developer.nvidia.com/nvidia-video-codec-sdk), [FFmpeg](doc/tips.md#ffmpeg), pkg-config and [NVENC](doc/tips.md#nvenc)), **makes GIFT-Grab undistributable**

## VP9

`-D USE_VP9=ON` (requires [FFmpeg](doc/tips.md#ffmpeg), pkg-config and [libvpx](doc/tips.md#libvpx))


# Epiphan DVI2PCIe Duo

`-D USE_EPIPHAN_DVI2PCIE_DUO=ON` (requires [OpenCV](doc/tips.md#opencv) and [libVLC](doc/tips.md#libvlc))

OpenCV and libVLC are needed for capturing in the BGRA and [I420][i420] colour spaces respectively.
Both options are active by default.
Append `-D USE_BGRA=OFF` or `-D USE_I420=OFF` to deactivate the respective option.

Also Epiphan Video Grabber SDK can be used instead of libVLC:
`-D USE_EPIPHAN_DVI2PCIE_DUO=ON -D ENABLE_NONFREE=ON -D USE_EPIPHANSDK=ON` (requires zlib, pthreads and [Epiphan Video Grabber SDK](doc/tips.md#epiphan-video-grabber-sdk)).
This option **makes GIFT-Grab undistributable**.

[i420]: https://wiki.videolan.org/YUV/#I420


# Blackmagic DeckLink SDI 4K

`-D USE_BLACKMAGIC_DECKLINK_SDI_4K=ON -D ENABLE_NONFREE=ON` (requires [Blackmagic Desktop Video SDK](doc/tips.md#blackmagic-drivers-and-blackmagic-desktop-video-sdk))

This currently works only with the [UYVY][uyvy] colour space (active by default).
This option **makes GIFT-Grab undistributable**.

[uyvy]: https://wiki.videolan.org/YUV#UYVY


# Network streams

`-D USE_NETWORK_SOURCES=ON` [OpenCV](doc/tips.md#opencv) and [libVLC](doc/tips.md#libvlc))

OpenCV and libVLC are needed for capturing in the BGRA and [I420][i420] colour spaces respectively.
Both options are active by default.
Append `-D USE_BGRA=OFF` or `-D USE_I420=OFF` to deactivate the respective option.<commit_msg>Issue #164: corrected typo in Network streams requirements<commit_after># Building GIFT-Grab from source

1. Configure using CMake and the `src` sub-directory of the cloned repository as the CMake source directory: `cmake <GIFT-Grab-clone>/src`
    * All GIFT-Grab features are inactive by default.
    * Use the below-listed options to choose features to install.
    * The list below indicates the requirements for each option.
1. Run the build process: `make -j`
1. Run the install process: `make install`

Please note that **due to incompatibilities in dependency licences, options requiring proprietary libraries are mutually exclusive with options requiring GPL libraries.**
If mutually exclusive options are activated, CMake will give an error and GIFT-Grab will not be built.


# Reading video files

`-D USE_FILES=ON` (requires [FFmpeg](doc/tips.md#ffmpeg))


# Writing video files

## Xvid

`-D USE_XVID=ON` (requires [OpenCV](doc/tips.md#opencv))


## HEVC

`-D USE_HEVC=ON` (requires [FFmpeg](doc/tips.md#ffmpeg), pkg-config and [kvazaar](doc/tips.md#kvazaar))

In addition, also the following two **BSD-3-incompatible** options are available:

1. `-D USE_HEVC=ON -D ENABLE_GPL=ON -D USE_X265=ON`: use x265 instead of kvazaar (requires [FFmpeg](doc/tips.md#ffmpeg), pkg-config and [x265](doc/tips.md#x265)), **upgrades GIFT-Grab licence to GPL**
2. `-D USE_HEVC=ON -D ENABLE_NONFREE=ON -D USE_NVENC=ON`: hardware-accelerated HEVC (requires [a supported GPU](https://developer.nvidia.com/nvidia-video-codec-sdk), [FFmpeg](doc/tips.md#ffmpeg), pkg-config and [NVENC](doc/tips.md#nvenc)), **makes GIFT-Grab undistributable**

## VP9

`-D USE_VP9=ON` (requires [FFmpeg](doc/tips.md#ffmpeg), pkg-config and [libvpx](doc/tips.md#libvpx))


# Epiphan DVI2PCIe Duo

`-D USE_EPIPHAN_DVI2PCIE_DUO=ON` (requires [OpenCV](doc/tips.md#opencv) and [libVLC](doc/tips.md#libvlc))

OpenCV and libVLC are needed for capturing in the BGRA and [I420][i420] colour spaces respectively.
Both options are active by default.
Append `-D USE_BGRA=OFF` or `-D USE_I420=OFF` to deactivate the respective option.

Also Epiphan Video Grabber SDK can be used instead of libVLC:
`-D USE_EPIPHAN_DVI2PCIE_DUO=ON -D ENABLE_NONFREE=ON -D USE_EPIPHANSDK=ON` (requires zlib, pthreads and [Epiphan Video Grabber SDK](doc/tips.md#epiphan-video-grabber-sdk)).
This option **makes GIFT-Grab undistributable**.

[i420]: https://wiki.videolan.org/YUV/#I420


# Blackmagic DeckLink SDI 4K

`-D USE_BLACKMAGIC_DECKLINK_SDI_4K=ON -D ENABLE_NONFREE=ON` (requires [Blackmagic Desktop Video SDK](doc/tips.md#blackmagic-drivers-and-blackmagic-desktop-video-sdk))

This currently works only with the [UYVY][uyvy] colour space (active by default).
This option **makes GIFT-Grab undistributable**.

[uyvy]: https://wiki.videolan.org/YUV#UYVY


# Network streams

`-D USE_NETWORK_SOURCES=ON` (requires [OpenCV](doc/tips.md#opencv) and [libVLC](doc/tips.md#libvlc))

OpenCV and libVLC are needed for capturing in the BGRA and [I420][i420] colour spaces respectively.
Both options are active by default.
Append `-D USE_BGRA=OFF` or `-D USE_I420=OFF` to deactivate the respective option.
{'fraction_non_alphanumeric': 0.11863862578262964, 'fraction_numerical': 0.016214480655000803, 'mean_word_length': 5.15004935834156, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1141173', 'n_tokens_mistral': 2400, 'n_tokens_neox': 2241, 'n_words': 663}