Converting cv2.VideoCapture(0) to use streamlit_webrtc

Streamlit: https://vvhhzrapkowmkgcg5vyykj.streamlit.app/

Github (app.py): GitHub - wayyn3/RFslr

It run well on localhost when using cv2.VideoCapture(0), but since I want to deploy it on streamlit cloud, I need to use the streamlit_webrtc instead of cv2.VideoCapture(0). Then I got this error:

Traceback (most recent call last):
  File "/home/adminuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 534, in _run_script
    exec(code, module.__dict__)
  File "/mount/src/rfslr/app.py", line 140, in <module>
    frame = webrtc_ctx.video_processor.recv()
TypeError: recv() missing 1 required positional argument: 'frame'

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.