Skip to content

isabella232/libvideo-metadata

 
 

Repository files navigation

libvideo-metadata - Parrot Drones video metadata library

libvideo-metadata is a C library that handles the serialization and de-serialization of video metadata in both streaming and recording.

Features

  • serializing/de-serializing of frame (timed) metadata
  • serializing/de-serializing of session (untimed) metadata
  • metadata conversion to CSV or JSON formats
  • various helper functions

Dependencies

The library depends on the following Alchemy modules:

  • libfutils
  • libulog
  • json (optional)

Building

Building is activated by enabling libvideo-metadata in the Alchemy build configuration.

Operation

Threading model

The API functions are not thread safe and should always be called from the same thread, or it is the caller's resposibility to synchronize calls if multiple threads are used.

Writer

Frame metadata

As a writer the library takes as input vmeta_frame structures and serializes the data as vmeta_buffer objects, ready to use in a stream sender (see libvideo-streaming) or in a MP4 muxer.

Session metadata

As a writer the library takes as input a vmeta_session structure and serializes the data as either data for a stream sender (SDES RTCP packets - see libvideo-streaming - and/or SDP attributes - see libsdp) or for a MP4 muxer (in meta or udta boxes).

Reader

Frame metadata

As a reader the library takes as input vmeta_buffer objects coming either from a stream receiver (see libvideo-streaming) or a MP4 demuxer (see libmp4) and de-serializes the data as vmeta_frame structures.

Session metadata

As a writer the library takes as input data coming either from a stream receiver (SDES RTCP packets - see libvideo-streaming - and/or SDP attributes - see libsdp) or a MP4 demuxer (values from meta or udta boxes - see libmp4) and de-serializes the data as a vmeta_session structure.

Testing

The library can be tested using the provided vmeta-extract command-line tool which takes as input a MP4 video file or a *.pcap packet capture and optionally outputs CSV, JSON and KML files.

To build the tool, enable vmeta-extract in the Alchemy build configuration. To use with mp4 files as input, libmp4 must be enabled in the build configuration. To use with *.pcap files, the libpcap-dev package must be installed on the system. For JSON output json must be enabled in the build configuration.

For a list of available options, run

$ vmeta-extract -h

About

Parrot Drones video metadata library

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 99.3%
  • Makefile 0.7%