SKJM Forum

Support => iCam Support => Topic started by: Superpuppy on August 17, 2009, 01:10:37 PM

Title: Auto-Start Multiple Cameras
Post by: Superpuppy on August 17, 2009, 01:10:37 PM
I have a set-up that involves 2 IP cameras and a USB Camera.
I had everything running perfectly in minutes after I installed your program, Awesome!!!!   :)

I would like to have it auto-start with all three cameras every time I boot the PC
I put 3 links in the start-up menu, but that didn't work.
When I manually start-up 3 instances of the program after I boot up the computer, each instance loads up the same camera, I have to manually change it
Title: Re: Auto-Start Multiple Cameras
Post by: Jay on August 17, 2009, 11:00:00 PM
The Windows version of iCamSource has command-line arguments that can be used to launch iCamSource instances with different video sources, logins, etc.

You can launch multiple instances of the iCamSource using what is called a batch file. It is basically a file that allows you to run a series of commands with a single double-click. The template can be downloaded here: http://skjm.com/icam/RuniCamSources.bat

If you download the RuniCamSources.bat file to your Desktop you will first have to update the file for your specific cameras before double-clicking on it. Simply right-click the file and select Edit.

The contents of the file looks like this:

- - -

cd "C:\Program Files\iCamSource"

start iCamSource.exe -url=http://192.168.0.107:5000/SnapshotJPEG?Resolution=320x240 -cu=<LOGIN> -cp=<PASS>

start iCamSource.exe -url=http://192.168.0.103:80/cgi-bin/video.jpg -cu=<LOGIN> -cp=<PASS>

- - -

The first line simply prepares to run the iCamSources from the Program Files \ iCamSource folder.
The second and third lines start two instances of the iCamSource using two camera URLs.

You'll need to change the template to reflect your situation.  If iCamSource is installed in a different directory, you'll need to change the first line to point to that directory.

You'll also need to change the iCamSource setup lines, so that there are three of them, one for each camera. 

For the IP cameras, you'll need to replace the URL arguments to be the URLs for your cameras.  The -cu and -cp arguments are for the camera's login and password.

For the USB camera, you'll need to replace the -url, -cu, and -cp arguments with -v and -a arguments that have the index of the video/audio source from the Video/Audio drop down list in iCamSource.  For example, if you want to select the first video source in the Video drop down and the second audio source in the Audio drop down, you'd use the command "start iCamSource.exe -v=0 -a=1"

Once that is done, save the RuniCamSource.bat file, and then double-click it and you should see three iCamSources start automatically with the correct settings for each camera.

I know that there are a number of steps involved here, so please let me know if you have any questions.
Title: Re: Auto-Start Multiple Cameras
Post by: Superpuppy on August 18, 2009, 12:41:05 AM
It didn't quite work exactly as you suggested...
It has been probably at least 30 years since I last wrote a batch file...  I tinkered with it and I got it to work this way:


No worries, it only took a few minutes to figure it out
Thanks for your help.
Title: Re: Auto-Start Multiple Cameras
Post by: mjkaufman on August 20, 2009, 07:16:14 AM
Ok, how do I do this from my Mac?
Also, is there a way to have iCam recognize my fixed ip Ethernet cams when the source machine is off? Or does the cpu need to remain on for my entire trip?
Title: Re: Auto-Start Multiple Cameras
Post by: Stefan on August 20, 2009, 03:18:34 PM
Since you have to make a copy of the iCamSource.app to run more than one iCamSource at the same time, the Mac version is able to remember the previous settings for each copy, so if you check the Auto Start checkbox and add them to your System Preferences > Accounts > Login Items then the iCamSources will be launched and started every time you login.
Title: Re: Auto-Start Multiple Cameras
Post by: mjkaufman on August 21, 2009, 05:53:15 AM
Also, is there a way to have iCam recognize my fixed ip Ethernet cams when the source machine is off? Or does the cpu need to remain on for my entire trip?
Do I assume correctly that the cpu needs to remain 'on'?
Title: Re: Auto-Start Multiple Cameras
Post by: Stefan on August 21, 2009, 10:49:31 AM
Yes, that is correct.
Title: Re: Auto-Start Multiple Cameras
Post by: jamesconklin on September 12, 2009, 02:00:25 PM
The command-line batch file works great!  I recommend you add this post to the FAQ page on the website. 

One more question:  Is there a command-line parameter to adjust the iCamSource Description, i.e., I want to label one of the auto-start IP cameras as "Linksys in the Kitchen", and the other auto-start IP camera as "Linksys in the Office", etc..?

Thanks.
Title: Re: Auto-Start Multiple Cameras
Post by: Stefan on September 13, 2009, 03:50:07 PM
One more question:  Is there a command-line parameter to adjust the iCamSource Description, i.e., I want to label one of the auto-start IP cameras as "Linksys in the Kitchen", and the other auto-start IP camera as "Linksys in the Office", etc..?

Hmm ... Actually, 1.3.5 does not include that functionality, but we'll include it in the next release. :)
Title: Re: Auto-Start Multiple Cameras
Post by: PacketBoy on September 14, 2009, 03:46:39 PM
Great program! Really like the new push feature!

I have the same multiple cam problem, but for some reason my batch file is having issues.

The argument start iCamSource.exe -url=http://192.168.0.107:5000/SnapshotJPEG?Resolution=320x240 -cu=<LOGIN> -cp=<PASS> is being interpreted as if the cameras url is 320x240, i think that second "=" is throwing things out of whack.

Any ideas?

Thank you.
Title: Re: Auto-Start Multiple Cameras
Post by: Jay on September 14, 2009, 11:19:35 PM
I'll look through the code to see if there's anything that explains that behavior. 

In the meantime, could you try using the URL the "http://192.168.0.107:5000/SnapshotJPEG" to see if it starts working?  It should just use the default resolution, which is probably 320x240 or 640x480.
Title: Re: Auto-Start Multiple Cameras
Post by: PacketBoy on September 15, 2009, 08:32:44 AM
No luck, two of my cameras are the panasonic BL-C131A and BL-C111A, and wouldn't you know it, two of the cameras that don't work in iCam w/o that extra "?Resolution=640x480" bit in the start command.
Title: Re: Auto-Start Multiple Cameras
Post by: Jay on September 15, 2009, 01:46:53 PM
Ok, it was worth a shot.  :)

I'll post back here when I have more info about the command line fix.

One other thing, have you ever tried the Panasonic MJPEG URL for your camera?  The MJPEG URL is "/nphMotionJpeg"  instead of "/SnapshotJPEG". (http://192.168.0.107:5000/nphMotionJpeg?Resolution=320x240   in your case)

MJPEG URLs generally refresh faster than the JPG snapshot URLs.  Make sure the MJPEG checkbox is checked if you use the MJPEG URL.
Title: Re: Auto-Start Multiple Cameras
Post by: tamaharbor on September 15, 2009, 08:56:21 PM
I am having the same problem using the command line batch file to start my Panasonic BL-C131A cameras.

And the suggested MJPEG URL works manually, but I am still getting the same truncation using the batch file.

Title: Re: Auto-Start Multiple Cameras
Post by: PacketBoy on September 16, 2009, 06:09:51 AM
I found a solution (accidentally, not being able to type very well finally pays off  ;D)

Just leave off the second "=" and have the resolution jammed up against the preceding characters with no spaces:

start iCamSource.exe -url=http://192.168.0.107:5000/nphMotionJpeg?Resolution640x480 -cu=<LOGIN> -cp=<PASS>

Seems to work fine.

Thanx again, Jay, and the typing instructor I never had.
Title: Re: Auto-Start Multiple Cameras
Post by: Jay on September 17, 2009, 11:14:28 AM
The problem with "=" in the URL should be fixed in the latest version of iCamSource (1.3.6) available here: http://skjm.com/icam/support.php

Please note that you must have iCam 1.2.1 installed on your iPhone or iPod before installing iCamSource 1.3.6.
Title: Re: Auto-Start Multiple Cameras
Post by: Graydon on September 18, 2009, 03:39:06 PM
I have been trying to run 5 instances of iCam on a Mac...When they autostart, their configurations are all mixed up...I need to go into each preference and change the login name again each time. Once setup, they run fine, until its rebooted.


Since you have to make a copy of the iCamSource.app to run more than one iCamSource at the same time, the Mac version is able to remember the previous settings for each copy, so if you check the Auto Start checkbox and add them to your System Preferences > Accounts > Login Items then the iCamSources will be launched and started every time you login.
Title: Re: Auto-Start Multiple Cameras
Post by: Jay on September 18, 2009, 09:16:08 PM
Graydon - Currently, the login and password are saved once per computer, which limits you to four instances auto-running per computer.  It doesn't need to be that way, this is just the first time it's come up :) 

We'll change it so that the login and password are stored separately for each copy of iCamSource in version that's released.
Title: Re: Auto-Start Multiple Cameras
Post by: Coastalfitness on December 23, 2009, 01:36:29 AM
Took a bit, but it is all running fantastic now, actually enjoyed a little challenge.  Supperpuppy's commands actually worked the best.  Last thing now is to get it to run automatically when the comp starts. 

Cheers,

Coastal
Title: Re: Auto-Start Multiple Cameras
Post by: VoSot on January 02, 2010, 08:56:54 PM
Hi,

NooB here.  I am trying to setup multi start - I get a 4th instance of iCamSource for some reason -

 I have tried this as a setup for batching:
----
G:

cd G:\Internet-MoBo\Internet-LAN\iCamSource\

start iCamSource.exe -v=1 -a=2 -cu=x -cp=x

start iCamSource.exe -v=2 -a=1 -cu=x -cp=x

start iCamSource.exe -v=3 -a=1 -cu=x -cp=x

--------

I do not have any IP cameras.. Can anyone tell me why the 4th instance happens?  


Thanks
Title: Re: Auto-Start Multiple Cameras
Post by: Stefan on January 03, 2010, 10:45:56 AM
It looks like you should be only getting 3 instances based on that batch file.

If you remove one of the lines, do you then get 3? And if you remove 2 of the lines, do you still get 2 instances?
Title: Re: Auto-Start Multiple Cameras
Post by: VoSot on January 03, 2010, 12:20:43 PM
A little more messing around, and I think I found out why I was getting a 4th. I had the tuner card activated at the time. I turned of the TV card, and now only 3 startup. Which leads to my next issue.  The three sources I have loading are two cameras and a TV tuner card. When I run the batch file, one of the cameras comes up with a source that doesn't exist. It has a IP camera in the list and I get a error dialog box that says, "Error Code 11.  Your camera drivers may need to be updated" I understand this is because that camera doesn't exist, but I wonder why it tries to start a camera that is 4th in the list, and I only ask for sources 1,2 and 3 to load. ?

Thanks for your time!

Title: Re: Auto-Start Multiple Cameras
Post by: Stefan on January 03, 2010, 09:30:27 PM
That is a good question.

Have you tried just launching one of the iCamSources from the batch file to see what happens? If it does just launch the one, I would keep adding lines to see where things don't work as expected.
Title: Re: Auto-Start Multiple Cameras
Post by: VoSot on January 04, 2010, 08:29:32 PM
OK, I think I figured it out. I have 3 sources - Should be 1,2 and 3  -- It seems to start the count at 0.  So if I use 0,1 and 2 all is well. Make sense?  Not sure about the audio though.

Tim--
Title: Re: Auto-Start Multiple Cameras
Post by: VoSot on January 04, 2010, 08:36:57 PM
OK, Just tested the audio too. It is also off by one - 0=1, 1=2, 2=3 etc..  (in the list)  So now everything here loads as expected with that adjustment - Is it just me? I have seen no one else mention this.
Title: Re: Auto-Start Multiple Cameras
Post by: Stefan on January 05, 2010, 10:45:20 AM
You are right, it isn't explicitly stated, but it does say this in the example:

For example, if you want to select the first video source in the Video drop down and the second audio source in the Audio drop down, you'd use the command "start iCamSource.exe -v=0 -a=1"

Glad you've gotten things figured out! :)
Title: Re: Auto-Start Multiple Cameras
Post by: VoSot on January 05, 2010, 08:09:29 PM
You mean there is a manual?   ::)
Title: Re: Auto-Start Multiple Cameras
Post by: roodrigox on January 23, 2010, 04:30:37 PM
Hi,

I have a system that has 4 cameras, but iCamSource only find one. I think that I need to open another iCamSource and select the second camera, but when I did it nothing change.

I saw your previous post but I didnt understand nothing about bat files. Can you help me?

thanks
Rodrigo
Title: Re: Auto-Start Multiple Cameras
Post by: Stefan on January 23, 2010, 09:39:08 PM
If you have more than one camera and each of them have their own unique IP/Port that you can connect to then yes, you should be able to run more than one iCamSource and connect to them at the same time.

A batch (or ".bat") file can be used to automatically launch more than one iCamSource to connect to multiple cameras, but it sounds like you first need to determine the separate MJEPG URLs for each camera first.

What is the make and model of the components of your system?
Title: Re: Auto-Start Multiple Cameras
Post by: trujillo on February 01, 2010, 02:18:12 PM
I am able to auto start 2 Dlink IP camera's and one USB webcam, using a .bat file.

I have two issues:

I monitor the cameras using my iPhone.    When I "View Motion Events" for one IP camera, my two IP camera's events are mixed together.

Second,  How can I provide a unique name camera name when starting through a .bat file?

Also, are there any new features planned for a near future release?
Title: Re: Auto-Start Multiple Cameras
Post by: Jay on February 01, 2010, 06:17:44 PM
iCamSource uses a camera identifier to determine which folder to store motion events in.  For USB cameras, the identifier is based on the device ID assigned by the operating system.  For network cameras, the identifier is based on the camera's URL.  This identifier should be unique.  For IP cameras, there is a small chance that the cameras could be assigned different IP's by the router's DHCP server.  If that is happening in your case, you should be able to stop it by having your cameras use static IP addresses (should be in the camera's network settings).  If you need any help doing that, let me know.

You can set the Camera Description in the .bat file by adding the "-desc" argument to each iCamSource line, like this: -desc="Example Camera Name"

Currently, the firewall/router piercing protocol is being improved so it will work on more routers.
Title: Re: Auto-Start Multiple Cameras
Post by: trujillo on February 03, 2010, 03:20:12 PM
My D-Link cameras are using static IPs.    I have not tried using the -desc= command line parameter.   I will you know if it changes the observed behavior. 

Title: Re: Auto-Start Multiple Cameras
Post by: trujillo on February 08, 2010, 04:05:38 PM
I attempted to use the -desc="camera name" parameter to start 2 IP camera.   

After starting,  the Motion Events for each each camera were still mixed together.   Each camera had a different name, but the motion event were not separated.

I am using two D-LINK 920 wireless cameras with a link-sys router.
Title: Re: Auto-Start Multiple Cameras
Post by: Jay on February 09, 2010, 12:49:24 PM
The -desc parameter would only affect the camera's displayed name, it would not affect the motion event folders.  I told you about it because you asked how to provide a unique camera name in your first post.

How many folders do you see in the "iCamSource Motion Events" folder on your computer?  Each of those folders represents a different camera.  What are the names of the folders?  (should be long strings of letters and numbers)
Title: Re: Auto-Start Multiple Cameras
Post by: trujillo on February 09, 2010, 07:23:42 PM
When auto start to network cameras and one usb,  only one motion events folder is created.

Folder name: EBACD4E8489ADD490B67C41379A6937810FAD14A

Each camera is recording events to this folder. 
Title: Re: Auto-Start Multiple Cameras
Post by: Jay on February 10, 2010, 04:12:18 PM
I've been looking through the code, and I can't find any scenario where they would use the same folder unless they're using the same URL.  Not saying you're wrong, just saying I haven't been able to find the cause in the code.

It would help to see what settings you are using in iCamSource.  Please email screeenshots of the network camera iCamSources to support@skjm.com. 
Title: Re: Auto-Start Multiple Cameras
Post by: trujillo on February 10, 2010, 11:14:46 PM
It appears two cameras are using the same folder.  One IP camera(192.168.0.7) and the usb cam have the same motion folder.  I can see this when I auto start and then open each isource, to check their motion events folder.   

Here's my .bat file

C:
cd\
cd "C:\Program Files\iCamSource"

start iCamSource.exe -url=http://192.168.0.7/video.cgi -cu=xxxxxxx -cp=xxxxxxx -desc="Kitchen"
start iCamSource.exe -url=http://192.168.0.9/video.cgi -cu=xxxxxxx -cp=xxxxxxx -desc="Bedroom"
start iCamSource.exe -v=0 -a=0 -desc="office"


Folders on my machine:

02/10/2010  11:06 PM    <DIR>          3F803A3EB81214687F27107FD9CBAB941DE72C5D
02/10/2010  11:04 PM    <DIR>          FCC85B213735ACD7F94CD9E2AD31CE119F6F8514

Title: Re: Auto-Start Multiple Cameras
Post by: Jay on February 11, 2010, 02:20:10 AM
Thanks for that extra information.  I thought it was the two network cameras that were using the same folder.  I'll check through the code again for that different case.

Does this only happen when you auto-run the iCamSources using the .bat file, or does it also happen if you run each iCamSource manually?
Title: Re: Auto-Start Multiple Cameras
Post by: trujillo on February 11, 2010, 09:25:19 AM
If I completely start each one manually, then each camera contains its own camera.  Sometimes all three camera's use the same folder when auto-starting.   It seems random.
Title: Re: Auto-Start Multiple Cameras
Post by: trujillo on February 11, 2010, 11:16:55 AM
Right now, from my iPhone, it appears all three camera are using same motions folder.   From my iPhone, when I View Motion Events, all three camera images are visible from each camera.  I am not at home, so I cannot provide a directory list.
Title: Re: Auto-Start Multiple Cameras
Post by: Jay on February 11, 2010, 02:47:59 PM
I'd like to run some tests with your iCamSource.  Please send an email to support@skjm.com and refer to this forum thread in your email.
Title: Re: Auto-Start Multiple Cameras
Post by: bfineman on May 10, 2010, 10:03:52 AM
Note to users of the command line interface: to avoid problems, you should enclose your arguments in quotations. Specifically, if your passwords contain special characters, it might cause your batch file to fail of give unexpected results. Enclosing them in quotes solves the problem.
Title: Re: Auto-Start Multiple Cameras
Post by: dean.testa on June 27, 2010, 01:17:49 PM
I have a problem that does not yet seem to exist in this thread - although I was successful at starting multiple cameras, only 1 of them is available on my iPhone (or via iCamWeb).

I have 3 cameras - builtin on my MacBook, a USB Logitech connected to my Windows machine and Linksys wireless N.  If I multi-start (either auto or manual) from my Mac everything is good - I see all 3 cameras.  But if I multi-start from my Windows machine the Logitech stomps on the Linksys (I only see the Logitech and the Mac).  If I stop the Logitech and refresh the Linksys is there ... if I restart the Logitech and refresh only the Logitech.

I very much want to make my Windows desktop my control point as it is always on.  Any ideas greatly appreciated. I tried both mjpeg start paths with the same results.

... my RuniCamSources.bat:

cd "C:\Program Files\iCamSource"
start iCamSource.exe -v=0 -a=0 -desc="ZoeCam
start iCamSource.exe -url=http://10.0.1.9/img/mjpeg.jpg -cu= -cp= -desc="CiscoWirelessCam"

Thanks!
DEAN
Title: Re: Auto-Start Multiple Cameras
Post by: Jay on June 27, 2010, 09:35:01 PM
dean.testa -  Does this only happen when you use the batch file to launch the iCamSources, or does this happen anytime you have two iCamSources running?

Are the Macbook and the Windows machine connected to the same local network?

Do you see this behavior when your iPhone is connected to the same local network as the Windows machine, or when your iPhone is connected to a remote network (3G, other Wi-Fi)?
Title: Re: Auto-Start Multiple Cameras
Post by: dean.testa on June 28, 2010, 04:08:14 PM
Hi Jay ... it happens anytime I have two iCam sources running on the Windows machine.

yes- the MacBook and Windows machine are connected to the same local network.

i have been testing with my iPhone on the same local network ... just tried 3G with the same result ... will try another Wi-Fi when possible.

Thanks!
DEAN
Title: Re: Auto-Start Multiple Cameras
Post by: Jay on June 29, 2010, 12:50:09 AM
dean.testa - In order to troubleshoot further, I'll need you to email the external IP address of the computer running iCamSource to support@skjm.com. To get that, go to http://whatismyip.com in your computer's web browser.  Please refer to this forum thread in your email.
Title: Re: Auto-Start Multiple Cameras
Post by: viop-ninja on September 20, 2010, 12:17:05 PM
Since this thread is stickied I thought it would be a good idea to ask this question here.

Prior to iCamsource 2.x I was running multiple instances of iCamsource.exe as Windows services, so that they would start automatically in the event the machine was rebooted.  Now of course all that is changed what with the ability in iCamsource to set up as many cameras as you want.

I see the 'auto start' option in iCamsource but I expect you must log in to the computer in order to get iCamsource to start up.  My goal is to get iCamsource started automatically if the computer reboots (automatic service pack installation, etc) so that if I'm not home to log in and start it I can still get it to come on automatically when the machine boots.

So, here's my question.  Can I just re-purpose one of my old Windows services to start iCamsource as a service still, but without the AppParameters being set, so that it just starts iCamsource itself?  Is there a better/easier way to do this?

Thanks.
Title: Re: Auto-Start Multiple Cameras
Post by: icam-c-u on September 20, 2010, 02:12:25 PM
Since this thread is stickied I thought it would be a good idea to ask this question here.

Prior to iCamsource 2.x I was running multiple instances of iCamsource.exe as Windows services, so that they would start automatically in the event the machine was rebooted.  Now of course all that is changed what with the ability in iCamsource to set up as many cameras as you want.

I see the 'auto start' option in iCamsource but I expect you must log in to the computer in order to get iCamsource to start up.  My goal is to get iCamsource started automatically if the computer reboots (automatic service pack installation, etc) so that if I'm not home to log in and start it I can still get it to come on automatically when the machine boots.

So, here's my question.  Can I just re-purpose one of my old Windows services to start iCamsource as a service still, but without the AppParameters being set, so that it just starts iCamsource itself?  Is there a better/easier way to do this?

Thanks.

Some people have reported setting up all the camera's and clicking on auto start and then placing a shortcut in the start up menu to do the trick.
Others use batch files.
Title: Re: Auto-Start Multiple Cameras
Post by: OUAnthony on September 21, 2010, 04:27:59 PM
He's referring to icamsource starting up when the computer turns on...not only when someone is logged in as a user. Viop-ninja, I still use your instructions to run it as a service and deleted the AppParameters from the registry for the icamsource service. Works fine for me. Just make sure that you've previously ran icamsource and input all sources/settings, started icamsource, stopped it (to ensure settings are saved), and then exited it before running the service.
Title: Re: Auto-Start Multiple Cameras
Post by: Intregliaj on October 19, 2010, 09:35:09 PM
I had 1 camera working, added another laptop computer and camera worked fine. I moved the laptop to a different location, restarted my laptop, when I look at my Ipad I see 3 cameras, the two current live ones and a frozen one when I first added the laptop. No matter what I do , I cannot get rid of the 3rd frozen picture from my Ipad. Any ideas??
Title: Re: Auto-Start Multiple Cameras
Post by: Stefan on October 20, 2010, 10:32:19 AM
If there is an extra "frozen" image in iPad you probably have an extra, stale instance of the iCamSource running. Have you tried rebooting your computer?
Title: Re: Auto-Start Multiple Cameras
Post by: Intregliaj on October 20, 2010, 05:23:38 PM
The reboot worked, thanks.
Title: Re: Auto-Start Multiple Cameras
Post by: fungus on April 08, 2013, 01:27:42 AM
Is there a way to make a webpage with multiple camera streams on it?