TwoCamControl.ahk - version 2018-11-13 - by Nod5 - GPLv3
Windows frontend for chdkptp with two cameras.
Shoot two cameras at (almost) the same time and quickly.
Save each photo directly to the PC.
Trigger cameras with a GUI button, keyboard or mouse wheel.
Autonames files in sequence
Controls - Basic Workflow
- When the settings are good start a
- Two Canon cameras with CHDK installed. Use the latest development version of CHDK.
- The cameras must have filewrite support. See FWT column here:
- LibUSB drivers installed for both cameras on PC.
- chdkptp downloaded and unzipped.
- Only if you want to run/build TwoCamControl from source:
Install AutoHotkey https://autohotkey.com and save the .ahk with UTF-8 BOM encoding
Required Setup in TwoCamControl
- Set workdirectory path
- Set path to
- Set right camera serial
Optional Settings (Default Value)
- Auto zoom (0) Auto zoom this number of steps when right/left camera connects.
- Wait (400) Wait this number of miliseconds before the camera shoots. Use this to add a delay in a hardware setup where shoots are triggered by a mousewheel that the platen touches on its way down. Set to 0 for no delay.
- Mousewheel (off) Mouse wheel down triggers a shoot.
- Numpad keys (off) Activate numpad key controls (see below).
- Space (off) Space button triggers a shoot.
- PC Save (on) Save images directly to PC. Uncheck to save to camera SD cards (not to PC). Save to SD mode uses chdkptp "shoot" command with parameters set by user in the rsint options field. Try parameter raw=1 for raw shoot.
- Alt Zoom (off) Use click('zoom_in') method instead of the default set_zoom method. If this is checked then the numbers in the auto zoom settings are interpreted as the number of click zoom actions to auto perform on connect.
- rsint options (-cmdwait=600 -tv=1/160) parameters for the
rsintcommand. See file
USAGE.TXTin chdkptp for more.
cmdwaitis the number of seconds until rsint times out.
- extraprocess () Path to some external tool to run at project start. Example:
C:\folder\program.exe. TwoCamControl sends the project name as a command line parameter. The project name is a timestamp (YYYYMMDDhhmmss).
On Main tab: Click on green text for a single session change of that setting.
Reset to default settings: delete
TwoCamControl.ini and restart TwoCamControl.
Controls - Tips and Tricks
Controlto apply zoom or focus command only to right/left side camera.
Mouse wheeldown: Shoot photo. Useful with a wireless mouse.
Space: Shoot photo.
Numpadkeys. Useful with a wireless numpad.
3= camera LCD display on/off (save battery)
4= connect cameras
5= zoom in 5%
+= zoom in minimal step
-= zoom out minimal step
6= focus lock
7= new project
8= shoot photo
2are modifier keys:
1= only apply to left camera
2= only apply to right camera
0= reverse action (zoom out, focus unlock)
- Numpad modifier examples:
5= zoom in 5% left camera
6= focus lock right camera
5= zoom out 5%
6= focus unlock
5= zoom out 5% left camera
Zoom Out: zoom in/out minimal step. Useful for fine tuning zoom position.
Preview: menu to show the same preview again.
Pause: menu to cancel current project but keep cameras connected.
Clickon green text for a single session change of that setting.
NumpadEnter: save a textfile with current page count, for example
0004.txt. Useful as a reminder for post shoot file check. For example when a page was accidentally shot twice.
CloseTwoCamControl: also powers off cameras.
GitHub , https://github.com/nod5/TwoCamControl
DIY Book Scanner forum , https://forum.diybookscanner.org/viewtopic.php?f=20&t=3082
Q What if camera serial setup step fails?
A Set camera serial manually: plug in and power on camera, open a cmd window in the chdkptp folder, run the command
chdkptp.exe -elist and look for the serial. It looks something like this: DC3E13D4111234B2A23CC31F2E3AA5 . TwoCamControl uses the serial to identify which camera is which.
Q What if the above manual command
chdkptp.exe -elist returns no serial?
A Reinstall LibUSB for that camera. Also double-check that the camera is on, plugged in, and that the cmd window path is in the chdkptp folder.
Q How to solve
ERROR: not in continous mode?
A Power on the camera with CHDK on the SD card without connecting it to the PC, press
func button on the camera, go to the menu item that allows setting continuous mode and turn it on. Power off the camera. Then try TwoCamControl again.
Q What if the chdkptp cmd window shows error about filepath or incorrect characters?
A Try changing workdirectory path to not include special or non-english characters. Test with only a-z 0-9 space.
Q What if chkdptp cmd window still shows error about filepath or incorrect characters?
A See notes_on_character_errors.md
Q Can I use TwoCamControl with only one camera?
Q What Windows version does TwoCamControl require?
A TwoCamControl is only tested in Windows 10 x64. It might work in earlier Windows.
Q How does zoom work in TwoCamControl?
A In default mode there are two zoom actions. You can zoom in/out a big amount (5% of the camera's zoom range) or a minimal amount (2 steps if the camera has a 60+ zoom range, otherwise 1 step). This is done using the chdkptp commands zoom_set and zoom_set_rel. The non-default "Alt Zoom" mode can be enabled in Setup. There TwoCamControl uses the chdkptp command click('zoom_in'). Use the non-default mode if the default mode causes errors or causes distortion in the .jpg files where lines become curved similar to a fish lens effect. Only some cameras have that problem. Read notes_on_zoom_methods.md for more.
Q What if my question/issue/suggestion is not in this FAQ?
A Open an issue at GitHub and describe the problem. Include these details: Your camera model, the version of CHDK, chdkptp and TwoCamControl, and Windows version and language.