This example shows the use of the espp::RtspServer
and espp::RtspClient
classes provided by the rtsp
component for performing streaming of JPEG images
(espp::JpegFrame
) using the MJPEG
format over the Real Time Streaming
Protocol (RTSP) / Real Time Protocol (RTP) packets.
For more complete example use, see the camera-streamer and camera-display repositories.
This example is designed to be run on an M5Stack ESP32 Timer Cam module (server) or a ESP32-S3-Box (client).
Plaintext
idf.py menuconfig
You need to configure the WiFi
network in the RTSP Example Configuration
menuconfig and you can optionally configure the RTSP Server Port
(default
8554).
NOTE: this example is designed to be modified into client only or server-only operation depending on the hardware it is deployed to.
Build the project and flash it to the board, then run monitor tool to view serial output:
Plaintext
idf.py -p PORT flash monitor
(Replace PORT with the name of the serial port to use.)
(To exit the serial monitor, type Ctrl-]
.)
See the Getting Started Guide for full steps to configure and use ESP-IDF to build projects.
Example showing the server (camera), the client (handheld display), and the python client, with both clients connected simultaneously:
https://user-images.githubusercontent.com/213467/236601258-c334e1ba-5e18-4452-b48d-e792ec2ed4fb.mp4
Screenshot showing the server running for a very long time (all day, see timestamp in log > 33,000 seconds):
Screenshot showing the received framerate on the camera-display:
Screenshot of main code for camera-streamer output:
To create a project from this example, run:
idf.py create-project-from-example "espp/rtsp=1.0.4:example"