Gstreamer常见pipeline命令 - 持续更新中

2023-05-16

解码:(根据码流类型自适应创建相应解码器)

gst-launch-1.0 filesrc location=./home/user/DCIM/Camera/VID_20201001_103749.mov ! qtdemux ! droidvdec ! videoparse format=i420 width=1920 height=1080 framerate=30/1 ! filesink location=test_1920x1080.yuv

将720x1560@rgbx 转换为 1920x1080@I420:

gst-launch-1.0 filesrc location=./test_0323.yuv blocksize=4492800 ! videoparse format=rgbx width=720 height=1560 framerate=30/1 ! videoconvert ! "video/x-raw,format=I420,width=720,height=1560,framerate=30/1" ! videoscale ! "video/x-raw,format=I420,width=1920,height=1080,framerate=30/1" ! filesink location=./test_rgbxToI420.yuv

生成yuv:

gst-launch-1.0 -e videotestsrc ! "video/x-raw,format=I420,width=1920,height=1080,framerate=30/1" ! filesink location=./video_test_1920x1080.yuv

yuv查看:

gst-launch-1.0 filesrc location=./test_1920x1080.yuv blocksize=3110400 ! "video/x-raw, format=I420,width=1920,height=1080,framerate=30/1" ! videoparse format=i420 width=1920 height=1080 ! autovideosink

编码:

将YUV编码生成裸码流(H264):

gst-launch-1.0 filesrc location=test_1920x1080.yuv blocksize=3110400 ! "video/x-raw,format=I420,width=1920,height=1080,framerate=30/1" ! droidvenc ! "video/x-h264,stream-format=avc,alignment=au,width=1920,height=1080,framerate=30/1" ! h264parse ! "video/x-h264, stream-format=byte-stream" ! filesink location=test1.h264

将YUV编码生成avi文件(H264):

gst-launch-1.0 filesrc location=test_1920x1080.yuv blocksize=3110400 ! "video/x-raw,format=I420,width=1920,height=1080,framerate=30/1" ! droidvenc ! "video/x-h264,stream-format=avc,alignment=au,width=1920,height=1080,framerate=30/1" ! h264parse ! "video/x-h264, stream-format=byte-stream" ! avimux ! filesink location=./test1.avi

将YUV编码生成裸码流(H265):

gst-launch-1.0 filesrc location=test_1920x1080.yuv blocksize=3110400 ! "video/x-raw,format=I420,width=1920,height=1080,framerate=30/1" ! droidvenc ! "video/x-h265,stream-format=hvc1,alignment=au,width=1920,height=1080,framerate=30/1" ! h265parse ! "video/x-h265, stream-format=byte-stream" ! filesink location=test1.h265

将YUV编码生成MP4文件(H265):

gst-launch-1.0 filesrc location=test_1920x1080.yuv ! videoparse format=i420 width=1920 height=1080 framerate=30/1 ! droidvenc ! "video/x-h265,stream-format=hvc1,alignment=au,width=1920,height=1080,framerate=30/1" ! h265parse ! "video/x-h265, stream-format=hvc1" ! qtmux ! filesink location= test.mp4

生成avi

gst-launch-1.0 -e videotestsrc ! "video/x-raw,format=I420,width=320,height=240,framerate=30/1" ! avenc_mpeg4 ! mpeg4videoparse ! avmux_mp4 ! filesink location=./0523_test1.avi

gst-launch-1.0 -e videotestsrc ! "video/x-raw,format=I420,width=320,height=240,framerate=30/1" ! avenc_mpeg2video ! mpegvideoparse ! avmux_mpegts ! filesink location=./0523_test1.ts

编码生成ts文件(视频)

gst-launch-1.0 -e videotestsrc ! "video/x-raw,format=I420,width=320,height=240,framerate=30/1" ! droidvenc ! "video/x-h264,stream-format=avc,alignment=au,width=320,height=240,framerate=30/1" ! h264parse ! "video/x-h264, stream-format=byte-stream"! avmux_mpegts ! filesink location=./0523_test1.ts

编码生成ts文件(视频+音频)

gst-launch-1.0 -e videotestsrc ! "video/x-raw,format=I420,width=320,height=240,framerate=30/1" ! queue ! droidvenc ! "video/x-h264,stream-format=avc,alignment=au,width=320,height=240,framerate=30/1"

! h264parse ! "video/x-h264, stream-format=byte-stream"! mux. audiotestsrc ! avenc_aac ! queue ! mux. avmux_mpegts name=mux ! filesink location=./0523_test1.ts

camera:

将采集的yuv数据编码封装成avi文件:

gst-launch-1.0 droidcamsrc ! capsfilter ! "video/x-raw,format=NV21,width=1920,height=1080,framerate=30/1" ! videoparse format=i420 width=1920 height=1080 framerate=30/1 ! queue ! droidvenc ! "video/x-h264,stream-format=avc,alignment=au,width=1920,height=1080,framerate=30/1" ! h264parse ! "video/x-h264, stream-format=byte-stream" ! mux. pulsesrc !capsfilter ! "audio/x-raw,format=U8,channels=1,width=8,depth=8,rate=8000,signed=TRUE"! mux. avimux name=mux filesink location= test.avi

将采集的yuv数据编码封装成MP4文件:

gst-launch-1.0 -e droidcamsrc ! capsfilter ! "video/x-raw,format=NV21,width=1920,height=1080,framerate=30/1" ! videoparse format=i420 width=1920 height=1080 framerate=30/1 ! queue ! droidvenc ! "video/x-h264,stream-format=avc,alignment=au,width=1920,height=1080,framerate=30/1" ! h264parse ! "video/x-h264, stream-format=avc" ! mux. pulsesrc ! "audio/x-raw,format=U8,channels=1,width=8,depth=8,rate=8000,signed=TRUE" ! queue ! mux. qtmux name=mux ! filesink location= test.mp4

将采集的yuv数据编码封装成MP4文件(H265):

gst-launch-1.0 -e droidcamsrc ! capsfilter ! "video/x-raw,format=NV21,width=1920,height=1080,framerate=30/1" ! videoparse format=i420 width=1920 heig

ht=1080 framerate=30/1 ! queue ! droidvenc ! "video/x-h265,stream-format=hvc1,alignment=au,width=1920,height=1080,framerate=30/1" ! h265parse ! "video/x-h265, stream-fo

rmat=hvc1" ! mux. pulsesrc ! "audio/x-raw,format=U8,channels=1,width=8,depth=8,rate=8000,signed=TRUE" ! queue ! mux. qtmux name=mux ! filesink location= test.mp4

音频:

播放MP3音频文件

gst-launch-1.0 filesrc location=./so/video/Test_videos_and_audios/Test_audio/daoxiang.mp3 ! decodebin ! pulsesink

gst-launch-1.0 filesrc location=./so/video/Test_videos_and_audios/Test_audio/daoxiang.mp3 ! mpegaudioparse ! avdec_mp3 ! autoaudiosink

编码生成音频文件

gst-launch-1.0 -e pulsesrc ! wavenc ! queue ! filesink location=test.wav

播放包含原始音频数据 (PCM) 的 .WAV 文件

gst-launch-1.0 filesrc location=test.wav ! wavparse ! audioconvert ! audioresample ! autoaudiosink

将pcm编码成aac文件

gst-launch-1.0 -e audiotestsrc ! audio/x-raw, channels=2, rate=44100, format=S16LE, layout=interleaved ! queue ! audiorate ! audioconvert ! avenc_aac ! qtmux ! filesink location=/home/user/test.aac

RTP(video)

gst-launch-1.0 -e videotestsrc ! "video/x-raw,format=I420,width=320,height=240,framerate=30/1" ! droidvenc ! "video/x-h264,stream-format=avc,alignment=au,width=320,height=240,framerate=30/1" ! h264p

arse ! "video/x-h264, stream-format=byte-stream" ! avmux_mpegts ! "video/mpegts,systemstream=true" ! rtpmp2tpay ! udpsink name=sink host=172.16.23.27 port=7236

gst-launch-1.0 -e videotestsrc ! "video/x-raw,format=I420,width=320,height=240,framerate=30/1" ! avenc_mpeg2video ! mpegvideoparse ! avmux_mpegts ! "video/mpegts,systemstream=true" ! rtpmp2tpay ! udpsink name=sink host=172.16.23.27 port=7236

RTP(video + audio)

gst-launch-1.0 -e videotestsrc ! "video/x-raw,format=I420,width=320,height=240,framerate=30/1" ! queue ! droidvenc ! "video/x-h264,stream-format=avc,alignment=au,width=320,height=240,framerate=30/1"

! h264parse ! "video/x-h264, stream-format=byte-stream"! mux. audiotestsrc ! avenc_aac ! queue ! mux. avmux_mpegts name=mux ! "video/mpegts,systemstream=true" ! rtpmp2tpay ! udpsink name=sink host=172.16.23.27 port=7236

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Gstreamer常见pipeline命令 - 持续更新中 的相关文章

随机推荐

  • VFH 2D —— Path Planning

    版权声明 xff1a 本文为博主原创博文 xff0c 未经允许不得转载 xff0c 若要转载 xff0c 请说明出处并给出博文链接 进行路径规划的前提是 xff0c 无人机或机器人自身已经对当前环境有一个清晰的认知 xff08 环境感知 x
  • PX4——rcs源码分析

    注 xff1a 本文转载自 博主 xff1a 虾米一代 博客 xff1a pixhawk原生码rcS分析 代码执行流程 1 编译时将cmake configs nuttx px4fmu v2 default cmake文件中配置的模块全部编
  • ArduPilot——AP_NavEKF3针对AP_NavEKF2做了哪些改进/变动?

    版权声明 xff1a 本文为博主原创博文 xff0c 未经允许不得转载 xff0c 若要转载 xff0c 请说明出处并给出博文链接 本篇博文主要针对Paul Riseborough大神为ArduPilot做的导航EKF3算法 xff0c 相
  • QuadPlane (VTOL)——ArduPilot——流程梳理

    版权声明 xff1a 本文为博主原创博文 xff0c 未经允许不得转载 xff0c 若要转载 xff0c 请说明出处并给出博文链接
  • 进程的几种状态

    进程 xff1a 进程 xff08 Process xff09 是计算机中的程序关于某数据集合上的一次运行活动 xff0c 是系统进行资源分配和调度的基本单位 进程状态 xff1a 一个进程的生命周期可以划分为一组状态 xff0c 这些状态
  • 超声波纳米材料乳化分散震动棒设计

    超声波纳米材料乳化分散震动棒利用超声波的超声空化作用来分散团聚的颗粒 它是将所需处理的颗粒悬浮液 xff08 液态 xff09 放入超强声场中 xff0c 用适当的超声振幅和作用时间加以处理 由于粉体颗粒团聚的固有特征 xff0c 对于一些
  • noVNC+VNCserver实现远程访问Docker容器桌面

    一 实验环境 主机 xff1a Ubuntu16 04 目标机 xff1a docker容器 说明 xff1a 在主机Ubuntu16 04中安装docker xff0c 并虚拟出一台Ubuntu容器 xff0c 将该容器作为要远程访问的目
  • 本地项目(vscode)和码云建立连接,及常用git命令

    本地Git和线上关联 xff1a 权限设置 G码云 设置 SSH公钥 公钥管理电脑桌面点击右键进入Git Bash Here对照链接输入指令绑定邮箱 xff1a https gitee com help articles 4181 arti
  • 解决android studio 控制台乱码

    双击shift键 xff0c 输入vmoption xff0c 选择Edit Custom CM Options 如果没有配置过 xff0c 就会弹出窗口问是否创建配置文件 xff0c 点击Create xff0c 输入 Dfile enc
  • 无人机学习笔记

    硬件 首先从硬件开始说起把 xff0c 气压计 陀螺仪 磁力计 xff0c 这三个不用说肯定是必备的 xff0c 后面由于开发的需要还添加了激光测距 xff0c 以及光流 但是在开发过程中遇到了很多问题 xff0c 一个一个来说 气压计 气
  • 解决KEIL中ARM编译器不能编译的问题

    keil编译器出现问题 xff0c 根据提示意思就是ARM编译器选择不对的问题 Target 39 Printf 39 uses ARM Compiler 39 V5 06 update 6 build 750 39 which is no
  • linux 内核中strstr函数 功能

    在内核代码中看到strstr函数 xff1a mode 61 strstr boot command line 34 D 34 应该是一个字符串处理函数 xff0c 使用man命令查看下给出如下解释 xff1a SYNOPSIS inclu
  • KPI异常检测资料汇总

    文章目录 0 综述类1 KPI异常检测1 1 经典模型1 1 1 Donut 基于VAE的周期性无监督KPI异常检测1 1 1 1 论文解读1 1 1 2 源码分析 1 12 MAD 基于GANs的时间序列数据多元异常检测 1 2 行业落地
  • jupyter notebook:使用argparse包存在的问题及解决

    argparse模块 argparse是python用于解析命令行参数和选项的标准模块 导入argparse包 span class hljs keyword import span argparse 遇到的问题 parser 61 arg
  • Qt C++和Java相互调用

    Qt C 43 43 和Java相互调用 1 C 43 43 调用Java Test h span class token keyword class span span class token class name Test span s
  • 单片机HAL库使用HAL_UART_Receive_IT

    前言 由于本人第一次尝试开发单片机 xff0c 要实现的功能是信息转发 xff0c 需要调用HAL库方法 xff0c 中断接受信息转发给FPGA xff0c 这里没有用到DMA方式所以不做赘述 xff0c 特此记录分享希望帮到你们 发送信息
  • VLC播放gstreamer pipeline rtp流

    一 xff1a Gstreamer 下载gstreamer 编译等自行百度 pipeline命令 硬编码输出rtp gst launch 1 0 e videotestsrc 34 video x raw format 61 I420 wi
  • 【unity】Multiple plugins with the same name '...'解决方案

    Multiple plugins with the same name 39 ulua 39 found at 39 Assets Plugins uLua 1 22 x86 64 ulua dll 39 and 39 Assets Plu
  • CMAKE 环境变量

    CMAKE CXX FLAGS CMAKE C FLAGS 在cmake脚本中 xff0c 设置编译选项有两种方式 xff1a 1 1 add compile options命令 add compile options命令添加的编译选项是针
  • Gstreamer常见pipeline命令 - 持续更新中

    解码 xff1a xff08 根据码流类型自适应创建相应解码器 xff09 gst launch 1 0 filesrc location 61 home user DCIM Camera VID 20201001 103749 mov q