I have a loop that is displaying a video frame by frame.
My issue is, I was expecting the images to display frame by frame…like flipping through a set of index cards; however, I’m getting the frames to display underneath each other one by one in a cascading fashion (if that makes sense).
Is there a way I can close an image in my streamlit app?
Here is my code
cap = cv2.VideoCapture('/content/video.mp4') while cap.isOpened(): ret, image = cap.read() st.image(Image.open(image), width=1200)