Any possible way to specify custom storage id/name for images/videos with ptpcam (Ricoh Theta USB API)

I have been trying to save image with custom name without any success. Sending raw command to Ricoh z1 is giving following error.

pi@NanoPi-NEO2:~$ sudo ptpcam -R 0x100e
Sending generic request: reqCode=0x100e, params=[0x00000000,0x00000000,0x00000000,0x00000000,0x00000000]
PTP: Invalid Parameter
PTP: ERROR: response 0x201d

I was successfully able to modify library to save downloaded file with custom name but how can I force RICOH to store with custom name on device itself. My application requires me to keep track of each and every image and I cant do it without my custom identifiers.

Would be thankful for any bit of help

1 Like

This is difficult as you cannot run a plug-in and use the USB API at the same time. Some people have written plug-ins to connect to Arduino, however, this won’t work for a production plug-in. It may work for a prototype or for an experiment.

If you explore that route, make sure you understand that you need to connect the camera to Vysor to use the USB port every time you reboot the camera. This setting is not saved after a reboot. This is a problem for many uses, but maybe not for an experiment.


IMO, your best course of action is to have a counter for the number of pictures, then transfer it to your Pi over the USB cable and then change the name on the Pi.

You can also write a plug-in to change the names on the camera as a batch after the pictures are taken.

Can you provide more information on your experiment, especially the trigger and sequence requirements of the 360 pictures?

This project may be of interest

He’s powering the Raspberry Pi with Power over Ethernet and a USB converter. He’s taking a picture and then pushing it to a networked server. If your project allows you to change the filenames on the Pi or in the cloud, it will be easier for you.

Thanks for your reply. Actually as of now I have been doing as you suggested. I captured the picture and downloaded it at the same time with custom name. But my application now requires very fast switching between image and video capture for a SLAM application. I have to capture an Image and rapidly change the mode back to video and start capturing video. This alternation can go for a while and I cant wait in between for images and video to download. It is supposed to be a realtime operation. I will explore more options and share my experience. Meanwhile any suggestions / help would be really appreciated.

Do you need the USB cable connection to trigger the switching?

If you use Wi-Fi, you can use the plug-in to switch between modes with custom file names assigned to the image using the CameraAPI.

You can also connect the THETA V with Ethernet using USB OTG.

Are you switching between the still image and the video because you want the higher resolution of the still image?

I guess it’s not feasible to use a secondary camera to take the still image when the video analysis triggers it? Maybe too much weight or cost?

1 Like

Yes I was trying to minimize weight and cost.

Thats exactly what I want.

I will try to explore the option you suggested for using a separate camera. I think its not feasible to switch modes as the device is busy on most of the occasion and I am unable to achieve realtime performance.