环境:ubuntu18.04 Qt5.9.5

描述:项目需要使用qtquick作为显示界面用于播放从网络摄像头抓取的影像,海康网络摄像头,摄像头源协议使用的是rtsp,影像数据格式为x-h264,但在调试时报错。

 Item{
MediaPlayer{
id: player
source: "rtsp://admin:gene123456@192.168.10.64:554/h264/ch1/main/av_stream"
autoPlay: true
}
VideoOutput{
anchors.centerIn: parent
source: player
}
}

报错

Starting /home/liang/study/13/03/build-Camera-unknown-Debug/Camera...
Warning: "No decoder available for type 'video/x-h264, stream-format=(string)avc, alignment=(string)au, codec_data=(buffer)014d002affe10018674d002a963540f0044fcb37010101400001c2000057e40101000468ee3c80, level=(string)4.2, profile=(string)main, width=(int)1920, height=(int)1080, framerate=(fraction)25/1, interlace-mode=(string)progressive, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true'."
Error: "Your GStreamer installation is missing a plug-in."
/home/liang/study/13/03/build-Camera-unknown-Debug/Camera exited with code 0

可以看出缺乏适配x-h264格式的解码器,报错缺少GStreamer插件,我在网上查找了很多资料不过很多都是基于ubuntu 14或者ubuntu 16平台下的,但解决方法不尽相同。一下便是我的解决方法

sudo add-apt-repository ppa:mc3man/gstffmpeg-keep

sudo apt-get update

sudo apt-get install gstreamer1.0-libav

sudo apt-get install gstreamer1.0-plugins-bad

sudo apt-get install gstreamer1.0-plugins-good

sudo apt-get install gstreamer1.0-plugins-base

sudo apt-get install gstreamer1.0-plugins-ugly

sudo apt-get install gstreamer1.0-qt5

sudo apt-get install gstreamer1.0-rtsp

QtQuick使用MediaPlayer抓取摄像头影响报错Error: "Your GStreamer installation is missing a plug-in."的更多相关文章

  1. python之OpenCv(五)---抓取摄像头视频图像

    OpenCV 可以通过 头videoCapture()方法打开摄像 摄像头变量 = cv2.VideoCapture(n)   n为整数,内置摄像头为0,若有其他摄像头则依次为1,2,3,4,... ...

  2. 使用dshow抓取摄像头数据时,回调函数时间为0的问题

    在使用dshow抓取摄像头数据,调用dshow的回调函数,如果发现SampleTime一直为0,如下图 那极有可能是使用RenderStream函数连接Filter时,指定的第一个参数为 PIN_CA ...

  3. 在python3下使用OpenCV 抓取摄像头图像并实时显示3色直方图

    以下代码为在Python3环境下利用OpenCV 抓取摄像头的实时图像, 通过OpenCV的 calHist函数计算直方图, 并显示在3个不同窗口中. import cv2 import numpy ...

  4. mysql5.7设置简单密码报错ERROR 1819 (HY000): Your password does not satisfy the current policy requirements

    注:本文来源于<  mysql5.7设置简单密码报错ERROR 1819 (HY000): Your password does not satisfy the current policy r ...

  5. Git fetch和git pull的区别, 解决Git报错:error: You have not concluded your merge (MERGE_HEAD exists).

    Git fetch和git pull的区别, 解决Git报错:error: You have not concluded your merge (MERGE_HEAD exists). Git fet ...

  6. 解决Git报错:error: You have not concluded your merge (MERGE_HEAD exists).

    Git fetch和git pull的区别, 解决Git报错:error: You have not concluded your merge (MERGE_HEAD exists). 2017年02 ...

  7. [转]解决Git报错:error: You have not concluded your merge (MERGE_HEAD exists).

    Git fetch和git pull的区别: 都可以从远程获取最新版本到本地 1.Git fetch:只是从远程获取最新版本到本地,不会merge(合并) $:git fetch origin mas ...

  8. git:Git fetch和git pull的区别, 解决Git报错:error: You have not concluded your merge (MERGE_HEAD exists).

    Git fetch和git pull的区别, 解决Git报错:error: You have not concluded your merge (MERGE_HEAD exists). 解决办法一:保 ...

  9. linux使用wkhtmltopdf报错error while loading shared libraries:

    官网提示 linux需要这些动态库.depends on: zlib, fontconfig, freetype, X11 libs (libX11, libXext, libXrender) 在li ...

随机推荐

  1. 通过jmeter,将数据库数据查询出来并打印

    1. 连接数据库 1.1 添加jdbc驱动路径 1.2 JDBC Connection Configuration    1.3 JDBC Request 2. 查询数据库数据并打印 2.1 定义变量 ...

  2. Dive into TensorFlow系列(1)-静态图运行原理

    接触过TensorFlow v1的朋友都知道,训练一个TF模型有三个步骤:定义输入和模型结构,创建tf.Session实例sess,执行sess.run()启动训练.不管是因为历史遗留代码或是团队保守 ...

  3. Python中Print方法

    1 number1 = int(input("请输入第一个数:")) 2 number2 = int(input("请输入第二个数:")) 3 4 # 方法一: ...

  4. 嵌入式-C语言基础:数组得初始化

    #include<stdio.h> int main() { int a[10]; int size=sizeof(a)/sizeof(a[0]);//计算数组得大小 for(int i= ...

  5. Go语言核心36讲02

    你好,我是郝林,今天我分享的主题是,学习专栏的正确姿势. 到了这里,专栏的全部内容已经都推送到你的面前了.如果你已经同步学习完了,那么我要给你点一个大大的赞! 还没有看完的同学也不要着急,因为推送的速 ...

  6. HashMap为何线程不安全?HashMap,HashTable,ConcurrentHashMap对比

    这两天写爬虫帮组里收集网上数据做训练,需要进一步对收集到的json数据做数据清洗,结果就用到了多线程下的哈希表数据结构,猛地回想起自己看<Java并发编程的艺术>框架篇的时候,在Concu ...

  7. [论文阅读] 颜色迁移-Linear Monge-Kantorovitch(MKL)

    [论文阅读] 颜色迁移-Linear Monge-Kantorovitch(MKL) 文章: The Linear Monge-Kantorovitch Linear Colour Mapping f ...

  8. Rust 学习之旅(7):Package,Crate,Module

    Rust 学习之旅(7):Package,Crate,Module 这是第 7 章的读书笔记,Cargo Workspace 在第 14 章. Packages and Crates As a pro ...

  9. 聊聊CPU的发展历程之单核、多核、超线程

    作者:小牛呼噜噜 | https://xiaoniuhululu.com 计算机内功.JAVA底层.面试.职业成长相关资料等更多精彩文章在公众号「小牛呼噜噜」 大家好,我是呼噜噜,在计算机的早期,In ...

  10. 搭建漏洞环境及实战——搭建DVWA漏洞环境

    DVWA是一款开源的渗透测试漏洞练习平台,其中内涵XSS.SQL注入.文件上传.文件包含.CSRF和暴力破解等各个难度的测试环境. 1.在安装时需要在数据库里创建一个数据库名,进入MySQL管理中的p ...