Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Python cv2.VideoCapture from subprocess.PIPE?

Hi, I am trying to capture video from a subprocess (which outputs stream to stdout).

Eg:

.

..
videopipe = subprocess.Popen(externalcmd, stdout=subprocess.PIPE)
capture = cv2.VideoCapture(videopipe.stdout)
...

Obviously snippet from above does not work.... Where the external command will be generating raw video stream...

How does captures video from a pipe with python cv2?

Thanks a lot!

Sergei.