ESP32-CAM Video Stream on Blynk

Presumably here:

but looking at how the readme file says that it should be used…

Just replace your existing “WiFi.begin(ssid, password)” call with:

  #include <AutoWifi.h>
  AutoWifi a;
  a.startWifi();

I don’t think its actually used in the sketch in post#25 because there is no AutoWifi object created with AutoWifi a; or equivalent and the regular WiFi.begin(ssid, pass); command is used.

I’d suggest that you comment out the #include <AutoWifi.h> line of code and see what happens.

Pete.

Good evening Pete,
always very kind and helpful :slight_smile:
I tried to comment #include <AutoWifi.h> but the arduino ide gives me an error …

Luca

Is that an error that’s connected to AutoWifi?
If so, then I’d suggest installing the library.

Pete.

I tried to install it but the ide doesn’t recognize it
Luca

i also bought an ESP32 camera module but i can’t connect the camera with blynk app using videostriming widget :((

You need to provide more information about the compiler error messages you are getting, and the steps you followed when installing the library and the error messages that you received as part of that process.

Pete.

ok, when I compile the sketch it gives me this error

the library I downloaded from the site that recommended me and included the zip file from arduino with add library

You should copy and paste the full error message.

Pete.

ok
`C:\Users\miale\AppData\Local\Temp\arduino_modified_sketch_488109\sketch_nov18a.ino:7:28: fatal error: OV2640Streamer.h: No such file or directory

compilation terminated.

Più di una libreria trovata per “WiFi.h”
Usata: C:\Users\miale\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\WiFi
Non usata: C:\Program Files (x86)\Arduino\libraries\WiFi
Più di una libreria trovata per “WebServer.h”
Usata: C:\Users\miale\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\WebServer
Non usata: C:\Users\miale\OneDrive\Documenti\Arduino\libraries\Webduino-master
exit status 1
Errore durante la compilazione per la scheda AI Thinker ESP32-CAM.`

This is your problem.
I think you need to install this library…

Pete.

thanks Pete

I saved the correct library imported the library from the arduino ide I compiled the program and it gives me this error :frowning:

Più di una libreria trovata per “WiFi.h”
Usata: C:\Users\miale\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\WiFi
Non usata: C:\Program Files (x86)\Arduino\libraries\WiFi
Più di una libreria trovata per “WebServer.h”
Usata: C:\Users\miale\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\WebServer
Non usata: C:\Users\miale\OneDrive\Documenti\Arduino\libraries\Webduino-master
exit status 1
‘class CRtspSession’ has no member named ‘broadcastCurrentFrame’

has anyone had a problem like this?

Hi, I’m tryng to edit the sketch to control with Blynk the build-in led but it doesnt work…
Sometimes i can control the LED with blynk but the stream doesn’t work or viceversa.

Thanks

this is the sketch:

#define BLYNK_PRINT Serial

#include <BlynkSimpleEsp32.h>

#include "OV2640.h"
#include <WiFi.h>
#include <WebServer.h>
#include <WiFiClient.h>
#include <AutoWifi.h>

#include "SimStreamer.h"
#include "OV2640Streamer.h"
#include "OV2640.h"
#include "CRtspSession.h"



char auth[] = "-----3";

char ssid[] = "-----";
char pass[] = "------R";


#define USEBOARD_AITHINKER

#define ENABLE_WEBSERVER


OV2640 cam;

WebServer server(80);

void handle_jpg_stream(void)
{
  WiFiClient client = server.client();
  String response = "HTTP/1.1 200 OK\r\n";
  response += "Content-Type: multipart/x-mixed-replace; boundary=frame\r\n\r\n";
  server.sendContent(response);

  while (1)
  {
    cam.run();
    if (!client.connected())
      break;
    response = "--frame\r\n";
    response += "Content-Type: image/jpeg\r\n\r\n";
    server.sendContent(response);

    client.write((char *)cam.getfb(), cam.getSize());
    server.sendContent("\r\n");
    if (!client.connected())
      break;
  }
}

void handle_jpg(void)
{
  WiFiClient client = server.client();

  cam.run();
  if (!client.connected())
  {
    return;
  }
  String response = "HTTP/1.1 200 OK\r\n";
  response += "Content-disposition: inline; filename=capture.jpg\r\n";
  response += "Content-type: image/jpeg\r\n\r\n";
  server.sendContent(response);
  client.write((char *)cam.getfb(), cam.getSize());
}

void handleNotFound()
{
  String message = "Server is running!\n\n";
  message += "URI: ";
  message += server.uri();
  message += "\nMethod: ";
  message += (server.method() == HTTP_GET) ? "GET" : "POST";
  message += "\nArguments: ";
  message += server.args();
  message += "\n";
  server.send(200, "text/plain", message);
}


void setup()
{


  Serial.begin(9600);

  Blynk.begin(auth, ssid, pass, IPAddress(192, 168, 1, 103), 7443);

  while (!Serial)
  {
    ;
  }

  int camInit =


    cam.init(esp32cam_aithinker_config);


  Serial.printf("Camera init returned %d\n", camInit);

  IPAddress ip;

  WiFi.begin(ssid, pass);

  while (WiFi.status() != WL_CONNECTED)
  {
    delay(500);
    Serial.print(F("."));
  }
  ip = WiFi.localIP();
  Serial.println(F("WiFi connected"));
  Serial.println("");
  Serial.println(ip);
  Serial.print("Stream Link: http://");
  Serial.print(ip);
  Serial.println("/");

  server.on("/", HTTP_GET, handle_jpg_stream);
  server.on("/jpg", HTTP_GET, handle_jpg);
  server.onNotFound(handleNotFound);
  server.begin();

}

CStreamer *streamer;
CRtspSession *session;
WiFiClient client; // FIXME, support multiple clients



void loop()
{


  Blynk.run();

  server.handleClient();

}


Thank’s to every one will help me…

If anyone is still stuck on this with an iphone, all I had to do to get it to work is to disable the use of private IP address in iPhone Wifi settings. If you are still wanting to use this, you’ll likely have to open up the subnet mask wider.