Dive Video Data Overlay

Please register or login

Welcome to ScubaBoard, the world's largest scuba diving community. Registration is not required to read the forums, but we encourage you to join. Joining has its benefits and enables you to participate in the discussions.

Benefits of registering include

  • Ability to post and comment on topics and discussions.
  • A Free photo gallery to share your dive photos with the world.
  • You can make this box go away

Joining is quick and easy. Log in or Register now!

D_Fresh

Contributor
Messages
891
Reaction score
580
Location
Philippines
The following will be a tutorial on how to add a data overlay to your dive videos using DashWare.

In my case, I am diving with a Galileo Luna dive computer with this display, but an overlay can be made to replicate most computers.

From this:
full


To this:

This is something I have been working on for a while now, and some recent discussions have inspired me to share what I have learned so far. I will tell you now, that it is not a streamlined process and is quite time consuming. I am trying to refine and simplify the process, but am having a hard time doing that alone. Hopefully, if anyone can come up with some brilliant tricks to simplify, please share!

You will need the following:
  • Video footage of your dive (obviously, right?:p). (HINT: take frequent "reference" shots of your Dive Computer to facilitate syncing your dive data)
  • Dive Log software (You need to get the data somehow, many options available, discussed later)
  • Your Favorite video editing software for cuts, transitions, titles, and color correction
  • Excel or your favorite spreadsheet software
  • Notepad, Notepad++, or your favorite basic .txt editor
  • DashWare
  • Time and patience!
I intend to create a separate post for each major workflow step, explaining in detail what is to be done.

Summary:
With your favorite dive footage we will be creating a beautiful and informative finished product, allowing viewers to get a sense of not only what you see, but also the depth, time, water temp, air pressure, and/or whatever else you'd like them to know. We will briefly discuss what type of footage will work best for this, how and what data you will need exported from a dive log software, how to create the overlay itself, and how to import the data to be displayed via the overlay.

I will not be going into detail regarding the actual editing and color correction of your video. If you're reading and following this tutorial, I assume that you are already proficient, learning, or experimenting with video editing. There are plenty of other tutorials and discussions on editing photo and video.


DashWare:
DashWare is a free Telemetry Data Overlay software designed to interpret and sync data as a display within video footage. It was developed with Racing and Action Sports (Mountain biking, skiing, skydiving, aviation) in mind and is now owned by GoPro. It is available for download here: DashWare - Telemetry Data Overlay on Your Videos


Please bear with me as I get this posted. I will do my best to add pictures and screen shots where I can. But it will take me some time to get this all posted, I am not pre-composing this.

Without further adieu, lets move on to Video Footage.
 
Video Footage:
Disclaimer: I am not a professional videographer.

If we are going to make a dive video, we must obviously record something! But not all footage is created equal. The intent here is to take the viewer on a journey of your dive; to give them the sense that they are making the dive themselves. I find that the best video clips for performing an overlay tend to be longer, document the dive, sort of footage. Simply a series of beautiful, up close, macro clips become very difficult to match up to your data. It can be accomplished, but will require a ton more work and time.

I try to let my action cam record through nearly all of the dive. With a little practice and a comfortable camera tray, you just keep moving through the water with the camera pointed the way you're going. Of course not all of that footage will be used, not even most of it, but it will help you to sync your data to the video before doing a bunch of cuts and edits. You should also be filming your dive computer from time to time in order to give reference points for syncing.

Here is a good example posted on youtube by Christophe Ngo Van Duc

How it goes for me:
On my dives, I try to film my arrival to the reef (or bottom). So go ahead, splash in, group up, and descend. On the way down, nearing the reef or bottom, go ahead and start recording, take a shot of your dive computer, and arrive at the bottom. Pan the camera around a little, let the viewers get a sense of what you're experiencing, then head off with your group.

As you're swimming along the reef, you see something of interest, go ahead and capture a bit, then move on. I find that shots coming up and over a higher bunch of coral tend to be very dramatic, "Oh, what's on the other side...?" Go ahead and film as much of your dive as safely possible, as long as your battery will allow. Don't forget to get reference shots of your computer!


That's basically it regarding capturing footage. You're a smart, creative person, do your best! Up next we will look at exporting our dive profile data from your dive log software.

Stay Tuned!

Edit: Decided it's best to pre-compose this tutorial first. I am working on that now, stand by for the next segment.......

Cheers!
 
Dive Log Software:
First, let’s discuss what data we need to obtain to create the overlay. You can display whatever data you’d like, but common fields are Time, Depth, (gas)Pressure, and Temp. You can also display ppO2, Gas Mix, No Deco Limit (NDL), Remaining Bottom Time (RBT). We will discuss Data Formatting and Importing to the overlay in the Data and DashWare Sections.

In my case, since I am replicating my Luna’s display exactly, I will use Dive Time, Depth, Max Depth, Temp, Pressure, NDL, RBT, a bar graph for Nitrogen Load, and a bar graph for TNK vol (a visual reference to air remaining).

There are many options for dive log software, go ahead and use your favorite. Being PC based, I tend to use Subsurface, Diving Log 6.0, and ScubaPro’s SmartTRAK. Yes, they are somewhat redundant, but each software has its strengths and weaknesses, which will only be touched on briefly here. Let’s take a look.

Subsurface:
  • Subsurface is available for free download here: Subsurface | An open source divelog
  • Subsurface is a great log software with very good organization and planning features. In this case, we must look at what data is exported in the current version (4.8.5). Currently, supported export formats are “Subsurface XML”, UDDF, divelogs.de, DiveShare, CSV Dive Profile, CSV Dive Details, Worldmap, TeX, and Image Depths. The formats most useful to us here are XML, UDDF, and CSV Dive Profile. Each format will export mostly similar data in greatly different formats. A Major benefit of Subsurface is the sample rate, which for me is every 4 seconds, I’m not sure if that is completely dictated by the dive computer or not, but some other software has exported data with large random time gaps (16, 64, 22, 50 second gaps).
    • XML is “Tagged” organization of data, like HTML, but much more readable by humans, using common language for tags. Excel has the capability to interpret XML data, but I have had a hard time mapping that data to the format we need. There is a lot of unneeded information in the header, but the sample time (every 4 seconds), depth, temp, and RBT data is very well organized (the red box in the picture). Not every data field is included with each timed Sample, but that is ok as long as all data samples occur at the correct time. If someone could write an Excel script based on Subsurface’s XML export format to organize the data in the correct format for this application, this would be, by far, the easiest form of export.
    • Here is an example of this data:
Subsurface XML.gif
  • UDDF (Universal Dive Data Format) is an XML based format but with a standard data organization and more information exported. If your dive is a Deco Dive, Rebreather, or Mixed Gas Tech, this may be of great use to you depending on what information you wanted to display in the overlay. UDDF has the same challenges as XML as that is its format base. Again, an Excel Script could be of great value here to organize the data as we will need.
  • CSV Dive Profile (Comma Separated Values) format is by far the easiest to work with and is already in the native format for DashWare. This format will provide Dive Number, Date, Time, Sample Time, Sample Depth, Sample Temperature, Sample Pressure, and Sample Heart rate (which will most likely be empty unless you have the equipment to record it). CSV Dive Profile does not currently export RBT, “Dive Time” (as we will want displayed), Max Depth, and in my case, NDL, Nitrogen Tissue load, or TNK Vol, but we can modify that later.
Diving Log 6.0

  • Available for free trial (10 dives) download in English or German here: Diving Log 6.0 - scuba logbook software for diver - dive log, scuba log
  • Diving Log 6.0 (DL6.0) is a very powerful MS Access based logging and planning software. One feature of note here is the Deco Calc function in the Profile tab of the logbook. If your dive computer will not export deco information, you will find it calculated here. If you are unable to extract NDL or Deco information from other sources, this can be a decent (though time consuming) way to obtain that data.
  • DL6.0 can export data in many formats, including CSV, DAN DL7, Excel*, Google Earth, HTML, SQL, PDF, SQLite, UDCF (predecessor to UDDF), UDDF, and XML. Again, the formats of primary use are CSV, UDDF, XML, and Excel.
*In my case, I use MS Office 365 and for some reason cannot export Excel format from DL6.0; appears to be a bug, therefore I cannot comment on what is exported or how useful that may be.
  • CSV export is currently not exporting with any meaningful organization (not comma separated?) rendering it useless for this project.
  • Excel export is currently nonfunctional on my system.
  • UDDF is exporting a detailed header, then samples of Depth, Dive time in seconds, and temperature. No Pressure, RBT or anything else. Again, this is a modified XML.
  • XML is exporting a detailed header, followed by samples every 4 seconds of Depth, Temp, Pressure, RBT, and Heartrate. Again, if somebody could write a script to facility Excel understanding and organizing this data the way we need, that would be fantastic!
  • Regarding this Overlay project specifically, Diving Log 6.0, in its current form, is basically only useful for the Deco Calc function. It is a very powerful logging and planning software which has great potential, but not so applicable in this case.

SmartTRAK
  • SmartTRAK is available from ScubaPro here: https://ww2.scubapro.com/en-GB/SWE/instruments/computers/products/smarttrak.aspx
  • SmartTRAK is proprietary Windows Based (sorry Mac guys) dive log and dive computer manager. I have no idea if non-ScubaPro dive computers can download directly to SmartTRAK, but it should be possible to import logs from other sources if that appeals to you. In my case, I am using SmartTRAK to obtain NDL times as displayed by my dive computer.
  • SmartTRAK currently supports a few proprietary export formats for ScubaPro partner programs (.slg, .asd), and DAN Level 1, DAN Level 3, Excel, and .txt. I have not investigated the DAN formats in any way.
    • TXT format seems to be the most useful here. TXT format is providing us with Dive Time, Depth, Temp, O2%, Pressure, and RBT. Very good data for our purposes, but still missing any NDL data which the program does display on the “live computer panel” as you scroll through a dive profile.
    • This is where I am currently obtaining the NDL and Nitrogen Load data for my overlays. The data is not exported, there for I must manually enter it based on landmarks between datasets (at X pressure and Y depth, NLD=n, Nitrogen Tissue Load=m)
Conclusion:
Decide what information you would like to display then export the dive profile data from your favorite dive log software. Keep in mind that a higher frequency sample rate will result in a smoother overlay display (i.e. data update every 4 seconds vs every 16, 20, or 30 seconds.) There may be gaps in the data, but we will fix that in the next section, Data.
 
Data:

So, we have our video footage and now we have our dive profile data exported and available. Next, we must modify (add, delete, fill gaps) and format the data to be read by DashWare. We will be using both Excel (or your favorite spreadsheet software) and Notepad (to check our CSV files prior to sending to DashWare). For this tutorial I will be working with the data exported from Subsurface via CSV Dive Profile for my overlay. You may choose what data you want, and don’t want, to display…adjust the following accordingly.


Quick review of CSV file:

DashWare works best with CSV data. We want to check and see what data was exported and if it’s in the correct CSV format. The best way is to open the CSV file in Notepad or any other basic TXT editor (right-click>Open With>Notepad). You should see the data organized like this:
CSV in Notepad.gif

What you see there is a header line containing labels (i.e. “dive number”,“date”,”time”, etc…) followed by the data below (“13”,”2018-12-01”, etc…). I know it looks messy right now, but this is exactly how it should look. The commas (delimiters/separators) are what organizes the data into columns without taking up space (hence Comma Separated Values). Don’t worry that they don’t line up, the software understands.

We have a little extra data in the raw CSV file. We won’t be using Dive Number, Date, and Time, so we must go modify the data. It is possible to edit the data right there in Notepad, but that can get messy quick. Let’s go open the file in Excel….

Excel:
Don’t forget to save your work often in Excel!

Most likely if you double click the CSV file, it should open in Excel and look like this:
Subsurface CSV Dive Profile.gif

Ah, that’s much more legible right? There are gaps in the data now, but we will fix that momentarily. We will not need Dive Number, Date, Time, and Sample Heartrate, so go ahead and delete those columns. Now we must add whatever other data columns we wish to display. In my case I format my spreadsheet like this:
Excel Step 1.gif

I have deleted and added a few columns and renamed the columns to match the organization of my gauge setup in DashWare. Organize this however you’d like.

Next, we need to create data for our new DIVETIME and MAXDEPTH columns. Notice that the time in the first column displays as 0:04, but if you click on the cell, you will see that Excel automatically interprets that as 12:04:00 AM. I don’t know why, but it makes it harder to convert our time to Whole Minutes Elapsed Time for DIVETIME as displayed by my dive computer.
  • TIMESECONDS column: Time gets a little complicated due to how Excel wants to interpret time data and how DashWare reads time data. We will need to convert TIMESECONDS from Excel’s 12:04:00 AM displayed as “0:04” to simply “4”. Sounds easy right? I wish... maybe someone can chime in on how better to do this, but this is my method so far (after trying many “Format Cells” options… Insert a new column between the existing TIMESECONDS and DIVETIME, go ahead and move the TIMESECONDS heading to the new column, but do not delete the A column. We will use t formula =ROUNDDOWN($A2:$A$2*24*60, 0) to convert the A column into an integer value, just like we will do in the next step. This formula is taking Excel’s understanding of 12:04:00 AM and converting it to a decimal value, then rounding down (so that our values do not change early) to zero decimal places.
  • DIVETIME column: Use a slightly modified form of the formula above, =ROUNDDOWN($A2:$A$3*24, 0) . Drag that formula to the bottom of the dataset.
  • MAXDEPTH column: Using the Max function in excel will quickly generate this data. Use the formula =MAX($C$3:$C3) . Again, drag this formula to the bottom of the dataset.
  • TEMP: We have some gaps in the Temperature column. The quickest/easiest way to fill this is using Excel’s handy-dandy fill capabilities. This is accomplished by selecting the column, de-selecting (crtl+click) the header cell, then click Find & Select > Go To Special > Blanks, followed by pressing (without clicking anywhere, keystrokes only) =[up arrow] [ctrl+enter]. All of your blanks should now be auto filled with the value above each gap. Reduce decimal to whole number.
  • PRESSURE column: Use the same technique from the TEMP column to fill the PRESSURE column. If you cannot reduce the decimal with the button in the Home toolbar, then select the column, Format Cells>Number>0 decimal.
  • RBT column: I did a simple Copy/Paste from the SmartTRAK profile TXT export file opened as CSV. Get that data if you intend to use it.
  • NDL, N2, TNK columns: Because I want to display this data with no apparent way to export it from any software, I must generate this data manually. This is time-consuming (took me about 40 minutes to enter data in those columns over 38 minutes of dive profile, 573 rows; entering data only when it changes then using Fill Empty Cells technique from above). In my case, I will open SmartTRAK and move through the dive profile entering the needed values based on landmarks (@ X pressure and Y depth). Tedious, I know…. Skip these data fields if you prefer.
  • We should now have a spreadsheet that looks like this:
    CSV Dive Profile Excel Before CSV.gif
    Notice Row 2, I included that to show the formulas, you should not actually have this row.
  • Last step: We have an extra column (A Column) that we do not want DashWare to reference. We need to copy our usable data to a new sheet in order to save our CSV correctly. Select all data except the first column containing “0:04, etc”, Copy the data, New Sheet, and Paste Values – do not simply Crtl+V this one, you will get the formulas pasted, but without their solutions. When we save, be sure to be Active on the new sheet, and save as CSV. Excel with pop up a message saying you have multiple sheets, Click OK to save Active Sheet Only as CSV.

We should now have a spreadsheet that looks like this:
Finished Excel result.gif


We are now ready to save the spreadsheet in BOTH Excel and CSV formats. We save the Excel format in case we must edit our data again, and the CSV to import into DashWare. Review the new CSV file in Notepad to confirm that it saved correctly, like this:
Completed CSV File.gif


Now onto DashWare….
 
DashWare:

Available for download here: DashWare - Telemetry Data Overlay on Your Videos

DashWare is a free Telemetry Data Overlay software designed to interpret and sync data as a display within video footage. It was developed with Racing and Action Sports (Mountain biking, skiing, skydiving, aviation) in mind and is now owned by GoPro. DashWare uses “Gauges” which can be placed anywhere in the space of a video, resized, and transparency added. We will cover how to create a custom Gauge (overlay), how to import and sync the data to the video, and finally how to export.

A Major note: Currently, DashWare may have some trouble rendering video files which were imported in 2k and 4k resolutions. Apparently, this has been solved in a Windows 10 environment, but I am running Windows 7…

By now you realize that creating an overlay like this, updating in real time, is quite time consuming. The good news is that once you’ve done it a couple times, the process really does speed up. Working with DashWare is no exception; once you’ve created a Gauge (overlay), the process should move much faster in the future.

Before we get into the topic of creating gauges, importing video and data, and syncing the data to the video, we should ask ourselves “How will this impact my editing?” I will share my suggestions, but feel free to experiment on your own. Most of the time, underwater video footage will require some sort of post-processing beyond simple cutting and arranging of clips; color correction and stabilization come to mind immediately.

There are a few potential workflow routes available here:
1. We could compile our raw, untouched clips into a long sequence, render that, add the overlay, then proceed to color correction, stabilization, and cuts & transitions, but our gauge overlay will be impacted by color correction.
2. We could color correct and stabilize our uncut video, render that into a single, long, video then add our overlay before going back to video software to do cuts & transitions, without impacting our new overlay.
3. We could color correct, stabilize, and cut our videos, add the overlay, then do transitions between clips. But this is not much different than option 2.
4. OR we could utilize Chroma Key…. I have not yet tried this method (actually it was a lightbulb discovery while doing this tutorial LOL), but theoretically, we could import (nearly any) video into DashWare, create our overlay, then use a “Green Screen” behind the gauge, over the video, which could be rendered then imported as a layer to your favorite Video Editing software (i.e. Premiere Pro, Final Cut, After Effects, or whatever). As far as flexibility I believe this could be the most practical route for those more experienced with video editing software. (Side note regarding Chroma Key, Blue or Green may not be the best colors for this considering our underwater videos are likely to have much of both. Perhaps something odd, like bright orange will have a lesser impact on any colors we may have in our video.)
The decision is yours but decide beforehand how you will integrate the overlay into your workflow process. I can tell you from experience, I have started, scrapped, and restarted many projects multiple times in trying to develop workflow. Until now, I have yet to compose a full-length video project using overlays, only small the occasional clip. Based on what I’ve learned just from doing this write up, I will be attempting to make a full (but likely boring LOL) video of a full dive with overlay utilizing the Chroma Key technique. I believe that method has the greatest potential for our application.

Creating Gauges:
As mentioned above, DashWare refers to the displays as Gauges. There are several stock gauges available for all sorts of applications, including diving, but if you’re like me, you’ll want to display the information your way. It could be as simple as few lines of text with data or you could go so far as to recreate your dive computer. In this section I will recreate the Shearwater Perdix in OC Recreational mode. Creating the artistic portion of the gauge is fairly simple once you understand how the interface works, but when it comes to linking the displays to data fields organization is key!

Create a new Gauge:
1. In the Gauge Tool box, click New Gauge and Name it
2. Use Insert New Component to add any feature to the gauge, from static shapes, text, or data value display functions. Interestingly, there is no Line component available, so use filled rectangle sized appropriately to make lines. Cloning components is your friend; use it to create multiple fields of text, boxes, and lines.
3. Try to do all the artistic stuff first to keep things more organized in the Components Tree on the righthand side.
4. Text fields which change to represent data are Dynamic fields within DashWare’s organization.
5. Be sure to assign Gauge Inputs to each Dynamic field, whether bar graph, number, or text values. Play around a bit and you’ll get it. But remember, your Gauge Inputs will have to match your Data Set headings for the data to map correctly.​

In all, it took me about 2 hours to create this Shearwater Perdix gauge with fully dynamic Depth, Safety Stop, Time, NDL, GTR (Gas Time Remaining), Pressure, and Dynamic Tank Graphic.
Shearwater Perdix Gauge.gif

In the picture you can see the Gauge Inputs section (DEPTH FT, SAFETY STOP, DIVE TIME, etc.) that are assigned to their corresponding Dynamic Text field in the Components section. Your data headings with need to match these names in order for DashWare to correctly map the data fields.

Importing Video and Data to DashWare:
In the Project tab of DashWare, you will add your Video and Data Files in Input Settings Box. When importing the data file, it is important to choose the correct Data Profile after adding your data file then Edit Profiles. After clicking on Edit Profiles, you will see something like this:
DashWare Data Profile Editor.gif


  • Ensure that DashWare is reading your CSV correctly and that the Column Mappings data fields match the column headers in your CSV file. Depending on how you created your CSV, you may have to change the Separator Settings.
  • Click “Test File/View Data”. You will see a window popup showing that all data is organized nicely into their appropriate columns. Good, close that.
  • Click OK on the Profile Editor.
  • Reselect the correct Data Profile in the Add Data File prompt box, then Add.
  • From the Gauge Toolbox, drag and drop your gauge into the video box.
  • In the Synchronization Tab, you can now “play” your data file and ensure that all data fields in the gauge are displaying the correct data at the correct time. If not, you may have to review your CSV file (outside of DashWare) or the Data Field Mapping (within Dashware).
    • If you wish to have some sort of Intro to your video before displaying your data, you have the option to sync the data at a later timestamp corresponding to the video.
    • Check the Box “Sync with Video” and you should be good to go.
Once everything looks good in DashWare, you are now ready to export (render) your newly overlayed video via File>Create Video. Select the settings appropriate for your project and Create Video. Depending on the length of your video, it may take some time to render.

Depending on your workflow, you either have a finished product or are ready to proceed to your favorite video editing software for further video processing.


Good luck, and I hope you've learned a little something here. Please feel free to chime in with any shortcuts or tips.
 
Here is a PDF version of the tutorial for those who would like to download and access offline.

It does have a few edits for the first and second sections.
 

Attachments

  • Overlay Tutorial.pdf
    905.5 KB · Views: 508
I can report that I just submitted a pull request to subsurface that exports the profile data (time, depth, temperature, some deco information) as a .ass subtitles file matching video files associated to a dive to be overlaid by standard video software like vlc or ffmpeg.
 
I can report that I just submitted a pull request to subsurface that exports the profile data (time, depth, temperature, some deco information) as a .ass subtitles file matching video files associated to a dive to be overlaid by standard video software like vlc or ffmpeg.

No way?! That has got some serious potential!! Fantastic! :thumb: As you make more progress on that, can you make a thread?
 
Thank you very much for the excellent tutorial!

I wonder if we can create a gauge depository focused on scuba? It seems a lot of custom gauge sources have disappeared including the ones mentioned in old FB posts.
 
Good idea! I think something like that can be arranged. Depending on the realistic nature of the gauge, they can be quite time consuming, so why not share!

In the mean time, if anyone would like a specific gauge made, I might be able to facilitate.
 

Back
Top Bottom