How to embed Subtitle INFO in uploaded videos
1834 9 2018-12-31
Uploading and Loding Picture ...(0/1)
o(^-^)o
solentlife
First Officer
Flight distance : 1087530 ft
Latvia
Offline

There was a question on another Forum of how to have Telemetry info in a video with a Phantom Std. The question is actually a very good one and I would like to suggest my way of solving this.

Before providing my suggested route, I am sure others have similar or even better ways to do it, I will make following :

1. Video Players on PC's and TV's will mostly give option to show or not SRT Subtitle files while a movie is playing.
2. Youtube and other online video sites will not upload SRT files with the Video - so you need to hardcode / embed the SRT into the video file as one.

How to do this ?

First we need to decide how we will create the subtitles. SRT files are simply Text files with a specific structure - Notepad will write / modify as long as you save as .SRT without the TXT suffix. (Choose ANY FILE in the drop down and name file with .SRT)
For our Phantoms and Telemetry info - its simple.

Power up all GO / RC / AC and then tap the camera MENU ... the SETTNGS ... enable VIDEO CAPTION.

Then when you fly - all telemetry info will be present as an SRT file on the SD card with same name as your Video file.

You can then play this in VLC or any usual player and the subtitles will appear. But this is no good if you want to upload to YT for others ...

I use a program called HANDBRAKE ... a free download. The nice thing about Handbrake is that you can actually embed any SRT file into the video even if it does not have same name.

With Handbrake, first you choose the video file, then go to the Subtitles section and choose the SRT file. Make sure BURN IN is ticked to the right of the SRT file name ... go to bottom and name your new video / SRT file ... click start.

That's it ... a single file that has the telemetry / subtitle embedded in it.

Here's my examples I made this morning to illustrate :

Quote ....

Here's a paste of an SRT file I made today as a test ...

The Video file is : DJI_0001.MP4 ... and so the SRT file is DJI_0001.SRT

It was shot on my floor so no movement !

1
00:00:01,000 --> 00:00:02,000
HOME(N/A,N/A) 2018.12.31 10:12:50
GPS(N/A,N/A,0) BAROMETER:0.0
ISO:3200 Shutter:50 EV: 0 Fnum:F2.8

2
00:00:02,000 --> 00:00:03,000
HOME(N/A,N/A) 2018.12.31 10:12:51
GPS(N/A,N/A,0) BAROMETER:0.0
ISO:3200 Shutter:50 EV: 0 Fnum:F2.8

3
00:00:03,000 --> 00:00:04,000
HOME(N/A,N/A) 2018.12.31 10:12:52
GPS(N/A,N/A,0) BAROMETER:0.0
ISO:3200 Shutter:50 EV: 0 Fnum:F2.8

4
00:00:04,000 --> 00:00:05,000
HOME(N/A,N/A) 2018.12.31 10:12:53
GPS(N/A,N/A,0) BAROMETER:0.0
ISO:3200 Shutter:50 EV: 0 Fnum:F2.8

5
00:00:05,000 --> 00:00:06,000
HOME(N/A,N/A) 2018.12.31 10:12:54
GPS(N/A,N/A,0) BAROMETER:0.0
ISO:3200 Shutter:50 EV: 0 Fnum:F2.8


As you see - it makes entry every second of the video ...

So once you edit the SRT file to what you want to display - keep same format ... you then hardcode it to the video file, that means you combine the two into one video file. I use HANDBRAKE ... a free utility to do this.

Here is the base video file without SRT ... the SRT file is in the same directory and has same name - but Youtube will not upload via simple interface.

(0 min 8 sec)



Now I have used HANDBRAKE to embed / hardcode the SRT file into the MP4 video file ..

(0 min 8 sec)



After opening the SRT file in Notepad ... I have altered the entries ..

1
00:00:01,000 --> 00:00:02,000
HOME(MEDUS,57) 2018.12.31 10:12:50


2
00:00:02,000 --> 00:00:03,000
HOME(MEDUS,57) 2018.12.31 10:12:51

3
00:00:03,000 --> 00:00:04,000
HOME(MEDUS,57) 2018.12.31 10:12:52

4
00:00:04,000 --> 00:00:05,000
HOME(MEDUS,57) 2018.12.31 10:12:53

5
00:00:05,000 --> 00:00:06,000
HOME(MEDUS,57) 2018.12.31 10:12:54

and so on ..

Now I embed into the MP4 file (handbrake allows a different name SRT file to be embedded if you wish .. unlike a Video Player that insists on same name) ..

Here you see the results ...

(0 min 8 sec)



Hope the above helps .... maybe one day I will record some tutorial vids ... then everyone can have a laugh !!

Happy New Year

Nigel

2018-12-31
Use props
EdM
Second Officer
Flight distance : 1491814 ft
  • >>>
United States
Offline

Thanks for the info solentlife.
You wouldn't happen to know if it would be possible to delete say the last 3/4' of the SRT file and have the subtitles appear in only the first 1/4 of the video?  
OR
Edit the SRT file in a way that no subtitles appear except during key points?
2018-12-31
Use props
solentlife
First Officer
Flight distance : 1087530 ft
Latvia
Offline

Not having done that - but I would think that deleting any entry but leaving the numbered sequence should do it...

I will test as I am doing another SRt example from another of todays flights. It will take time as embedding is slow.
I am sure if I check some of the other video editors I have - they probably allow time line addition of SRT files similar to audio etc.

If anyone has an alternative way of hardcoding SRT into video ... please be my guest and add on here ..

Nigel
2018-12-31
Use props
solentlife
First Officer
Flight distance : 1087530 ft
Latvia
Offline

One item I have noticed is that file size and therefore resolution drops back significantly when HANDBRAKE embeds in default mode. But for me - its still usable as i am not selling the vids !

Nigel
2018-12-31
Use props
solentlife
First Officer
Flight distance : 1087530 ft
Latvia
Offline

OK ... to expand the SRT entry for example my file earlier ...

1
00:00:01,000 --> 00:00:02,000
HOME(N/A,N/A) 2018.12.31 10:12:50
GPS(N/A,N/A,0) BAROMETER:0.0
ISO:3200 Shutter:50 EV: 0 Fnum:F2.8

is ...

1  The sequence number - necessary but does not display
00:00:01,000 --> 00:00:02,000   at what time is the text to be displayed in the video ... hrs : mins: secs
HOME(N/A,N/A) 2018.12.31 10:12:50  what you want displayed - DJI have made it so telemetry info goes here ... you can type what you like
GPS(N/A,N/A,0) BAROMETER:0.0    what you want displayed - DJI have made it so telemetry info goes here ... you can type what you like
ISO:3200 Shutter:50 EV: 0 Fnum:F2.8   what you want displayed - DJI have made it so telemetry info goes here ... you can type what you like

You can actually add more lines if you wish ..

I am uploading examples to my YT channel - so if you want to see any - please have a look there .... "solentlifeuk"

Cheers
Nigel
2018-12-31
Use props
solentlife
First Officer
Flight distance : 1087530 ft
Latvia
Offline

OK ... here's examples ..



This has SRT file as follows :

1


2
xxxx just a test

3
YYYY

4
00:00:04,000 --> 00:00:05,000
HOME(MEDUS,57) 2018.12.31 10:12:53

5
HHHHH

6
00:00:06,000 --> 00:00:07,000
HOME(MEDUS,57) 2018.12.31 10:12:55

7
00:00:07,000 --> 00:00:08,000
HOME(MEDUS,57) 2018.12.31 10:12:56

Note that entries are without the time base to use and therefore do not display any text even though text is there in the file.

Now with time base in the SRT file we get :



using SRT file :

1


2
00:00:02,000 --> 00:00:03,000
xxxx just a test

3
00:00:03,000 --> 00:00:04,000
YYYY

4
00:00:04,000 --> 00:00:05,000
HOME(MEDUS,57) 2018.12.31 10:12:53

5
00:00:05,000 --> 00:00:06,000
HHHHH

6
00:00:06,000 --> 00:00:07,000
HOME(MEDUS,57) 2018.12.31 10:12:55

7
00:00:07,000 --> 00:00:08,000
HOME(MEDUS,57) 2018.12.31 10:12:56


Phew !! I gotta lie down !!

Nigel
2018-12-31
Use props
solentlife
First Officer
Flight distance : 1087530 ft
Latvia
Offline

Surprised no-ones posted alternative way to do it ....

Nigel
2019-1-1
Use props
Mark The Droner
Second Officer
Flight distance : 2917 ft
United States
Offline

I like Dashware.  Unfortunately it requires dumbing down the resolution on the modern drone cameras because Dashware can't handle high resolution video.



2019-1-1
Use props
solentlife
First Officer
Flight distance : 1087530 ft
Latvia
Offline

Hi Mark ... but I note that the vids you post have no embedded subtitle info ... EDIT .... Just replayed them again and I see the info ... first video hard to read though ...
I note that GPS position is missing ?

About dumbing down ... Handbrake does that when embedding the SRT subtitle info into the video ... trying to find a way to keep the high res and embed.

VLC can ... but its a real pain to do it ...  In fact VLC can do quite a lot once you start exploring its menus.

Nigel
2019-1-1
Use props
Montfrooij
Captain
Flight distance : 2560453 ft
  • >>>
Netherlands
Offline

Wow, very interesting!
Have to start investigating this someday.
2019-1-1
Use props
Advanced
You need to log in before you can reply Login | Register now

Credit Rules