This example illustrates how to use a raspberry pi and picamera to send h264 encoded video to the browser. Hardware encoder built in Raspberry Pi camera module is used on this example.
First install the required packages:
$ pip install -r requirements.txtMake sure you have installed required packges by aiortc with apt.
When you start the example, it will create an HTTP server which you can connect to from your browser:
$ python rpicamera.pyYou can then browse to the following page with your browser:
Once you click Start the server will send video from the raspberry pi camera to the browser.