Rename all files to BURST format

Started by lmiol, October 17, 2022, 03:04:38 AM

Previous topic - Next topic

lmiol

Hi!
Google Photo can use BURST format
it means 4 images (for example) are shows like 1 block of images with 4 frames.
google photo app recognize it by img name, for example
IMG_1_BURST20221017194216846.jpg
IMG_2_BURST20221017194216846.jpg
IMG_3_BURST20221017194216846.jpg
IMG_4_BURST20221017194216846.jpg

this is very usefull when you do 4 shots at once and photo gallery is look more compact: 1 photo block instead of 4

So my question is
How to determine only first photo in folder and check exifdata modifydate (and time) of it, then rename all images into this modifydate using format with different numbers (edit exifdata not required)

IMG_1_BURST20221017194216846.jpg

Phil Harvey

I don't know what the "846" in those file names represents, but otherwise this command may do what you want:

exiftool "-testname<IMG_%nC_BURST${createdate}.%e" -d %Y%m%d%H%M%S DIR

Note that this will also rename files that were not in bursts.

If you are happy with the output of this command, change "testname" to "filename" to actually do the renaming.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

lmiol

Quote from: Phil Harvey on October 17, 2022, 06:43:49 AMI don't know what the "846"
probably miliseconds, which puted only to filename by googlecamera app (miliseconds not exists in exifdata as i know)
i think 000 can be used for this

lmiol

Quote from: Phil Harvey on October 17, 2022, 06:43:49 AMNote that this will also rename files that were not in bursts.
hmm it seems files is not been renamed

Warning: No writable tags set from DIR/IMG_20221017_194216846.jpg
Warning: No writable tags set from DIR/IMG_20221017_194218247.jpg
Warning: No writable tags set from DIR/IMG_20221017_194219341.jpg
Warning: No writable tags set from DIR/IMG_20221017_194221881.jpg
    1 directories scanned
    0 image files updated
    4 image files unchanged

lmiol


Phil Harvey

Try using DateTimeOriginal instead of CreateDate in the command.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

lmiol

Quote from: Phil Harvey on October 17, 2022, 07:45:09 AMTry using DateTimeOriginal instead of CreateDate in the command.
nope, doesn't work, same error
i am using exiftool last version 12.4.8.0

Phil Harvey

Use this command to see what date/time tags are available, and choose one of them:

exiftool -time:all -s FILE

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

lmiol

Quote from: Phil Harvey on October 17, 2022, 08:38:11 AMUse this command to see what date/time tags are available, and choose one of them:

exiftool -time:all -s FILE
FileModifyDate                : 2022:10:17 19:42:40+03:00
FileAccessDate                 : 2022:10:17 19:53:25+03:00
FileCreateDate                 : 2022:10:17 19:42:05+03:00
ModifyDate                      : 2022:10:17 19:42:05
DateTimeOriginal             : 2022:10:17 19:42:05
CreateDate                       : 2022:10:17 19:42:05

it seems problem somewhere else

Phil Harvey

The quoting I gave is for a Windows CMD shell.  You may have to use single quotes if running in something else.  Otherwise, make sure you have typed everything correctly because that command should work.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

lmiol

Quote from: Phil Harvey on October 17, 2022, 08:46:23 AMYou may have to use single quotes
single quotes doesnt work too
C:\lab>exiftool '-filename -d mHS DIR 0<IMG_e'
The system cannot find the file specified.

Quote from: Phil Harvey on October 17, 2022, 08:46:23 AMmake sure you have typed everything correctly because that command should work.
I just copy your string without any changes

Phil Harvey

Quote from: lmiol on October 17, 2022, 10:47:14 AMC:\lab>exiftool '-filename -d mHS DIR 0<IMG_e'
The system cannot find the file specified.

Wow.  There is so much wrong with this I don't know where to start.  It looks nothing like the command I suggested:

Quote from: Phil Harvey on October 17, 2022, 06:43:49 AMexiftool "-testname<IMG_%nC_BURST${createdate}.%e" -d %Y%m%d%H%M%S DIR

It seems you are running under Windows.  Are you using CMD or PowerShell?

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

lmiol

Quote from: Phil Harvey on October 17, 2022, 10:54:46 AMWow.  There is so much wrong with this I don't know where to start.  It looks nothing like the command I suggested:
No, this is error in window
Inside file the string is right:


Quote from: Phil Harvey on October 17, 2022, 10:54:46 AMIt seems you are running under Windows.  Are you using CMD or PowerShell?

tried both

lmiol

exiftool "-filename<IMG_%%nC_BURST${CreateDate}.%%e" -d %%Y%%m%%d%%H%%M%%S *jpg
pause
This works fine (double %)

lmiol

But it catch CreateDate from every file and put it to same filename
result:


But it should catch CreateDate only from First file in list and put to every filename. It is possible?