27 January, 2015

Comtrol DSLR camera via USB from commandline in Linux

My first gphoto2 image

Install gphoto2

# sudo apt-get install gphoto2
Run gphoto2 from the commandline. Here are some options:

# gphoto2 --capture-image-and-download

The camera will take a picture, and save it to the active folder.

# gphoto2 --list-device

Will tell the name of your camera.

On my SONY A58 the USB-setting in the menu must be "remote PC".

For samples see the man file, or "Using gphoto2".

After installing gphoto2 you can write a bashscript and call it automaticly via anacron or crontab.

In order to see whether your PC is able to connect to the cam, try this:

# gphoto2 --auto-detect

Model                          Port                                           
Sony SLT-A58 (Control)         usb:001,015    

No comments: