Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Enabling GStreamer source in G API

Anastasiya(Asya) Pronina edited this pageMay 9, 2023 ·4 revisions

Building G-API with GStreamer support on Ubuntu 20.04:

  • As a first step, you need to install the following dependencies:

    $ sudo apt install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-{base,good,bad}
  • Secondly, you need to launch OpenCV cmake with an extra option specified:

    $ cmake /path-to-opencv -DOPENCV_GAPI_GSTREAMER=ON

After completing these steps, you should see the following in the cmake output:

-- Checkingfor module'gstreamer-base-1.0'--   Found gstreamer-base-1.0, version 1.16.3-- Checkingfor module'gstreamer-app-1.0'--   Found gstreamer-app-1.0, version 1.16.3-- Checkingfor module'gstreamer-riff-1.0'--   Found gstreamer-riff-1.0, version 1.16.3-- Checkingfor module'gstreamer-pbutils-1.0'--   Found gstreamer-pbutils-1.0, version 1.16.3-- Checkingfor module'gstreamer-video-1.0'--   Found gstreamer-video-1.0, version 1.16.3-- Checkingfor module'gstreamer-audio-1.0'--   Found gstreamer-audio-1.0, version 1.16.3

And, also the following:

--   Video I/O:--   ...--     GStreamer:                   YES (1.16.3)--   ...

Running G-API GStreamerSource Tests:

When you build G-API with GStreamer support, tests for streaming via GStreamerSource are enabled. However, some of them require test data fromopencv_extra repository. So, to launch all the tests successfully, you need:

  • Cloneopencv_extra repository:
    $ git clone https://github.com/opencv/opencv_extra.git
  • SetOPENCV_TEST_DATA_PATH environment variable:
    $export OPENCV_TEST_DATA_PATH=/path-to-opencv_extra/testdata
  • Run tests with*GStreamer* filter:
    $ ./path-to-opencv-bin/opencv_test_gapi --gtest_filter=*GStreamer*

After completing these steps, you should see that all of tests pass.For example:

image

You may, however, notice some warnings during execution, like these ones:

image

or

image

Please don't worry, they are expected!

© Copyright 2019-2025, OpenCV team

Clone this wiki locally


[8]ページ先頭

©2009-2025 Movatter.jp