下面是我使用多线程池并行播放多个视频的代码.但每个输入只播放一段视频.我希望每个视频单独打开.不组合
import concurrent.futures
RTSP_URL = "rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4"
RTSP_List = [RTSP_URL, RTSP_URL, RTSP_URL, RTSP_URL]
def url_to_video(url):
video = cv2.VideoCapture(url)
while True:
_, frame = video.read()
cv2.imshow("RTSP", frame)
k = cv2.waitKey(1)
if k == ord('q'):
break
video.release()
cv2.destroyAllWindows()
while True:
with concurrent.futures.ThreadPoolExecutor() as executor:
executor.map(url_to_video, RTSP_List)```
how to play each video separately.