I'm looking for a solution to send a video stream from a USB camera connected to an ESP-32-S3 to an rtsp-simple-server.

There are many solutions to transform an ESP into a server but I want the ESP to be a client. It will have to stream the video stream from the camera to a server. Unfortunately I don't know how to do that.

  • Is there a way to add the FFMPEG lib (or similar) in an ESP project ?
  • Transform the ESP into a server with Micro-RTSP and use the proxy mode of rtsp-simple-server ?
  • Any idea ?

Dev env:

  • Platformio + VSCode
  • ESP-IDF (Framework)
  • ESP-IOT-SOLUTION (component USB)
  • LovyanGFX + LVGL (GUI)

Hardware:

  • ESP32-S3 Parallel TFT with Touch 3.5'' ILI9488:
  • USB Camera

Thank you in advance for your ideas!

0

2 Answers

I found an alternative to solve my problem: The ESPs will be RTSP servers, there will be an rtsp-simple-server in proxy mode to link each ESP on a local server. I will make an API using FFMPEG which will restream on the target RTSP server with this command: ffmpeg -rtsp_transport tcp -i "rtsp://ip_proxy_rtsp:8554/mystream1" -rtsp_transport tcp -c:v libx264 -c:a copy -f rtsp rtsp://ip_server_rtsp_target/mystream2

This way I would just have to call an endpoint of my API to stream an ESP to a remote RTSP server

If you are looking at the native IDF then Websockets offer 2 types of packet (string & binary) which makes a very convienient streaming carrier of text metadata and binary video.

Its TCP so guaranteed, bi-directional and can have multiple clients, so your server woould need to be written but that is just serialising the packets to a stream or file again.

Autobhan websockets is a really solid RAD for that.

Whilst having a rehash myself I missed that was released Aug 5, 2022

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.