TX2 NX上gstreamer融合音视频示例及更多示例

将mp4和wav融合成一个新的mp4

gst-launch-1.0 filesrc location=test.mp4 ! qtdemux name=demux demux.video_0 ! queue ! h264parse ! omxh264dec ! nvv4l2h264enc ! h264parse ! qtmux name=mux ! filesink location=test1.mp4 filesrc location=test.wav ! wavparse ! mux.

摄像头拉流

 std::string pipeline = " nvarguscamerasrc "

        "! video/x-raw(memory:NVMM), format=(string)NV12, width=(int)1640, "

        "height=(int)1232,framerate=(fraction){fps}/1 "

        "! nvvidconv  left=0 right=1640 top=136 bottom=1096 "

        "! video/x-raw,format=(string)I420, width=(int)1024, height=(int)600 "

        "! videoconvert "

        "! video/x-raw,format=(string)BGR "

        "! appsink";

rtsp推流

 std::string pipeline_video_writer =

        "appsrc "

        "! video/x-raw, format=BGR "

        "! videoconvert "

        "! nvvidconv "

        "! nvv4l2h264enc  iframeinterval=10 idrinterval=32 "

        "! rtspclientsink  latency=8000  location=rtsp://{ip_address}:8554/my_pipeline";

视频录制h264编码

std::string pipeline =

        "appsrc ! video/x-raw, format=BGR ! queue ! videoconvert ! video/x-raw,format=RGBA ! nvvidconv ! nvv4l2h264enc "

        "! h264parse ! qtmux ! filesink location={filename}  sync=false";

  // nvcompsositor 的两个输入必须是一样的图片格式和内存形式,需要将云图透明部分用白色(255,255,255)填充

两路视频融合,剪切

    std::string pipeline_nvcompsositor =

        "appsrc "

        "! video/x-raw, format=BGR "

        "! videoconvert "

        "! video/x-raw,format=(string)RGBA, width=(int)1024, height=(int)600"

        "! nvvidconv "

        "! queue2"

        "! nvcompositor  name = compos sink_0::zorder=1 sink_0::alpha=0.5 "

        "sink_1::alpha=1 "

        "sink_1::zorder=0 sink_1::width=1024 sink_1::height=600 "

        "! nvvidconv "

        "! nvv4l2h264enc "

        "! rtspclientsink location=rtsp://192.168.20.99:8554/my_pipeline"

        " nvarguscamerasrc "

        "! video/x-raw(memory:NVMM), format=(string)NV12, width=(int)1640, height=(int)1232,framerate=(fraction)25/1 "

        "! nvvidconv  left=0 right=1640 top=136 bottom=1096 "

        "! video/x-raw,format=(string)RGBA, width=(int)1024, height=(int)600 "

        "! videobalance brightness=0.3 "

        "! nvvidconv "

        "! queue2"

        "! compos. ";

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

zanglengyu

敲碗要饭

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

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

打赏作者

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

抵扣说明:

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

余额充值