Loading...
Phantom3 .srt Customizer

Phantom3 .srt Customizer

30. October 2015 - 17:40
Development

The DJI Phantom 3 Professional is a quadrocopter with a 4k camera. It can be configured to record flight data in addition to a recorded video. This is done by using subtitles in the .srt format. Each second a block of data is recorded. For example:

00:01:06,000 --> 00:01:07,000
HOME(X) 2015.10.18 12:23:23
GPS(X) BAROMETER:45.9 ULTRASONIC:10.2
ISO:100 Shutter:800 EV:+1/3 Fnum:F2.8

Because this is very bulky I wrote a python script to customize the .srt file:

python3 phantom3-srt-customizer.py -h
usage: phantom3-srt-customizer.py [-h] -i INPUT -o OUTPUT [-hb] [-hu] [-da]
                                  [-ti] [-du] [-sp] [-l]

This scipt helps to customize the .srt file of a DJI Phantom 3.

optional arguments:
  -h, --help            show this help message and exit
  -i INPUT, --input INPUT
                        input .srt file
  -o OUTPUT, --output OUTPUT
                        output .srt file
  -hb, --barometer      add barometer height
  -hu, --ultrasonic     add ultrasonic height
  -da, --date           add date of flight
  -ti, --time           add time of flight
  -du, --duration       add duration of flight
  -sp, --speed          add speed
  -l, --label           add text label to each piece of data

For instance the following command

python3 phantom3-srt-customizer.py -i DJI_0001.SRT -o DJI_0001.c.SRT -hb -hu -da -ti -du -sp -l

generates from the example above this subtitle:

00:01:06,000 --> 00:01:07,000
Date: 2015.10.18; Time: 12:23:23; Duration: 01:05; Speed: 11.12m/s; Height (b): 45.9m; Height (u): 10.2m;

You can find the code on github:

17:40

30.10.2015

Development

11