Skip to main content

Replay Enhancer

Project description

# Project CARS Replay Enhancer [![Build Status](https://travis-ci.org/SenorPez/project-cars-replay-enhancer.svg?branch=0.5-devel)](https://travis-ci.org/SenorPez/project-cars-replay-enhancer) [![codecov](https://codecov.io/gh/SenorPez/project-cars-replay-enhancer/branch/0.5-devel/graph/badge.svg)](https://codecov.io/gh/SenorPez/project-cars-replay-enhancer)

Combines telemetry data with replay video to improve Project CARS replays.

Current release: 0.5 Current edge state: Getting There, Maybe Current mood: Frustrated

The Project CARS Replay Enhancer (I’d call it PCRE, [but that’s taken](http://www.pcre.org/ “PCRE”)) is intended to augment Project CARS replays by combining captured telemetry data with replay video. The project is currently in a rough state, being rewritten from the ground-up to be more stable, better tested, and faster.

The scripts are currently not fast enough for live broadcasting.

## Requirements * [Python 3.3](https://www.python.org/download/releases/3.3.0/ “Python 3.3.0”) or greater * [MoviePy](http://zulko.github.io/moviepy/ “MoviePy”) * [natsort](https://pypi.python.org/pypi/natsort “natsort”) * [NumPy](http://www.numpy.org/ “NumPy”) * [Pillow](https://pypi.python.org/pypi/Pillow “Pillow”)

##Installation The Project CARS Replay Enhancer can be installed with pip: pip install replayenhancer.

> NOTE: Depending on your environment, you may need to explicitly call pip using your python installation. For example: python -m pip install replayenhancer or python3 -m pip install replayenhancer.

## Usage ###Telemetry Capture: Telemetry packet capture is performed by running the packetgrab.py script on the network. This captures UDP packets broadcast by Project CARS (make sure you’ve enabled UDP broadcast) and store them to a subdirectory for future processing.

> NOTE: As most internet video runs at 30 frames per second, you want to set your UDP broadcast rate to at least 30 packets per second, otherwise there may be noticeable “phasing” between video and data displays.

####Telemetry Capture Best Practices: There are a few things to do to optimize the telemetry data used by the Project CARS Replay Enhancer.

  • Telemetry capture should be started before entering the race. The preferred time for this would be at the menu before clicking the Drive button on the menu.

  • At the end of the race, do not click Continue or stop telemetry capture until all the Race Time numbers post. (Make sure you scroll down to see the later cars!) Despite you being on the results screen, the remaining cars will finish their lap and this is captured by the telemetry.

  • Each collection of telemetry packet captures should only contain a single race. Restarting, if that is allowed, is allowed. The parser automatically detects the latest complete (start->finish) race in each collection; if multiple complete races are included in the telemetry, only the last one will be used.

###Video Capture: There is no video capture functionality included in the scripts. How you get the video to your local machine is left as an exercise for the reader. For my PS4, I stream the replay to YouTube which then archives it and then can be downloaded using [youtube-dl](https://rg3.github.io/youtube-dl/ “youtube-dl”). Video capture devices such as an Elgato work just fine as well (probably better, actually).

###Configuration Files: Project CARS Replay Enhancer configuration files are JSON files, and can be created by using the [Project CARS Replay Enhancer UI](https://github.com/SenorPez/project-cars-replay-enhancer-ui) or by creating them by hand. See [Configuration File Format](https://github.com/SenorPez/project-cars-replay-enhancer/wiki/Configuration-File-Format) for details on recognized fields.

###Telemetry Synchronization: For best results, the telemetry data feed must be synchronized to the video feed; there is no way to automatically perform this. To aid with this synchronization, run the Project CARS Replay Enhancer is the -s option and the desired configuration file. For example, replayenhancer -s config.json.

A low-quality video that encompasses only the first lap of the race is created, along with a timer overlay. To determine the telemetry synchronization, compare the time on this overlay with the lap time of a car as it crosses the start-finish line. These two times should be identical; if they are not, the syncronization needs to be adjusted. * If the value on the timer is greater than the lap time (this is the typical scenario), add the difference between the timer and the lap time to the telemetry synchronization value. * If the value on the timer is less than the lap time, subtract the difference between the timer and the lap time from the telemetry synchronization value. After adjusting the telemetry synchronization, another low-quality, shortened video is created to confirm the synchronization.

###Creating a Replay To create the full, enhanced replay, provide the Project Cars Replay Enhancer with a valid configuration file. For example, replayenhancer config.json.

##Enhancing the Enhancer? You’re more than welcome to do so! Write new modules, speed up new modules, feel free. If you have any issues or questions please communicate them here! I’m always looking for help.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

replayenhancer-0.5rc1.tar.gz (220.2 kB view details)

Uploaded Source

Built Distribution

replayenhancer-0.5rc1-py3-none-any.whl (224.9 kB view details)

Uploaded Python 3

File details

Details for the file replayenhancer-0.5rc1.tar.gz.

File metadata

File hashes

Hashes for replayenhancer-0.5rc1.tar.gz
Algorithm Hash digest
SHA256 a13dd89be6ef9a26c29b002d11d04e6c8003b37558547dc9fc1f962e52e9a18e
MD5 5877734930d32c6aef898bbe53f274f4
BLAKE2b-256 c4302400052b2bbecea51381ad5ba894bbc9a3c85c99480b3a4fb1d67554a320

See more details on using hashes here.

File details

Details for the file replayenhancer-0.5rc1-py3-none-any.whl.

File metadata

File hashes

Hashes for replayenhancer-0.5rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 94077b059a22f8d46104213f8b68f16ae82393cb89fb41621a49c210a6265db6
MD5 2f69c69f7d8f61ab78188d9f2a2a0d90
BLAKE2b-256 2930ce1c5dbacaa9febae490f51edb7754599ec55934b958c04555f102fb0c98

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page