Multi-camera setup project. - page 4 - Creative Uses of CHDK - CHDK Forum

Multi-camera setup project.

  • 462 Replies
  • 212377 Views
*

Offline mphx

  • ***
  • 210
Re: Multi-camera setup project.
« Reply #30 on: 12 / July / 2014, 12:58:56 »
Advertisements
I was reading novsela thread and i see that he is trying something similar with my project,although i believe our cameras wont be on the same level..but anyways.
I was seeing there some very complicated diagrams about the connections of the hubs etc.

I was thinking to use like 8x 10port usb hubs (8 cameras on each of them) and plug them all in 1x 10port usb hub connected to the pc.
A switch on that "last" hub and play with usb-remote and switch on/off method.I know its a very simple concept and i am missing something.

I am guessing it wont work as i imagine right?

Re: Multi-camera setup project.
« Reply #31 on: 12 / July / 2014, 13:09:10 »
I was thinking to use like 8x 10port usb hubs (8 cameras on each of them) and plug them all in 1x 10port usb hub connected to the pc.
A switch on that "last" hub and play with usb-remote and switch on/off method.I know its a very simple concept and i am missing something.
How do you plan to power the 9 USB hubs?

If you want to use CHDK's USB remote "sync" feature,  you need to be able to disconnect the 5V "red" wire to all 80 cameras at exactly the same time.  If you don't want to lose USB communications, then you can't simply turn off the power to all the hubs (even supposing that causes the individual cameras to all see the power go off at exactly the same time).

If you can make reyalp's calibrated sync shooting mode in multicam.lua work acceptably then you are spared the pain of trying to switch the hubs.   Note that your earlier tests on two cameras don't tell you what will happen with 80 cameras - the sync error is not 80x(two camera sync error).   It might actually be okay for your application.
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline mphx

  • ***
  • 210
Re: Multi-camera setup project.
« Reply #32 on: 12 / July / 2014, 16:50:32 »

How do you plan to power the 9 USB hubs?

If you want to use CHDK's USB remote "sync" feature,  you need to be able to disconnect the 5V "red" wire to all 80 cameras at exactly the same time.  If you don't want to lose USB communications, then you can't simply turn off the power to all the hubs (even supposing that causes the individual cameras to all see the power go off at exactly the same time).

Damn damn damn .I was testing all these days with a non-powered usb hub and i thought i was on a powered one.Tell me if i get the concept right.

1. ~64x cameras powered by an adapter kit (dummy battery and stuff).Every 8 of them on a power plug.
2. 8x 10-port usb hubs powered by different power plug(s) (maximum 8 )
3. 1x 10-port usb hub powered .The 8x hubs of step-2 will connect to it.The switch will be on the cable from this hub to pc.

So , if i am getting this right, somehow , when the shoot task is in loop...i have to press switch FIRST and cut power on all hubs AFTER.And after shot is taken.. i have to give power back to hubs FIRST and then press the switch again AFTER.
Am i getting this right?

Quote
If you can make reyalp's calibrated sync shooting mode in multicam.lua work acceptably then you are spared the pain of trying to switch the hubs.   Note that your earlier tests on two cameras don't tell you what will happen with 80 cameras - the sync error is not 80x(two camera sync error).   It might actually be okay for your application.

In other words , you are suggesting to avoid switch thing?Enlighten me a bit about "calibrated sync shooting mode".When i was using multicam commands for shooting (no switch involved) i was using shoot command with syncat parameter.Is there something else there?
Do i have to issue a sync command to ALL cameras with this method?because issuing sync to 8 cameras was taking *some* secs..i cant imagine what time is needed with ~64....

Re: Multi-camera setup project.
« Reply #33 on: 12 / July / 2014, 17:57:10 »
3. 1x 10-port usb hub powered .The 8x hubs of step-2 will connect to it.The switch will be on the cable from this hub to pc.
I don't think that's what you want. See below.

Quote
So , if i am getting this right, somehow , when the shoot task is in loop...i have to press switch FIRST and cut power on all hubs AFTER.And after shot is taken.. i have to give power back to hubs FIRST and then press the switch again AFTER.
Am i getting this right?
No - not really.   What you want is to set things up so that everything is hooked up normally ( i.e. all cameras powered and plugged into a hub,  all the individual hubs connected to a central hub,  and the central hub connected to your PC).    Then you use the PC to issue a "shoot" command to all cameras.  At that point the camera will all start the shooting process and halt just before completing it,  waiting for the USB 5V power at their input jack to go away.  You need to figure out a way to disconnect the USB 5V power (red wire) to each camera at exactly the same time.   

This is exactly what novsela is doing here :  http://chdk.setepontos.com/index.php?topic=11583.msg114297#msg114297


Quote
If you can make reyalp's calibrated sync shooting mode in multicam.lua work acceptably then you are spared
In other words , you are suggesting to avoid switch thing?Enlighten me a bit about "calibrated sync shooting mode".When i was using multicam commands for shooting (no switch involved) i was using shoot command with syncat parameter.Is there something else there?
Do i have to issue a sync command to ALL cameras with this method?because issuing sync to 8 cameras was taking *some* secs..i cant imagine what time is needed with ~64....
I think you can do the sync thing once and then just shoot with the values it figures out.   Have only issued the command once while experimenting but that seems to make sense to me.


FYI : I updated my bcamHost / bcamRem lua scripts :  http://chdk.setepontos.com/index.php?topic=11583.msg114393#msg114393
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 14126
Re: Multi-camera setup project.
« Reply #34 on: 12 / July / 2014, 17:57:49 »
In other words , you are suggesting to avoid switch thing?Enlighten me a bit about "calibrated sync shooting mode".When i was using multicam commands for shooting (no switch involved) i was using shoot command with syncat parameter.Is there something else there?
With the latest lua files from chdkptp svn and CHDK 1.3 (not currently in a release zip, but I'll probably get another one out this weekend), you can use shoot_hook_sync instead of shoot, which should have substantially better sync.
Quote
Do i have to issue a sync command to ALL cameras with this method?because issuing sync to 8 cameras was taking *some* secs..i cant imagine what time is needed with ~64....
Yes, it would be quite slow. It's possible this process could be sped up, but in any case I wouldn't bet much on the reliability with 64 cams.

Note that you should only have to do init_sync once after startup. Doing it after you have switched to rec mode should give more accurate results.

It's possible you could save the sync timings by serial number, or assuming all your cameras are the same model, just come up with empirical values from running init_sync a few times.
Don't forget what the H stands for.

*

Offline mphx

  • ***
  • 210
Re: Multi-camera setup project.
« Reply #35 on: 12 / July / 2014, 18:28:14 »
@waterwingz

Ok time to give another try to chdkptp method (no switch invloved).I dont like to start pulling wires all over the place.

I think your script(s) are what i'd like for my projects but i am not very comfortable with the way they work.
I mean one script on pc , another on cam.I'd prefer multicam.lua way.
I mean , script is running on pc and runs a part of the "code" from itself to the camera.
Can't you do it this way? :)

@reyalp

Just replace shoot() command with shoot_hook_sync()? is that what you mean?

And sync() is still required i suppose even with the above command?

Also , are you saying that i can issue like 20x sync() commands and write down an average sync timing of every camera and issue them through a file somehow?
Can you elaborate more on this thing?


Thanks again all.
« Last Edit: 12 / July / 2014, 18:40:45 by mphx »

Re: Multi-camera setup project.
« Reply #36 on: 12 / July / 2014, 18:37:46 »
I think your script(s) are what i'd like for my projects but i am not very comfortable with the way they work.
I mean one script on pc , another on cam.I'd prefer multicam.lua way.
I mean , script is running on pc and runs a part of the "code" from itself to the camera.
Can't you do it this way? :)
Here's the problem. 

The multicam way loads the same script on every camera and there is no unique way to identify each camera from the host.  What you get is cameras in random order based on how they were enumerated when the USB system connected them. 

What I wanted was to be able to set the camera number based on its physical position on the multicam rig - numbered right to left as they were mounted for example.  Using a unique script on each camera does that.

I guess you could build a PC based table that cross references each camera's unique serial number with a camera number and go at it that way.  It would be a major PITA to setup and edit. 

Or maybe  there is a way to trick the "default script" to read @param values from the camera's A/CHDK/DATA directory.

Alternatively, I could add a "download script" function to bcamHost.lua that would load the same script onto every camera and then reboot the cameras.  As long as you had the script set to autorun on reboot you would be good to go?

I tried to address this here :  http://chdk.setepontos.com/index.php?topic=11631.0 but there was not a lot of interest.
« Last Edit: 12 / July / 2014, 18:40:10 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 14126
Re: Multi-camera setup project.
« Reply #37 on: 12 / July / 2014, 18:49:27 »
Just replace shoot() command with shoot_hook_sync()? is that what you mean?
if you were using mc:cmd('shoot',{syncat=100}) you would use  mc:cmd('shoot_hook_sync',{syncat=100}) instead.

If you were using testshots, you can use mc:testshots({shoot_cmd='shoot_hook_sync'})

Quote
And sync() is still required i suppose even with the above command?
mc:init_sync() is required if you want synchronized commands. It is only required once after mc:connect()

Quote
Also , are you saying that i can issue like 20x sync() commands kai write down an average sync timing of every camera and issue them through a file somehow?
In principle, it seems like this should work. If the camera is on the same interface every time (or the interfaces are all equal), then the delay shouldn't change between sessions.

Some code would have to be written to initialize the values without running init_sync, but this should not be a big deal.
Don't forget what the H stands for.

*

Offline mphx

  • ***
  • 210
Re: Multi-camera setup project.
« Reply #38 on: 12 / July / 2014, 19:10:35 »
@waterwingz

ok i will be honest here.I am covered by multicam.lua , but i am more covered with your scripts.
And "more" means the way *your* download process works with the latest update.

BUT i am not feeling comfortable yet :)
I get the idea why it can't be done the multicam way.An idea just popped my little head.
Isn't any way the host script to "read" the serial numbers and cross reference with a specific number?As you suggested.And then pop up a big-fat font message to respective lcd of the camera.

While trying to play a bit with batch script commands and manipulating folders and files for trying to rename images and put them in one folder (as you did with your script eventually)...i found batch commands that could read the contents of a file with the structure <serial number>=<number> in each line and compare a given string to the first part of every line (that is the serial number part) and take the number as a result and do something with it.
I assume it would be *rather* easy to be done with lua commands...

@reyalp

First of all testshots didn't work for me last time i checked..program unresponsive and had to force close it.
Don't know if it will behave the same with the latest version i compiled for future tests.

I got all 8 cameras here , had only 2 for testing while partner had the rest..so i will try some syncing and shooting and see what will happen.

If you feel like to implement the thing about issuing sync timings through some file...let me know :)

Re: Multi-camera setup project.
« Reply #39 on: 12 / July / 2014, 19:24:58 »
Isn't any way the host script to "read" the serial numbers and cross reference with a specific number?As you suggested.And then pop up a big-fat font message to respective lcd of the camera.
That leaves you with big-fat font messages showing the camera numbers all mixed up and out of sequence on the shooting rig.  I wanted them in order - and if I need to swap out a camera,  I just put the new one in place and set the camera number with the script @param value.

It's really up to you what you are happy with.   Having worked on many networked controller systems, I'm really aware of the need to be able to positively identify each remote unit and its location.

Ported :   A1200    SD940   G10    Powershot N    G16

 

Related Topics


SimplePortal © 2008-2014, SimplePortal