Skip to main content

Open source package for extracting and parsing telemetry associated with video streams and converting to common formats.

Project description

Open Telemetry Kit

Image of Open Telemetry Kit

The Open Telemetry Kit (OTK) is an open source package for extracting and parsing telemetry associated with video streams and converting to common formats. It comes out of a need for a singular API that can be used for multiple different video telemetry formats.

Telemetry that can be parsed includes: GPS, time, camera information, speed

Features:

  • Automatically detect telemetry format
  • Manipulate telemetry with ease
  • Write telemetry to a new format

Getting Started

Dependencies

Python version: >=3.6

ffmpeg and ffprobe.

On Debian systems these can be installed with:

$ sudo apt install ffmpeg

dateutil

On Debian systems this can be installed with:

$ pip3 install python-dateutil

Installation

$ pip3 install open-telemetry-kit

Importing

The OTK package can be imported into your python3 project with:

import open_telemetry_kit as otk

Quick Start

Download the OTK Quickstart package with sample data

Download the OTK quickstart package (~90 MB). (Mac users can install wget using these instructions)

$ wget https://hivemapper-sample-videos.s3-us-west-2.amazonaws.com/OTK/OTK_quickstart.tgz

This includes a sample .csv, .srt, and .mov with embedded telemetry. It also contains quickstart.py which you can use to extract the telemetry from the sample files.

Extract the package:

$ tar xzvf OTK_quickstart.tgz

This will extract everything into a new directory called OTK_quickstart/

The quickstart.py script accepts a standalone .csv or .srt or a video file with an embedded .srt. It will read in the data, convert it to JSON, and write it to the provided destination.

Telemetry extraction and conversion example

In your terminal go to the new OTK_quickstart directory.

Extract telemetry from the sample video:

$ python3 quickstart.py embedded_srt_example.mov embedded_srt_example.json

Extract telemetry from the sample srt or csv files respectively:

$ python3 quickstart.py srt_example.srt srt_example.json

$ python3 quickstart.py csv_example.csv csv_example.json

Note: This process will create a new JSON file containing the telemetry extracted from the sample file. The data is organized into an array of objects (or, in python terminology, a list of dictionaries)

Data manipulation example

For an example of simple data manipulation, open quickstart.py and uncomment the lines:

# gps = Telemetry()
# for packet in telemetry:
#   gps.append({ k:v for k, v in packet.items() if k in ['latitude', 'longitude', 'altitude']})

# write.telemetryToJson(gps, dest)

Rerun the script with one of the provided commands above.

Current Functionality

Input Formats

The OTK currently supports the following forms of telemetry:

  • .csv files
  • .srt files
  • Any video file with embedded telemetry encoded as a .srt (e.g. video taken with some DJI drone models)
  • .gpx files
  • .kml files

Output Formats

  • JSON

Future Releases

Planned expansions and updates for the OTK include:

Input Formats

  • Open Camera .srt
  • KLV/MISB embedded data

Output Formats

  • geoJSON

Other

  • Unit Tests

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

open_telemetry_kit-0.1.8.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

open_telemetry_kit-0.1.8-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

Details for the file open_telemetry_kit-0.1.8.tar.gz.

File metadata

  • Download URL: open_telemetry_kit-0.1.8.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.8

File hashes

Hashes for open_telemetry_kit-0.1.8.tar.gz
Algorithm Hash digest
SHA256 3821194ab5e97e1a49c8d2fa4cdf4b4c6637447c458e234f3e6265adfad5dbaa
MD5 76b653b6f63489534a3936022918f160
BLAKE2b-256 41d33573032d00472ca2e20818b15e034cbaded396ca874a3bb6ae9f1702ebb9

See more details on using hashes here.

File details

Details for the file open_telemetry_kit-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: open_telemetry_kit-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 16.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.8

File hashes

Hashes for open_telemetry_kit-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 bc90c70ddc41817f4fb5b8ef3154d7a0760817d4e2e5a36a40eaf1c70eb46a72
MD5 0bb94bdde84dc59ab1a2ae0601cfd75a
BLAKE2b-256 fb59e52e030f00ae9a8bc87d5cefc4fcede924637c2711d928f540384d98c09d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page