gst-launch-1.0 错误管道:无法 link queue2 到 videoconvert0

gst-launch-1.0 erroneous pipeline: could not link queue2 to videoconvert0

我正在尝试将视频源发送到三个输出:多播、文件系统和(调整大小的视频)显示 gst-launch-1.0

这是命令,

gst-launch-1.0   videotestsrc  !  x264enc  !  tee name=t  \
  t.  !  queue  !  rtph264pay  !  udpsink host=224.1.1.1 port=20000 auto-multicast=true  \
  t.  !  queue  !  h264parse  !  splitmuxsink location=./vid%02d.mkv max-size-time=10000000000  \
  t.  !  queue  !  videoconvert  !  videoscale  !  video/x-raw,width=100  !  autovideosink

这是错误,

WARNING: erroneous pipeline: could not link queue2 to videoconvert0

您的问题是您正在将 h264 流发送到 videconvert 而不是原始视频。所以你只需添加解码:

gst-launch-1.0 -e videotestsrc ! video/x-raw,width=640,height=480,framerate=30/1 ! queue ! x264enc ! tee name=t    t. ! queue ! rtph264pay ! udpsink host=224.1.1.1 port=20000 auto-multicast=true     t. ! queue ! h264parse ! splitmuxsink location=./vid%02d.mkv max-size-time=10000000000     t. ! queue ! h264parse ! avdec_h264 ! videoconvert ! videoscale ! video/x-raw,width=100 ! autovideosink