Write dive data as video subtitles

This commit adds an entry to the dive media context
menu which offers to write a subtitle file. This
creates an .ass file for the selected videos.

In an attempt to to clutter the screen too much, don't
show irrelevant entries (zero temperature or
NDL and show TTS only for dives with stops).

VLC is able to show these subtitles directly, they
can be integrated into the video file with ffmpeg.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
This commit is contained in:
Robert C. Helling 2019-04-14 16:19:23 +02:00 committed by bstoeger
parent 0573b19b65
commit 52105e5217
8 changed files with 125 additions and 2 deletions

View file

@ -1638,6 +1638,17 @@ or play the video, overlaying the _Subsurface_ window. Delete media from the _Me
it (single-click) and then by pressing the _Del_ key on the keyboard. This removes it BOTH
from the _Media_ tab as well as the dive profile.
By right-clicking on a video and selecting the "Save dive data as subtitles" option, a subtitles
file with the same name as the video but with an ".ass" extension is created that contains
time dependent dive data (runtime, depth, temperature, NDL, TTS, surface GF) to be overlayed
with the video. The VLC video player automatically finds this file upon playing the video
and overlays the dive data. Alternatively, the ffmpeg video encoder can be used to create a
new video file with the dive data encoded in the video stream. To do so run
ffmpeg -v video.mp4 -vf "ass=video.ass" video_with_data.mp4
from the command line. You need to have the libass library installed.
==== Media on an external hard disk
Most underwater photographers store media on an external drive. If such a drive can be mapped by the operating system
(almost always the case) the media can be directly accessed by _Subsurface_. This eases the interaction