Video file handling

Although designed primarily for use with still images Photini can also be used with video files. The Image selector Open images dialogue normally shows image files only (.jpg, .gif, etc.) but has a drop down selector to choose video files (.mov, .mp4, etc.) instead, or all file types.

The Exiv2 metadata library cannot write to video files, so Photini will always use XMP sidecars for the metadata you write. There is an option when compiling Exiv2 that enables it to read some metadata from video files. This may enable Photini to read date & time, and possibly GPS location data. It is unlikely that the Exiv2 library installed with your operating system has been compiled with video capability, so you may need to compile it yourself.

Most video files don’t have thumbnails, but Photini may be able to create one if you have OpenCV installed on your computer. (See installation - optional dependencies.) Right-click on the file and choose regenerate thumbnail from the popup menu. If Photini is able to generate a thumbnail it will store it in the XMP sidecar file.

The Flickr uploader and Google Photos / Picasa uploader tabs can upload video files, but expect it to be slow. Video files can be very large.

Compiling Exiv2 on Linux

The following instructions assume some familiarity with compiling and installing software on Linux systems. The examples shown are for one particular system at one particular time. It is unlikely that exactly the same commands will work on your machine. Don’t blindly copy and paste them.


Replacing the Exiv2 library installed with your operating system may affect the operation of other programs.

Before attempting to compile Exiv2 with video support you should get Photini running with the versions of Exiv2 and GExiv2 installed by your system’s package manager. You can test if you already have video support by attempting to open a video file using the exiv2 command line tool:

jim@mole ~/Pictures/from_camera/2017/2017_06_07 $ exiv2 -pa MVI_2964.MOV
Exiv2 exception in print action for file MVI_2964.MOV:
MVI_2964.MOV: The file contains data of an unknown image type
jim@mole ~/Pictures/from_camera/2017/2017_06_07 $

Clearly this version of Exiv2 cannot read video files.

The source code of Exiv2 can be downloaded from After extracting the archive (e.g. tar xf exiv2-0.26-trunk.tar.gz) change to the exiv2-trunk directory.

Before compiling Exiv2 it’s worth finding out where its files are put by the standard system installer:

jim@mole ~/Documents/exiv2-trunk $ dpkg-query -L libexiv2-14
jim@mole ~/Documents/exiv2-trunk $

This shows that the configure “installation prefix” should be set to /usr rather than the default /usr/local. In addition, the “library directory” is /usr/lib/x86_64-linux-gnu instead of the more usual /usr/lib. Finally, to enable video support we need to set the --enable-video option:

jim@mole ~/Documents/exiv2-trunk $ ./configure --enable-video --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu

You may need to install some more dependencies before configure will run correctly. Don’t forget to install the “development headers” versions of packages such as libexpat.

After configuration is successful you can compile and install:

jim@mole ~/Documents/exiv2-trunk $ make
jim@mole ~/Documents/exiv2-trunk $ sudo make install

Once compiled and installed we can try opening a video file again:

jim@mole ~/Pictures/from_camera/2017/2017_06_07 $ exiv2 -pa MVI_2964.MOV                           XmpText     7  18.2563                           XmpText    17  MVI_2964.MOV                           XmpText    15  video/quicktime                         XmpText    25  Apple QuickTime (.MOV/QT)                       XmpText     9  537331968                   XmpSeq      2  Apple QuickTime (.MOV/QT), Canon Digital Camera                  XmpText    30  CanonAVC0010/02.00.00/00.00.00                        XmpText     1  0                     XmpText     1  0                    XmpText     0                 XmpText     1  0                            XmpText    10  3579686878                   XmpText    10  3579686878
...                            XmpText     1  0                         XmpText     4  sowt                        XmpText     1  2                      XmpText     2  16                         XmpText     5  48000                        XmpText     4  16:9
jim@mole ~/Pictures/from_camera/2017/2017_06_07 $

Compiling GExiv2 on Linux

Now that we have a video-capable version of Exiv2 we need to compile GExiv2 to use it. Download the GExiv2 source from, then extract the archive and change to its directory.

Once again we need to check where files are put by the standard system installer:

jim@mole ~/Documents/gexiv2-0.10.6 $ dpkg-query -L gir1.2-gexiv2-0.10
jim@mole ~/Documents/gexiv2-0.10.6 $

As before /usr is the base directory, but the typelib file is installed in the “library directory” /usr/lib/x86_64-linux-gnu. We also need to tell configure to generate the “introspection bindings” used by Python:

jim@mole ~/Documents/gexiv2-0.10.6 $ ./configure --enable-introspection --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu

Once again you may need to install additional dependencies:

jim@mole ~/Documents/gexiv2-0.10.6 $ sudo apt-get install libglib2.0-dev libgirepository1.0-dev

Once configuration is successful the software can be compiled and installed as normal:

jim@mole ~/Documents/gexiv2-0.10.6 $ make
jim@mole ~/Documents/gexiv2-0.10.6 $ sudo make install

You can check what version of GExiv2 Photini is using as follows:

jim@mole ~/Documents/gexiv2-0.10.6 $ python3 -m photini.editor --version
Photini 2017.8.0, build 873 (93457b4)
  Python 3.5.2 (default, Nov 17 2016, 17:05:23)
[GCC 5.4.0 20160609]
  pgi, GExiv2 0.10.6, GObject 2.0
  PyQt 5.5.1, Qt 5.5.1, using QtWebKit
  enchant 1.6.8
  flickrapi 2.2.1
jim@mole ~/Documents/gexiv2-0.10.6 $

Comments or questions? Please subscribe to the Photini mailing list!forum/photini and let us know.