IP-Cam Picture? Authorization Required!
IP-Cam Picture? Authorization Required!
I bought a cheap SOHO IP-Cam to play around with.
With http://<username>:<password>@192.168.0.120/IMAGE.JPG in the browser i see the image, and only the image.
In ZM I use
Hostname: <username>:<password>@192.168.0.120 (tried it even with http://)
Port: 80
Path: /IMAGE.JPG
And I don't see anything. The network->"I will use network cams"-thing is on.
in /var/log/messages I get:
Oct 22 05:50:44 videoserver zmc-m3[22402]: ERR [Invalid response status 401: Authorization Required]
With http://<username>:<password>@192.168.0.120/IMAGE.JPG in the browser i see the image, and only the image.
In ZM I use
Hostname: <username>:<password>@192.168.0.120 (tried it even with http://)
Port: 80
Path: /IMAGE.JPG
And I don't see anything. The network->"I will use network cams"-thing is on.
in /var/log/messages I get:
Oct 22 05:50:44 videoserver zmc-m3[22402]: ERR [Invalid response status 401: Authorization Required]
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
The zmc process just uses the same authentication process as a browser so unless it's something other than basic auth I can't see what the problem might be. You might try ramping up the debug on the capture process by doing
and seeing if that gives you anything useful.
Phil
Code: Select all
kill -USR1 <pid>
Phil
still no f... clue
kill -USR1 sets debug level to 1, but i can't get anything useful out of the logs.
i switched http from 1.1 to 1.0 and even used the same user agent string. and the DB has the correct settings.
what i forgot last time:works perfect (yes, it is an image )
i tried to find the "get_image_form_ip_cam"-line in the scripts to generate some output. but failed. maybe someone can help me out here.
i'm running out of ideas...
thanks in adavantage
i switched http from 1.1 to 1.0 and even used the same user agent string. and the DB has the correct settings.
what i forgot last time:
Code: Select all
wget http://<username>:<password>@192.168.0.120/IMAGE.JPG
i tried to find the "get_image_form_ip_cam"-line in the scripts to generate some output. but failed. maybe someone can help me out here.
i'm running out of ideas...
thanks in adavantage
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
more log...
i killed the process till the debug level was 9. couldn't get it any higher
Code: Select all
Nov 7 23:04:23 videoserver zmc-m5[26587]: DB3 [Connected to host, socket = 15]
Nov 7 23:04:23 videoserver zmc-m5[26587]: DB3 [Request sent]
Nov 7 23:04:25 videoserver zmc-m5[26587]: DB3 [Expecting 94 bytes]
Nov 7 23:04:25 videoserver zmc-m5[26587]: DB3 [Read 94 bytes]
Nov 7 23:04:25 videoserver zmc-m5[26587]: DB4 [Captured header (94 bytes): 'HTTP/1.0 401 Authorization Required^M WWW-Authenticate: BASIC realm="Administrator or User"^M ^M ']
Nov 7 23:04:25 videoserver zmc-m5[26587]: ERR [Invalid response status 401: Authorization Required]
solved it
there were several things i changed, and now everything works perfect.
i resetted the camera, that there was no auth needed anymore. but it didn't work anyway.
i found out that "http://..." is not a good idea. i guess that's because of splitting <username>:<password>. with "http://..." i got the auth log errors.
for all my testing i was waiting in the log file for some "INF: Capturing at 15 frames" (instead of opening the monitor tab), but this message doesn't appear for remote cams...
the camera.jpg was not the size i set in the preferences... it's only a thumbnail (255x219 i think). i'm using video.cgi now - this connecTec camera seems to be pretty much the same as the DCS.
another important thing was that there is no problem with switching my grabber card to 8bit greyscale, even if there is a colour image. that's different for network cams.
zoneminder only listens to a digital image stream. and surely won't convert it...
thanx for helping - shame on me
i resetted the camera, that there was no auth needed anymore. but it didn't work anyway.
i found out that "http://..." is not a good idea. i guess that's because of splitting <username>:<password>. with "http://..." i got the auth log errors.
for all my testing i was waiting in the log file for some "INF: Capturing at 15 frames" (instead of opening the monitor tab), but this message doesn't appear for remote cams...
the camera.jpg was not the size i set in the preferences... it's only a thumbnail (255x219 i think). i'm using video.cgi now - this connecTec camera seems to be pretty much the same as the DCS.
another important thing was that there is no problem with switching my grabber card to 8bit greyscale, even if there is a colour image. that's different for network cams.
zoneminder only listens to a digital image stream. and surely won't convert it...
thanx for helping - shame on me
Acrid, is your setting for DCS-900 working fine?
IF it is, could you please elaborate on how you did it. I have the samd DCS-900, and I am having a difficulty in setting that up.
I get the following error in the /var/log/messages
zmc-m3[4770]: ERR [Invalid response status 401: Authorization Required]
If I do the following, the comands execute fine.
wget http://admin:admin@192.168.1.6/image.jpg
wget http://admin:admin@192.168.1.6/video.cgi
On the setting, I have the following
Remote Host Name <admin>:<admin>@192.168.1.6
Remote Host Port 80
Remote Host Path /video.cgi
Remote Image Colours 24 bit color
Capture Width (pixels) 360
Capture Height (pixels) 240
Orientation Normal
Also, when I connect the DCS-900 thru web browser with Java, it displays the video fine.
Could you please help on where I need to look?
THank you.
IF it is, could you please elaborate on how you did it. I have the samd DCS-900, and I am having a difficulty in setting that up.
I get the following error in the /var/log/messages
zmc-m3[4770]: ERR [Invalid response status 401: Authorization Required]
If I do the following, the comands execute fine.
wget http://admin:admin@192.168.1.6/image.jpg
wget http://admin:admin@192.168.1.6/video.cgi
On the setting, I have the following
Remote Host Name <admin>:<admin>@192.168.1.6
Remote Host Port 80
Remote Host Path /video.cgi
Remote Image Colours 24 bit color
Capture Width (pixels) 360
Capture Height (pixels) 240
Orientation Normal
Also, when I connect the DCS-900 thru web browser with Java, it displays the video fine.
Could you please help on where I need to look?
THank you.
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
Thank you very much for the reply, Phil & acrid.
Phil, actually I was putting the angle braket arount the id and password. Please pardon my igonrance. I did not know that.
So, I changed the setting to
Remote Host Name admin:admin@192.168.1.6
Acrid, I changed the setting to 320 by 240.
After the 2 settings change, now I get the different errors.
From the /var/log/messages, I get
zmc-m3[7465]: ERR [Can't shmget, probably not enough shared memory space free: Invalid argument]
At first sight, it does not look like it is from not having enough shared memory. I put the shared memory increase statement in /etc/rc.d/rc.local. So I get the following
[root@lserver tmp]# cat /proc/sys/kernel/shmmax
134217728
[root@lserver tmp]# cat /proc/sys/kernel/shmall
134217728
[root@lserver tmp]#
From the /tmp/zmdc.log, I get
'zmc -m 3' starting at 04/11/21 20:52:46, pid = 7037
'zmc -m 3' started at 04/11/21 20:52:46
'zmc -m 3' crashed at 04/11/21 20:52:46, exit status 255
Starting pending process, zmc -m 3
'zmc -m 3' starting at 04/11/21 20:53:06, pid = 7077
'zmc -m 3' started at 04/11/21 20:53:06
'zmc -m 3' crashed at 04/11/21 20:53:06, exit status 255
I attached the Logitect Web Cam Pro 4000 this zm locally using usb, with total 2 cameras, and the Logitech cam is working fine.
I will read more the doc and look around the Forum and FAQ to see if I can resolve this problems.
If you can give some hints or suggestions, I also appreciate it greatly.
Again I thank you for your help.
Phil, actually I was putting the angle braket arount the id and password. Please pardon my igonrance. I did not know that.
So, I changed the setting to
Remote Host Name admin:admin@192.168.1.6
Acrid, I changed the setting to 320 by 240.
After the 2 settings change, now I get the different errors.
From the /var/log/messages, I get
zmc-m3[7465]: ERR [Can't shmget, probably not enough shared memory space free: Invalid argument]
At first sight, it does not look like it is from not having enough shared memory. I put the shared memory increase statement in /etc/rc.d/rc.local. So I get the following
[root@lserver tmp]# cat /proc/sys/kernel/shmmax
134217728
[root@lserver tmp]# cat /proc/sys/kernel/shmall
134217728
[root@lserver tmp]#
From the /tmp/zmdc.log, I get
'zmc -m 3' starting at 04/11/21 20:52:46, pid = 7037
'zmc -m 3' started at 04/11/21 20:52:46
'zmc -m 3' crashed at 04/11/21 20:52:46, exit status 255
Starting pending process, zmc -m 3
'zmc -m 3' starting at 04/11/21 20:53:06, pid = 7077
'zmc -m 3' started at 04/11/21 20:53:06
'zmc -m 3' crashed at 04/11/21 20:53:06, exit status 255
I attached the Logitect Web Cam Pro 4000 this zm locally using usb, with total 2 cameras, and the Logitech cam is working fine.
I will read more the doc and look around the Forum and FAQ to see if I can resolve this problems.
If you can give some hints or suggestions, I also appreciate it greatly.
Again I thank you for your help.
After I changed the setting as suggested above, and rebooted the system, the DCS-900 is working fine. So, my 2 camera(Logitech and Dlink) are woking fine.
THe following is the working setting.
Remote Host Name admin:admin@192.168.1.6
Remote Host Port 80
Remote Host Path /video.cgi
Remote Image Colours 24 bit color
Capture Width (pixels) 320
Capture Height (pixels) 240
Orientation Normal
Again, I thank you Phil, and Acrid.
THe following is the working setting.
Remote Host Name admin:admin@192.168.1.6
Remote Host Port 80
Remote Host Path /video.cgi
Remote Image Colours 24 bit color
Capture Width (pixels) 320
Capture Height (pixels) 240
Orientation Normal
Again, I thank you Phil, and Acrid.