ESP32 Camera Websockets Video Stream to Remote Server | WEB Livestream AI Thinker CAM

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey so these esp32 cameras have this nice example script so first I choose from the board manager or the right board which is in this case for this board under esp32 Arduino and then very I think our esp32 cam when you select this one and all these parameters a huge app is important um yeah and the rest you can just copy from this then you select the serial Port then you have this example script that is p32 and then camera and then camera wrap server I have to change different parameters in my case it is the AI thinker board so I have to change this network and your password and now upload it to the esp32 camera compiling now okay now it's uploading again now I can go to the Series monitor and see that my camera has connected to Wifey I just copy this really fast and open new tab and now I have this screen available I can now start stream and I have the stream here now you can see the camera and you can see me hello um and you can change it from parameters resolution for example one very important thing is that you have to connect an external antenna because when I disconnect this you see that the image immediately starts to drop images and the stream is really slow then so I will just reconnect this really fast now I just reconnected the antenna back in the board again maybe reset but now I can start again you can see with the external antenna connected the stream is super fast but if you're in your in your private Network in your local network you can just right click and open image in your tab and then you have this through the stream available here and then you can see it all the time when the ESP is running so the settings so I can change settings here and change the properties of the stream here same for images I can also take a still image like this actually always at the same time if I reload this page the right page the image actually changes so I put my camera and you still have the live stream on the left side which is pretty cool I think yeah but that's actually it so you can't um do anything more with this except streaming to the local network if you need your camera stream outside your local network for example on a different machine for example in my case the Raspberry Pi um you need a different approach and I haven't found something on the Internet so I wrote this so if you like to use it you can do it it's on GitHub so what I did was I built this time script to upload the images via Arduino websocket to a websocket server and my websocket server can run anywhere on a Raspberry Pi for example or in the cloud so you can put it online and watch the images from anywhere in the world so this is available on GitHub so you can just copy it the only thing you have to do is to change the network name and the password and the IP to send the stream to in my case this is the local IP of the Raspberry Pi but it can also be a public IP address on the network the only thing that has to be set on the server side is that you can reach the port so on cloud source is something you have to open the port to the outside world and on the Raspberry Pi it works out of the box so I change my network parameters really fast and then upload the code to the esp32 module so this will take a few seconds again foreign monitor websocket connection failed that makes sense because the websocket is currently not running I will just log into my Raspberry Pi I will just open another window to the Raspberry Pi yeah I would just copy it here so I do get clone so I just turned the repository um go to ESP camera web stream the repository have there are two python files one is for receiving the stream from the esp32 module and the other one is to send the image stream to a website but before that you have to install these dependencies in my case these are already installed while it's doing that I will already CD into the repository oops and I will start the receive stream when I set that the python backend waits for the websocket to connect the websocket I just reset the esp32 camera then you can already see images coming in and you can see here on the ceremony tour that I send the images to establish the connection you have to restart the esp32 these numbers are the image sizes of the images so if I change the light on the camera the size of the image actually changed because of the air compression to see this picture I can either if I'm on the local machine just watch this image.jpg or if I don't have access to the machine I can just start the forward I can just start the send in the image stream just like this and then I can go to the IP address and the port I can just click that I think maybe not no and I'll start it here and now I can see me okay something went wrong sure see sometimes it freezes and this is because when I receive a broken image um the browser crashes so something goes wrong to prevent that I have this um kind of done work around and it looks like this I just stopped this one and then copy the image to a placeholder.jpg cover the camera so it's black placeholder and when I restart the Send image thing again it won't stop so if I have a crashing image you see you have a black background so it won't crash the browser or the preview because I think it always has to have like a working picture to refresh the page again I think this was because of the network connection yeah so I didn't send images I don't know what exactly it is maybe it's a camera that is like poorly connected so now the image stream actually works so I can sometimes it's a bit laggy but I mean it's only the 240 gigahertz processor but it works so and more or less return and if you want to change the resolution for example for the esp32 camera you can change that here upload it to the SP again and then see the different other resolution here um yeah I think that's it it seems to work it also works online on a Cloud Server I already tested that and if this is helpful to you or something you can leave a like or subscription or anything so thank you bye [Music] thank you
Info
Channel: Neumi
Views: 6,696
Rating: undefined out of 5
Keywords:
Id: cdjgs48OQ6E
Channel Id: undefined
Length: 7min 10sec (430 seconds)
Published: Wed Apr 19 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.