[digiKam-users] Renaming pairs of JPG/RAW

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[digiKam-users] Renaming pairs of JPG/RAW

AndriusWild
Hello,

I imported pairs of JPG/DNG files while renaming on import using this pattern:

[date:"yyyyMMdd-hhmmss"]-[file]{range:5,8}


and have noticed that some of the pairs ended up having different file names, e.g. IMPG7125.JPG becomes:

20200206-171436-7125.JPG

while

IMGP7125.DNG becomes:

20200206-171438-7125.DNG


I am wondering if anyone has an idea of what I am doing wrong here.


Thanks,
Andrey
Reply | Threaded
Open this post in threaded view
|

Re: Renaming pairs of JPG/RAW

AndriusWild
Metadata editor (Ctrl Shift M) shows "2020-02-06 5:14:35 PM" for both images actually.
So I am not sure where 36 and 38 seconds come from...

Thanks,
Andrey


On Thu, Feb 6, 2020 at 6:14 PM Andrey Goreev <[hidden email]> wrote:
Hello,

I imported pairs of JPG/DNG files while renaming on import using this pattern:

[date:"yyyyMMdd-hhmmss"]-[file]{range:5,8}


and have noticed that some of the pairs ended up having different file names, e.g. IMPG7125.JPG becomes:

20200206-171436-7125.JPG

while

IMGP7125.DNG becomes:

20200206-171438-7125.DNG


I am wondering if anyone has an idea of what I am doing wrong here.


Thanks,
Andrey
Reply | Threaded
Open this post in threaded view
|

Re: Renaming pairs of JPG/RAW

Maik Qualmann
This problem is not unknown, we also have bug reports for it. Whether the
import tool has a correct date depends on many factors. First, the reading of
metadata must be activated in the digiKam camera settings (slows down the
transmission). For RAW files that are read via the GPhoto interface, we cannot
read metadata via Exiv2, here the file date is only possible. However, the
file date of a camera can differ significantly from the actual date in the
metadata. In short, it is better to rename the file after importing it.

Maik

Am Freitag, 7. Februar 2020, 02:17:52 CET schrieb Andrey Goreev:

> Metadata editor (Ctrl Shift M) shows "2020-02-06 5:14:35 PM" for both
> images actually.
> So I am not sure where 36 and 38 seconds come from...
>
> Thanks,
> Andrey
>
> On Thu, Feb 6, 2020 at 6:14 PM Andrey Goreev <[hidden email]> wrote:
> > Hello,
> >
> > I imported pairs of JPG/DNG files while renaming on import using this
> > pattern:
> >
> > [date:"yyyyMMdd-hhmmss"]-[file]{range:5,8}
> >
> >
> > and have noticed that some of the pairs ended up having different file
> > names, e.g. IMPG7125.JPG becomes:
> >
> > 20200206-171436-7125.JPG
> >
> > while
> >
> > IMGP7125.DNG becomes:
> >
> > 20200206-171438-7125.DNG
> >
> >
> > I am wondering if anyone has an idea of what I am doing wrong here.
> >
> >
> > Thanks,
> > Andrey




Reply | Threaded
Open this post in threaded view
|

Re: Renaming pairs of JPG/RAW

AndriusWild
Thanks, Maik,
I added a warning in the documentation and submitted a merge request on invent.kde.org.

Thanks,
Andrey


On Thu, Feb 6, 2020 at 11:33 PM Maik Qualmann <[hidden email]> wrote:
This problem is not unknown, we also have bug reports for it. Whether the
import tool has a correct date depends on many factors. First, the reading of
metadata must be activated in the digiKam camera settings (slows down the
transmission). For RAW files that are read via the GPhoto interface, we cannot
read metadata via Exiv2, here the file date is only possible. However, the
file date of a camera can differ significantly from the actual date in the
metadata. In short, it is better to rename the file after importing it.

Maik

Am Freitag, 7. Februar 2020, 02:17:52 CET schrieb Andrey Goreev:
> Metadata editor (Ctrl Shift M) shows "2020-02-06 5:14:35 PM" for both
> images actually.
> So I am not sure where 36 and 38 seconds come from...
>
> Thanks,
> Andrey
>
> On Thu, Feb 6, 2020 at 6:14 PM Andrey Goreev <[hidden email]> wrote:
> > Hello,
> >
> > I imported pairs of JPG/DNG files while renaming on import using this
> > pattern:
> >
> > [date:"yyyyMMdd-hhmmss"]-[file]{range:5,8}
> >
> >
> > and have noticed that some of the pairs ended up having different file
> > names, e.g. IMPG7125.JPG becomes:
> >
> > 20200206-171436-7125.JPG
> >
> > while
> >
> > IMGP7125.DNG becomes:
> >
> > 20200206-171438-7125.DNG
> >
> >
> > I am wondering if anyone has an idea of what I am doing wrong here.
> >
> >
> > Thanks,
> > Andrey




Reply | Threaded
Open this post in threaded view
|

Re: Renaming pairs of JPG/RAW

Hella Breitkopf-2
No solution for "let digikam do the work" but for those who are not
averse to some command line following might be a solution:
I use a script and analyze only the metadata of the jpep,
related files (same basename) are renamed based on that meta data.

I started with a bash script and heavy use of exiftoolkit (
https://github.com/unixhex/exipicrename),
but that was s l o w .

So I've rewritten and improved this as Python script.
All files with the same basename are renamed.

https://github.com/unixhex/exipicrename2

shorter filenames:

/tmp/demo $ exipicrename *JPG --dry-run --debug --short-names
INFO:SIMULATION| rename old: /tmp/demo/H3200120.JPG
INFO:SIMULATION| to NEW    : /tmp/demo/20180120_152454__001.jpg
INFO:SIMULATION| rename old: /tmp/demo/H3200120.ORF
INFO:SIMULATION| to NEW    : /tmp/demo/20180120_152454__001.orf
INFO:SIMULATION| rename old: /tmp/demo/H3200121.JPG
INFO:SIMULATION| to NEW    : /tmp/demo/20180120_152457__002.jpg
INFO:SIMULATION| rename old: /tmp/demo/H3200121.txt
INFO:SIMULATION| to NEW    : /tmp/demo/20180120_152457__002.txt
INFO:SIMULATION| rename old: /tmp/demo/H3200121.xmp
INFO:SIMULATION| to NEW    : /tmp/demo/20180120_152457__002.xmp
INFO:SIMULATION| rename old: /tmp/demo/H3200121.ORF
INFO:SIMULATION| to NEW    : /tmp/demo/20180120_152457__002.orf

long filenames with camera name, focal length, aperture, iso:

/tmp/demo $ exipicrename *JPG --dry-run --debug
INFO:SIMULATION| rename old: /tmp/demo/H3200120.JPG
INFO:SIMULATION| to NEW    :
/tmp/demo/20180120_152454__001__e-p3__70mm__f5-5__t60__iso1000.jpg
INFO:SIMULATION| rename old: /tmp/demo/H3200120.ORF
INFO:SIMULATION| to NEW    :
/tmp/demo/20180120_152454__001__e-p3__70mm__f5-5__t60__iso1000.orf
INFO:SIMULATION| rename old: /tmp/demo/H3200121.JPG
INFO:SIMULATION| to NEW    :
/tmp/demo/20180120_152457__002__e-p3__70mm__f5-5__t80__iso1000.jpg
INFO:SIMULATION| rename old: /tmp/demo/H3200121.txt
INFO:SIMULATION| to NEW    :
/tmp/demo/20180120_152457__002__e-p3__70mm__f5-5__t80__iso1000.txt
INFO:SIMULATION| rename old: /tmp/demo/H3200121.xmp
INFO:SIMULATION| to NEW    :
/tmp/demo/20180120_152457__002__e-p3__70mm__f5-5__t80__iso1000.xmp
INFO:SIMULATION| rename old: /tmp/demo/H3200121.ORF
INFO:SIMULATION| to NEW    :
/tmp/demo/20180120_152457__002__e-p3__70mm__f5-5__t80__iso1000.orf

Best wishes,
Hella -- who started to rename files in that way probably before she
detected digikam.
Reply | Threaded
Open this post in threaded view
|

Re: Renaming pairs of JPG/RAW

AndriusWild
Hella,

Thank you for sharing your scripts.
Does the python one require exiftool or any other packages?
Thanks,
Andrey


On Thu, Feb 13, 2020 at 12:22 AM Hella Breitkopf <[hidden email]> wrote:
No solution for "let digikam do the work" but for those who are not
averse to some command line following might be a solution:
I use a script and analyze only the metadata of the jpep,
related files (same basename) are renamed based on that meta data.

I started with a bash script and heavy use of exiftoolkit (
https://github.com/unixhex/exipicrename),
but that was s l o w .

So I've rewritten and improved this as Python script.
All files with the same basename are renamed.

https://github.com/unixhex/exipicrename2

shorter filenames:

/tmp/demo $ exipicrename *JPG --dry-run --debug --short-names
INFO:SIMULATION| rename old: /tmp/demo/H3200120.JPG
INFO:SIMULATION| to NEW    : /tmp/demo/20180120_152454__001.jpg
INFO:SIMULATION| rename old: /tmp/demo/H3200120.ORF
INFO:SIMULATION| to NEW    : /tmp/demo/20180120_152454__001.orf
INFO:SIMULATION| rename old: /tmp/demo/H3200121.JPG
INFO:SIMULATION| to NEW    : /tmp/demo/20180120_152457__002.jpg
INFO:SIMULATION| rename old: /tmp/demo/H3200121.txt
INFO:SIMULATION| to NEW    : /tmp/demo/20180120_152457__002.txt
INFO:SIMULATION| rename old: /tmp/demo/H3200121.xmp
INFO:SIMULATION| to NEW    : /tmp/demo/20180120_152457__002.xmp
INFO:SIMULATION| rename old: /tmp/demo/H3200121.ORF
INFO:SIMULATION| to NEW    : /tmp/demo/20180120_152457__002.orf

long filenames with camera name, focal length, aperture, iso:

/tmp/demo $ exipicrename *JPG --dry-run --debug
INFO:SIMULATION| rename old: /tmp/demo/H3200120.JPG
INFO:SIMULATION| to NEW    :
/tmp/demo/20180120_152454__001__e-p3__70mm__f5-5__t60__iso1000.jpg
INFO:SIMULATION| rename old: /tmp/demo/H3200120.ORF
INFO:SIMULATION| to NEW    :
/tmp/demo/20180120_152454__001__e-p3__70mm__f5-5__t60__iso1000.orf
INFO:SIMULATION| rename old: /tmp/demo/H3200121.JPG
INFO:SIMULATION| to NEW    :
/tmp/demo/20180120_152457__002__e-p3__70mm__f5-5__t80__iso1000.jpg
INFO:SIMULATION| rename old: /tmp/demo/H3200121.txt
INFO:SIMULATION| to NEW    :
/tmp/demo/20180120_152457__002__e-p3__70mm__f5-5__t80__iso1000.txt
INFO:SIMULATION| rename old: /tmp/demo/H3200121.xmp
INFO:SIMULATION| to NEW    :
/tmp/demo/20180120_152457__002__e-p3__70mm__f5-5__t80__iso1000.xmp
INFO:SIMULATION| rename old: /tmp/demo/H3200121.ORF
INFO:SIMULATION| to NEW    :
/tmp/demo/20180120_152457__002__e-p3__70mm__f5-5__t80__iso1000.orf

Best wishes,
Hella -- who started to rename files in that way probably before she
detected digikam.