# Esp32 cam webserver videocapture

**URL:** <https://forum.opencv.org/t/esp32-cam-webserver-videocapture/16382>\
**Category:** C++\
**Tags:** raspberrypi, programming\
**Created:** [February 6, 2024, 10:38am UTC](https://forum.opencv.org/t/esp32-cam-webserver-videocapture/16382 "2024-02-06T10:38:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Khaled\_Moin](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/khaled_moin/32/9663_2.png) [@Khaled\_Moin](https://forum.opencv.org/u/Khaled_Moin)\
**Post date:** [February 6, 2024, 10:38am UTC](https://forum.opencv.org/t/esp32-cam-webserver-videocapture/16382/1 "2024-02-06T10:38:30Z")

</div>

Hello,  
I’ve written a code for esp32cam to host a webserver for its camera feed. When i visit from my computer to the url (192.168.2.50/cam.jpg), the esp32cam captures a photo and shows me on the browser.

I’m running opencv library on codeblocks on a raspberry pi 4. I’ve been able to capture photo from the internet, e.g.: the following code runs perfectly and shows me picture.  
`VideoCapture capture("https://img.freepik.com/free-photo/purple-osteospermum-daisy-flower_1373-16.jpg");`

But The following code fails to fetch image from esp32cam server and times out.  
`VideoCapture capture("http://192.168.2.50/cam.jpg");`

I’m new to this. please help.
