trigger Sony camera via python

Hi everyone,

I hope this is the right forum!

Does anyone have some hands-on experience with programmatically controlling a Sony A7RIV or A7RV through a python interface? I have some python code that controls a rotation customized platform and I’d like to trigger the camera at specific events. I can’t use any other motion-controlled turntables.

I found the libsonyapi package (GitHub - petabite/libsonyapi: Python binding for the Sony Camera API), but this package uses the discontinued Sony Camera Remote API but not the current Camera Remote SDK. I was able to control the camera using the latter in C++, but what I actually need is to do this via python, and I really don’t want to code up any python wrappers for that library.

The only requirements I have is to send a signal to the camera to trigger it and this should be done via python. It doesn’t need to be a direct connection to the camera via USB or Wifi, any signal to trigger (via Bluetooth, shutter cable, remote) would work, as long I can do this via python.

Does anyone have experience with that?

Thanks in advance!

1 Like

If you camera is supported by gphoto2, then you can use GitHub - jim-easterbrook/python-gphoto2: Python interface to libgphoto2

2 Likes

Almost all Sonys are supported by libgphoto2 - sometimes there are reliability issues though.

An alternative would be Amazon.com plus a relay like Amazon.com

Seems the OP might be in luck, as support was added to libgphoto2 2.5.31 just 2 weeks ago.

I think SwitchBot devices are kind of cute: https://us.switch-bot.com/collections/hot-sales/products/switchbot-bot

Wow, many good suggestions! I’ll try libgphoto2 first and then work from there, try the hardware. I was tempted to use a relay, but I was afraid frying the camera.
Thanks so far, will report back what works.

@scivisalot did libgphoto2 work for you?