gstreamer工具

gst-launch

测试模拟数据

gst-launch-1.0 -v -m videotestsrc ! autovideosink

测rtsp

gst-launch-1.0 rtspsrc location=rtsp://127.0.0.1:8554/test ! rtph264depay ! h264parse ! nvv4l2decoder ! nvoverlaysink

tee

图像一边播放,一边编码存储

gst-launch-1.0 -e v4l2src ! video/x-raw,format=YUY2,width=640,height=480,framerate=30/1 ! tee name=srctee srctee. ! queue ! xvimagesink srctee. ! queue ! videoconvert ! video/x-raw,format=I420 ! x264enc tune=zerolatency ! mp4mux ! filesink location=v.mp4

音频一边重采样,一边显示波形

 gst-launch-1.0 filesrc location=song.ogg ! decodebin ! tee name=t ! queue ! audioconvert ! audioresample ! autoaudiosink t. ! queue ! audioconvert ! goom ! videoconvert ! autovideosink

gst-inspect

检查所有264编解码。

gst-inspect-1.0 |grep 264

gst-play

播放v.mp4文件

gst-play-1.0 v.mp4

存pipeline

export GST_DEBUG_DUMP_DOT_DIR=/home/nvidia

static gint num = 0; //必须要添加GST_DEBUG_DUMP_DOT_DIR环境变量。

gchar* dump_dot= g_strdup_printf("%d-pipeline", num++);

GST_DEBUG_BIN_TO_DOT_FILE(GST_BIN (appCtx[0]->pipeline.pipeline), GST_DEBUG_GRAPH_SHOW_ALL, dump_dot);

dot 0-pipeline.dot -T png -o pic.png

jetson 显示

gst-launch-1.0 -e nvstreammux name=mux batch-size=2   ! nvinfer config-file-path=/opt/nvidia/deepstream/deepstream/samples/configs/deepstream-app/config_infer_primary.txt batch-size=2  ! nvstreamdemux name=demux filesrc location=/opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4 ! qtdemux ! h264parse ! nvv4l2decoder ! queue ! mux.sink_0 filesrc location=/opt/nvidia/deepstream/deepstream/samples/streams/sample_720p.h264 ! h264parse ! nvv4l2decoder ! queue ! mux.sink_1 demux.src_0 ! queue ! nvvideoconvert !  nvdsosd ! nvegltransform ! nveglglessink demux.src_1 ! queue ! nvvideoconvert ! nvdsosd ! nvegltransform ! nveglglessink

jetson nvv4l2h264enc 
gst-launch-1.0 -e nvstreammux name=mux batch-size=2   ! nvinfer config-file-path=/opt/nvidia/deepstream/deepstream/samples/configs/deepstream-app/config_infer_primary.txt batch-size=2  ! nvstreamdemux name=demux filesrc location=/opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4 ! qtdemux ! h264parse ! nvv4l2decoder ! queue ! mux.sink_0 filesrc location=/opt/nvidia/deepstream/deepstream/samples/streams/sample_720p.h264 ! h264parse ! nvv4l2decoder ! queue ! mux.sink_1 demux.src_0 ! "video/x-raw(memory:NVMM), format=NV12" ! queue ! nvvideoconvert ! "video/x-raw(memory:NVMM), format=RGBA" ! nvdsosd !  nvvideoconvert ! nvv4l2h264enc ! h264parse ! qtmux ! filesink location=a.mp4 demux.src_1 ! queue ! "video/x-raw(memory:NVMM), format=NV12" ! queue ! nvvideoconvert ! "video/x-raw(memory:NVMM), format=RGBA" ! nvdsosd ! nvvideoconvert ! nvv4l2h264enc ! h264parse ! qtmux ! filesink location=b.mp4

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

山西茄子

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值