Currently, my system is able to do the real-time recognition using webrtc_streamer
but I have no idea how to access the video content that has been uploaded . Below is what I have for now:
uploaded_video = st.file_uploader("Please upload a video.")
if uploaded_video is not None:
tfile = tempfile.NamedTemporaryFile(delete=False)
tfile.write(uploaded_video.read())
video_file = open(tfile.name, 'rb')
video_bytes = video_file.read()
while video_bytes is not None:
with lock:
img = img_container["img"]
if img is None:
continue
frame = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
Is there any suggestions other than using cv2.VideoCapture()
as the Streamlit cloud is not allowed to use it. Much appreciated!