1

Maybe this question was ask before, but now is 2020 and maybe there is something new on the internet :))

I take burst mode photos with my camera. But they are so hard to sort, because of the amount of images. Also I work on Lightroom Classic, and my computer can't handle so many photos opened once. What I am searching for is software or a script that can/will group photos that were taken between an interval of seconds (5 second for example) and put them in one folder.

For example, if there are 30 photos, and the first one was taken at 10:10:15, the 10th one at 10:10:20 and the other ones were take after 10:10:21. It this case, there will be two folders, one with photos between 10:10:15 and 10:10:20, and the second folder with the rest.

I know that Lightroom has a similar feature, but it doesn't help me, I need folders :))

Thank you in advance!

(or maybe a software that scan similar photos, and photos that look like each other are put it in different folders, idk )

  • It would be useful to specify your OS, even if it can be assumed to be Windows since it's missing. And do your files keep the shooting timestamp when they are imported or do they get reset to the time of import? – xenoid Feb 10 at 7:16
  • Yep Windows :)) sorry about that And yes, it keeps the timestamp – bargastef Feb 11 at 13:20
0

Adobe Bridge may not automatically stack sequences, but it can be used to create stacks and then carry out operations on those stacks. I'm assuming (untested) that this includes moving them to new directories.

Adobe Bridge is free, and a lot faster than Lightroom when viewing thumbnails. You don't need to import images, it simply operates on the filesystem.

This doesn't solve your entire issue, since I don't think it'll do the stacking automatically (it will for Panorama or HDR, but I'm not sure if the HDR will catch your burst sequences).

| improve this answer | |
  • ok I will try it – bargastef Feb 11 at 13:21
0

May be you could find some one to write a script.

Warning: Moving the files needs to be done nefore importing into Lightroom otherwise the synchronization with it is lost.

In python that looks like

""" 
Tool for the management of photograph files taken in burst

Creates a sub directory for each burst of images
Moves all the files of images taken in a burst to the directory they belong

A burst is defined as the set of files for which 
the times they have been taken do not have a gap of more of  a delay

Author: hpchavaz
License: MIT Henri-Pierre Chavaz, 2020, https://hpchavaz-photography.blogspot.com/

"""
from sys import exit
from os import listdir, mkdir, rename
from os.path import exists, isfile, join, splitext
from shutil import move
from datetime import datetime, timedelta
from exif import Image

# the path to the files
mypath = "J:\DATA\DEV\Python\VS CODE\image\Burst" 

""" Returns the exif datatime_original attribute of an image file if exists or None """
def getimagedate(image):
    while True:
        try: 
            datestr = getattr(image, "datetime_original")
            date = datetime.strptime(datestr, '%Y:%m:%d %H:%M:%S')
            break
        except:
            date= None
            break
    return date


""" Make an ordered list of files with an exif datatime_original attribute """
datedexifimages = []
for fn in [f for f in listdir(mypath) if isfile(join(mypath, f))]:
    with open(join(mypath, fn), 'rb') as image_file:
        image = Image(image_file)
        if image.has_exif:
            date = getimagedate(image)
            if date:
                datedexifimages.append([fn, date])
datedexifimages.sort(key= lambda it: it[1])

""" To facilitate validation before the real commands are played
the latter are kept in lists """ 
MkdirList = []   # the list of folders to create
MoveList = []    # the list of files to move
ErrorList = []   # the list of errors (existing files or folders)
PrettyList = []  # the list to print for validation

CurBurstFolderName = "" # the name of folder for the the curent burst

""" Update lists for a new burst  """
def newburst(imgItem):
    global CurBurstFolderName
    nbfn = join(mypath, splitext(imgItem[0])[0])
    if exists(nbfn):
        ErrorList.append("Folder: "+ nbfn + " already exists")
    else:
        CurBurstFolderName = nbfn
        MkdirList.append(nbfn)
        PrettyList.append("NEW BURST: "+ nbfn)

""" Update lists for a new file in a burst """
def inburst(imgItem):
    global CurBurstFolderName
    if CurBurstFolderName != "":
        nfn= join(CurBurstFolderName, imgItem[0])
        if exists(nfn):
            ErrorList.append("Folder: "+ CurBurstFolderName + " : File; " + nfn + "already exists")
        else:
            MoveList.append([join(mypath, imgItem[0]), nfn])
            PrettyList.append("    > "+ imgItem[0]+ " >  " + nfn)

""" Create the lists by collecting image in same burst """
delta = timedelta(0, 1) 
if len(datedexifimages) >= 1:
    burst = False
    for ind in range(1, len(datedexifimages)-1):
        if (datedexifimages[ind][1] - datedexifimages[ind - 1][1]) >= delta:
            burst = False
        else:
            if burst == False: 
                newburst(datedexifimages[ind - 1])
                inburst(datedexifimages[ind - 1])
                burst = True
            inburst(datedexifimages[ind])


print("------------- MkdirList -----------")
[print(i) for i in MkdirList ]
print("------------- MoveList -----------")
[print(i[0], " > ", i[1]) for i in MoveList ]
print("------------- ErrorList -----------")
[print(i) for i in ErrorList]


ui = input("To continue? Y(y)/N: ")
if ui.capitalize() != 'Y':
    sys.exit(-1)

[mkdir(i) for i in MkdirList ]
[rename(i[0], i[1]) for i in MoveList ]
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.