Author Topic: problem installing IP cams in 1004  (Read 2247 times)

mcefan

  • Veteran
  • ***
  • Posts: 89
    • View Profile
problem installing IP cams in 1004
« on: October 20, 2012, 10:23:36 am »
I've been playing with various IP cameras over the past week with no success. he image is still unavailable.
I settled on focusing on the Foscam FI8910W which streams MJPEG only. I verified the stream address with Foscam and followed the tutorials.
I tried both motion and generic IP. the camera was not detected, so no P&P.
I also tried the D-Link DCS5222L which was P&P, but no picture showed up either (chose the 5300 at the prompt0. I proceeded to install it manually as motion and IP, but neither worked either.
I can see the pictures using the stream address in a browser, so that's verified.
I tried various combinations in the configuration, passed credentials via the address and also via the user/pwd entries, port in the address or in the port field,... nothing has worked so far, so I'm beginning to wonder what I'm doing wrong (assuming I'm at fault).
What could cause an IP camera NOT to work? My understanding from reading was that just pointing to the stream would display it. What am I missing? I'm trying to understand.
My other question would be, what needs to happen for the images to show (this one is so I can update the documentation).
« Last Edit: October 20, 2012, 10:27:54 am by mcefan »

murcel

  • Guru
  • ****
  • Posts: 198
    • View Profile
Re: problem installing IP cams in 1004
« Reply #1 on: October 20, 2012, 01:16:16 pm »
mcefan,

can you make sure, that the mjpeg stream of the dcs-5222L looks identically to

http://<dlink camera username>:<dlink camera password>@<ip address>/cgi-bin/video.jpg

if so, it should work with the tempalte from

http://wiki.linuxmce.org/index.php/D-Link_DCS-5300G

if not, you should modify this template.
Nearly every ip cam should work, as long as it can provide a single snapshot image via cgi command

mcefan

  • Veteran
  • ***
  • Posts: 89
    • View Profile
Re: problem installing IP cams in 1004
« Reply #2 on: October 20, 2012, 06:15:04 pm »
murcel,
that url gives me:

File is not found.
please enter correct url.

so I guess it's not the right one. The camera settings have RTSP URL set as play3.sdp for jpeg. Not sure what this means.
I've been all week after dlink to get the full url, but i'm still waiting. I looked @ the page source of the stream from the cam's web server stream to see if I could glean something, but nothing there. The url of that page is http://192.168.80.138/eng/liveView.cgi#

http://<dlink camera username>:<dlink camera password>@<ip address>/cgi-bin/video.jpg
Where did you get that url from?

murcel

  • Guru
  • ****
  • Posts: 198
    • View Profile
Re: problem installing IP cams in 1004
« Reply #3 on: October 20, 2012, 07:22:35 pm »
web server stream to see if I could glean something, but nothing there. The url of that page is http://192.168.80.138/eng/liveView.cgi#
Where did you get that url from?
its from the template of the wiki i posted.

Linuxmce does not support the use of rtsp.
What you have to have, like i said is, an jpg url. Mean an url which delivers an true JPG not mjpeg,
i don't know it for your model, maybe you can play around with some settings from this site:

http://www.ispyconnect.com/man.aspx?n=DLink

Normally every ip camera does support this kind of "snapshot" view. but some vendors does not give out the string.
I believe dlink will. Just give them a call.

mcefan

  • Veteran
  • ***
  • Posts: 89
    • View Profile
Re: problem installing IP cams in 1004
« Reply #4 on: October 21, 2012, 12:22:28 am »
Linuxmce does not support the use of rtsp.
What you have to have, like i said is, an jpg url. Mean an url which delivers an true JPG not mjpeg,
On the Motion page, the wiki states:

Motion is a command line based tool whose output can be jpeg or ppm files, or mpeg video sequences.

That' the reason I was looking into the mjpeg since motion is what I was tying the cam to. I had misread the above line.
I will look into pure jpeg now. Thank you.

I've been on the phone after dlink the whole week, and today also. They don't even understand that there's a url. I'm waiting for a level3 to call me back on monday.

I the mean time, I'm back to looking for another cam, and trying the link you posted.


mcefan

  • Veteran
  • ***
  • Posts: 89
    • View Profile
Re: problem installing IP cams in 1004
« Reply #5 on: October 21, 2012, 08:16:21 am »
I picked up a different camera: dcs-930l

I still can't get it to work with LMCE, so I want to clear out the fact that I understand the process properly:
  • Verify that the path to show the video works in a browser. For completeness and future reference, the list of stream URLs ("Connecting to IP Cameras") can be found here, and here. For Surveillance IP Camera RTSP URLs, look here.
  • Create Motion Wrapper as a Child Device of Core with everything else left as is.
  • Create IP Cameras as a "Generic Motion IP Camera" Child Device of Motion Wrapper with device data fields edited for camera's IP, MAC, port, user, password, and path.

The camera is listed on Motion's site as a compatible, and I double checked that it is a jpg camera.

I am trying to use compatible cameras for the time being because I have not looked into templates editing yet, and at this point, I'm working on breaking down what's necessary to make cameras work, so I am more concerned with the procedure than anything else.
I still can't get video in Security | View Cameras. From my reading, it should work, but since this is my first install, and the documentation is not yet where it should be, I'm not sure what to think.
What am I missing?
Where should I go from here?
« Last Edit: October 21, 2012, 08:46:46 am by mcefan »

murcel

  • Guru
  • ****
  • Posts: 198
    • View Profile
Re: problem installing IP cams in 1004
« Reply #6 on: October 21, 2012, 01:12:42 pm »
IF you are using the "Generic Motion IP Camera" template, you normally don't need to edit anything, how the template works. So forget about my previous template. It is just important if you want to use other features, like ptz.
For only watching a live image, the above template should work.

So what is the url, you are using?

Please see attachment, how i am using my camera here

mcefan

  • Veteran
  • ***
  • Posts: 89
    • View Profile
Re: problem installing IP cams in 1004
« Reply #7 on: October 21, 2012, 05:15:33 pm »
The url is: /mjpeg.cgi
As mentioned before, I can see the live stream in FF browser with http://192.168.80.X/mjpeg.cgi
« Last Edit: October 21, 2012, 05:36:24 pm by mcefan »

murcel

  • Guru
  • ****
  • Posts: 198
    • View Profile
Re: problem installing IP cams in 1004
« Reply #8 on: October 21, 2012, 05:24:31 pm »
The url is: /mjpeg.cgi
As mentioned before, I can see the live stream in FF browser with http://192.168.80.X/mjpeg.cgi

Hey and like i said it before.....you are trying to use a Motion Jpeg instead of a jpg.

mcefan

  • Veteran
  • ***
  • Posts: 89
    • View Profile
Re: problem installing IP cams in 1004
« Reply #9 on: October 21, 2012, 05:41:06 pm »
OK, the other path is /image/jpeg.cgi, and I can see a static image in FF from that one also, but same result in preview.

There's also:

D-Link DCS-930L wireless (802.11g) net camera
Firmware version: 1.00
Product: http://www.dlink.com/products/?pid=DCS-930L
Tested with motion 3.2.12
    JPEG: netcam_url http://x.x.x.x/image.jpg
    MJPEG netcam_url http://x.x.x.x/mjpeg.cgi

I tried /image.jpg, same result.


The camera is said to be using jpeg. Does the mjpeg extension make any difference with the contents (I'd like to know the difference in this case)? In other words, does that extension HAVE to be jpeg? I made sure I followed your advice and got a jpeg cam this time. What am I missing? I'm sure there's a knowlege gap here, and I'm missing something.
« Last Edit: October 21, 2012, 05:58:23 pm by mcefan »

mcefan

  • Veteran
  • ***
  • Posts: 89
    • View Profile
Re: problem installing IP cams in 1004
« Reply #10 on: October 22, 2012, 04:33:23 am »
I knew I wasn't dreaming:

Quote
"Device data" :

    "Path" : set the path to your IP Camera current snapshot, it has to be a jpg or mjpg file
This is from: "Adding IP Cameras under Motion Wrapper" on the "Monitor surveillance cameras" page on the wiki.

So, I'm still on a quest for understanding here: what are the requirements for an IP camera to work?

Seeing that the equipment listed on the wiki is fairly old and most no longer supported, it would be good to have a generic approach that would help sort things out with new cameras, and new camera purchases. If we could just have basic guidelines to follow, it would help in the future, and help me complete the documentation of this section (which I'm currently working on).

If you (or anyone you know) know anything on the subject, please drop a note, or link.

If the above is inaccurate, we need to amend the documentation. If it is correct, then fine, but then the question remains: besides the file name, what exactly should we be looking for in IP cameras? Why do some work, and some others don't?

mcefan

  • Veteran
  • ***
  • Posts: 89
    • View Profile
Re: problem installing IP cams in 1004
« Reply #11 on: October 23, 2012, 04:12:57 am »
Ok folks, got a little light on the issue on IRC, thanks to tschakMAC:  (& golgoj4-qt5:  ):

19:58 mcefan:  Seeing that the equipment listed on the wiki is fairly old and most no longer supported, it would be good to have a generic approach that would help sort things out with new cameras, and new camera purchases. If we could just have basic guidelines to follow, it would help in the future, and help me complete the documentation of this section (which I'm currently working on).
19:59 mcefan:  what exactly should we be looking for in IP cameras? Why do some work, and some others don't?
19:59 golgoj4-qt5:   good question
19:59 * golgoj4-qt5:   ponders
20:00 golgoj4-qt5:   well the ones that work allow some way to access the image frames directly
20:00 mcefan:  i thought LMCE just hooked in the stream
20:00 mcefan:  but it looks like i'm missing something
20:00 golgoj4-qt5:   no, it grabs frame by frame
20:01 mcefan:  well, the stream is a flow of frames...
20:01 mcefan:  where is the difference?
20:01 mcefan:  what am i missing here?
20:01 golgoj4-qt5:   it grabs them every few seconds
20:01 golgoj4-qt5:   and not the stream of images
20:01 mcefan:  ok
20:01 golgoj4-qt5:   shit
20:02 golgoj4-qt5:   am i wrong
20:02 golgoj4-qt5:   now you made me paranoid...
20:02 mcefan:  lol
20:02 golgoj4-qt5:   we shall verify this
20:02 mcefan:  it hooks into a virtual file that happens to be a stream
20:02 mcefan:  not a static file
20:03 golgoj4-qt5:   and there is the man with the wooden shoes
20:03 mcefan:  so when you point a browser to it, it keeps downloading the file and never ends,
20:03 mcefan:  so you see video
20:03 golgoj4-qt5:   hmm ok
20:03 golgoj4-qt5:   maybe i had a crappier camera
20:03 golgoj4-qt5:   haha
20:03 golgoj4-qt5:   it always seemed that way to me

20:41 mcefan:  mcefan:  Seeing that the equipment listed on the wiki is fairly old and most no longer supported, it would be good to have a generic approach that would help sort things out with new cameras, and new camera purchases. If we could just have basic guidelines to follow, it would help in the future, and help me complete the documentation of this section (which I'm currently working on).
20:41 mcefan:  19:59 mcefan:  what exactly should we be looking for in IP cameras? Why do some work, and some others don't?
20:41 mcefan:  can anyone give some light?
20:43 mcefan:  or know someone who can?
20:53 tschakMAC:  it's very simple, LinuxMCE just wants a single jpeg image
20:54 tschakMAC:  it will keep requesting that image, over and over.
20:54 tschakMAC:  (with the Get Video Frame command)
20:55 tschakMAC:  if you look at the device templates, for say the Panasonic IP camera
20:55 tschakMAC:  all it's doing is an HTTP request, to grab that image
20:56 tschakMAC:  and passing it back to the system.
20:56 mcefan:  that's what i thought
20:56 mcefan:  so all that's needed is the right path?
20:58 tschakMAC:  if it's an ip camera talking over HTTP, yes.
20:58 tschakMAC:  you have to understand, LinuxMCE doesn't give a shit where the data comes from
20:58 tschakMAC:  it just wants it
20:58 mcefan:  ok
20:58 tschakMAC:  in the panasonic ip camera template, we just do HTTP requests by hand
20:58 tschakMAC:  get the data
20:58 mcefan:  that's clarifies it
20:58 tschakMAC:  and pass it back.
20:58 mcefan:  ok
20:58 mcefan:  so what's necessary from the camera end?
20:59 mcefan:  just a jpeg?
20:59 tschakMAC:  yes. Get Video Frame expects a JPEG.
20:59 mcefan:  ok what about codecs?
20:59 tschakMAC:  when you go to a security camera page, you can see in the source code, it just ...
20:59 tschakMAC:  ...
20:59 tschakMAC:  seriously?
20:59 tschakMAC:  all we ask for is single JPEG frames
21:00 tschakMAC:  codecs do not enter into it
21:00 tschakMAC:  the codec, is JPEG.
21:00 * tschakMAC:  resists the urge to smack you upside the head.
21:00 tschakMAC:  :)
21:00 mcefan:  ok so any jpeg capable camera should work then
21:00 mcefan:  as long as you klnow the path to the jpeg
21:00 mcefan:  right?
21:01 tschakMAC:  yes.
21:01 mcefan:  ok
21:01 mcefan:  so looking for a camera, all you have to do is make sure the camra has a jpeg image
21:02 mcefan:  LMCE keep getting the current jpeg image
21:02 mcefan:  and that's it
21:02 mcefan:  ?
21:02 tschakMAC:  yes
21:03 mcefan:  ok so i can safely write that the only necessary requirement is that the camera serves a static jpeg image at a known address
21:04 mcefan:  and that the path be known
21:04 mcefan:  ?
21:06 mcefan:  can we lookat the setup now?
21:07 mcefan:  i've tried several cameras and could not get them to work, I have the path right, and the camera is jpeg capable
21:07 mcefan:  what are the possible causes?
21:08 mcefan:  I installed it as a plain IP and also tried the Motion wrapper, but no go
21:08 mcefan:  if it's just looking for the ip and jpeg address, what could go wwrong?
21:13 mcefan:  please enlighten me
21:21 tschakMAC:  sorry, I'm swamped at the moment, three work contracts at the moment means I have no time to be in here.
21:21 tschakMAC:  mcefan: if you want to look at what could be going wrong, look at the Generic_Serial_Device log for the camera
21:21 tschakMAC:  Motion wrapper was a stop gap, intended as a hack to allow USB cameras to be manually fudged into the system
21:22 tschakMAC:  if the camera is an IP camera, there is no reason to use Motion Wrapper
21:22 mcefan:  ok
21:22 tschakMAC:  if you need to, add additional logging statements to the path that's created
21:22 tschakMAC:  and see if the path printed in the log matches what is required to send an image back.
21:23 mcefan:  unfortunately, i have not gotten that far in my experience with LMCE, so i will have to get under the hood
21:23 mcefan:  what else do  i need to know, i will do some digging
21:24 mcefan:  where do i fing the gsd log for the cam?
21:27 mcefan:  also, when can you find some time for us to discuss this further? I'm trying to write step by step instructions on installation and troubleshooting on the wiki
21:40 tschakMAC:  mcefan: all the logs for the devices can either be viewed in the web admin, advanced > configuration > devices, selecting the camera, and selecting View Log, or Follow Log
21:40 tschakMAC:  mcefan: or you can tail -f /var/log/pluto/XX_Generic_Serial_Device.log
21:40 tschakMAC:  where XX is the device #
21:40 tschakMAC:  all of the logs for the various devices end up in /var/log/pluto
21:41 mcefan:  great
21:41 mcefan:  thank you
21:41 tschakMAC:  no problem
21:42 mcefan:  to make sure: motion is not needed for ip cams
21:42 mcefan:  so install them directly?
21:43 tschakMAC:  when properly configured
21:43 tschakMAC:  the cameras should detect and install what they need
21:43 tschakMAC:  GSD devices automatically have the Generic Serial Device package selected in their device template
21:44 mcefan:  well this one did not detect
21:44 tschakMAC:  and in the panasonic IP camera template, there is a MAC
21:44 mcefan:  i had to manually add it
21:44 tschakMAC:  let me finish.
21:44 mcefan:  ok
21:44 mcefan:  sorry
21:44 mcefan:  i did not realize u were not done
21:45 tschakMAC:  in the device template, there is a section for detecting devices
21:45 tschakMAC:  for network devices, this is done via MAC address
21:45 mcefan:  ok
21:45 tschakMAC:  so there are ranges (in decimal) for MAC addresses, if  a mac address falls within that range
21:45 tschakMAC:  then the system will say it's detected, and if confirmed, will install the software it needs.
21:46 tschakMAC:  you use convert_mac in /usr/pluto/bin to create a decimal mac address from a hex one
21:46 tschakMAC:  the reason your camera was most likely not detected was because it's not within the range of mac addresses that we try to detect.
21:46 mcefan:  ok
21:47 tschakMAC:  if you're wanting to understand how all this works
21:47 tschakMAC:  you need to read two documents
21:47 tschakMAC:  in the wiki
21:47 mcefan:  ok
21:47 tschakMAC:  * Developing a DCE device
21:47 tschakMAC:  * Developers Guide
21:47 mcefan:  i'm actuall reading them now
21:47 tschakMAC:  Developing a DCE device is mainly for C++ devices, but it does explain how the device templates work.
21:47 mcefan:  just haven't finished
21:48 mcefan:  ok
21:48 tschakMAC:  and Developers Guide is a conceptual overview of the system
21:49 mcefan:  I'll complete that reading and pull what users need to know from it
21:49 tschakMAC:  ok.
21:49 mcefan:  and hopefully, it's enough info
21:49 tschakMAC:  just keep asking questions
21:49 mcefan:  if i have any other questions, i'll post tomorrow
21:49 mcefan:  or day after
21:49 tschakMAC:  ok
21:49 mcefan:  thank you for your help
21:49 tschakMAC:  np
21:50 mcefan:  thanks though, serious!
21:50 mcefan:  i appreciate it
21:50 tschakMAC:  you're welcome.
« Last Edit: October 23, 2012, 05:09:32 am by mcefan »