Esp32-s2 webcam image capture

I am using esp32.
I am using an esp32-s2 board with usb hosting function.

I want to capture an image from a webcam.
No video required. Only 1 image every 5 minutes.
I want to capture.

I've been searching, but there's not much content.
Has anyone ever done something similar or is doing something similar?
Please advise.

provide links (and datasheet if any) for your devices
it will be useful to understand for example if your webcam has an API?

What resolution do you want to capture?

Also, why not just use an ESP32-CAM?

What picture quality are you aiming for with the webcam ?

If you look at the time 2:55 minutes, there is a video in action with a UVC webcam.
I don't need a video .. I want high quality still images.

I wish it was 720p or 1080p.

I know ESP32-CAM.
But I think the picture quality is too low compared to webcam.
So I don't want to use esp32-cam .

The ESP32-CAM is about the peak image quality you'll get with any ESP. Sounds like you need a Raspberry Pi.

I don't get why you say that... The ESP32 is just the user interface.

If you have an external device capturing pictures, and it has an API to trigger a photo and then get back the bytes from the picture, then you get the quality of that external device.... So if OP has a great quality webcam, then...

I'd love to be proven wrong, but my understanding is that it's still the LS 2.0 protocol and that you have to cobble together drivers for most anything but keyboards and mice, and that webcam interfacing is still quite difficult and produces sketchy results.

Please reference a project of this type or post your on finished code to help OP along.

Although IP cameras are normally used for direct video streaming of live video, many IP Cameras also have an FTP client built in, as well as SMTP (eMail) capability.

that's how software such as CameraFTP work.

So this goes back to my question in #2. What's the webcam model... if it has an API, then it's just a matter of implementing that API

If you take a raw image and process it by esp32
That's right, but in the case of a webcam, it's wrong.
If you bring only 1 image of the compressed mjpeg static image and upload it ..
That's it.
This is my first time starting so I just don't know.

A camera so fancy that you don't even need an ESP32 to run it. If the goal is to use it as just an intermediary to connect it to a computer, then just use CameraFTP as you helpfully suggested.

This is a webcam, not a cctv. There is no rtmp or rtsp or ftp upload function.

ah OK - I might have been lost in terminology there then.
I thought of an IP based camera / WiFi Camera
thanks for clarifying

Then you probably want to use a Raspberry Pi. The drivers and all are already available. Raspbian and Arch are good distros. Raspbian is easiest and Arch is lite and super fast.

Implementation with Raspberry Pi or other Linux is too easy.
But it's going to be powered by a battery pack... so there's not enough power.

Well, you've definitely set a solid challenge for yourself.
To write a driver I suggest that you use FREE USB Sniffer & Software USB Protocol Analyzer for Windows ( to record the protocol from your computer for initializing the camera, for changing resolution and other settings, and for image capture. You'll also need to figure out how to set it to low speed 2.0 protocol I believe.
I look forward to seeing what you come up with. Please post your progress or results. If you get it working it will make a nice project for the showcase.

You still haven't answered the question: what webcam make and model?

Currently, it is a camera + USB cable like a regular GoPro.
It is connected by uvc.
I thought uvc wasn't important because it's a general purpose protocol.
Sorry for the late reply.