Toybrick

Opencv error on video: gstreamer missing required plugin

chuyee

中级会员

积分
352
发表于 2019-2-13 08:39:34    查看: 43740|回复: 25 | [复制链接]    打印 | 显示全部楼层
$ python
Python 3.6.8 (default, Jan 31 2019, 09:06:51)
[GCC 8.2.1 20181215 (Red Hat 8.2.1-6)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
>>> cap = cv2.VideoCapture('chaplin.mp4')
Failed to query video capabilities: Inappropriate ioctl for device
libv4l2: error getting capabilities: Inappropriate ioctl for device
VIDEOIO ERROR: V4L: device ../GOTURN/chaplin.mp4: Unable to query number of channels
OpenCV(3.4.1) Error: Unspecified error (GStreamer: your gstreamer installation is missing a required plugin
) in handlemessage, file /builddir/build/BUILD/opencv-3.4.1/modules/videoio/src/cap_gstreamer.cpp, line 1869
VIDEOIO(cvCreateCapture_GStreamer (CV_CAP_GSTREAMER_FILE, filename)): raised OpenCV exception:

OpenCV(3.4.1) /builddir/build/BUILD/opencv-3.4.1/modules/videoio/src/cap_gstreamer.cpp:1869: error: (-2) GStreamer: your gstreamer installation is missing a required plugin
in function handlemessage

>>>

I have tried multiple video files (mp4). All have the same problem. If you couldn't reproduce the problem, I can upload my video file (although I don't think it's necessary).

回复

使用道具 举报

jefferyzhang

版主

积分
12923
发表于 2019-2-13 09:05:23 | 显示全部楼层
You can find gstreamer for rockchip linux here : https://github.com/rockchip-linux/gstreamer-rockchip
回复

使用道具 举报

chuyee

中级会员

积分
352
 楼主| 发表于 2019-2-13 13:19:02 | 显示全部楼层
谢谢,方便提供一下rpm吗?
回复

使用道具 举报

jefferyzhang

版主

积分
12923
发表于 2019-2-13 16:00:15 | 显示全部楼层
chuyee 发表于 2019-2-13 13:19
谢谢,方便提供一下rpm吗?

sorry,回错内容了,我们还没有gsteam的rpm包,我帮你咨询下
回复

使用道具 举报

chuyee

中级会员

积分
352
 楼主| 发表于 2019-2-15 08:54:16 | 显示全部楼层
The problem is fixed. Thanks!
回复

使用道具 举报

linuxsky

注册会员

积分
151
发表于 2019-2-18 23:41:07 | 显示全部楼层
chuyee 发表于 2019-2-15 08:54
The problem is fixed. Thanks!

请问怎么解决的?我按照你说的提示找不到
回复

使用道具 举报

linuxsky

注册会员

积分
151
发表于 2019-2-19 09:36:44 | 显示全部楼层
jefferyzhang 发表于 2019-2-13 09:05
You can find gstreamer for rockchip linux here : https://github.com/rockchip-linux/gstreamer-rockchi ...

请问这个问题怎么解决?看样子是驱动问题?
回复

使用道具 举报

jefferyzhang

版主

积分
12923
发表于 2019-2-19 09:50:26 | 显示全部楼层
linuxsky 发表于 2019-2-19 09:36
请问这个问题怎么解决?看样子是驱动问题?

只是没装gstreamer而已,但是源自带的gstreamer是用cpu做编解码的,速度极其低下。
rockchip-linux的github里有结合了硬件vpu编解码的gstreamer,下下来编译安装下就可以解决问题。
回复

使用道具 举报

linuxsky

注册会员

积分
151
发表于 2019-2-19 10:17:31 | 显示全部楼层
jefferyzhang 发表于 2019-2-19 09:50
只是没装gstreamer而已,但是源自带的gstreamer是用cpu做编解码的,速度极其低下。
rockchip-linux的gith ...

哦哦,我用 dnf  安装了 gstreamer-* 这样也不行么? 好的那我下来编译试试。多谢
回复

使用道具 举报

linuxsky

注册会员

积分
151
发表于 2019-2-19 11:05:27 | 显示全部楼层
jefferyzhang 发表于 2019-2-19 09:50
只是没装gstreamer而已,但是源自带的gstreamer是用cpu做编解码的,速度极其低下。
rockchip-linux的gith ...

我刚才编译 make  install 了,发现问题还是有

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

产品中心 购买渠道 开源社区 Wiki教程 资料下载 关于Toybrick


快速回复 返回顶部 返回列表