External video for Circuit Tools VBO files

For anyone using Circuit Tools to analyze laps, RaceChrono has excellent support for exporting data to its VBO file format.

But plenty of people here and in other forums have asked how to integrate external video. Using video along with the GPS data is a big benefit - you can confirm actual position on the track to often greater accuracy than the GPS info. Plus you can see steering wheel position, foot pedals, or other info, depending on where you mount cameras.

No lap timer that I'm aware of has yet provided the ability to automatically link video during VBO export, but Antti and I have discussed it and a solution might find its way into a future version of RaceChrono. In the meantime I am releasing my findings on how to manually link external video to Circuit Tools. I welcome any feedback.

VBO File Reverse Engineering for External Video.doc
https://drive.google.com/file/d/0Bw0_gq98C4bvX2k1NXFZcFFFeDQ/view?usp=sharing
«1

Comments

  • Any questions or comments on this method of linking video to VBO / Circuit Tools? Google Drive doesn't show download statistics so I can't tell whether anyone has read the document. It's been useful to me and to a friend who has started auto-cross (and is now an excited RaceChrono Pro user - congrats on another sale, aol ). Hopefully it will help others.
  • Thanks! Really appreciate your work on this! I haven't yet got around making the .VBO improvements to RC but when I do I'll certainly refer to your document :)
  • Thanks, I'm glad it will be useful. I really have high hopes about going a step beyond in what we discussed (using symbolic links to export videos without video files taking up space with separate copies).

    In the meantime, the manual steps will have to fill the gap. I hope I made it clear enough for the general public to work with until that time. For that matter, people with other lap timers could stumble along with this and then see the value RC brings in automating the process.
  • I'm trying to follow your how-to and cannot seem to get it to work. When I add the two columns, Circuit Tools tries to load the file (I see the telemetry data from RaceChrono show up), but then it crashes. Looking at the data dump there is an ArgumentOutOfRange error.
  • There might be something wrong with the .VBO export, for example non numeric field (NaN?). Can you send the .VBO file to me and I'll check. tracks(at)racechrono.com
  • The base file is fine, it's after I edit it that it blows up.. I usually use RJ TextEd for this kind of editing, but tried Notepad to be sure that wasn't it. I'm also using Excel to do the grunt work of editing the column data. I've made sure to format the entire sheet as Text--though I have to tell it again when working on the file name. I might try Google Sheets. I will send an edited file for you to take a quick look at, thanks.
  • I've seen similar issues myself before. I'm willing to take a look too, if you want. Circuit Tools sometimes has issues parsing edited files and fails hard when something is out of place. ArgumentOutOfRange (from the Windows application log, right?) seems to be an unhandled error on their part. It would be great if anyone knows how to get a better debug log from CT. I haven't tried to talk to RaceLogic before - Antti, do you have any contacts there or did you just develop VBO export on your own?
  • Maybe a little more info on where my video is coming from may help. I started with GoPro files (avi) and ran them through the GoPro Studio for some basic edits, then ran that through RaceRender Pro to group the raw files into a single file. That wrote to MP4. I'm trying pulling that file back into GoPro Studio and moving it back to AVI. If that doesn't work, I'll look back at the raw files right out of the camera. For the session I'm working with, that's 3 files total max size ~17:30 each (with lots of extra from-the-garage and to-the-garage footage).

    I took a look at running the data through Google Sheets and Word. That was a no-go. I didn't see a way to format to columns like I needed or do the nice sequence fill. I tested an edited file without the video data and it loaded fine, so it's definitely something CT is not liking with my video file. Somehow either GoPro Studio or RaceRender Pro encoded in a way CT doesn't like.
  • Still no joy. Even pulling files straight off the GoPro it's blowing up. Just to make sure I'm calculating correctly, the first file shows as 17:34 long. So I am doing ((17*60)+34)*1000 = 1054000 milliseconds total in the file, so run file 0001 from index 000000000 to 001054000, then switch to file 0002.

    The header section is:
    File created on 03/05/2015 at 18:17:48

    [header]
    satellites
    time
    latitude
    longitude
    velocity kmh
    heading
    height
    long accel g
    lat accel g
    device-update-rate
    fix-type
    coordinate-precision
    altitude-precision
    velocity kmh
    rpm-obd
    coolant-temperature-obd
    intake-temperature-obd
    accelerator-pedal-position-d-obd
    avifileindex
    avitime

    [avi]
    vidraw_
    AVI

    [comments]
    Generated by RaceChrono v4.1.5
    http://www.racechrono.com/

    [session data]
    name SV ACS 5-3-2015 #2
    notes Speed Ventures @ Auto Club Speedway. Session #2.

    [laptiming]
    Start +7050.032640 +2045.168960 +7050.175976 +2045.168959 Start/Finish
    Split +7050.056360 +2045.355540 +7050.023782 +2045.355540 Split
    Split +7050.078380 +2045.456650 +7050.045802 +2045.456650 Split

    [column names]
    sats time lat long velocity heading height longacc latacc device-update-rate fix-type coordinate-precision altitude-precision velocity-obd rpm-obd coolant-temperature-obd intake-temperature-obd accelerator-pedal-position-d-obd avifileindex avitime


    The switchover lines look like this:
    016 184951.10 +2045.459150 +07050.079100 131.548 272.60 +00344.30 +0.17 +0.13 +00008 2 00.70 01.00 137.848 05354 +105.0 +024.0 065.9 0001 001053900
    016 184951.20 +2045.459240 +07050.081490 133.067 272.50 +00344.30 +0.43 +0.07 +00008 2 00.70 01.00 138.978 05412 +105.0 +024.0 064.1 0001 001054000
    016 184951.30 +2045.459320 +07050.083900 133.826 272.30 +00344.30 +0.22 +0.13 +00008 2 00.70 01.00 139.997 05442 +105.0 +024.0 056.0 0002 000000000
    016 184951.40 +2045.459400 +07050.086340 134.986 272.10 +00344.30 +0.27 +0.10 +00008 2 00.70 01.00 141.012 05479 +105.0 +024.0 020.9 0002 000000100

    I'm running out of ideas why it's not happy. I'm running CT 2.4.4.360.
  • [-- We've emailed separately. Posting the outcome here for anyone else who might be following along. --]

    The issue was my error in the document. The [header] section must reference *avisynctime* rather than *avitime*. The latter is the short name sometimes used in the [column names] section by some VBOX devices, but Circuit Tools crashes when using that name in both places. The safest thing to do is use avisynctime in both.

    I've revised the document. The new revision is available from the same link above. Key changes include this issue plus tabs being acceptable separators for the [data] section (making the conversion to spaces optional). Other changes are minor rewordings for clarity. I'm still happy to hear from anyone else trying to add video to VBO files.

    If Circuit Tools crashes when reading an edited VBO file, it's likely an unhandled error while parsing the file. CT assumes the file is well-formed and everything is in the right place - it doesn't provide any help in showing where the issue is. You can partially confirm this by checking the Windows Event Viewer > Windows Logs > Application. The .NET Runtime will report an ArgumentOutOfRange exception. Unfortunately no other details are shown, since this is an unhandled error.

    So to troubleshoot, first check the spelling and order of column names, and then whether any data lines are corrupted (for example, an added space would confuse CT by having too many data elements on that line).
  • With that update, the edited file is now working! Thanks for taking a look. Now I have a real telemetry/video gathering + analysis toolset. Scary.
  • I have managed to change the VBO file and have tried both MP4 and AVI but get a blank (black) video - any ideas?
  • Just to add to the above comment - I edited a video mid section and aligned it to the time in the data. VBO file loads fine and all data present. Video just blacked out - both AVI and MP4
  • So Circuit Tools doesn't complain about the video with any alert/message when opening the VBO file, but the video pane is solid black? Do you get audio or anything else to happen when you press play?

    The only thing that comes to mind is a mismatch in the video codec. Have you been using h.264? Could you confirm the details of the file contents, ideally using ffmpeg? ffprobe filename.mp4 or ffmpeg -i filename.mp4 will work. Otherwise a video player app can do it - in VLC, click Tools > Codec Information; in Windows Media Player, right-click the video and choose Properties.
  • Definitely a codec issue - moving between mac and Windows. Thanks for the pointer!
  • I'm glad it helped. Circuit Tools is somewhat picky about what you feed it, both for the VBO file contents and the video file's format and codecs. It's understandable because they assume everything is sourced from an actual VBOX. It would be nice if they published their specs a little more, but I can't really fault them. If only AIM were as open with their Race Studio (proprietary binary) data format, we could migrate session data around to whatever program we'd like.
  • Anyone tried to make it work with raw GoPro3 720p60 files? will it work?
    I don't have enough space now on my laptop to convert my 20+ min session in proper avi, so maybe definitive yes/no answer will save me some time :)
  • MAVMAV
    edited November 2015
    UPDATE: The method described in the manual works fine with GoPro Hero 3 Silver 720p60 files.
    Although playback is jerky in CT, probably due to some other reasons. I successfully added two videos for one RaceChrono session exported in vbo. Karter88, thank you for the manual!
  • I'm happy it helped, MAV.

    I had tested 1080p30, 720p30, and 960p48 but somehow hadn't done the 60fps modes. Since my maximum data capture is at 10Hz, both high resolution and high frame rate are less useful at my analysis phase. They're of course good for other purposes like reframing and editing for viewing the video outside of Circuit Tools. For CT, I've started to make an initial trim of the footage to 720p29.97.

    I will try a few samples on various recording modes myself and will then update the document. I'd love to hear any other comments you have on it that I could incorporate. Any suggestions for improvement?
  • edited February 2016
    I understand with this manual you can get a video from rc in to ct and it is sync locked to the data. Can you bring in 2 rc videos and do side my side comparison and sync locked to both rc laps/session data?
  • Yes, this method adapts the RaceChrono data and video completely into the Circuit Tools format. At that point they are the same as original VBOX data/video from Circuit Tools' perspective. So you can compare up to 6 laps simultaneously (whether from the same session or different sessions).

    Let us know how it goes for you!
  • wow that is excellent. I would support a kickstarter to develop an applet that does the conversion automatically or better yet an export mode from rc.
  • Yeah, it is pretty amazing when it all comes together. Here is a screenshot of 6 laps with video. https://drive.google.com/file/d/0B5f3glnJmxqnUkhUM2xJNjhUNWs/view?usp=sharing

    I can't commit for Antti, but he and I discussed some enhancements to RaceChrono's export that would be extremely helpful in this way. Hopefully we'll see some of them in an upcoming release very soon (hint, hint, Antti [grin]).
  • Thanks for putting this document together - it has saved loads of time! I used it while working with a friend who's using Harry's LapTimer (a modest DA product), and getting the video up and sync'd in CT2 was a big help to us.

    Speaking of which - any advice or thoughts on how to quickly sync the two? I ended up going to Google Earth to get the S/F coordinates at the point at which cars cross the line, and then did the hunt-and-peck routine to figure out which .vbo lines represented S/F. It was tedious, although if I do it again it won't take as long.
  • I'm glad it helped. I intentionally wrote the procedure generically, since it should apply to any data acquisition app. We may as well help the whole community. I bought HLT myself as well when starting (no free version - boo!). It has some very good features but it's still too iOS centric for my taste. I prefer RaceChrono.

    My sync routine was usually to take a decent guess at the start timestamp, fill the data down, then view key spots in Circuit Tools like hairpin turns. The strong braking and acceleration zones highlight the speedometer. My vehicle is single-gear, but you could also watch a tachometer gauge and listen for shift points in the video. If the timing is wrong, it's quick to enter a new timestamp and fill down again.

    But your idea of using GPS coordinates is really interesting; I'll have to try it. If we're lucky, Antti will enhance the export routine in an upcoming version and lots of this manual fiddling will go away.
  • Hello people im really dissapointed with all this buy ful version reace chrono based on its funkcionality but its not doing anything to me, buy new gps logger problem is i cant compare two autoxs laps on phone as those are 2 sessions, so i have to do it on pc in circuit tool problem is i cant add video i manage to do all above but circuit toll still crashes when i open modified file
  • is the structure OK?
    File created on 15/05/2016 at 09:45:03

    [header]
    satellites
    time
    latitude
    longitude
    velocity kmh
    heading
    height
    long accel g
    lat accel g
    device-update-rate
    unknown-channel
    fix-type
    coordinate-precision
    altitude-precision
    x-acceleration-accelerometer g
    y-acceleration-accelerometer g
    z-acceleration-accelerometer g
    device-update-rate-accelerometer
    x-rotation-gyroscope
    y-rotation-gyroscope
    z-rotation-gyroscope
    device-update-rate-gyroscope
    device-update-rate
    x-magnetic-field
    y-magnetic-field
    z-magnetic-field
    avifileindex
    avisynctime


    [comments]
    Generated by RaceChrono v4.5.1
    http://www.racechrono.com/

    [session data]
    name Test cinz

    [laptiming]
    Start -1042.214520 +2921.328310 -1042.214520 +2921.301330 New trap
    Split -1042.281770 +2921.360280 -1042.281770 +2921.333300 New trap (1)
    Finish -1042.290300 +2921.305440 -1042.294501 +2921.332277 New trap (2)

    [avi]
    test_
    MP4


    [column names]
    sats time lat long velocity heading height longacc latacc device-update-rate unknown-channel fix-type coordinate-precision altitude-precision x-acceleration-accelerometer y-acceleration-accelerometer z-acceleration-accelerometer device-update-rate-accelerometer x-rotation-gyroscope y-rotation-gyroscope z-rotation-gyroscope device-update-rate-gyroscope device-update-rate x-magnetic-field y-magnetic-field z-magnetic-field avifileindex avisynctime

    [data]
    017 094440.90 +2921.295100 -01042.207690 000.400 356.80 +00214.00 +0.00 +0.00 +00000 000.00 1 00.60 00.00 +0.00 +0.00 +0.00 +00000 +00.000 +00.000 +00.000 +00000 +00000 +0.00 +0.00 +0.00 0001 000000000
    017 094441.00 +2921.295100 -01042.207690 000.702 356.80 +00214.00 -0.00 +0.00 +00005 000.00 1 00.60 00.00 +0.00 +0.00 +0.00 +00000 +00.000 +00.000 +00.000 +00000 +00000 +0.00 +0.00 +0.00 0001 000000100
    017 094441.10 +2921.295100 -01042.207690 000.464 356.80 +00214.00 -0.00 +0.00 +00007 000.00 1 00.60 00.90 +0.00 +0.00 +0.00 +00000 +00.000 +00.000 +00.000 +00000 +00000 +0.00 +0.00 +0.00 0001 000000200
    017 094441.20 +2921.295100 -01042.207690 000.407 356.80 +00214.00 -0.00 +0.00 +00008 000.00 1 00.60 00.90 +0.00 +0.00 +0.00 +00000 +00.000 +00.000 +00.000 +00000 +00000 +0.00 +0.00 +0.00 0001 000000300
    017 094441.30 +2921.295100 -01042.207690 000.259 356.80 +00214.00 -0.00 +0.00 +00007 000.00 1 00.60 00.90 +0.00 +0.00 +0.00 +00000 +00.000 +00.000 +00.000 +00000 +00000 +0.00 +0.00 +0.00 0001 000000400
    017 094441.40 +2921.295100 -01042.207690 000.112 356.80 +00214.00 -0.00 +0.00 +00007 000.00 1 00.60 00.90 +0.00 +0.00 +0.00 +00000 +00.000 +00.000 +00.000 +00000 +00000 +0.00 +0.00 +0.00 0001 000000500
    017 094441.50 +2921.295100 -01042.207690 000.295 356.80 +00214.00 -0.00 +0.00 +00007 000.00 1 00.60 00.90 +0.00 +0.00 +0.00 +00000 +00.000 +00.000 +00.000 +00000 +00000 +0.00 +0.00 +0.00 0001 000000600
    017 094441.60 +2921.295100 -01042.207690 000.295 356.80 +00214.00 -0.00 +0.00 +00008 000.00 1 00.60 00.90 +0.00 +0.00 +0.00 +00000 +00.000 +00.000 +00.000 +00000 +00000 +0.00 +0.00 +0.00 0001 000000700
    017 094441.70 +2921.295100 -01042.207690 000.270 356.80 +00214.00 -0.00 +0.00 +00007 000.00 1 00.60 00.90 +0.00 +0.00 +0.00 +00000 +00.000 +00.000 +00.000 +00000 +00000 +0.00 +0.00 +0.00 0001 000000800
    017 094441.80 +2921.295100 -01042.207690 000.241 356.80 +00214.00 -0.01 +0.00 +00007 000.00 1 00.60 00.90 +0.00 +0.00 +0.00 +00000 +00.000 +00.000 +00.000 +00000 +00000 +0.00 +0.00 +0.00 0001 000000900
    017 094441.90 +2921.295100 -01042.207690 000.166 356.80 +00214.00 -0.01 +0.00 +00007 000.00 1 00.60 00.90 +0.00 +0.00 +0.00 +00000 +00.000 +00.000 +00.000 +00000 +00000 +0.00 +0.00 +0.00 0001 000001000
    016 094442.00 +2921.295100 -01042.207690 000.148 356.80 +00214.00 -0.01 +0.00 +00008 000.00 1 00.60 00.90 +0.00 +0.00 +0.00 +00000 +00.000 +00.000 +00.000 +00000 +00000 +0.00 +0.00 +0.00 0001 000001100
    016 094442.10 +2921.295100 -01042.207690 000.166 356.80 +00214.00 -0.01 +0.00 +00008 000.00 1 00.60 00.90 +0.00 +0.00 +0.00 +00000 +00.000 +00.000 +00.000 +00000 +00000 +0.00 +0.00 +0.00 0001 000001200
    016 094442.20 +2921.295100 -01042.207690 000.158 356.80 +00214.00 -0.00 +0.00 +00008 000.00 1 00.60 00.90 +0.00 +0.00 +0.00 +00000 +00.000 +00.000 +00.000 +00000 +00000 +0.00 +0.00 +0.00 0001 000001300
    016 094442.30 +2921.295100 -01042.207690 000.148 356.80 +00214.00 -0.00 +0.00 +00007 000.00 1 00.60 00.90 +0.00 +0.00 +0.00 +00000 +00.000 +00.000 +00.000 +00000 +00000 +0.00 +0.00 +0.00 0001 000001400
    016 094442.40 +2921.295100 -01042.207690 000.130 356.80 +00214.00 -0.00 +0.00 +00008 000.00 1 00.60 00.90 +0.14 +0.99 -0.01 +00000 +00.781 -00.640 +00.140 +00000 +00050 +119.63 -137.57 -60.84 0001 000001500
  • By eye it seems to fit the format, but your file reveals a quirk of parsing in Circuit Tools. Apparently the [avi] section is position-dependent. When I move that section to be between the [header] and [comments] sections, CT successfully reads the file. Hopefully that works for you.

    And I think you've missed the feature that lets you compare laps across sessions directly inside RaceChrono. Open a session, then tap the overflow button (three dots on the right side). Tap "Add reference lap" and then choose a session and a lap. The reference lap appears in the lap list as R1. You can repeat the process - additional laps will be R2, R3, etc.
  • edited July 2016
    Next version will export the required avifileindex and avisynctime. Manual rename is needed for the video files, but the required file names will show in the comments section. This feature seems to already work, but the export configuration form needs some work related to this.
  • Thanks, Antti - that should make the Circuit Tools export much easier than today. Really looking forward to it.
Sign In or Register to comment.