VideoCapture
is a C++ library for video capturing, supporting various backends such as OpenCV and optionally GStreamer.
- Capture video from different sources using OpenCV
- Optional support for GStreamer to enhance video capturing capabilities
- Integration with other C++ projects using modern CMake
- CMake 3.20 or higher
- C++17 compatible compiler
- OpenCV
- GStreamer (if
USE_GSTREAMER
is enabled)
Ensure you have the required dependencies installed:
-
Clone the repository:
git clone https://github.com/olibartfast/VideoCapture.git cd VideoCapture
-
Configure and build the project with CMake:
cmake -B build -S . -DUSE_GSTREAMER=ON cmake --build build
Use
-DUSE_GSTREAMER=OFF
to disable GStreamer support.
After building the project, you can run the sample application:
./build/bin/VideoCaptureApp <path/to/video>
To use VideoCapture
in your project, you can use CMake's FetchContent
:
include(FetchContent)
FetchContent_Declare(
VideoCapture
GIT_REPOSITORY https://github.com/olibartfast/VideoCapture.git
GIT_TAG main # or the specific tag/branch you want to use
)
FetchContent_MakeAvailable(VideoCapture)
target_link_libraries(your_target PRIVATE VideoCapture)