GoPro’s GPMF open sources video metadata

Screen Shot 2017 05 24 at 9.09.18 AM

Every time you take a photo, on just about any camera, information called metadata is embedded within that image. This data usually contains your location, camera model, lens type, and general information about how the image was taken. This data makes browsing your photo library easier, and allows events to be automatically grouped, and exposures to be auto corrected. Photo metadata is standardized and free, but what about when it comes to video metadata from action cameras?

Why add metadata to video? GoPro have an opinion

David Newman, a GoPro Technical Fellow, explains below how the company’s newly developed GPMF (General Purpose Metadata Framework) works:

Metadata should answer, how was this file made? In what environment? At what location? If, when and how was the camera moving? At GoPro, we’ve had the ambition to solve these questions, but it turned out to be treading new ground. The popular consumer video file format MP4 had no clear provision to store telemetry or any time varying metadata. Yet we must store telemetry within the video, not in a separate file, so consumers can’t misplace side-car files, or be expected to upload them separately. Metadata can’t be lost because you ejected the battery before the capture was complete, or crashed into a tree that caused the same, so the metadata must be regularly interleaved with video and audio, not simply added to the end upon a file close. Finally, it must store all of today’s and tomorrow’s wide range of sensor data, and be easily retrieved in more than GoPro’s own utilities, without technical or legal hurdles. We needed a new standard, so GoPro created one, and made it completely free.

GoPro HERO5 adds sensors and GPMF metadata

GoPro Hero 5 Black
GoPro Hero 5 Black

The first release of this new MP4 embedded metadata came with the HERO5. The HERO5 has extensive metadata for photos and video, adding sensors for accelerometer, gyroscope and high frequency GPS location. Running the GPS 18 times faster than your average smartphone, combining that with IMU data, allows every motion to be accurately measured and displayed. You can display a lot of this today using the free Quik for Desktop app.

However, the HERO5 stores much more than location and camera motion in its video files: it stores its own temperature, image exposure, shutter speed, the very precise GPS time, detailed flight telemetry from Karma, and data from GoPro-enabled third-party Bluetooth devices. The amount and range of metadata will continue to expand over GoPro’s future.

GoPro Karma
GoPro Karma

The General Purpose Metadata Framework is a new track within an MP4 file, working just like video and audio which have their own tracks. The timing relationship between metadata collection and the video and audio captured is stored using existing MP4 mechanisms, so if a developer can handle video and audio within an MP4, metadata is very similar.

Describe yourself

The richness of GPMF comes from its ability to nest multiple sensor streams into a single MP4 track, and do it in a self-describing way. The self-describing nature is critical, it allows future sensors to be added without updating reader applications, or even registering the sensor’s data format with a GPMF managing entity. The big plus is that this is all completely free for anyone to use. A GPMF-parser was recently made available as an open source project (https://github.com/gopro/gpmf-parser) for developers to easily include video metadata within their application.

Interestingly, GoPro say that this if just ‘one of many’ new open source projects you will see from them. Do you think the GPMF could will be a useful addition to your workflow? Let us know below…

Subscribe to our newsletter