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

Multi-camera setup project.

  • 462 Replies
  • 123315 Views
*

Offline reyalp

  • ******
  • 12942
Re: Multi-camera setup project.
« Reply #360 on: 23 / June / 2016, 20:32:34 »
Advertisements
I recently found out that someone can issue commands through the serial port of these projectors..either with python scripts or simply by creating plain text files with the desired commands and "copying" these texts over the serial port of the projector.

Question is , can we use some way and issue these commands (with any way i dont really care which one) through chdkptp ?
chdkptp can execute external commands with the normal lua os.execute function. So if you have a python script or whatever that sends the commands, you could just run that.
On some OSes you might also be able to write to the serial port using regular lua IO calls.
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 12942
Re: Multi-camera setup project.
« Reply #361 on: 26 / June / 2016, 20:28:05 »
Quote
Regarding your problem with burst shooting:
I'm still thinking about it, I just had some stuff come up that doesn't leave me with much time for CHDK. Maybe after the weekend I'll have something to test.
Any input on it will be much appreciated and useful.
To test shooting rate using on a single camera without involving PTP, you can use my fixedint.lua script
http://chdk.wikia.com/wiki/Lua/Scripts:_Fixed_Exposure_Intervalometer

Doing this should give a good idea what your cameras are capable of sustaining. If the result is much different from what you see with multicam burst, there is likely a bug somewhere.

To test, upload the script and run it on the camera without PTP connect, using the following settings in the script menu
Shots 10
Interval 0
User raw no
Tv 1/64 (not 64)
Use cont mode if set (unchecked)
Log mode Append

Other settings can be left on default values.

Run the script again with "use cont mode if set" and continuous mode enabled in the Canon UI.

When you run the script, it will create (or append to) a log file called fixedint.csv in the root of the SD card. With interval set to 0, the "sleep" column will give you the negative of the time between shots. Please upload the log here.

Don't forget what the H stands for.

*

Offline mphx

  • ***
  • 210
Re: Multi-camera setup project.
« Reply #362 on: 26 / June / 2016, 23:12:47 »
Hey ,


Right now i have 2 x ixus 160 in my home and i can test it. Theoritically under the same setup , A2500 should perfom more or less the same since they have the same specs (0.8 shoots per second).


So (in theory) the two ixus i have here , must perform (when they are in ptp connection and having the same setup) with the times that the one of them did with this script...riiiiight?


The results are .. https://www.dropbox.com/s/bq9r95xoqdhdd4d/fixedint.csv?dl=0


So if i get this right.. a rig of x ixus can go as low as ~1.7-1.8 secs between shots regardless the number of them ?(of the cameras)
Always in theory...

*

Offline reyalp

  • ******
  • 12942
Re: Multi-camera setup project.
« Reply #363 on: 26 / June / 2016, 23:45:30 »
Right now i have 2 x ixus 160 in my home and i can test it. Theoritically under the same setup , A2500 should perfom more or less the same since they have the same specs (0.8 shoots per second).
In theory, but I would highly recommend testing using the actual camera and cards used in the rig
Quote
So if i get this right.. a rig of x ixus can go as low as ~1.7-1.8 secs between shots regardless the number of them ?(of the cameras)
Always in theory...
If you want sync, the interval has to be longer than the longest time, so in practice you'd want some margin. I'd guess 2 seconds should be achievable, though you might find there are longer outliers with a bigger sample size than 10. It may also depend on the SD card, beyond just the "class" speed, they have wear leveling and garbage collection logic that can cause unpredictable performance.

It looks like adding continuous mode saves roughly 200ms, so adding support for that in multicam would let you go a bit shorter on this camera. I'm working on this along with some other changes that will give us timing information.
« Last Edit: 26 / June / 2016, 23:47:03 by reyalp »
Don't forget what the H stands for.


*

Offline reyalp

  • ******
  • 12942
Re: Multi-camera setup project.
« Reply #364 on: 27 / June / 2016, 02:10:46 »
I checked in some changes to multicam.lua

It now records timing information. To see this, use
!mc.verbose=true
before sending !mc:shoot
For each camera, there will be a line in the status
  msg="1 w:368 i=0, 2 w:1068 i=2000, 3 w:1048 i=2000, 4 w:1058 i=2000",
The first number is the shot number
w is the amount of time waited for the shot. i is the amount of time between shots.

If w is negative for the first shot it means synctime was too low. For subsequent shots, it means the interval is too low. If everything is working, i should be within a few 10s of ms of the interval.

I also added support for continuous mode. It will be used by default if continuous shooting is enabled in the Canon UI. To turn it off, you can send cont=false in the mc:shoot options.

Testing with 4 cameras (a540, d10, elph130 and sx160) an interval of 2 seconds seemed to work fine for me, although I only used a online stopwatch page to check sync so it wasn't very rigorous.
Don't forget what the H stands for.

*

Offline mphx

  • ***
  • 210
Re: Multi-camera setup project.
« Reply #365 on: 27 / June / 2016, 04:14:41 »
ok i did a test with 2x ixus 160 (continuous mode off / interval 2000msecs)


msg="1 w:45 i=0, 2 w:115 i=2000" (camera #1)


msg="1 w:50 i=0, 2 w:130 i=2000" (camera #2)


These numbers change very little during the shooting .Shots "sound" synced .I used like 20-30 shots to test it extensively.


I can say that 2000msecs is a safe interval.How sure we are that this interval will work the same way with more cameras (with the same configuration apparently)?
Theoritically it should work..right?


EDIT:


Lets say i want to change "review image after shooting" parameter to all cameras in the studio.
Reading http://chdk.wikia.com/wiki/User:Srsa_4c/UI_properties and the thread , i cant say i understood everything :)


As far as i can tell i need two things :

1. Address of the function i need to change.
2. The actual command to do the change.

For ixus 160 i found the address , someone in that thread had mapped ixus 160 functions.So how do i change function's values through chdkptp?Just to test that it works.

If i want to do the same for A2500s in the studio how can i find the address of the function , since i assume it would be different from the one , ixus 160 has.

Thanks
« Last Edit: 27 / June / 2016, 05:53:27 by mphx »

*

Offline reyalp

  • ******
  • 12942
Re: Multi-camera setup project.
« Reply #366 on: 27 / June / 2016, 22:57:19 »
I can say that 2000msecs is a safe interval.How sure we are that this interval will work the same way with more cameras (with the same configuration apparently)?
Theoritically it should work..right?
In theory.

Quote
1. Address of the function i need to change.
2. The actual command to do the change.
You need the ID of the UI property, and the values. To change it, you can use the eventprocs mentioned in the forum thread.

To find the ID and values
In the debug menu, set the "ALT +/- debug action" to CmpUIP
enter alt and press the debug key
leave alt and change the setting
enter alt and press the debug key again
The differences in UI prop values will be displayed

The debug key is port specific. It should be shown in the alt help screen.

However, on D10, review time doesn't appear to be a UI prop. It does appear to be one (ID 129) on ixus140_elph130, which was released much closer to a2500.
Don't forget what the H stands for.

*

Offline mphx

  • ***
  • 210
Re: Multi-camera setup project.
« Reply #367 on: 28 / June / 2016, 04:31:25 »
I can say that 2000msecs is a safe interval.How sure we are that this interval will work the same way with more cameras (with the same configuration apparently)?
Theoritically it should work..right?
In theory.

Quote
1. Address of the function i need to change.
2. The actual command to do the change.
You need the ID of the UI property, and the values. To change it, you can use the eventprocs mentioned in the forum thread.

To find the ID and values
In the debug menu, set the "ALT +/- debug action" to CmpUIP
enter alt and press the debug key
leave alt and change the setting
enter alt and press the debug key again
The differences in UI prop values will be displayed

The debug key is port specific. It should be shown in the alt help screen.

However, on D10, review time doesn't appear to be a UI prop. It does appear to be one (ID 129) on ixus140_elph130, which was released much closer to a2500.


call_event_proc("PTM_SetCurrentItem",0x800c,0) didn't work with the 2 ixus at home (where 0x800c and value i put the correct ones ofc).Unless the syntax is different than the above and i don't know it :)
(And by "didn't work" i mean the command produced error , it didnt get through to the cameras , i can copy/paste the error when i get back home and repeat it)

I will follow the steps u mention for finding out the exact address in A2500s (if the specific function  has an address in this camera) and see what happens.

EDIT : it seems i am losing something as far as A2500 is concerned.I dont find any reference about "debug key" in alt help menu.Check the photo below (not the best but u can see what it displays :P )

https://www.dropbox.com/s/hl05ycl3mhazrih/20160628_121350.jpg?dl=0

Maybe its chdk-version related?A2500s run chdk 1.3.0

EDIT 2 :

I changed manually the settings of 8x A2500s to "play" with the intervals.At 2000msecs 1-2 double shots were synced , the rest not.At 2500msecs , same result.Some synced , some not.
« Last Edit: 28 / June / 2016, 05:40:13 by mphx »


*

Offline reyalp

  • ******
  • 12942
Re: Multi-camera setup project.
« Reply #368 on: 28 / June / 2016, 13:46:17 »
call_event_proc("PTM_SetCurrentItem",0x800c,0) didn't work with the 2 ixus at home (where 0x800c and value i put the correct ones ofc).Unless the syntax is different than the above and i don't know it :)
(And by "didn't work" i mean the command produced error , it didnt get through to the cameras , i can copy/paste the error when i get back home and repeat it)
If there was an error message, that probably means you didn't use the correct syntax to send the command. Assuming you doing this with regular chdkptp (not through multicam) you should use something like
Code: [Select]
=return call_event_proc("PTM_SetCurrentItem",0x800c,0)
Note that you have to call the eventproc registration function first (once after startup, not before every PTM_* call), like
Code: [Select]
=return call_event_proc("UI.CreatePublic")
For both of these, if the return value is -1, the function doesn't exist or isn't registered.

Quote
it seems i am losing something as far as A2500 is concerned.I dont find any reference about "debug key" in alt help menu.Check the photo below (not the best but u can see what it displays :P )
It's there in your photo: DISP Alt +/- Debug action

Quote
I changed manually the settings of 8x A2500s to "play" with the intervals.
I would suggest starting with just one or two. As I've said before, there really shouldn't be a difference, and it will be easier to keep track of the results.
Quote
At 2000msecs 1-2 double shots were synced , the rest not.At 2500msecs , same result.Some synced , some not.
Were you using the most recent multicam.lua?
What were the status values?
Have you run fixedint.lua on one of these cameras?
Don't forget what the H stands for.

*

Offline mphx

  • ***
  • 210
Re: Multi-camera setup project.
« Reply #369 on: 28 / June / 2016, 15:39:18 »
Code: [Select]
=return call_event_proc("UI.CreatePublic")
and

Code: [Select]
=return call_event_proc("PTM_SetCurrentItem",0x800c,0)
did the trick AFTER

1.I enabled "native lua calls" on the cameras .

2.I single-connected the camera to chdkptp (not using multicam).


But the idea was , to change the setting on all A2500s at the same time.If i have to connect each one of them , one by one , is pointless :)


[quote]It's there in your photo: DISP Alt +/- Debug action
Ok , seriously i feel dumb , what is the debug key according to this ? :)

Quote
I would suggest starting with just one or two. As I've said before, there really shouldn't be a difference, and it will be easier to keep track of the results.
We had tested 4 of them , and the results were more or less the same.
One thing i noticed today when i was testing the 8 A2500s was that , if the cameras were idle for some minutes , shots were synced (i am always referring to second shots).
When i was doing some other action e.g. deleting photos and then issuing double shot right after ,shots were out of sync...
Maybe my imagination maybe not.Like , cameras were occupied from previous "job" and when i was issuing shooting commands they weren't able to execute them correctly...
Cameras (those 8 )  had the exact same settings (i set them up manually).

Quote

Were you using the most recent multicam.lua?
What were the status values?Have you run fixedint.lua on one of these cameras?


Nope , there were some shootings the last days , didn't want to mess up with multicam or any other file.
So for your next 2 questions the answers are obvious...no status values , no running fixedint.lua.

Thing is that we are about to setup a rig with ixus 160.So we are more concerned about ixus and the lowest times they can achieve , than A2500s.
Achieving a lower time than the current 5secs with A2500s is secondary thing ..but ofc we'd like to lower their time too at some point.Testing with them is a bit delicate matter since its "production" rig and i wouldn't like to fck it up while shooting is pending
:)
« Last Edit: 28 / June / 2016, 15:44:11 by mphx »

 

Related Topics