Changing the default file name in the THETA Z1

I am using several THETA Z1 cameras on a large project. When I download the files to folders I am having trouble with having files with the same name from multiple cameras.
Is there a way that I can change the “R” to a different letter on each camera? Or better yet have the date/time or gps information as the file name?
Thank you,
Kevin

How are you connecting the camera to the computer? Are you using Wi-Fi or a USB cable?

Are you building your own software? Or, are you trying to find an existing package to do this?

I was coincidentally just testing this with Wi-Fi using a custom application.

If you’re writing your own program, then create a loop for the custom filename.

example with psuedocode

  arrayHoldingFilename = []
   customPrefix = 'SQ'
   startNumber = 100001
   for i=0; i < maxFilesOnCamera; i++;   
       filePath = appDocumentsPath/ + customPrefix + startNumber + '.JPG'
       arrayHoldingFilename.add(filePath)

You could also download the files and then run a script to batch change all the filenames.

1 Like

I am using USB connection.
I would like to be able to change the default file tag on each camera. ie A1000001 B1000001 C1000001 etc. however I would be willing to code as a last resort but would much rather have someone else do that for me and pay them so that I can concentrate on my work at hand.
I have been doing the script thing on downloads but still a step I would like to avoid.
Thank you so much for providing the example code I may attempt to use it!

If you want to store the files in DCIM/ on the camera, you can use a plug-in. The plug-in runs inside the camera.

https://theta360developers.github.io/plugin-guide/concept/#example-construction-concept

image

This is an old example of plug-in code.

We have a listing plug-in developers with access to a camera and can contact them to see if they can write a plug-in for your requirements for some payment. The basic concept of the plug-in is simple, but the difficult part is making it business-ready and polished for real-world use.

code below is a snippet for INSIDE the camera

The plug-in can save the image with any filename.

private Camera.PictureCallback mJpegPictureCallback = new Camera.PictureCallback() {
    @Override
    public void onPictureTaken(byte[] data, Camera camera) {
        mParameters.set("RIC_PROC_STITCHING", "RicStaticStitching");
        mCamera.setParameters(mParameters);
        mCamera.stopPreview();

        String fileUrl = "/storage/emulated/0/DCIM/Construction/room01sect01.jpg";
        try (FileOutputStream fileOutputStream = new FileOutputStream(fileUrl)) {
            fileOutputStream.write(data);
        } catch (IOException e) {
            e.printStackTrace();
        }

        mCamera.startPreview();
    }
};

Example of prefix from inside the camera with iteration through different file names.

if (roomNumber > 9)
{
    roomNumberStr = Integer.toString(roomNumber);
} else {
    roomNumberStr = "0" + Integer.toString(roomNumber);

}


String fileUrl = "/storage/emulated/0/DCIM/Construction/room" + roomNumberStr + "sect01.jpg";
try (FileOutputStream fileOutputStream = new FileOutputStream(fileUrl)) {
    fileOutputStream.write(data);
    roomNumber = roomNumber + 1;

instead of changing the filename, would it be sufficient to ID the camera by the serial number? The serial number is embedded in the MakerNote of the exifdata.

Craig,
Thank you for your help on this. You have provided great options to solve my issue!
Kevin

1 Like