• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

ESP32 Cam ports?

Q&A Forum › Category: ESP32 › ESP32 Cam ports?
0 Vote Up Vote Down
ray asked 4 years ago

ESP32Cam Pan Tilt code —- ESP32Cam book Pan and Tilt Video streaming (2 axis)
I was able to change the port from 80 to 8020  in main code
Only pan / tilt blocks show on 8020 port —- no video stream
Where do I specify in code to send  video to port 8020?  To get video stream to show on 8020?

3 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 4 years ago

Hi Ray.
 
There are a few things you need to change.
 
You need to change this line:

config.server_port = 80;

To this:

config.server_port = 8020;

 
The following line:

bool jpeg_converted = frame2jpg(fb, 80, &_jpg_buf, &_jpg_buf_len);

To this:

bool jpeg_converted = frame2jpg(fb, 8020, &_jpg_buf, &_jpg_buf_len);

 
At this moment, the video streaming is running on the selected port(+1), followed by /stream. So it is running on the following URL:

IPaddress:8081/stream. 

So, we also need to change the source of the video to embed it on the page. 
So, change the following line:

window.onload = document.getElementById("photo").src = window.location.href.slice(0, -1) + ":81/stream";

To this:

window.onload = document.getElementById("photo").src = window.location.href.slice(0, -6) + ":8021/stream";

 
Here’s a link to the complete working code:https://gist.github.com/sarasantos/1518a2d137ef7c0500ebdbb4154c81b0
 
I hope this helps.
Regards,
Sara
 
 
 

0 Vote Up Vote Down
ray answered 4 years ago

Works fine on port 8020
but  this code only allows 1 user to view cam
Tnx

0 Vote Up Vote Down
Sara Santos Staff answered 4 years ago

Yes, the examples provided only allow one client at a time for video streaming.
Regards,
Sara

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.