user49043
user49043

Reputation: 1

Why I cannot use FFMPEG as a backend of the OpenCV?

I would like to use FFMPEG as a backend for OpenCV, but I cannot get it to work. The operating system used is CentOS8. OpenCV and FFMPEG versions are 3.4.5 and 2.8.17, respectively.

The OpenCV build information shows that FFMPEG=ON, so OpenCV seems to recognize the FFMPEG library.

This is the video I/O part of the OpenCV build information.

Video I/O:
DC1394:                      NO
FFMPEG:                      YES
  avcodec:                   YES (58.91.100)
  avformat:                  YES (58.45.100)
  avutil:                    YES (56.51.100)
  swscale:                   YES (5.7.100)
  avresample:                NO
GStreamer:                   NO
v4l/v4l2:                    YES (linux/videodev2.h)

However, the Info message displayed at runtime says

[ INFO:0] VIDEOIO: Enabled backends(6, sorted by priority): GSTREAMER(1000); V4L2(990); CV_IMAGES(980); CV_MJPEG(970); FIREWIRE(960); UNICAP(950)
OpenCV | GStreamer warning: your gstreamer installation is missing a required plugin(/builddir/build/BUILD/opencv-3.4.6/modules/videoio/src/cap_gstreamer.cpp:1823)
OpenCV | GStreamer warning: GStreamer: unable to start pipeline(/builddir/build/BUILD/opencv-3.4.6/modules/videoio/src/cap_gstreamer.cpp:872)

I also don't understand why Gstreamer is being used when it is not enabled in the build information.

What could be the cause? Please advise me if you know more.

Upvotes: 0

Views: 2083

Answers (1)

Prabir Ghosh
Prabir Ghosh

Reputation: 440

Even you make the FFMPEG=ON as preference, there is no guarantee that FFMPEG will be on in the opencv build process. Because OpenCV will check for all the dependency. Please install all the dependency and try to install missing parts like GStreamer, avresample.

Upvotes: 1

Related Questions