Gstreamer学习流水账
学习 gstreamer
2023-09-11 14:15:46 时间
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 bin
czl@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/video1
caozilong@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 pulseaudio
Description PulseAudio plugin library
Filename /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstpulseaudio.so
Version 1.14.5
License LGPL
Source module gst-plugins-good
Source release date 2019-05-29
Binary package GStreamer Good Plugins (Ubuntu)
Origin URL https://launchpad.net/distros/ubuntu/+source/gst-plugins-good1.0
pulsedeviceprovider: PulseAudio Device Provider
pulsesrc: PulseAudio Audio Source
pulsesink: PulseAudio Audio Sink
3 features:
+-- 2 elements
+-- 1 device providers
czl@czl-RedmiBook-14:~$
结束!
相关文章
- Intel汇编语言程序设计学习-第六章 条件处理-下
- 【学习笔记20】JavaScript数据类型之间的区别
- (转)为什么不去读顶级会议上的论文?适应于机器学习、计算机视觉和人工智能
- SRE学习笔记:分布式共识系统、Paxos协议
- Linux系统入门学习:在curl中设置自定义的HTTP头
- 技术学习
- PHP 开发 APP 接口 学习笔记与总结 - XML 方式封装通信接口
- 机器学习中的常用距离
- SwiftUI进阶之 08 编程的最大挑战是什么 (《代码大全》学习笔记)
- Java学习-079-多线程12:使用 synchronized 同步方法解决多线程资源同步问题
- 《Scala机器学习》一一1.6 相关性的基础
- 同策略强化学习算法可以使用经验缓存池(experience buffer)吗 ??? 设计一个基于缓存池的改进reinforce算法,给出初步的尝试 ---------- (reinforce + experience buffer)
- 系统结构杂谈-计算机底层学习如何入门(CS-EE通用)
- springboot学习之一(搭建和配置文件)
- PyTorch深度学习实战 | 高斯混合模型聚类原理分析
- rabbitmq 学习-9- RpcClient发送消息和同步接收消息原理