我正在尝试将视频源发送到三个输出:多播、文件系统和使用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流发送到videcovert,而不是期望原始视频。所以你只需要添加解码:
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