Adding exif metadata with Gstreamer

From RidgeRun Developer Connection
Jump to: navigation, search

In this document you will find how to add exif metadata to jpeg image.

The libexif Library

  • Libexif is a library for parsing, editing, and saving EXIF data.
  • The library supports all the EXIF tags described in EXIF standard 2.1 (and most from 2.2).
  • It is written in plain C and does not require any additional library.

RidgeRun SDK includes this library you can select it in the configuration menu.

libexif and Gstreamer

The gst-plugins-bad includes the plug-in jifmux that allow you to include exif metadata in an image using Gstreamer. jifmux uses the libexif library to remux images with marks and tags. The jpeg image received on the jifmux's sink pad should be minimal (e.g. should not contain metadata already).

Example of gst-launch line:

gst-launch videotestsrc num-buffers=1 ! jpegenc ! taginject tags="comment =\"Image metainfo test \",artist=RidgeRun" ! jifmux ! filesink location=test.jpeg

This pipeline insert the artist's name and a comment in the metadata of the jpeg's image.

Here you can find the list of tags and values used to describe media metadata in Gstreamer.