您好我想在python中创建以下管道。
gst-launch-1.0 udpsrc port=5000 ! application/x-rtp, encoding-name=H264,payload=96 ! rtph264depay ! h264parse ! avdec_h264 ! autovideosink
我试过以下
pipeline = gst.Pipeline("test-pipeline")
source = "udp://@127.0.0.1:5000"
rtph264pay= gst.element_factory_make("rtph264pay", "rtph264pay")
x264enc= gst.element_factory_make("x264enc", "x264enc")
pipeline.add(source,rtph264pay,x264enc)
cap = cv2.VideoCapture(pipeline);
cap.set(cv2.cv.CV_CAP_PROP_FOURCC, cv2.cv.CV_FOURCC('H', '2', '6', '4'));
cap.set(3,640)
cap.set(4,340)
我做错了什么?
我读了以下问题: Question 1