GStreamer 传输和接收管道需要什么才能发送/接收 H264,每个帧都附有元数据?

问题描述 投票:0回答:0

我正在尝试发送 640x480 RGB 图像,每帧都附有元数据。我有以下传输管道:

appsrc name=src ! videoconvert ! x264enc ! rtph264pay config-interval=1 ! udpsink host=127.0.0.1 port=5000

src
将 921667 字节推送到缓冲区(图像为 921600,元数据为 67)并成功传输。

为了显示视频和解析元数据,我尝试了两种不同的接收管道:

  1. udpsrc port=5000 caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)67" ! queue ! rtph264depay ! avdec_h264 ! queue ! videoconvert ! tee name=t t. ! queue ! appsink drop=true name=metadatasink emit-signals=true t. ! queue ! autovideosink
    .
    对于此管道,视频显示成功,但
    metadatasink
    缓冲区的大小始终为 921660.
  2. udpsrc address=127.0.0.1 port=5000 ! rtpjitterbuffer ! application/x-rtp ! appsink name=metadatasink sync=true drop=true emit-signals=true
    对于此管道,
    metadatasink
    缓冲区大小各不相同(范围从大约 14 到 1400)。

这个设置有什么问题?传输管道、接收管道或两者都有问题?

gstreamer gstreamer-1.0 python-gstreamer
© www.soinside.com 2019 - 2024. All rights reserved.