Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How does the cv2.VideoCapture class work with gstreamer pipelines?

Today I found out that you can use a gstreamer pipeline-string in the constructor of the VideoCapture class (see http://stackoverflow.com/a/23795492), like this:

cv2.VideoCapture("autovideosrc ! appsink")

(in python 2.7, OpenCV 3.1.0, Gstreamer 1.4.3)

And this works like a charm, apart from a few assertions failing for Gstreamer, with no apparent ramifications. Sadly, I did not find any documentation on this kind of usage. The (! appsink) is mandatory, I assume? Is data format which flows into 'appsink' arbitrary, i.e. as long as it is a valid pipeline, VideoCapture can work with it?

A Disclaimer: Im pretty new with cv2 - in fact today I used it the first time.

How does the cv2.VideoCapture class work with gstreamer pipelines?

Today I found out that you can use a gstreamer pipeline-string in the constructor of the VideoCapture class (see http://stackoverflow.com/a/23795492), like this:

cv2.VideoCapture("autovideosrc ! appsink")

(in python 2.7, OpenCV 3.1.0, Gstreamer 1.4.3)

And this works like a charm, apart from a few assertions failing for Gstreamer, with no apparent ramifications. Sadly, I did not find any documentation on this kind of usage. The (! appsink) is mandatory, I assume? Is data format which flows into 'appsink' arbitrary, i.e. as long as it is a valid pipeline, VideoCapture can work with it?

A Disclaimer: Im pretty new with cv2 - in fact today I used it the first time.