'Reading a video output from cv2.imshow into another code

I have written a code, which puts on a live webcam recording various filters, and gives me at the end again a video as output (with cv2.imshow). Now I want to use the output video in another code at the same time. Bringing the two codes together is not possible.

Does the output video have an address where I can call it? Is there an OpenCV function, (like cv2.VideoCaputere), with which I can read open videos?

Saving the video and then reusing it does not work, because the other code must process the output video at the same time.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source