gstreamer 命令
命令行调试日志:
--gst-debug-level=X 或 --gst-debug=myelement:X(X的取值为[0,5])
Udpsrc
Sender:
./gst-launch-1.0 videotestsrc is-live=true ! video/x-raw,framerate=25/1 ! videoconvert ! x264enc ! h264parse ! rtph264pay pt=96 ! udpsink host=127.0.0.1 port=5000
Receiver:
/gst-launch-1.0 -v udpsrc port=5000 ! application/x-rtp,clock-rate=90000,payload=96 ! rtph264depay ! h264parse ! avdec_h264 ! videoconvert ! glimagesink
采集摄像头:
./gst-launch-1.0 -v -m autovideosrc ! videoconvert ! osxvideosink
采集麦克风 pcmu
./gst-launch-1.0 autoaudiosrc ! audioconvert ! audioresample ! mulawenc ! rtppcmupay ! udpsink host=127.0.0.1 port=8888
接收:
/gst-launch-1.0 -ve udpsrc port=10002 ! application/x-rtp, clock-rate=8000, payload=0 ! rtppcmudepay ! mulawdec ! audio/x-raw, format=S16LE, layout=interleaved, rate=8000 ! audioconvert ! audiomixer name=mix ! audioconvert ! audioresample ! autoaudiosink
生成mp4:
gst-launch-1.0 -v -e videotestsrc ! video/x-raw,width=1920,height=1080 ! openh264enc ! h264parse ! mp4mux name=mux ! filesink location="bla.mp4" audiotestsrc wave=4 ! opusenc ! mux.
#opus
./gst-launch-1.0 autoaudiosrc ! audioconvert ! audioresample ! opusenc ! rtpopuspay pt=127 ! udpsink host=127.0.0.1 port=10001
混流demo:
./gst-launch-1.0 intervideosrc ! video/x-raw,framerate=\(fraction\)10/1,width=3200,height=2400 ! videomixer name=mix sink_2::xpos=1000 sink_2::width=140 sink_2::height=140 sink_1:xpos=0 ! videoconvert ! glimagesink filesrc location=./ttt.mov ! decodebin ! video/x-raw,width=1280,height=720 ! mix. videotestsrc ! video/x-raw,framerate=\(fraction\)10/1 ! mix.
./gst-launch-1.0 intervideosrc channel=aaaa ! video/x-raw,framerate=\(fraction\)10/1,width=320,height=240 ! videomixer name=mix background=2 sink_1::alpha=1 sink_1::xpos=400 sink_2::zorder=0 sink_3::zorder=1 ! video/x-raw, width=1280, height=720 ! clockoverlay ! videoconvert ! glimagesink videotestsrc ! video/x-raw,format=AYUV,framerate=\(fraction\)5/1,width=1280,height=720 ! videobox left=-10 ! videoscale ! video/x-raw, width=320,height=180 ! mix. videotestsrc ! videobox border-alpha=1 bottom=-5 ! mix. filesrc location=./bule.jpg ! jpegdec ! videoscale ! video/x-raw,width=320,height=240 ! imagefreeze ! mix.
./gst-launch-1.0 intervideosrc ! video/x-raw,framerate=\(fraction\)10/1,width=320,height=240 ! videomixer name=mix sink_0::alpha=1 sink_1::alpha=1 sink_1::xpos=100 ! videoconvert ! glimagesink videotestsrc ! video/x-raw,format=AYUV,framerate=\(fraction\)5/1,width=120,height=100 ! videocrop ! mix. videotestsrc ! mix.
两路mix:
./gst-launch-1.0 intervideosrc ! video/x-raw,framerate=\(fraction\)10/1,width=320,height=240 ! videomixer name=mix sink_0::alpha=1 sink_1::alpha=1 sink_1::xpos=100 sink_2::ypos=100 ! videoconvert ! glimagesink videotestsrc ! video/x-raw,format=AYUV,framerate=\(fraction\)5/1,width=120,height=100 ! videobox border-alpha=0 top=70 bottom=70 right=22 ! mix. videotestsrc ! video/x-raw, format=AYUV, width=100, height=100 ! mix.
/gst-launch-1.0 intervideosrc ! video/x-raw,framerate=\(fraction\)10/1,width=3200,height=2400 ! videomixer name=mix sink_1::xpos=200 sink_2:xpos=0 ! videoconvert ! glimagesink filesrc location=./ttt.mov ! decodebin ! video/x-raw,width=1280,height=720 ! videocrop left=100 top=200 ! mix. videotestsrc ! video/x-raw,framerate=\(fraction\)10/1 ! mix.
/gst-launch-1.0 intervideosrc ! video/x-raw,framerate=\(fraction\)10/1,width=3200,height=2400 ! videomixer name=mix sink_1::xpos=200 sink_2::xpos=1000 sink_2::width=100 sink_2::height=100 ! videoconvert ! glimagesink filesrc location=./ttt.mov ! decodebin ! video/x-raw,width=1280,height=720 ! mix. videotestsrc ! video/x-raw,framerate=\(fraction\)10/1 ! mix.
//混流+缩放
./gst-launch-1.0 intervideosrc ! video/x-raw,framerate=\(fraction\)10/1,width=3200,height=2400 ! videomixer name=mix sink_1::xpos=0 sink_2::xpos=1000 sink_2::width=100 sink_2::height=100 ! videoconvert ! glimagesink filesrc location=./ttt.mov ! decodebin ! video/x-raw,width=1280,height=720 ! videoscale ! video/x-raw,width=100 ! mix. videotestsrc ! video/x-raw ! mix.
udpsink:
./gst-launch-1.0 videotestsrc is-live=true ! video/x-raw,framerate=25/1 ! videoconvert ! x264enc ! h264parse ! rtph264pay pt=96 ! udpsink host=127.0.0.1 port=8888 audiotestsrc is-live=1 ! mulawenc ! rtppcmupay ! application/x-rtp, media=audio, payload=0, rate=8000 ! udpsink host=127.0.0.1 port=8888
gst-launch-1.0 -v udpsrc port=5000 ! application/x-rtp,clock-rate=90000,payload=96 ! rtph264depay ! h264parse ! avdec_h264 ! videoconvert ! osxvideosink
./gst-launch-1.0 udpsrc port=8888 ! "application/x-rtp, media=video, clock-rate=90000, encoding-name=H264" ! rtph264depay ! avdec_h264 ! videoconvert ! glimagesink
./gst-launch-1.0 -e -v udpsrc port=10001 ! "application/x-rtp, media=video, clock-rate=90000, encoding-name=H264" ! rtph264depay ! h264parse ! "video/x-h264, stream-format=byte-stream" ! filesink location=./aa.h264
gst-launch-1.0 rtpmux name=mux ! udpsink host=127.0.0.1 port=8888 \
audiotestsrc ! alawenc ! rtppcmapay ! \
application/x-rtp, payload=8, rate=8000 ! mux.sink_0 \
audiotestsrc is-live=1 ! \
mulawenc ! rtppcmupay ! \
application/x-rtp, payload=0, rate=8000 ! mux.sink_1
发送视频:
./gst-launch-1.0 videotestsrc is-live=true ! video/x-raw,framerate=25/1 ! videoconvert ! x264enc ! h264parse ! rtph264pay pt=96 ! udpsink host=127.0.0.1 port=8888
发送音频:
./gst-launch-1.0 audiotestsrc is-live=1 ! mulawenc ! rtppcmupay ! udpsink host=127.0.0.1 port=8888
播放并存储为h264
gst-launch-1.0 -e -v udpsrc port=10001 ! "application/x-rtp, media=video, clock-rate=90000, encoding-name=H264" ! rtph264depay ! tee name=t t. ! queue ! h264parse ! "video/x-h264, stream-format=byte-stream" ! filesink location=./aa.h264 t. ! queue ! avdec_h264 ! glimagesink
播放h264
./gst-launch-1.0 filesrc location=/Users/aa/Desktop/ttt.h264 ! h264parse ! openh264dec ! glimagesink
存储每帧图片:
./gst-launch-1.0 videotestsrc ! videoconvert ! video/x-raw,framerate=30/1 ! queue ! pngenc ! multifilesink location="frame%d.png"
gstreamer 命令相关推荐
- gstreamer读取USB摄像头H264帧并用rtmp推流
文章目录 gstreamer命令行实现rtmp推流 gstreamer代码实现rtmp推流 因为要在嵌入式端使用rtmp推流,目前我知道的有三种办法,ffmpeg.gstreamer.librtmp, ...
- 【GStreamer学习】之GStreamer基础教程
目标 没有什么比在屏幕上打印出"Hello World"更能获得对软件库的第一印象了! 但是由于我们正在学习多媒体框架,所以我们将输出"Hello World!" ...
- gstreamer(一)入门和概述
一.概述 在音视频领域接触最多实现的方案通常是通过ffmpeg(PC和sever端居多)或者硬件厂家的的SDK实现特定硬件的编解码功能(机顶盒,电视等嵌入式设备).这里我们介绍一个在国内不太常用的解决 ...
- GStreamer入门-1
Ubuntu18.04-GStreamer入门-1 Gstream安装 第一步 -- 在Ubuntu上安装GStreamer 第二步 -- 使用GStreamer构建应用程序 第三步 -- 获取教程的 ...
- Hobbit玩转Zynq MPSoC系列之2:TPG输入+VCU编码+rtp网络传输
Xilinx官方提供了TPG.MIPI.SDI.HDMI和FILE等接口作为图像的输入源,在工程中例化为V4L2架构设备,供上层软件调用.TPG全称为Test Pattern Generator,为F ...
- 兼容NVIDIA Jetson Xavier AGX/Orin的GMSL 设计与调试
[欢迎访问方竹科技的淘宝店铺链接地址] 定制 GMSL2 8路采集板精准适配NVIDAI Jetson Xavier AGX/Orin Devkit套件 一.设计目标 1. 支持Jetson Xavi ...
- RPiPlay配置树莓派AirPlay投屏
文章目录 总结 相关文档 RPiPlay项目按照说明安装 命令行常用操作 运行 报错timeout 总结 报错的原因应该是系统OpenMAX等的图像渲染等上的支持问题(换了个系统重新烧录不知道为啥就好 ...
- i.MX8M Plus核心板、开发板编解码性能测试
i.MX8M Plus特点 CPU:4个Cortex-A53+1个Cortex-M7: GPU: 16 GFLOPS (高精度) OpenGL®ES 3.1/3.0.Vulkan®.Open CL™ ...
- 迅为RK3399开发板音视频开发之Debian9 多媒体测试
iTOP3399平台 Debian 系统音视频部分应用层软件采用的是 Gstreamer,支持硬件编解码.本节所有的 示例均是基于 Gstreamer 命令行的形式. iTOP3399 平台内部有一个 ...
最新文章
- php各种编码集详解和在什么情况下进行使用 [php 字符集 显示]
- 为了给你们讲清楚数据库中间件有哪些,我也是拼了!
- 登录账号 npm_自定义npm 及问题整理
- html5网站测试工具,基于HTML5网页的前端技术测试技巧
- 图解http协议头实例分析
- 关于生sql中的空值
- 动画 制作_您希望制作的10个醒目的徽标动画
- codeforces 122A-C语言解题报告
- C++11标准库 - array 1
- web响应式图片设计实现
- Java 性能优化系列之3.2[JVM调优]
- String基本操作
- 取消input聚焦时的边框,去除ios点击时,自动添加的底色效果
- 正交解调 matlab,13.1.1 正交调制解调
- 魔术师usm安装服务器系统,魔术师u盘一键装系统
- Excel选中单元格光标一直闪
- IIC的OLED显示程序
- 如何在 Mac 上强制退出应用
- 实验 9 音频信号采集及处理
- 71道经典Android面试题和答案,重要知识点都包含了