esp32-cam icon indicating copy to clipboard operation
esp32-cam copied to clipboard

Is ONVIF possible?

Open SargFowler opened this issue 4 years ago • 30 comments

I'd like to hook up an ESP32-CAM to my NVR recorder, but this requires ONVIF protocol. Is that something that can be incorporated?

SargFowler avatar Jan 29 '20 14:01 SargFowler

@SargFowler The camera driver only outputs an mjpeg stream and I think ONVIF requires MP4. They work well with the linux motion package if you keep the resolution low.

bkeevil avatar Jan 29 '20 15:01 bkeevil

@SargFowler If you have a spare PC available, it seems that you can turn mjpg-streams into onvif-protocols using an extra SDK: https://www.instructables.com/id/How-to-turn-an-USB-camera-with-Raspberry-Pi-into-a/ (only use step 3, the ozeki sdk). At least it looks like what you need (not a perfect solution though). I expect that you could use a number of mjpeg cameras and convert all of them in parallel with the SDK.

melvinisken avatar Jan 29 '20 20:01 melvinisken

ONVIF 2.0 does support MJPEG streams so it ought to possible to add this feature to the board. It wouldn't be full ONVIF support though. I think I will add it to the project roadmap and maybe someone will take that feature on at some point. Changing to feature request.

bkeevil avatar Feb 03 '20 14:02 bkeevil

That's good to know. Thanks for the response!

SargFowler avatar Feb 03 '20 19:02 SargFowler

onvif really will be very useful when using esp32-sam with aliexpress nvr

ant1fr1z avatar Mar 15 '20 20:03 ant1fr1z

I just got this from reddit for Blue Iris: Blue_Iris_With_ESP32_Cam2020-05-29 140112

redeyedjack avatar May 29 '20 18:05 redeyedjack

I confirm the code streams correctly from my ESP32-CAM to a recorder with parameters set to: Cam: Generic Model: Generic Request: http://192.168.0.103:81/stream Protocol: Server push (MJPEG) Login: empty

Not a standard ONVIF sure but it works :-) I'll try to play with ONVIF profile S as soon as possible.

turcotronics avatar May 30 '20 08:05 turcotronics

Unfortunately, I can't get this to work with my Aliexpress NVR. I can't set the protocol in the settings, but can confirm the stream appears in a web browser when pointed to the camera address port 81 as above. I only have IPC or ONVIF selection, IP address and port. Has anyone else been able to connect to their NVR?

SargFowler avatar Jun 04 '20 10:06 SargFowler

similarly, aliexpress NVR does not see the flow from esp32cam (((( sad

ant1fr1z avatar Jun 13 '20 11:06 ant1fr1z

Maybe it worth to take a look here: https://github.com/enesbcs/ESP32_RTSP_Cam

melvinisken avatar Jul 18 '20 18:07 melvinisken

Thanks, I'll take a look for integration.RodolfoIl 18 Lug 2020 20:48, Melvin [email protected] ha scritto: Maybe it worth to take a look here: https://github.com/enesbcs/ESP32_RTSP_Cam

—You are receiving this because you commented.Reply to this email directly, view it on GitHub, or unsubscribe.

turcotronics avatar Jul 19 '20 06:07 turcotronics

Hello, is there any news on simple ONVIF implementation? Thank you

DavidAntonin avatar Sep 22 '20 12:09 DavidAntonin

I don't think anyone has implemented it yet. But from what I read here it should be a matter of generating some XML files. The full Onvif S specification can be found here.

flatsiedatsie avatar Sep 23 '20 08:09 flatsiedatsie

For anyone else reading this looking for a workaround, this worked very easily for me with Synology Surveillance Station: https://github.com/circuitrocks/ESP32-RTSP

wyne avatar Nov 29 '20 05:11 wyne

It is not possible to manually specify the RTSP stream in my NVR

DavidAntonin avatar Dec 01 '20 08:12 DavidAntonin

I confirm the code streams correctly from my ESP32-CAM to a recorder with parameters set to: Cam: Generic Model: Generic Request: http://192.168.0.103:81/stream Protocol: Server push (MJPEG) Login: empty

Not a standard ONVIF sure but it works :-) I'll try to play with ONVIF profile S as soon as possible.

Any update on Onvif? Thank you

DavidAntonin avatar Mar 04 '21 16:03 DavidAntonin

Any news here? having some of those AliExpress NVRs too, who autodetect ONVIF-devices on the network. no possibility to enter the rtmp-address manually, they get it via a web-page from the device. (BTW: it's really frustrating that people read the request and then suggest solutions which are clearly not matching the issue 'ONVIF would be helpful'. the request was clearly not "can i transfor the stream on a separate PC/Raspi", nor "how do i enter the stream manually into a display/recording device".)

Adorfer avatar Jul 12 '21 12:07 Adorfer

Hello,

I believe that the idea of using an NVR is to use the P2P App for Internet access,

With that in mind, I found this other platform, which, despite not solving the current case, because it is still not recommended to use a public network,

But it might be interesting to know a little about how the P2P system works:

https://github.com/nabto/nabto-esp32cam

It may be possible in the future to make a secure P2P connection similar to the NVR, using ESP32,

But I believe it may be necessary to use more RAM, the IP cameras I've seen have RAM chips similar to the one used in Linux routers that support OpenWRT OS:

https://openwrt.org/supported_devices

rtek1000 avatar Jan 18 '22 03:01 rtek1000

Hi,

I found this option:

Using ngrok tunnel service After signing up for the account, go to your email address and activate your account by clicking on the activation link. Now login to your account and click on the ‘Auth’ button’ to get your Tunnel Authtoken as shown in the figure below. Copy this Tunnel Authtoken, we will need it later on.

https://www.elementzonline.com/blog/Accessing-ESP32-CAM-Video-Streaming-from-anywhere-in-the-world

(Note: I haven't tested it yet.)

rtek1000 avatar Jan 18 '22 14:01 rtek1000

I believe that the idea of using an NVR is to use the P2P App for Internet access,

never thought of that, but possible that there are actual people with this in mind. Or to put it in a different way:

no, i would need ONVIF to have it on an NVR. on a site without internet access (not enought upstream for 10+ cameras).

Adorfer avatar Jan 19 '22 11:01 Adorfer

If it's to have on a site without internet then just these software wouldn't solve it? I've used the Raspberry Pi with MotionEyeOs, and that was enough for me.

https://www.ispyconnect.com/camera/esp

https://github.com/espressif/esp32-camera/issues/217

iSpy is described as 'uses your USB webcams, IP cams, capture cards, desktops and microphones to detect and record movement or sound and provides security, surveillance, monitoring and alerting services. Media is recorded directly to H264 mp4 files or AVI files' and is an app in the Video & Movies category. There are more than 50 alternatives to iSpy for a variety of platforms, including Windows, Android, iPhone, Linux and iPad. The best alternative is ZoneMinder, which is both free and Open Source. Other great apps like iSpy are Shinobi (Free Personal, Open Source), AtHome Video Streamer (Free), motionEyeOS (Free, Open Source) and Haven (Free, Open Source).

https://alternativeto.net/software/ispy/

rtek1000 avatar Jan 19 '22 11:01 rtek1000

NB: This issue is called "ONVIF", not "how to use Raspi with esp32-cam". Please stay on topic!

Adorfer avatar Jan 19 '22 13:01 Adorfer

Does the ESP32 have enough memory to make an ONVIF server?

https://onvif.github.io/specs/doc/index.html

rtek1000 avatar Jan 19 '22 13:01 rtek1000

Minimum resources for implementation

https://github.com/onvif/specs/discussions/182

rtek1000 avatar Jan 19 '22 13:01 rtek1000

Note that has a supported build of Tasmota for ESP32 / ESPCAM, and it provides HTTP and RTSP out of the box. It can also change resolution using the inbuilt console, and has MQTT enabled. No Onvif though.

tensiondriven avatar May 14 '22 00:05 tensiondriven

This guy has implemented ONVIF on ESP32 https://www.bilibili.com/video/BV1jg411D7DE?spm_id_from=333.337.search-card.all.click https://www.youtube.com/watch?v=Oa11X59BZb0&t=4s

ifdreams avatar Aug 30 '22 08:08 ifdreams

looks like a fake, there is no code and the author's page with viruses

This guy has implemented ONVIF on ESP32 https://www.bilibili.com/video/BV1jg411D7DE?spm_id_from=333.337.search-card.all.click https://www.youtube.com/watch?v=Oa11X59BZb0&t=4s

ant1fr1z avatar Sep 25 '22 11:09 ant1fr1z

This guy has implemented ONVIF on ESP32 https://www.bilibili.com/video/BV1jg411D7DE?spm_id_from=333.337.search-card.all.click https://www.youtube.com/watch?v=Oa11X59BZb0&t=4s

The author released firmware on github https://github.com/trygoto/esp32-onvif today. I'm not test yet.

icyleaf avatar Jan 29 '23 03:01 icyleaf

Is it possible someone made an English tutorial? I tried and failed doing it

codedogz777 avatar Jul 10 '23 15:07 codedogz777

as I don't know how to edit bin files

codedogz777 avatar Jul 10 '23 15:07 codedogz777