0

Hi I want to create the following pipe in python.

gst-launch-1.0 udpsrc port=5000 ! application/x-rtp, encoding-name=H264,payload=96 ! rtph264depay ! h264parse ! avdec_h264 ! autovideosink

I have tried the following

 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)

What am I doing wrong ?

I read the following questions : Question 1

4

1 回答 1

0

这个问题似乎很相似。您确定 VideoCapture 功能支持直接 gst PIPE 吗?我只使用了 videoN 设备(环回或直接)。

于 2015-08-17T09:10:02.910 回答