Description

Beaver is a command-line utility for easily renaming your photos (and videos) by shooting date.

If your photos come from various sources (e.g. you used different cameras, or you want to pool friend's or colleague's photos with yours) you have to take care that cameras have to be synchronized to have your photos properly sorted. As it is usually not the case, this utility will help you to synchronized photos taken by non-synchronized cameras.

You can also resize photos to standard sizes (720p, 1080p, 4K, etc.) to prepare them for archiving or make them lighter for sharing.

Usage

Getting started

Create a directory in which we will beaverize your photos, and go in it:
mkdir ~/Documents/amazingTripWithFriends && cd ~/Documents/amazingTripWithFriends
Create one directory per camera and copy photos and videos in it, for instance:
Manu-Nikon
Manu-smartphone
Lily-Canon
Lily-smartphone
John-smartphone
Fred-Canon
Now simply run:
beaver -p myAmazingTrip2014

Synchronization

It may appear that some cameras are not synchronized to each other. Smartphones are generally synchronized to the world clock (synchronization to a NTP server), but offline cameras are not automatically synchronized. As a consequence your photos will not be sorted according to their real shooting date and your viewing will be altered by delayed photos. A particular case occurs when you change of timezone: your smartphone will switch to the local timezone but offline devices not. beaver allows you to resynchronized your photos. Here is the strategy:
  1. During the event, gather all cameras and take the same picture at the same time with all devices. Generally each camera owner takes the picture with its own camera. A good idea is to take the photo with the lens cap to get a black picture easy to retrieve among all your photos.
  2. When photos are on your computer, you have to decide which camera will be the time reference. A good choice is a device synchronized to the world clock. In the corresponding folder, rename the photo you took for synchonizing _ref.jpg.
  3. In all other folders, rename this photo _sync.jpg.
  4. Run beaver as usual. It will discover the synchronization files and proceed to the synchronization.

Resizing photos

Photos taken by cameras generally have a high resolution. If you want to share your photos with your relatives the size of your photos may be a limiting factor. It may be a good choice to resize them to a lower resolution to share them more easily. To do it use the -r option.
beaver -p myAmazingTrip2014 -r 1080p

Options

-d or --directory      Specify the directory name where to export photo.
-e or --extension      Extension to use for naming photos. Default is 'jpg'.
-f or --force          If the directory where exporting photos already exists, it will be removed.
-h or --help           Basic usage help.
-i or --img            Specify a perl pattern to match media extensions. Default is '.jpg$'.
-p or --prefix         Specify a label to use for prefixing photo names. If not set the folder name is used.
-q or --quiet          Silent mode.
-r or --resize         Resize photo to a given resolution, for example '1920x1080', or '1080p'.
-s or --suffix         Specify a label to use for suffixing photo names. Default is 'public'.
-S or --separator      Specify the separator to use between the prefix and the date in photo names. Default is '-'.
-v of --verbose        Display the name of each files converted.

Notes


Installing beaver on Ubuntu

First you need to install my ppa kiwi in your repositories, and then update your packages list to query the added repository:
sudo add-apt-repository ppa:emmanuel-rousseaux/kiwi
sudo apt-get update
Now you can install the package as usual:
sudo apt-get install beaver


comments powered by Disqus