New Component: streamlit-webrtc, a new way to deal with real-time media streams

@Joe_Tay @nerilou.delacruz
My previous answer was wrong. Being unable to set the frame size is for the case of recorder, but not processor.

You can configure the input resolution as below:

webrtc_streamer(
    ...
    media_stream_constraints={
        "video": {
            "width": 1280,
        }
    },
    ...
)

or for finer controls:

webrtc_streamer(
    ...
    media_stream_constraints={
        "video": {
            "width": {"min": 800, "ideal": 1200, "max": 1920 },
        }
    },
    ...
)

media_stream_constraints parameter is passed to navigator.mediaDevices.getUserMedia() on the frontend code to configure the media devices.
This page, for example, explains the details of that API. If you want more controls, this page can be a hint.

Note that the media_stream_constraints setting is a instruction for the browser to configure the media devices, but the browser sometimes does not follow it.