I've gotten a ESP32-CAM working - displays on Firefox and VLC but not in ZM. I think the problem is the incoming data:
^M
--123456789000ccc000000987654321^M
Content-Type: image/jpeg^M
Content-Length: 123200^M
^M
ÿØÿà^@^PJFIF^@^A^A^A^@^@^@^@^@^@ÿÛ^@C^@
^G^H ^H^F
^H ^K^K
^L^O^Y^P^O^N^N^O^_^V^W^R^Y$ &&$ #"(-:1(+6+"#2D36;=@A@'0GLF?K:?@>ÿÛ^@C^A^K^K^K^O^M^O^]^P^P^]>)#)>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>ÿÄ^@^_^@^@^A^E^A^A^A^A^A^A^@^@^@^@^@^@^@^@^A^B^C^D^E^F^G^H
^KÿÄ^@µ^P^@^B^A^C^C^B^D^C^E^E^D^D^@^@^A}^A^B^C^@^D^Q^E^R!1A^F^SQa^G"q^T2<81><91>¡^H#B±Á^URÑð$3br<82>
^V^W^X^Y^Z%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz<83><84><85><86><87><88><89><8a><92><93><94><95><96><97><98><99><9a>¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖ×ØÙÚ...
I've tried every combination I can think of to add it - no joy. Suggestions?
ESP32-CAM format
Re: ESP32-CAM format
Looks like a MIME attachment of a JPEG (JFIF is the first 4 characters of a JPEG image).
Reminiscent of the data served up by "/video.cgi" on my DCS900 D-link Cameras, which claims to be MJPEG -- it's a really odd way of encoding an MJPEG. FFMPEG will accept it [edit: Oops. See Follow Up], if told format is "mjpeg" ... as a hint. Otherwise, I don't think it knew what to do with it.
D-Link: Attach a JPEG, attach a JPEG, attach a JPEG .... (each of which fully describes a single discrete JPG image/frame).
Proper MJPEG: A common header for *all* frames about to follow, then a stream of JPG coded data ... (more efficient in that all frames refer back to that first header). Oh, and not MIME encoded ... either!
Try JPEG or MJPEG?
Example output below ...
Code: Select all
/usr/bin/echo -e "GET /VIDEO.CGI HTTP/1.1\n" | nc 192.168.0.XX 80 | more
HTTP/1.0 200 OK
Server: Camera Web Server/1.0
Auther: Steven Wu
MIME-version: 1.0
Cache-Control: no-cache
Content-Type: multipart/x-mixed-replace;boundary=--video boundary--
--video boundary--Content-length: 25006
Content-type: image/jpeg
ÿØÿâJFIF .... blah blah
Code: Select all
/usr/bin/echo -e "GET /IMAGE.JPG HTTP/1.1\n" | nc 192.168.0.XX 80 | more
HTTP/1.0 200 OK
Server: Camera Web Server/1.0
Auther: Steven Wu
MIME-version: 1.0
Cache-Control: no-cache
Content-Type: image/jpeg
Content-Length: 24646
ÿØÿâJFIF ... blah blah
Last edited by mikb on Fri May 13, 2022 5:35 pm, edited 1 time in total.
Re: ESP32-CAM format
First, thanks for the help. Sorry for the delay - events and trying other things.
/usr/bin/echo -e "GET /stream HTTP/1.1\n" | nc 192.168.0.33 81 | more
screams
ZM log says Found unsupported content type. I've searched for ZM & JFIF - no joy. My biggest problem is I'm an end user and I don't know/understand ZM internals. And Google has not been any help at all.
--------------------------------
5 min later - grep'n for JFIF - ZM knows about it. - ./skins/classic/views/monitor.php has the entry:
fourcc('J','P','E','G') => '*JPEG', /* JFIF JPEG */
But in /usr/bin/zm* - nada
/usr/bin/echo -e "GET /stream HTTP/1.1\n" | nc 192.168.0.33 81 | more
screams
ZM log says Found unsupported content type. I've searched for ZM & JFIF - no joy. My biggest problem is I'm an end user and I don't know/understand ZM internals. And Google has not been any help at all.
--------------------------------
5 min later - grep'n for JFIF - ZM knows about it. - ./skins/classic/views/monitor.php has the entry:
fourcc('J','P','E','G') => '*JPEG', /* JFIF JPEG */
But in /usr/bin/zm* - nada
Re: ESP32-CAM format
Update :-
I'm using ZM 1.ancient -- and I set up :-
And it just worked. Now, at some point no doubt "Remote" is deprecated and using FFMPEG etc. is the way to go.
However -- I just looked at my old scripts for capturing from these cameras outside of ZoneMinder (which spit JPEGs as MIME headered stuff, in place of proper video) and FFMPEG did *NOT* understand it at all.
I (badly) wrote a C hack filter, to strip out all the one-time-header and repeating-per-frame-headers rubbish, leaving only the meat of the JPEG images -- and put this in line between the "netcat" (nc) and FFMPEG reading from stdin, at which point it was happy. I still had to tell it "-f mjpeg" so it knew what was coming in. It tolerated that just fine!
So -- if you are using FFMPEG as your camera type, it may not support this camera without extra work, unless FFMPEG has become much more tolerant in terms of the garbage fed in
I'm using ZM 1.ancient -- and I set up :-
Code: Select all
Source Type "Remote"
Protocol "HTTP/Simple"
However -- I just looked at my old scripts for capturing from these cameras outside of ZoneMinder (which spit JPEGs as MIME headered stuff, in place of proper video) and FFMPEG did *NOT* understand it at all.
I (badly) wrote a C hack filter, to strip out all the one-time-header and repeating-per-frame-headers rubbish, leaving only the meat of the JPEG images -- and put this in line between the "netcat" (nc) and FFMPEG reading from stdin, at which point it was happy. I still had to tell it "-f mjpeg" so it knew what was coming in. It tolerated that just fine!
So -- if you are using FFMPEG as your camera type, it may not support this camera without extra work, unless FFMPEG has become much more tolerant in terms of the garbage fed in
Re: ESP32-CAM format
Ver 1.34.26
I purchased a pair: Frienda 2 Pieces ESP32-CAM WiFi Board ESP32-CAM-MB Micro USB to Serial Port CH340G with OV2640 2MP Camera Module Compatible with Arduino IDE Arduino Raspberry Pi via Amazon.
Then using Ardunio I loaded it with code for CAMERA_MODEL_AI_THINKER. It outputs 2 different pages: 80 which has a large menu - res, bright, contrast, flip, and another 20 settings. #2 is IP:81/stream which gives just the image. In Firefox, VLC it pops right up and runs fine. I have tried every ZM configuration possible and - no joy. Logs: Protocol not found - and Google hasn't been my friend. Education please.
tks
I purchased a pair: Frienda 2 Pieces ESP32-CAM WiFi Board ESP32-CAM-MB Micro USB to Serial Port CH340G with OV2640 2MP Camera Module Compatible with Arduino IDE Arduino Raspberry Pi via Amazon.
Then using Ardunio I loaded it with code for CAMERA_MODEL_AI_THINKER. It outputs 2 different pages: 80 which has a large menu - res, bright, contrast, flip, and another 20 settings. #2 is IP:81/stream which gives just the image. In Firefox, VLC it pops right up and runs fine. I have tried every ZM configuration possible and - no joy. Logs: Protocol not found - and Google hasn't been my friend. Education please.
tks
Re: ESP32-CAM format
As an ancient user, but not too skilled, i have running 2 ESP32-Cam, each one with different sw and different ZM configs as well as different performances, as shown attached files.
My ZM v1.36.25 is running under Ubuntu 20.04 on RPi4 4GB, recording on 1x 4TB WD Purple (about 1 month @320x240) the follows:
1 Panasonic PTZ
1 Axis 207
5 Rpi (2x RPi0 + 3x Rpi (2 & 3 version) ) with Cam Module
3 Dlink
2 Esp32-Cam (third one ESP32-Cam by choosing and, obviously, applying the best sw to all of them, asap)
Cheers, 3r1
My ZM v1.36.25 is running under Ubuntu 20.04 on RPi4 4GB, recording on 1x 4TB WD Purple (about 1 month @320x240) the follows:
1 Panasonic PTZ
1 Axis 207
5 Rpi (2x RPi0 + 3x Rpi (2 & 3 version) ) with Cam Module
3 Dlink
2 Esp32-Cam (third one ESP32-Cam by choosing and, obviously, applying the best sw to all of them, asap)
Cheers, 3r1
- Attachments
-
- ESP32Cam_ZM_Configs.7z
- (134.25 KiB) Downloaded 1464 times
-
- ZM_ESP32Cams.JPG (55.58 KiB) Viewed 17892 times
Re: ESP32-CAM format
same here for me with zm 1.37.25 - no success with ESP32-CAM AI-Thinker Modelchuck8530 wrote: ↑Fri May 20, 2022 5:57 pm Ver 1.34.26
I purchased a pair: Frienda 2 Pieces ESP32-CAM WiFi Board ESP32-CAM-MB Micro USB to Serial Port CH340G with OV2640 2MP Camera Module Compatible with Arduino IDE Arduino Raspberry Pi via Amazon.
Then using Ardunio I loaded it with code for CAMERA_MODEL_AI_THINKER. It outputs 2 different pages: 80 which has a large menu - res, bright, contrast, flip, and another 20 settings. #2 is IP:81/stream which gives just the image. In Firefox, VLC it pops right up and runs fine. I have tried every ZM configuration possible and - no joy. Logs: Protocol not found - and Google hasn't been my friend. Education please.
tks
It gets more and more commononly from my point of view - so any suggestions?
the tip with libvlc from this thread ESP32 Cam not working properly with ZM
is not working for me
URL:
http://192.168.xx.xx:81/stream%27,NULL, ... ,NULL,NULL
also this url is not working
URL:
http://192.168.xx.xx:81/stream
Re: ESP32-CAM format
I switched ESP32-CAM project from the arudino example "CameraWebServer" and some other LiveWebserver to
* TITLE: HOW TO BUILD A $9 RSTP VIDEO STREAMER: Using The ESP-32 CAM Board || Arduino IDE - DIY #14
* DESCRIPTION: This sketch creates a video streamer than uses RTSP. You can configure it to either connect to an existing WiFi network or to create
* a new access point that you can connect to, in order to stream the video feed.
and it is working fine with zoneminder
you may choose https://github.com/bnbe-club or some other forks
* TITLE: HOW TO BUILD A $9 RSTP VIDEO STREAMER: Using The ESP-32 CAM Board || Arduino IDE - DIY #14
* DESCRIPTION: This sketch creates a video streamer than uses RTSP. You can configure it to either connect to an existing WiFi network or to create
* a new access point that you can connect to, in order to stream the video feed.
and it is working fine with zoneminder
you may choose https://github.com/bnbe-club or some other forks
-
- Posts: 6
- Joined: Fri Apr 26, 2019 1:53 pm
Re: ESP32-CAM format
Using the link below I managed to get Zoneminder to work with the ESP 32 Cam. See the screenshots below for my settings. I hope this helps somebody.
https://github.com/circuitrocks/ESP32-RTSP/tree/master
https://github.com/circuitrocks/ESP32-RTSP/tree/master
- Attachments
-
- ESP 32 Camera Zoneminder Settings
- zm1.png (53.75 KiB) Viewed 4780 times
-
- ESP 32 Camera Zoneminder Settings
- zm2.png (54 KiB) Viewed 4780 times
-
- ESP 32 Camera Zoneminder Settings
- zm3.png (4.32 KiB) Viewed 4780 times