A new, quite niche, VIRB/FIT command-line tool

Probably the wrong forum, but there's no dedicated VIRB forum (ominous?), and this is perhaps of interest to developers as well as VIRB users. Or perhaps to no one. Anyway, feel free to delete this post if it doesn't "fit" (*cough*).

This is a fairly simple, open-source command-line tool with the focus on syncing and annotating VIRB video and GPS data (we've exclusively used the Ultra 30). For VIRB and FIT-users there's some niche and not so niche functionality. The tool stems from an academic research project working with language and landscape.

It's available here:
gitlab.com/.../geoelan
Compiled binaries for Win, Mac, Linux - VIRB video clip concatenation requires ffmpeg, explained in the manual. I currently use a Mac and haven't been able to test the Win + Linux versions that much, unfortunately.

I hope to release the FIT-parsing bit as a Rust crate/library at some point (requires work still, small and large fixes - I'm quite new at this and used this opportunity to learn Rust). Done from scratch since I couldn't find any working FIT library when I started out. No idea if my parsing is unconventional or just plain horrible - my spaghetti code works so far though! :)

As for FIT parsing performance it's ok, but I recently had to add a check for multi-byte numerical value length/alignment due to a corrupt FIT-file. Caused a performance loss, but it was important not to crash on errors (a definition message reported a 32-bit value, but the corresponding value was only a single byte in the data message).

It's a niche tool, but there's some general functionality:

  • automatically find and match VIRB clips/recording sessions with the corresponding FIT-file
  • automatically concatenate VIRB recording sessions (given an input dir to search and one of FIT-file, the first UUID or first clip in a session)
  • get a brief, boring overview for most FIT-files (developer data supported, but not compressed timestamp headers)
  • various kinds of parse errors are also reported for corrupt files (I'm sure I've missed lots)
  • generate a KML for a VIRB FIT-file or a recording session in that file (quite possibly VIRB only, since gps_metadata/160 with specific fields is required, can add `record`/20 in the future), use `--downsample NUMBER` for smaller KML-files to make google earth happy.

Example, print all `record` values:
`geoelan check FITFILE.fit -g 20` (g = global FIT id)

Example, match files if you have VIRB data:
`geoelan match -i PATH_TO_SEARCH`

The real aim and more niche functionality is to geo-reference annotations of VIRB-footage, or to annotate coordinates if you will (final output of the full workflow is a KML with points or polylines). In the humanities there's a widely used annotation tool for time-aligned multimedia annotations called ELAN (archive.mpi.nl/.../elan - free) which plays a central role for the workflow, hence the name GeoELAN. There's some background in a paper linked in the repo if you need something to bore yourself with. ;)

  • Great work and thank you very much for sharing it.

    Your software alone is going to make me buy a Virb this year and has enlightened me to it's abilities.

  • Hey, thanks for the kind words! Still lots to add/fix, but any functionality listed in the readme/manual is supposed to work or it's a bug.

    On the virb, I really hope it still sells well enough for Garmin to consider a successor at some point. GoPro releases a new camera every year, so while those will progress quicker in terms of being a good *camera* (?), they lack some of the data logging power the virb has. Connect Ant+ devices, logging outside of recording video, FIT (log/timestamp everything!). It's a data hub that happens to also record video. :)

  • There are actually six different VIRB so I don't think it's going away and there will be more models.

    You can see them all under the "compatible devices" table at the bottom here:

    https://buy.garmin.com/en-US/US/p/573412#devices

    only the newer higher end expensive models have that fancy gmetrix and 10hz GPS resolution

    https://buy.garmin.com/en-US/US/catalog/product/compareResult.ep?compareProduct=119592&compareProduct=119594&compareProduct=522869&compareProduct=562010

    I just want one that is the size of a chapstick/lipstick you clip on your visor or shoulder or vest or something like that, with both optical and digital stabilization.

    let's see if their new fancy forum software will let me paste the list

    garmin virb 119592 119594 164723 165499 522869 562010

  • That's quite true of course. I'm positively surprised they are all still in the lineup. The Ultra 30 and the 360 are the most obvious, direct GoPro competitors so I'm hoping for updates to those, Ultra 30 especially. GoPro is quite aggressive with releases (for better or worse) so I'm thinking image quality etc at least gets a bit of an update each year.

    The Ultra 30 could especially do with an audio update, both in terms of quality and flexibility. Using external and internal microphones at the same time will mix down both channels to mono (maybe over two channels but both will contain the same audio stream), rather than keeping each separated to L and R respectively. Could probably be fixed via firmware (if Garmin is interested in doing so), but I was extremely disappointed with this due to how we planned to record. And embarrassed I didn't notice before use. Garmin responded that this is the expected behaviour so it's not a bug.

    It could also be a bit more rugged without a case, including water/splashproof external mic connector. Haven't tried Bluetooth, but I'm worried battery life would suffer too much and the locations we use these don't exactly have the best charging possibilities. I drilled holes in the waterproof case for connecting external mic:s - not very waterproof anymore, but that's on me. :P