Yeah I had a little script to do something similar (no video, but merging data) just for Strava recording a while back. Had forgotten all about it until this description & 'FIT files'.
Video's a bit more complex no doubt, but like you say all the pieces are there, SMoP.