multicam.lua remote shoot - General Help and Assistance on using CHDK stable releases - CHDK Forum

multicam.lua remote shoot

  • 3 Replies
  • 156 Views
multicam.lua remote shoot
« on: 22 / December / 2019, 07:14:42 »
Advertisements
Hi


Anyone know how to trigger remote shoot using multicam.lua? I see a function `shoot` but there doesn't seem to be one for remote shoot.


Any advice appreciated.

*

Online reyalp

  • ******
  • 12440
Re: multicam.lua remote shoot
« Reply #1 on: 22 / December / 2019, 15:15:28 »
Anyone know how to trigger remote shoot using multicam.lua? I see a function `shoot` but there doesn't seem to be one for remote shoot.
multicam.lua doesn't support remote shoot. The main reason is that chdkptp only actually operates on one camera at a time, so the performance advantage would be minimal with more than a few cameras. Say a camera takes one second to save an image to SD, and one second transfer an image over USB. With one camera, using remoteshoot skips the SD write, so the total time is one second. With 10 cameras, the writes to each cameras SD card happen in parallel, so total SD write time is still only one second, but transfer is sequential, so it takes 10 seconds whether you use remoteshoot or not.

That might still be worth it in some cases, but it would be complicated to implement.
Don't forget what the H stands for.

Re: multicam.lua remote shoot
« Reply #2 on: 22 / December / 2019, 20:59:41 »
Anyone know how to trigger remote shoot using multicam.lua? I see a function `shoot` but there doesn't seem to be one for remote shoot.
multicam.lua doesn't support remote shoot. The main reason is that chdkptp only actually operates on one camera at a time, so the performance advantage would be minimal with more than a few cameras. Say a camera takes one second to save an image to SD, and one second transfer an image over USB. With one camera, using remoteshoot skips the SD write, so the total time is one second. With 10 cameras, the writes to each cameras SD card happen in parallel, so total SD write time is still only one second, but transfer is sequential, so it takes 10 seconds whether you use remoteshoot or not.

That might still be worth it in some cases, but it would be complicated to implement.


I see. One thing I don't quite understand is (I'm very new, so please bear with me). When using `multicam`, the following gives an error "not connected":

Code: [Select]
!mc=require('multicam')
!mc:connect()
!mc:start()
!mc:cmdwait('rec')
shoot


But this doesn't:


Code: [Select]
connect
rec
shoot
rs dir -jpg


Is it because, in the first example, the camera is connected via the `mc` package whereas the second via `cli`?
« Last Edit: 22 / December / 2019, 21:18:11 by dayzman »

*

Online reyalp

  • ******
  • 12440
Re: multicam.lua remote shoot
« Reply #3 on: 22 / December / 2019, 22:05:01 »
I see. One thing I don't quite understand is (I'm very new, so please bear with me). When using `multicam`, the following gives an error "not connected":

Code: [Select]
!mc=require('multicam')
!mc:connect()
!mc:start()
!mc:cmdwait('rec')
shoot
...
Is it because, in the first example, the camera is connected via the `mc` package whereas the second via `cli`?
Pretty much. If you want to shoot with multicam, you should use !mc:shoot().

The normal CLI only has a single connection, which is in the global variable con.

Multicam keeps a list of connections in mc.cams, which is not normally connected to the CLI con.

You can actually set CLI con to point at one of the multicam connections, like
!con = mc.cams[1]
but many CLI commands will fail if the multicam camera side script (that you start with mc:start()) is running. So if you want to use regular CLI commands on a single camera in your multicam rig, you should normally use something like
Code: [Select]
!mc:cmdwait('exit')
!con = mc:find_id(... id of camera you want to work on ...)
... do your CLI stuff here ...
!mc:start()
Don't forget what the H stands for.


 

Related Topics