#+TITLE: Exiftool
#+SUBTITLE: Snippets for everyday photo/video metadata editing
#+DESCRIPTION:
#+KEYWORDS: exiftool
# Export underscore as underscore instead of highlight in HTML:
#+OPTIONS: ^:nil
# Include usable macros from https://github.com/fniessen/org-macros:
#+INCLUDE: ../org-mode/macros/org-macros.setup
#+INFOJS_OPT: view:showall ltoc:nil path:https://iki.fi/~pyyhttu/debian/org-mode/js/org-info.js
#+HTML_HEAD:
* Exiftool
** Installation on Kapsi shared hosting
As per [[https://exiftool.org/install.html#Unix][Exitool unix instructions]]:
~$ wget https://exiftool.org/Image-ExifTool-12.25.tar.gz~
~$ tar xvf Image-ExifTool-12.25.tar.gz~
~$ cd Image-ExifTool-12.21~
~$ perl Makefile.PL~
~$ make test~
~$ mv exiftool lib/ ~/bin/~
Note: If above is not done after version upgrade, a warning is displayed:
#+BEGIN_SRC bash
~$ exiftool -ver
12.25 [Warning: Library version is 12.21]
#+END_SRC
Finally, make sure that =~/.profile= has:
#+BEGIN_SRC bash
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
#+END_SRC
Then logout and ssh back in for =~/.profile= changes to take effect. Exiftool is installed:
#+BEGIN_SRC bash
$ type exiftool
exiftool is /home/users/pyyhttu/bin/exiftool
#+END_SRC
** NEXT Upgrading on Kapsi shared hosting
** Installation on debian instance with su access
~$ sudo aptitude install libimage-exiftool-perl~
** Overview of mass tagging and organizing photos
To achieve with minimal amount of work a tagged and organized file structure.
1. Move photos to one =Upload= directory. Doesn't matter if photos are scattered around in subdirectories in it.
2. Update with Exiftool =FileModifyDate= using =CreateDate= that has it:\\
~$ exiftool -m -r '-FileModifyDate I get pictures displayed in correct timeline.
*** NEXT =DateTimeOriginal= as master instead of =CreateDate=?
Instead of =DateTimeOriginal=, I consider =CreateDate= to be the
master, as it's more common among video files. Additional difference between
them two [[https://exiftool.org/forum/index.php?topic=2451.0][here]].
~$ exiftool -m -r '-FileModifyDate ~/.local/bin/vimv && chmod +755 ~/.local/bin/vimv~
~$ vimv Photo_2014-03-04-*.mov~
Changing extension to =MOV= in vim:
1. Visual select =mov= {{{kbd(ctrl-v)}}}
2. Press on selection {{{kbd(shift-c)}}}
3. Type =MOV=, press {{{kbd(esc)}}}
4. Save and exit {{{kbd(:wq)}}}
** Moving
*** Move images and =.AVI= files from directory =2018/= into a directory structure of =2018/01/=, =2018/02/=, etc.
As per: https://exiftool.org/faq.html#Q16.
~$ exiftool -r -ext+ AVI '-Directory