SKJM Forum

Support => iCam Support => Topic started by: brucewin on September 01, 2009, 08:23:34 PM

Title: Auto-Start
Post by: brucewin on September 01, 2009, 08:23:34 PM
Does auto-start mean that if you lose a connection another copy of icam will start running? After a few hours of icam working perfectly I noticed even though I had one camera running I had 3 images. 2 were still images from before the camera was moved but not unplugged. I also noticed on the main computer that 3 icamsources were on the task bar.

How can I get icamsource to start up automatically when I reboot the system from the main computer? I have auto-start checked. I am using windows xp.

Bruce
Title: Re: Auto-Start
Post by: Stefan on September 02, 2009, 07:28:51 AM
Checking Auto-Start means that when the iCamSource is run the "Start" button is automatically clicked. To run the iCamSource on startup simply copy the iCamSource shortcut into your Startup folder in the your Start menu.
Title: Re: Auto-Start
Post by: wuzup on September 04, 2009, 05:58:04 PM
Any way to have it start without logging in as a user when using Windows XP or Vista.  I don't suppose there would be since it is not a system service but an actual program that must be started by a user.  Would be kewl if I could activate my laptop's cam every time it was booted.  Mulitple people use the laptop but I wanted to keep the software running.  Vista allows for multiple users logged in but once the machine is rebooted I can't find a way for the system to restart the program without a user logging in.
Title: Re: Auto-Start
Post by: Jay on September 04, 2009, 11:34:19 PM
iCamSource does currently require a user to be logged in to launch the program.  I think there are third party programs available that will basically run any application as a service, but I've never tried it myself.  A search on "run application as service" found a few different programs like that.
Title: Re: Auto-Start
Post by: wuzup on September 05, 2009, 09:33:05 AM
Actually it appears fairly easy to create a user defined service in Windows.  I will have to test this when I get home.  Microsoft's article can be found here: http://support.microsoft.com/kb/137890/en-us

And all it requires is the NT Resource Kit. The only issue I may run into is launching the cam without its own software loaded.  Worth a shot though. Thanks for the reply Jay.
Title: Re: Auto-Start
Post by: viop-ninja on December 12, 2009, 03:44:05 PM
I am going to revive this topic as this is a much needed capability and I'm not 100% clear on how we would set it up as a service when watching multiple cameras.

Has anyone successfully gotten this set up as a service on XP/Server2003 for multiple watched cameras?  If so can you provide parameter values, etc, that you used to make it work?

Thanks.
Title: Re: Auto-Start
Post by: viop-ninja on December 12, 2009, 07:08:36 PM
So I created a new service using instsrv.exe and srvany.exe for iCam.  I have created a key for the service called Application that has the following values;

c:\program files\icamsource\icamsource.exe -url=http://192.168.0.103/nphMotionJpeg?Resolution=320x240&Quality=Standard -cu=mylogin -cp=mypass

The service says it is started but when I try to access the service from my iPhone I get an error saying "No Sources Found".  I have verified that the login and password are correct.

Does anyone have any ideas?
Title: Re: Auto-Start
Post by: viop-ninja on December 12, 2009, 07:43:07 PM
Okay, I got it working.  Took a couple of additional steps;

Here's the full description of what you need to do in order to get this to work.

1. Install the NT/Server 2003 Resource Kit (I was installing on Windows Home Server OS which is the same as Server 2003).

2. Create the service entry from the CMD prompt as an Administrator account;

"c:\program files\Windows Resource Kits\Tools\instsrv.exe" iCam "c:\program files\windows resource kits\tools\srvany.exe" (you DO need quotes for this path to work).

This will create the service called iCam.

3.  BACK UP YOUR REGISTRY (especially if you don't know what you're doing here)

4. Now you will need to go into Regedit and go into HKEY_LOCAL_MACHINE\SYSTEM\CURRENTCONTROLSET\SERVICES

Find the key for your service (in this example will be "iCam").

5.  With the iCam key highlighted, right click and choose new key.  Name this key Parameters

6.  Click the Parameters Key - right click and choose String Value.  Name the String Value "Application" (no quotes).  Choose Type REG_SZ.  In the Data value enter the path to the application example c:\program files\icamsource\icamsource.exe (do not enter quotes around this).

7.  Click the Parameters Key - right click and choose String Value.  Name the String Value "AppParameters" (no quotes).  Choose Type REG_SZ.  In the Data value enter the options for the iCam which will need to be the URL to the camera and the login/password for iCam access.  Example -url=http://192.168.0.103/nphMotionJpeg?Resolution=320x240&Quality=Standard -cu=mylogin -cp=mypass (no quotes around this).

8.  Exit the registry editor.

9.  Go into Administrative Tools -> Services.  Find the iCam service you created.  Stop the service (it will be set to run automatically which is what you want).  Go into the options and choose to run as account and set it to run with an administrator account login and password.  I don't believe it will run properly with the local account which is what services normally use.  When I had it set to use the local account I could never connect to it with my iPhone.

10.  Restart the service.  The service should start with no errors and you should be able to access the iCam properly.  There will be no tray icon, etc, when it is running as a service but it should be working.

Be aware that it should theoretically be possible to create as many services as you like for up to 4 cameras.  Name each service separately (iCam1, iCam2, etc) and set the parameters up separate for each service.  I have not attempted this yet but expect it would work.

Also be aware that running with the administrator account has inherent risks.  The safer way to do this would be to copy the instsrv.exe and srvany.exe applications into the iCamsource directory and set permissions to only allow administrator and a new account you create to access that folder.  Then only allow the new account to run the service.  I haven't set this up as I'm not too concerned about the security risks but be aware that running services with the admin account is frowned upon as it is theoretically possible that those services could be hijacked by a worm/virus/etc.

Hope this helps someone else out who runs into the same thing I did trying to get this going.

Title: Re: Auto-Start
Post by: OUAnthony on April 10, 2010, 07:32:36 PM
I run 2 instances of icamsource, one for an IP camera, and one for a blank ManyCam with audio. The blank one works perfectly per your instructions. The IP cam source executes, but crashes as soon as I try to access it from my iPhone. I tried disabling the blank one to make sure it wasn't the fact that 2 instances were going at once, and the IP cam source still crashed. I tried with both of the newest versions of icamsource (1.4.1 and 1.4.2)...crashes both of them. This is what my registry entry for the IP cam looks like (both in the appropriate place and both with the appropriate registry names):

Application: c:\program files\icamsource\icamsource.exe
AppParameters: -url=http://192.168.10.100/video.cgi -u=icamusername -p=icampassword -cu=ipcamusername -cp=ipcampassword -m -desc="Garage"

Any ideas?

P.S. If I can get this working, you are my hero...this rocks. I also made a service for dropbox, which backs up the motion events off-site for free...and a service for ManyCam (blank camera with audio). Thanks for the directions!
Title: Re: Auto-Start
Post by: viop-ninja on April 10, 2010, 07:41:31 PM
I'm not sure but I'm immediately suspicious of your -url parameters... what kind of camera do you have?  Does that parameter work with iCamSource if it is running standalone (not as a service)?

Also, you have your username and password entered twice, this should not be necessary and could cause a problem.  Here's what the string for my panasonic IP camera looks like;

-url=http://192.168.0.105/nphMotionJpeg?Resolution=320x240&Quality=Standard -desc="Back Patio" -cu=username -cp=password

Use the helper tool on the SKJM webpage to make sure your URL is correct for your video feed, it looks like it could be the problem, or your duplicate username and password.
Title: Re: Auto-Start
Post by: OUAnthony on April 10, 2010, 09:53:32 PM
My camera is a D-Link DSC-910. The video feed is username/password protected, which is why there are 2 sets of usernames and passwords...one so icamsource can access the IP cam video feed, and the other is the icamsource username/password that I type in on my phone.

The way I typed it is exactly how I typed it in my Windows shortcut and placed in the startup folder so it'd start automatically when I log in. It works fine when I execute it as a startup shortcut...I can access the camera from my phone and it is stable.

Last time it crashed, I got the error code, which was 0xc0000005. I found a site (http://www.0xc0000005.com) that suggested several possibilities, including one caused by DEP. I allowed an exception for icamsource, and still have the same problem. I doubt it's my RAM, as I don't have any other issues with my computer. I'm virus-free according to my anti-virus software (which I know doesn't really mean I'm necessarily virus-free). I haven't installed/uninstalled many programs, so my registry shouldn't be too sloppy.

What version of icamsource are you running?
Title: Re: Auto-Start
Post by: OUAnthony on April 10, 2010, 10:32:52 PM
Wow...ignore me. Somehow I typed the icamsource password twice...resulting in the wrong password for the IP cam's video feed. Der der der! Thanks for getting back to me so quick. This is awesome!
Title: Re: Auto-Start
Post by: venus on June 29, 2010, 11:57:23 PM
how do you install the NT/Server 2003 Resource Kit on windows 7?  can services be created this way with windows 7?   
Title: Re: Auto-Start
Post by: OUAnthony on July 02, 2010, 06:56:50 AM
I did it on Vista the same way you do it on XP...just downloaded and ran the resource kit then followed the directions. I assume it'll work in Windows 7, although I haven't tried it (yet). Please let me know if you try it and if it works. I plan on upgrading to Windows 7 soon...assuming I can still do this.
Title: Re: Auto-Start
Post by: phunte on March 29, 2011, 10:50:41 PM
I tried following the steps in this post, and I have an "iCam" service. I can start the service, and I see icamsource.exe as a process for a couple of seconds in Task Manager, but then it seems to terminate. Any ideas how I can debug why it terminates?

Thanks, phunte
Title: Re: Auto-Start
Post by: OUAnthony on March 29, 2011, 11:44:53 PM
After I upgraded to Windows 7 and set up the service, I had some issues with crashing as well. If I remember correctly, my issue related to improper settings or firewall/port forwarding issues. I used SKJM's registry file to clear the iCam settings, deleted the service (from the registry as well), and started fresh. This is the order I did things after uninstalling icamsource, cleaning the registry, deleting the service, etc:

1) set up port forwarding in the router settings and assigned a static IP address to my computer (or enable uPNP if you want to use auto-router configuration in icamsource)
2) installed icamsource and set up the ports to forward (using the registry file to enable manual port forwarding) OR enable auto-router configuration (if using uPNP in the router settings)
3) added all cameras to icamsource and changed settings as desired, made sure auto start is enabled in icamsource, clicked start in icamsource to verify all cameras work properly, then exited icamsource
4) remove all references to icamsource from running automatically at Windows logon (Startup menu on Start Menu, etc)
5) with icamsource not running, set up icamsource as a service using directions in this post
6) started service and verified it functioned properly with my iPhone from wi-fi and 3g network

If you have issues, make sure that other programs aren't fighting for control of your camera(s)...especially any webcams. You can use ManyCam (free) to clone webcams so that they can be used with multiple programs (such as icamsource and a chat program like skype). Also make sure that any IP cameras have a static IP address on your network. Finally, verify that the ports are actually open through your router's firewall if you use manual port forwarding.
Title: Re: Auto-Start
Post by: satom on May 02, 2011, 01:38:34 PM
What would you put in your registry string if the cam was built in like on a laptop? Versus the ip of an external cam.

Thanks
Title: Re: Auto-Start
Post by: OUAnthony on May 03, 2011, 12:44:44 AM
Command line options are discussed at the links below. You would just replace the value for AppParameters with the command line options that would have come after icamsource.exe if you were running it in command line. I can't remember, but I think v=0 should be the starting point. Good luck!

http://skjm.com/forum/index.php?topic=462.0

http://skjm.com/forum/index.php?topic=416.15
Title: Re: Auto-Start
Post by: satom on May 03, 2011, 07:06:26 AM
@OUAnthony

So if I read you correctly on the links you sent me, there is no need to build the AppParameters as long as you run the program (icamsource.exe) once on it's own and build in your settings?  When you run it as a service in this configuration without the appparameters does it show up as a service or a process in the task manager?  Did you also set it up in the service to use a local account or set it up to run off an administrator account with a login password?

I was able to get it to somewhat work using a local account and appparameters but it seemed to lock up on me. That could be related to a post Stefan made explaining an instance of icamsource hanging in the background. My only complainant about using the app parameters is being able to adjust quality and telling the program specifically where I want it to dump the motion events. I'm hoping your idea of no app parameters will work for me.
Title: Re: Auto-Start
Post by: OUAnthony on May 03, 2011, 09:04:57 PM
It's been a while since I've even looked at the settings...it's so stable that I never have to mess with it. But yeah, no need for appparameters. Just install icamsource, set up the camera(s) that you want and any other default settings you want...click start, then stop (to ensure the settings are saved)...then exit icamsource and configure it as a service.

In the logon tab in the icamsource service properties window, I entered my computer user account as the user and saved the password. I also use an automatic (delayed) startup so that it waits for the network to become available...but I use IP cameras.

In my registry, I also provided a dependency for DropBox...meaning DropBox runs before icamsource starts. I use DropBox to backup my images offsite in case someone steals my computer.

Anyway, let me know if you have any other questions. I love running icamsource as a service so it starts up automatically as soon as the computer is powered on.
Title: Re: Auto-Start
Post by: satom on May 04, 2011, 07:53:58 AM
I think I have it setup correctly but am running into two problems

1.  When I open icamsource, not as a service but as a program, with auto-start enabled the program does not connect to the server. I have to click stop and them start again to get the "connected to server" notifier. I have tested this and it happens everytime I run icamsource from scratch. I have killed the program and tried again and it happens everytime. I tried the manual port forwarding and that didn't solve anything. I'm pretty sure it's not a network issue since I can correct by stopping and starting. Having this issue though is making this not work as a service unless I use appparameters.

2.  When I do use appparameters, where do my images go?  I can't find them anywhere on the machine yet I see them on iPhone in recorded motion events.

Also with having an embedded camera and using appparameters is there a way to adjust quality?
Title: Re: Auto-Start
Post by: OUAnthony on May 04, 2011, 06:38:41 PM
1) Sounds like maybe the atuo-start checkbox and the registry change that it's supposed to make when it's checked/unchecked possibly got out of sync. Maybe try stopping icamsource, unchecking auto-start, starting it, stopping it again, re-checking auto-start, then start/stop it one more time...finally exit icamsource and then rerun it to see if that fixes the problem. If it doesn't, I'm not sure what the issue is. I agree that it doesn't sound like it's network related...unless you're using auto-router configuration and maybe your router is hesitating. But you said you tried it with manual port forwarding...so that would eliminate that being the issue assuming you uncheck auto-router config while using the manual port forwarding. And to be clear, when you say you used manual port forwarding, that means you enabled it in icamsource AND set up a port forwarding rule in your router, right?

2) The images should be saved to the same folder that icamsource saves them to when you run icamsource as a program.

3) To adjust image quality, this is what I did on a computer with a webcam: 1) complete exit icamsource/stop the service 2) used the webcam software that came with the camera (you might also be able to use Live Messenger and/or Yahoo Messenger...or maybe even Skype) to change the settings...the options were in the video setup screen where you choose your camera source. You should be able to adjust contrast, flip the image, etc, with those settings. Once you get it the way you like it, make sure to save/apply the settings. 3) Exit the webcam software and re-run icamsource. Check to make sure the changes were applied. The changes are saved for the operating system...it's not on a per-program basis like many settings are.
Title: Re: Auto-Start
Post by: satom on May 06, 2011, 05:50:37 AM
Ok so I was able to get it to work but not under my account. The only waybi could get it to work was to put it under the local system account. Problem with that is I can't adjust any of the settings through the icamsource GUI. At this point I can only make changes to the program via the registry. Do yall have a decoder ring for the registry strings so I know what key goes with which slide bar in the program?  Also when I try to change motion events folder in the registry for that user account it always reverts back to the original setting. All other settings stay the same as I input.

Thanks
Title: Re: Auto-Start
Post by: SKJM Support on May 07, 2011, 03:53:49 PM
The ImageCompressionFactor value corresponds to the Better Frame Rate -> Better Image Quality slider

The MotionSensitivity value corresponds to the Less Sensitive -> More Sensitive slider

The MotionDetectionWait value corresponds to the More Often -> Less Often slider

If the iCamSource program is running when you change the registry settings, then the values you enter may be overwritten by the program.  If the program is closed and then the values are changed, then it will keep the new values.
Title: Re: Auto-Start
Post by: satom on May 07, 2011, 07:18:40 PM
Thanks to all. After uninstalling it and deleting the program from all user accounts in the registry I was able to get it working like OUAnthony has.
Title: Re: Auto-Start
Post by: OUAnthony on May 08, 2011, 02:06:37 AM
Glad you got it working! Did you also install Dropbox as a service and set it as a dependancy for the iCam service so you can also have offsite backup of your motion events in case your computer is stolen? If you need any help with it, let me know.
Title: Re: Auto-Start
Post by: satom on September 01, 2011, 06:26:02 AM
Got a new pc, which of course comes with new issues

I am currently running iCamSource on a Win7 machine as a service and the program works great minus to things I would like to get some help on.
 
1.  Is there a way whether in the registry for the service or something in icamsource to tell it to use a higher resolution on the webcam?  Cam can support up to 1280x1024 but always seems to default to 640x480.  I bought a netbook with a HD webcam for a specific reason and would like to find a way to manipulate icamsource to use it.
 
2.  I go in to change the folder where the motion events are stored but it seems when I run icamsource as a service it always starts storing the motion events in the default location of under the pictures folder in user files.  I have gone in an manually changed the registry to fix this but it always seems to go back to default.
Title: Re: Auto-Start
Post by: OUAnthony on September 01, 2011, 05:22:46 PM
1) The only way I've found to change the resolution settings for a USB webcam it to use the software that came with the webcam (such as Logitech QuickCam). First stop icamsource service (make sure icamsource.exe is not running in the task manager), then open the webcam software and change the settings using that program...apply settings and exit webcam software. Start icamsource service. This will cause icamsource to use more processor resources, as it has to do more work to downsize the image to 640x480 (the max iCam can receive). I believe that icamsource will save the motion events in the original resolution (before downsizing it for streaming to iCam). Maybe the SKJM guys can confirm this?

2) I run icamsource as a service on my Win7 PC...and I don't have that issue. Try following these steps carefully and see if it fixes your problem:

a) stop icamsource service and make sure icamsource.exe is not running (task manager)
b) start icamsource (from the Start Menu, not the service)
c) in icamsource, click the stop button
d) change the recording folder (you might have to do it for each camera if you have multiple cameras)
e) in icamsource, click the start button
f) in icamsource, click the stop button (I do this just to make sure that it saved the previous settings)
g) exit icamsource (make sure icamsource.exe is not running)
h) run icamsource service from the control panel > administration > services
i) verify recording taking place in correct folder
j) reboot and re-verify correct folder for recording
Title: Re: Auto-Start
Post by: satom on September 02, 2011, 01:59:48 PM
Tried what you suggested several times. It keeps changing back once I start the service.   How to you have the login set for the service?  This is very frustrating.
Title: Re: Auto-Start
Post by: SKJM Support on September 02, 2011, 04:20:21 PM
That behavior might be caused by another instance of iCamSource running simultaneously that's overwriting the recording folder setting. Please check the process list in the task manager to make sure that there isn't an additional instance of iCamSource running (before you launch the service).
Title: Re: Auto-Start
Post by: satom on September 03, 2011, 11:28:24 AM
The issue ended up being that I created the process first, then installed icamsource. Now is there a way to force icamsource to do a higher resolution to Icam or to recorded motion events?  Regardless of what apple wanted limited?
Title: Re: Auto-Start
Post by: OUAnthony on September 03, 2011, 11:58:24 AM
Tried what you suggested several times. It keeps changing back once I start the service.   How to you have the login set for the service?  This is very frustrating.

For the service I use the same account that I login to the computer with. I also have it set up for auto-delayed startup. As far as I know, the resolution is not dictated by icamsource...it's determined by the settings for the webcam (managed by the camera's original software and possibly Windows) or the settings in the IP camera's webpage.
Title: Re: Auto-Start
Post by: satom on September 19, 2011, 06:40:40 AM
My webcam being a USB built in webcam capable of supporting 1280x1024, is it possible in the service i created to adjust the appparameters string value in the registry to dictate what resolution I want icamsource to use?  I am trying to find a way to get 1280x1024 recorded images.

I have an Acer netbook with the acer crystal eye software for the default webcam software. It's default resolution is 640x480 and when I change the resolution to something higher it always defaults back after I exit and restart the program. I know there has to be a way to do this. I tried using manycam to do this but it forced resolution to 320x240.
Title: Re: Auto-Start
Post by: SKJM Support on September 19, 2011, 01:16:34 PM
My webcam being a USB built in webcam capable of supporting 1280x1024, is it possible in the service i created to adjust the appparameters string value in the registry to dictate what resolution I want icamsource to use?  I am trying to find a way to get 1280x1024 recorded images.

I have an Acer netbook with the acer crystal eye software for the default webcam software. It's default resolution is 640x480 and when I change the resolution to something higher it always defaults back after I exit and restart the program. I know there has to be a way to do this. I tried using manycam to do this but it forced resolution to 320x240.

Thank you for your post.

The reason that the 640x480 resolution is used is because of bandwidth limitations imposed by Apple and because of the size of the display.
Title: Re: Auto-Start
Post by: satom on September 19, 2011, 02:08:28 PM
What if I am not using I cam and am only viewing and recording locally?
Title: Re: Auto-Start
Post by: SKJM Support on September 20, 2011, 10:17:43 AM
Specifications within iCamSource are specifically designed for use with iCam and not as a stand-alone desktop application. An option to be able to change the resolution has been requested in the past and is currently on our list of potential features to implement in the future.
Title: Re: Auto-Start
Post by: Trevor on October 30, 2011, 08:11:16 AM
This is great help, however something isn't working right.  I have iCam source running as a service under the admin account and it looks like it's trying to work (task manager shows icamsource.exe running- with memory but no CPU usage) but after a couple of minutes it exits on its own.  I cannot connect through the phone application at any point.  I looked in the event viewer and see a ".NET Runtime 2.0 Error" in the system log (EventType clr20r3, P1 icamsource.exe, P2 0.0.0.0, P3 4e8e382a, P4 system.windows.forms, P5 2.0.0.0, P6 4d8c1dde, P7 48b9, P8 96, P9 system.invalidoperationexception, P10 NIL.).

It seems that .Net 2.0 is having an issue when I try to run iCam source as a service so I verified that .Net 2 is installed and working correctly using an MS tool.  I tried reinstalling iCam source and nothing changed.  A web search on the event log is saying that it's a .Net bug in the code or "something" else.  Either way, it's beyond my ability to troubleshoot.

Any ideas?
Title: Re: Auto-Start
Post by: OUAnthony on October 30, 2011, 04:44:30 PM
How many cameras do you have added in icamsource? If more than one, have you tried manual port forwarding, or at least auto router configuration check in icamsource with uPNP enabled in your router? The only time icamsource ever crashed on me was when iCam tried to access icamsource for the video feeds, but was unable to connect due to port forwarding issues. As soon as I set up manual port forwarding, I had no more crashes.

That's just one idea...I'm sure there are others.
Title: Re: Auto-Start
Post by: OUAnthony on October 30, 2011, 04:46:30 PM
Oh, another idea...you have icamsource running only as a service, and not also starting up through Windows, right? In other words, once you're logged into your computer and go into the task manager, you only see icamsource once, right?
Title: Re: Auto-Start
Post by: SKJM Support on October 31, 2011, 04:48:42 PM
This is great help, however something isn't working right.  I have iCam source running as a service under the admin account and it looks like it's trying to work (task manager shows icamsource.exe running- with memory but no CPU usage) but after a couple of minutes it exits on its own.  I cannot connect through the phone application at any point.  I looked in the event viewer and see a ".NET Runtime 2.0 Error" in the system log (EventType clr20r3, P1 icamsource.exe, P2 0.0.0.0, P3 4e8e382a, P4 system.windows.forms, P5 2.0.0.0, P6 4d8c1dde, P7 48b9, P8 96, P9 system.invalidoperationexception, P10 NIL.).

It seems that .Net 2.0 is having an issue when I try to run iCam source as a service so I verified that .Net 2 is installed and working correctly using an MS tool.  I tried reinstalling iCam source and nothing changed.  A web search on the event log is saying that it's a .Net bug in the code or "something" else.  Either way, it's beyond my ability to troubleshoot.

Any ideas?

Please try updating the .Net (http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=17851 (http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=17851))

It's also possible that the registry key has somehow gotten into a bad state.

Also, download and run (double-click) this file: http://skjm.com/icam/CleaniCamKey.reg (http://skjm.com/icam/CleaniCamKey.reg)

That will erase the current iCamSource settings in your registry. You will need to re-enter all of your settings, but hopefully the problem will be resolved if it's due to a problem in the registry.