Gstreamer是Linux上的一套多媒体框架,集采集,编码,解码,渲染,滤镜等功能一条龙的媒体解决方案,它的调度能力和扩展能力非常出色,被广泛应用在各种多媒体方案上 ,这里总结一些学习记录和心得,采用编年体,比较自由,到最后肯定会是一篇流水账。

1.查看系统安装了哪些插件

czl@czl-VirtualBox:~/WorkSpace$ gst-inspect-1.0 |grep -i videosink
inter:  intervideosink: Internal video sink
autodetect:  autovideosink: Auto video sink
decklink:  decklinkvideosink: Decklink Video Sink
debugutilsbad:  fpsdisplaysink: Measure and show framerate on videosink
debugutilsbad:  fakevideosink: Fake Video Sink
cluttergst3:  clutterautovideosink: Generic binczl@czl-VirtualBox:~/WorkSpace$ gst-inspect-1.0 |grep -i v4l
video4linux2:  v4l2src: Video (video4linux2) Source
video4linux2:  v4l2sink: Video (video4linux2) Sink
video4linux2:  v4l2radio: Radio (video4linux2) Tuner
video4linux2:  v4l2deviceprovider (GstDeviceProviderFactory)
czl@czl-VirtualBox:~/WorkSpace$ 
caozilong@caozilong-Vostro-3268:~/Workspace/camera$ v4l2-ctl --list-devices
Integrated Camera: Integrated C (usb-0000:00:14.0-2):/dev/video0/dev/video1caozilong@caozilong-Vostro-3268:~/Workspace/camera$

V4L2 plugin注册:

gstv4l2videodec.c启动解码任务:

最终是调用gst-base包中的gst_video_decoder_xxx plugin进行解码的。

V4L2设备打开:


2.videoconvert组件的作用,当不加入videoconvert组件时,以下两个命令会出错:

gst-launch-1.0 filesrc location=./test.mp4  ! decodebin  ! ximagesink
gst-launch-1.0 filesrc location=./test.mp4  ! decodebin  ! xvimagesink
czl@czl-VirtualBox:~/WorkSpace/ffserver$ gst-launch-1.0 filesrc location=./test.mp4  ! decodebin  ! ximagesink
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Redistribute latency...
Redistribute latency...
ERROR: from element /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstQTDemux:qtdemux0: Internal data stream error.
Additional debug info:
qtdemux.c(6073): gst_qtdemux_loop (): /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstQTDemux:qtdemux0:
streaming stopped, reason not-negotiated (-4)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...
czl@czl-VirtualBox:~/WorkSpace/ffserver$ gst-launch-1.0 filesrc location=./test.mp4  ! decodebin  ! xvimagesink
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Redistribute latency...
Redistribute latency...
ERROR: from element /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstQTDemux:qtdemux0: Internal data stream error.
Additional debug info:
qtdemux.c(6073): gst_qtdemux_loop (): /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstQTDemux:qtdemux0:
streaming stopped, reason not-negotiated (-4)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...
czl@czl-VirtualBox:~/WorkSpace/ffserver$ 

但是,加入videoconvert后,命令正确执行:

gst-launch-1.0 filesrc location=./test.mp4  ! decodebin ! videoconvert ! ximagesink
gst-launch-1.0 filesrc location=./test.mp4  ! decodebin ! videoconvert ! xvimagesink

3.gst audio sink test

gst-launch-1.0 audiotestsrc ! pulsesink
czl@czl-RedmiBook-14:~$ gst-inspect-1.0 pulseaudio
Plugin Details:Name                     pulseaudioDescription              PulseAudio plugin libraryFilename                 /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstpulseaudio.soVersion                  1.14.5License                  LGPLSource module            gst-plugins-goodSource release date      2019-05-29Binary package           GStreamer Good Plugins (Ubuntu)Origin URL               https://launchpad.net/distros/ubuntu/+source/gst-plugins-good1.0pulsedeviceprovider: PulseAudio Device Providerpulsesrc: PulseAudio Audio Sourcepulsesink: PulseAudio Audio Sink3 features:+-- 2 elements+-- 1 device providersczl@czl-RedmiBook-14:~$

结束!

Gstreamer学习流水账相关推荐

  1. gstreamer学习笔记---编码videoencoder

      既上一节的<gstreamer学习笔记-v4l2src>之后,我们这一次,学习gstreamer的编码流程.稍微了解gstreamer的小伙伴都知道,gstreamer具备强大的音视频 ...

  2. gstreamer学习笔记---v4l2src

      v4l2src element源码位于gst-plugins-good-xxx/sys/v4l2/gstv4l2src.c,v4l2src主要是从v4l2设备获取视频数据的element,基于v4 ...

  3. gstreamer学习笔记:将音视频合成MPEG2-TS流并打包通过rtp传输

    一.通过rtpbin插件发送 (1)发送端 gst-launch -v gstrtpbin name=rtpbin latency=100 mpegtsmux name="mux" ...

  4. 【GStreamer学习】之GStreamer基础教程

    目标 没有什么比在屏幕上打印出"Hello World"更能获得对软件库的第一印象了! 但是由于我们正在学习多媒体框架,所以我们将输出"Hello World!" ...

  5. GStreamer学习笔记

    目录 前言 一.GStreamer编程接口介绍 二.gst-launch-1.0工具使用 总结 前言 GStreamer 是用来构建流媒体应用的开源多媒体框架(framework),其目标是要简化音/ ...

  6. gstreamer学习(一) gstreamer-rtsp-server环境安装

    gstreamer-rtsp-server环境安装(Linux环境下) 两种方式: 第一种方式,通过官网安装(如果是Linux环境,可以直接通过软件包工具进行安装),点击进入官网下载. 第二种方式,手 ...

  7. Gstreamer学习笔记(4):pad定义、连接、流动

    pad相当于element的接口,各个element就是通过pad连接进行传输数据,同时pad会通过caps限制特定的数据类型通过,只有当两个pad的caps数据类型一致时才可以建立连接.那么pad在 ...

  8. gstreamer学习笔记---pad定义、连接、流动

      pad相当于element的接口,各个element就是通过pad连接进行传输数据,同时pad会通过caps限制特定的数据类型通过,只有当两个pad的caps数据类型一致时才可以建立连接.那么pa ...

  9. gstreamer学习笔记---demux使用

      在使用gstreamer的过程中,相信很多是都通过gst-launch-1.0直接使用playbin或者自建pipeline完成相应的播放测试,反而很少的会自己编写代码,其实,gst-launch ...

最新文章

  1. STL vector list deque区别与实现
  2. suse linux c 编译环境,SUSE 11中安装GCC开发环境
  3. 聊一聊 Redis 数据内部存储使用到的数据结构
  4. 【JavaSE_第一周】练习题总结
  5. Java写入大字符串到oracle数据库_java程序如何提高oracle百万级数据的insert效率
  6. xenserver 脚本学习之/opt/xensource/bin/xapi-wait-init-complete
  7. 清除ASP.Net缓存
  8. 分时系统的用户具有独占性,因此一个用户可以独占计算机系统的资源.,课件2016计算机操作系统试题库(判断).doc...
  9. Nmap绕过防火墙脚本的使用
  10. Java终止线程的三种方式
  11. 【Oracle】数据库热备
  12. Node.js:借助formidable文件上传
  13. 怎样让网站显示在 Google 搜索结果中?
  14. system/build.prop参数说明
  15. linux系统安装word,如何在Linux中安装FreeOffice 2018
  16. 灵雀云基于 OVN 的 Kubernetes 网络架构解析
  17. 5A学友的备考心得 | PMP考试如何一把过?
  18. [已推荐到体育博客,点击查看更多精彩内容] 篮球上的幽默时刻(多图)
  19. android红外遥控驱动
  20. Win10无法搜索应用解决

热门文章

  1. 【亲测】回合制手游魔力宝贝【法兰城的回忆】最新整理Linux手工服务端+视频教程+GM授权后台
  2. CentOS MySQL数据库备份
  3. Springboot+Mysql实现驾校课程在线预约系统源码附带运行视频
  4. 智慧畜牧三维可视化,图扑数字孪生赋能现代农业
  5. 抖音直播画中画、绿幕抠图直播,如此简单
  6. 基于html的猜数字游戏设计
  7. python语言程序设计是什么课文_中国大学MOOC有哪些优质课程?
  8. 大力弘扬“马洪精神” 矢志推进改革创新
  9. C++标准模板库STL学习
  10. BZOJ 3252 攻略