Please paste the complete code that I can copy, paste and run to reproduce the problem.
Though I haven’t tested but just have seen it, let me point out some potential problems;
globaldoes not work inside
recv(). See New Component: streamlit-webrtc, a new way to deal with real-time media streams - #50 by whitphx
img_listis used outside
listis just a reference to another object, which is shared by both the main thread and
recv()'s thread, so I think it should also be guarded with thread-safe lock, though I’m not sure if it is really necessary as I haven’t tested it yet.
Your code is based on an old sample.
VideoTransformeris now deprecated and
VideoProcessoris recommended to use instead, though it is still working with the latest release - See New Component: streamlit-webrtc, a new way to deal with real-time media streams - #31 by whitphx