Using USB API (MTP) with libghoto2 and Python bindings on MacOS, Raspberry Pi, Linux, ROS

First, thanks to @Hugues for providing this fix. Amazing that you could figure it out! I can’t even find the documentation for --set-config=/main/actions/opcode=

Second, for @NaokiSato102, the solution works for me. I believe that maybe you are not starting the video or your THETA is mounted as a file system?

Here is my complete test

unmount camera

If the camera is mounted, the commands may not work.

image

set to video mode

Using the API reference, we can see that video mode is hex 0x8002 or 32770 in base 10.

$ gphoto2 --set-config=5013=32770

start video

$ gphoto2 --set-config movie=1

stop video

$ gphoto2 --set-config=/main/actions/opcode=0x1018,0xFFFFFFFF

start video and stop after specified time

$ gphoto2 --set-config movie=1 --wait-event=2s --set-config movie=0 
Behavior with Audio Beep

There is a beep after each command and no errors on the console.

image

checking media

If you mount the camera again, you can see the media.

image

In my test, I have intentionally disabled internal stitching.

I suspect that your camera may be auto-mounting. Please check it and report back.

I have added this test to the USB API documentation on the Linux streaming documentation I am building. I’m providing attribution to Hugues by linking to his profile on this site along with his ID on this site.