Determining Telemetry Synchronization Value - SenorPez/project-cars-replay-enhancer GitHub Wiki

One of the hardest things to understand about the Project CARS Replay Enhancer is the Telemetry Sync. Value in the configuration. This page aims to aid you in understanding what it is and how to figure it out.

Why Do We Need Telemetry Synchronization?

In a typical replay, there are two streams of data. First, you have the captured video that shows your car racing around the track. Second, you have the captured telemetry that has the data about your car racing around the track. The Project CARS Replay Enhancer plays both of these back simultaneously and at the proper speed.

In a perfectly synchronized enhanced replay, when the video feed shows a car crossing the start-finish line, the telemetry feed should have that car crossing the start-finish line. However, the video feed and the telemetry feed can not communicate with each other, so if the starting point of the video feed is before or after the starting point of the telemetry feed, the data doesn't match up.

How Do We Get Telemetry Synchronization?

The Project CARS Replay Enhancer has an the option to create a Telemetry Sync Video.

  • In the command line, run replayenhancer -s config.json, replacing config.json with your configuration file.
  • In the GUI, click [Create Telemetry Sync Video].

The video that is created uses the telemetry feed and starts 10 seconds before the first car completes the first lap, and ends 10 seconds after the last car completes the first lap. Unless you're really lucky, this won't be in sync with the video, but that's what we're here for!

NOTE The video also includes any title and result cards that will be rendered by the configuration.

  1. Pause the video as close as possible to when your car crosses the start-finish line.

NOTE: Some tracks don't have a visible start-finish line; in that case, I typically find a reference point that's "close enough" and use that... if position changes or lap ticks seem wrong, that would be why. In the example screenshot, at Spa, I use the green gantry, which seems to produce "good enough" results.

NOTE: Throughout this procedure, we'll refer to "your car." This procedure actually works with ANY car in the field, but since Project CARS, by default, focuses on the local player's car, that's usually the easiest.

  1. Record the time displayed in the black box on the top of the video. This is the timecode of the video, in seconds.

    In the example below, the timecode is 163.17.

  2. Resume playback of the video until your first lap time is displayed. If you're not in first place, you may need to add the leader's time to your gap time.

    In the example below, the first lap time is 2:38.993.

  3. Convert the first lap time into seconds.

    In the example below, the first lap time in seconds is 158.993.

  4. In a synchronized video, the timecode of the video (see Step 2) when your car crosses the start-finish line matches the first lap time into seconds. The difference between the timecode and the first lap time is your Telemetry Sync. Value.

    In the example below, the Telemetry Sync. Value is 4.177

NOTE: The typical scenario has timecode greater than first lap time. However, the procedure remains the same even if that is not the case; the Telemetry Sync Value is a negative number. For example, if first lap time was 163.17 and timecode was 158.993, the Telemetry Sync Value would be -4.177.

Example Screenshot

Notes and Troubleshooting

Accuracy Considerations

The Project CARS Replay Enhancer creates videos at 30 frames per second. The suggested rate for UDP packet broadcast for Project CARS Replay Enhancer use is 30 packets or more per second. This means the reasonable "closest approach" is +/-0.03 seconds. Having a perfectly synchronized video is difficult to impossible. Practically, if you're off by a tenth or two, your viewers aren't going to notice.

Interaction With Video Start Time

The Telemetry Sync Value is directly affected by the Video Start Time configuration value, used to determine the start of the video playback. Any adjustments made to Video Start Time must be done, in reverse, to the Telemetry Sync Value to maintain proper synchronization.

For example, if in the example we decided to change Video Start Time from 25 to 26 (adding 1), we would change Telemetry Sync Value from 4.177 to 3.177 (subtracting 1).

Preview Video Doesn't Include Start-Finish Line

If the preview video doesn't include your car crossing the start-finish line, set the Telemetry Sync Value to a high value (at least the length of the preview video) and recreate the preview video. Adjust the value further based on the method above.

For example, if we had entered 10 and recreated the video, and ended up with our example screenshot, the Telemetry Sync Value would become 14.177.