DJI Mavic, Air and Mini Drones
Friendly, Helpful & Knowledgeable Community
Join Us Now

Another use for an SRT file

DJ Wes

Well-Known Member
Joined
Feb 6, 2019
Messages
390
Reactions
804
Location
Springdale, AR, USA
Site
www.litchiutilities.com
As many of you probably know, if you enable “Video Captions” in the app, a “.SRT” file is generated along with the video file when capturing a movie. For example, with video captions enabled, you would see a pair of files on your SD card named something like this:
  • DJI_0001.MP4
  • DJI_0001.SRT
With an appropriate player, the contents of that SRT file can then be displayed as video captioning when viewing the video file.

That SRT file, among other things, contains a log of GPS coordinates and altitude information. From that information, one can re-create the path of the flight that was used in capturing that video. One limitation in doing this, results from the fact that neither the heading nor the gimbal pitch angle are stored in the SRT file. As a result, only the path of the drone can be re-created in a waypoint mission.

Capture.PNG
I have an “Air Data to Litchi Converter” that will convert flight logs into Litchi missions. To that converter, I have added the ability to convert the information contained within an SRT file into a Litchi mission CSV file. That waypoint mission can then be flown using Litchi or converted to a KMZ file and flown with DJI Fly.



If you would like to try this, use my “Air Data to Litchi Converter”.



 
Wes, I have tried to upload an srt file which I have extracted from a DJI .mp4 file. I used the Browse button on the line where it shows 'AirData/Litchi CSV File Upload:', but the app reports 'ERROR: No datapoints were extracted from the AirData CSV file.'

Am I doing something wrong?

Thanks!
 
I have tried to upload an srt file which I have extracted from a DJI .mp4 file.
I added the ability to read the SRT file that is generated when you enable video captions. This file is created separately from the MP4 file. Your statement about extracting the SRT file from an MP4 file suggests that you are doing something different. No extraction should be necessary.

If I have misunderstood your description of what you are doing, perhaps you could provide me with the SRT file you are trying to convert so that I can troubleshoot the problem.
 
Wes, in the Mini 2 (and, I believe, most recent DJI drones), the subtitles are incorporated int the .MP4 file and not output as a separate .SRT file. Therefore, to use your tool, I extracted the subtitles from an MP4 produced by a Mini 2 using this tool: Subtitle Extractor for DJI Drones

This produces an .SRT file, but I guess the format differs subtly from an SRT output by an AIR 2.

Attached is an example of an SRT extracted from an MP4 (extension had to be changed to .txt to permit attachment to this message).
 

Attachments

  • Yuquot1.txt
    16.9 KB · Views: 13
Wes, in the Mini 2 (and, I believe, most recent DJI drones), the subtitles are incorporated int the .MP4 file and not output as a separate .SRT file. Therefore, to use your tool, I extracted the subtitles from an MP4 produced by a Mini 2 using this tool
Thanks for that. I was unaware that the latest drones incorporate the captions into the video file.

I have modified my program to also handle this new SRT data. Please give it a test.
 
It now works!

Thanks for the update, Wes. I suggest you add SRT to the label on the Browse button line.
 
Nice work, and great contribution to the community! It's too bad that the gimbal pitch and heading are missing from the SRT file. Maybe DJI will decide to add those in a future update.
 
Thanks for that. I was unaware that the latest drones incorporate the captions into the video file.
Older thread but I wanted to clarify that it is actually the opposite. Some old DJI drones would incorporate the subtitles into the video file. However, all newer DJI drones, including me own Air 3 and the Mini 4 Pro, all have separate SRT files in the Sd card beside the mp4 files.
 
Lycus Tech Mavic Air 3 Case

DJI Drone Deals

New Threads

Forum statistics

Threads
130,891
Messages
1,557,574
Members
159,902
Latest member
Modoc