How to install gstreamer 1.0 badplugin for opencv?

Yair Reshef yair99 at gmail.com
Sun Dec 1 21:46:22 UTC 2019


hi roy
i suggest trying gst-build project.
from my little experience it offers the best experience in diving into
gstreamer compiling.
it will d/l and compile by default almost everything in the gsteamersphere
check/edit meson_options.txt

get to a state where you have opencv headers in your path.
  export LD_LIBRARY_PATH=/opt/gst/x64/lib/x86_64-linux-gnu/:/opt/opencv/lib

i try to keep my dot files as clean as possible
and have an alias to a gstEnv script that assigns gstreamer environment
vars to the specific terminal i work at.
export PKG_CONFIG_PATH=/opt/gst/x64/lib/x86_64-linux
export GST_PLUGIN_PATH=/opt/gst/plugins/
export GSTREAMER_1_0_root_x86_64=/opt/gst/x64/
export PATH=$PATH:/opt/gst/x64/bin:/opt/opencv/

gst-build has chroot mode for developing
`printenv | grep gst` is your friend.


btw, how do you get those fancy markdown in your posts ..



On Sat, Nov 30, 2019 at 11:07 PM Roy <shankar.roy at gmail.com> wrote:

> On a *Ubuntu 18.04* machine I am trying to use *opencv 4.1.2* facedetect
> <https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-bad/html/gst-plugins-bad-plugins-facedetect.html> in
> a *gstreamer 1.14.5* pipeline but unfortunately the plugin is not
> installed.
>
> I downloaded the gstreamer bad plugin code
> <https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-1.14.5.tar.xz> and
> tried to build using meson The size of the so files created does not look
> right.
>
> How do I install the opencv plugin?
>
> (cv) roy at hp:~$ cat /proc/versionLinux version 5.0.0-36-generic (buildd at lgw01-amd64-060) (gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1)) #39~18.04.1-Ubuntu SMP Tue Nov 12 11:09:50 UTC 2019
> (cv) roy at hp:~$ which gst-inspect-1.0 /usr/bin/gst-inspect-1.0
> (cv) roy at hp:~$ gst-inspect-1.0 --version
> gst-inspect-1.0 version 1.14.5GStreamer 1.14.5
> https://launchpad.net/distros/ubuntu/+source/gstreamer1.0
> (cv) roy at hp:~$ gst-inspect-1.0 facedetectNo such element or plugin 'facedetect'
> (cv) roy at hp:~$ pythonPython 3.6.9 (default, Nov  7 2019, 10:44:02) [GCC 8.3.0] on linuxType "help", "copyright", "credits" or "license" for more information.>>> import cv2>>> print(cv2.__version__)4.1.2>>> exit()
> (cv) roy at hp:~$ ls -l /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstopen*-rw-r--r-- 1 root root  39752 Jul  4 02:16 /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstopenal.so-rw-r--r-- 1 root root  23376 Jul  4 02:16 /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstopenexr.so-rw-r--r-- 1 root root  81896 Jul  4 02:16 /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstopenglmixers.so-rw-r--r-- 1 root root 253048 Jul  3 09:19 /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstopengl.so-rw-r--r-- 1 root root  48328 Jul  4 02:16 /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstopenjpeg.so-rw-r--r-- 1 root root  27368 Jul  4 02:16 /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstopenmpt.so
> (cv) roy at hp:~$ ls -l gst-plugins-bad-1.14.5/gst-libs/gst/opencv/
> total 84-rw-r--r-- 1 roy roy  6395 Mar 23  2018 gstopencvutils.cpp-rw-r--r-- 1 roy roy  1700 Mar 23  2018 gstopencvutils.h-rw-r--r-- 1 roy roy  8871 Mar 23  2018 gstopencvvideofilter.cpp-rw-r--r-- 1 roy roy  4559 Mar 23  2018 gstopencvvideofilter.h-rw-r--r-- 1 roy roy   746 Mar 23  2018 Makefile.am-rw-r--r-- 1 roy roy 38511 May 29  2019 Makefile.in-rw-r--r-- 1 roy roy   775 Mar 23  2018 meson.build-rw-r--r-- 1 roy roy  1082 Mar 23  2018 opencv-prelude.h
> (cv) roy at hp:~$ ls -l gst-plugins-bad-1.14.5/build/gst-libs/gst/opencv/
> total 0
> lrwxrwxrwx 1 roy roy 21 Nov 30 08:50 libgstopencv-1.0.so -> libgstopencv-1.0.so.0
> lrwxrwxrwx 1 roy roy 28 Nov 30 08:50 libgstopencv-1.0.so.0 -> libgstopencv-1.0.so.0.1405.0
> (cv) roy at hp:~$
>
> I even tried
>
> (cv) roy at hp:~$ sudo apt install libgstreamer-plugins-bad1.0-dev
>
> (cv) roy at hp:~$ gst-inspect-1.0 facedetect No such element or plugin 'facedetect'
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20191201/1fccc749/attachment-0001.html>


More information about the gstreamer-devel mailing list