3

How can I view geotagged photos and play audio files in qgis? For photos, HTML map tooltips used to work in qgis, but don't as of 2.18.2. For audio, I don't know of a solution.

3

On a Mac running QGIS 2.18.2, it is possible to setup a qgis action to open these two media types using the mac qlmanage (quicklook) application that is native to MacOS. For QGIS 3.6, there is a plugin that works great and doesn't need the quicklook action. see instructions below.

Install plugin:

Get your geotagged photos associated with a set of points. The Photo2Shape plugin works great for 2.18.2. For qgis 3.6 and greater use the ImportPhotos plugin. If you are using the KyngChaos packages and this plugin complains about exifread, download exifread and copy the 'exifread' folder to:

/Library/Python/2.7/site-packages/  (2.18.2)
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages  (3.6)

Usage 3.6:

  1. Click the import photos button on the toolbar, choose the folder, choose output shp and the point shp with linked photos should be created successfully.

  2. Use the 'Click Photos' tool to double-click the photo points to view photo.

Usage 2.18.2:

Once the shapefile is created and associated with the photos (and file paths), setup the action:

  1. double-click the layer to show layer properties
  2. Click 'Actions'. Add a new action (green plus sign).
  3. Setup a new 'Mac' action with the value:

qlmanage -p [%filepath%]

qgis action

Click apply, OK. Now, with the action tool, click on the point and the photo should load in a quicklook window. It's not technically integrated into qgis, but the functionality of the quicklook window and being able to close it with just a press of the spacebar makes it easy/fast to use.

qlmanage qgis photo display

Audio (2.18.2 only):

If you have points associated with audio files (or another kind of media the quicklook can display), you can load them as well:

setup the action:

  1. double-click the layer to show layer properties
  2. Click 'Actions'. Add a new action (green plus sign).
  3. Setup a new 'Mac' action with the value:

qlmanage -p [%filepath%]

alternatively, if you don't want to use qlmanage for audio (which requires you to hit the play button), you can use the built-in 'afplay' application. This will just play the audio file in the background after just a single click on the point with the action tool.

afplay [%filepath%]

  • Nice! Thanks for the great demonstration of the actions functionality. – corvus Jan 16 '18 at 1:39
  • If you have duplicate photos or 'stacked' photo points that result in lots of 'qlmanage' app windows starting to stack up, running "killall qlmanage" in the terminal is a good way to quickly clear them out. – jamierob Jan 29 '18 at 16:57

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.