Lakemast / WifiCar

Now you will be able to build and control your own RC Car over the Internet using the Message Queue Telemetry Transport Protocol (MQTT) with an easy and intuitive control interface on LAN (Local Area Network) and WAN (Wide Area Network) (but WAN Camera Stream may require some workaround) using any two motors robot chassis.
16 stars 6 forks source link

Can't receive video streaming from WAN #1

Closed rikiata closed 1 year ago

rikiata commented 1 year ago

Sir,I cant receive espcam32 mqtt image on app.How to cofigure the code or app to receive live video in app?

Lakemast commented 1 year ago

Hi Friend,

First your smartphone needs to be connected to same WiFi network of your ESP32. Second you need to change to your ESP32 IP the field Camera URL in the APP Settings:

To do that you need to know what is your ESP32 IP.

If you know your ESP32 IP run this small test to ensure your ESP32 is running:

ESP32-test

Notice that my ESP32 IP is 192.168.15.41 in my LAN (Local Area Network). Now click on START STREAM and some like below the video stream should be shown in your browser.

video-stream-esp32

If none of that works please let me know what is your Android Version and how you are powering ESP32.

rikiata commented 1 year ago

Friend,I can access live video on browser(phone or laptop on same wifi.I have changed camera url- http://192.168.1.102:81/stream but I cant stream video on app screen through mqtt(anywhere in the world).But I can control servo and the motors,Please help.

Lakemast commented 1 year ago

What is your Android Version ?

Could you please attach a image from app home and settings screen?

Lakemast commented 1 year ago

Did you install the app through .apk or through Android Studio ?

rikiata commented 1 year ago

wificar

ANDROID 10 VERSION

rikiata commented 1 year ago

I installed the app through apk

rikiata commented 1 year ago

Screenshot_2023-01-21-19-10-20-629_com example wificar

Lakemast commented 1 year ago

Hi Friend,

I updated the app. Try to install this new uploaded apk WiFiCar-fixed.apk

Tell me if it worked.

rikiata commented 1 year ago

It's working on local wifi. But when I try to connect(4g mobile) with mqtt, I can control motor,servo and espcam led from anywhere. But can't monitor live video on app.

rikiata commented 1 year ago

I want to control the car from anywhere in the world through mqtt with live video streaming.

Is it possible?

Lakemast commented 1 year ago

I got it.

As far as I know MQTT is not a protocol for streaming video. The only workaround that I know is you make your ESP32 IP static on your Router and use Port Routing and DDNS to access your video stream.

That's why I wrote a disclaimer on project description saying that WAN will require some workaround.

On your Router, you will need to reserve an IP address to ESP32

So you will need sign up at a DDNS provider like NOIP and register a Domain (Example: wificar.ddns.net) and turn up DDNS feature on Router and log in.

After that you need to assign this domain to your gateway and then port forward to ESP 32 IP and port 81.

I know some chinese cameras app do that without all this workaround, but I didn't find out yet how to do it.

Lakemast commented 1 year ago

If you do this workaround it is possible that video streaming delay will be huge.

Lakemast commented 1 year ago

Sorry I forgot to say after you do all I said, you will need to change in the App the camera URL with your domain Example: http://wificar.ddns.net/

rikiata commented 1 year ago

Did you test the esp32cam on ddns?worked? Can I use raspberri pi camera url(internet streaming) on your app? If possible, I can control the motors and servo through matt and video streaming through raspberri pi camera.

Or. Can I use v380 camera with your app?

Please suggest.

rikiata commented 1 year ago

I watched your YouTube video. Video streaming is ddns based or wifi based?

Lakemast commented 1 year ago

Did you test the esp32cam on ddns?worked? Can I use raspberri pi camera url(internet streaming) on your app? If possible, I can control the motors and servo through matt and video streaming through raspberri pi camera.

Or. Can I use v380 camera with your app?

Please suggest.

Yes I've tested esp32 cam using ddns. It worked but not as expected. The video delay was huge.

Yes, if your camera url is a MJPEG stream you can use my app with raspberry pi camera or any MJPEG camera.

My app used this other repository to stream video perthcpe23/android-mjpeg-view

rikiata commented 1 year ago

Can you suggest any readymade mjpeg camera?

Lakemast commented 1 year ago

I watched your YouTube video. Video streaming is ddns based or wifi based?

None of them.

DDNS stands for Dynamic Domain Name System and is used to translate IP to domains example: 142.251.132.238 to google.com

WiFi is a wireless networking technology that uses radio waves to provide wireless high-speed Internet access. So WiFi basically connects your devices like phone, pc to the router.

Video streaming can be based on several protocols like : RTSP, ONVIF, MJPEG over HTTP and many others.

Lakemast commented 1 year ago

Can you suggest any readymade mjpeg camera?

Sorry, but I've worked only with theses modular cameras like esp32cam or raspberry pi cameras.

rikiata commented 1 year ago

Thanks for your valuable ideas. I will try to make Mjpeg based raspberri pi internet camera. Then I can control the car from anywhere with live video streaming.

Lakemast commented 1 year ago

Thanks for your valuable ideas. I will try to make Mjpeg based raspberri pi internet camera. Then I can control the car from anywhere with live video streaming.

You are welcome! Maybe you can find some repository in github to help with at.