Fantastic idea, I love it.
Fantastic idea, I love it.
Intel i5 2500k @ 4.5GHz, 16GB DDR3 RAM, GeForce GTX 680 with driver 361.43, Windows 7 x64
I cant understand this part of the script:
In the globals_template.py you have this as value racestart = 3.5+0.8, what does it mean?racestart: This is used to synchronize the telemetry data with the video. The easiest way to find this number is to make a low-quality video, pause on a new lap, and note the differential between 0.00 on the timer and the actual time displayed.
I have a video where the race begins at 40 seconds. The second rounds begins at 1:53. So what do I have to use?
In the replay videos produced by PCARS, there's a few seconds at the start before the green flag drops. racestart then, tells the how many seconds into the video the green flag drops. You might think of it as mapping the video time to the race elapsed time: video time = race elapsed time + racestart.
If you have a video with a longer introduction (which could be if you captured it from a Twitch stream, or did some editing to add titles or whatnot), 40 seconds could be correct. The way to test that is to make sure that the lap timer resets to 0.00 when the car crosses the start/finish line.
For a video with two races (and two sets of telemetry), you're going to want to split the video and telemetry into two separate videos. This is mostly due to the fact that early testing required restarts, so the scripts automatically trim the telemetry to the last valid (start to finish) race in the telemetry. So you'll lose your first race's data.
However, it's easy to concatenate videos end-to-end with moviepy: output = concatenate_video([video1, video2, etc.]) so you can end up with one big final video!
Ok...I did some testing with the default values.
The result is in the video and clearly I'm doing something wrong because its not working
Do you have any clue what goes wrong?
To put it a different way, racestart is the interval of time between 0:00 on the replay video (not including the title screen, so 0:05 in the YouTube video) and when the green flag drops. Just eyeballing it in your video it looks like it might be 4 seconds (slightly more than the "base" of 3.5). Try that and see if the telemetry advances, and take a look at the difference in time between your car crossing the line and the timer resetting to 0.00 to fine-tune it. (That's actually why it the defaults it's listed as 3.5+0.8. When I built a test video with 3.5, it was off by 0.8 seconds, and I let Python do the math.)
You might also snag the copy from the 0.2-devel branch on git hub. I've made a few changes this weekend that will (at least) make rendering faster, especially if you want to do subclips to test.
If all else fails, you can send me the telemetry CSV and I'll take a look at it. If nothing else it'll find more rough edges I can file down as time allows!
My new video capture card arrives tomorrow, so hopefully I'll be able to recut videos with some improvements I've made. No sense in stumbling through the "stream to YouTube, then download, then process" jungle just before the capture card makes that whole process easier.
This is so interesting!
Would it be possible to use it to make Life "race reports" while the race is going on? Like those webpages that show live standings and times.
As far as i know no current software output a lap by lap report or the positions of the cars, fastest lap/sector times and so on... I think your app already does most of it?
(not sure i explained myself properly it's almost 1AM here lol)
I don't think you'll be able to do a 'live broadcast', but certainly add it to a replay.
XB1 GT - Steel Jockey. Steam GT - STEELJOCKEY.Project CARS 2 GOLD Member
Xbox One,TX 458,GTE rim,T3PA-Bodin load cell,racing cockpit,Onkyo 7.1,Panasonic 55"
Lenovo A7-20 for CrewChief, Alienware Alpha i7-4765T, 8gb DDR3-1600, GTX 860M, 2gb GDDR5, Samsung SSD 850 EVO 250gb, Win 10 Home 64bit
For live video, no. Right now, the script isn't fast enough to process telemetry packets and render video packets to keep up in real time.
If all you want is data, it's fast enough to do that. Silently living in the repository is a "racestandings.py" script. It would require a bit of work to get working again since I've changed a few things since it was created, but it was used as a "proof of concept" to get sector and lap times.
Output looks something like this (ignore the blank sector 2, like I said, it's a bit out of sync with telemetry parsing):
This *is* fast enough to render in real time; I tested that. With a bit of effort you could convert it to output a dynamic web page instead of terminal text, which might be exactly what you're looking for.
Testing with your dev branch results in a error:
I have created a fresh Ubuntu installation with the program requirements as you mentioned in the readme.Code:root@ubuntu:/home/michel/Desktop/replay_dev# python3 replay.py globals_template.py Traceback (most recent call last): File "replay.py", line 12, in <module> from black_test import black_test File "/home/michel/Desktop/replay_dev/black_test.py", line 9, in <module> g = import_module(".".join(sys.argv[:-3].split('/')[1:])) File "/usr/lib/python3.4/importlib/__init__.py", line 109, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 2249, in _gcd_import File "<frozen importlib._bootstrap>", line 2201, in _sanity_check ValueError: Empty module name root@ubuntu:/home/michel/Desktop/replay_dev#
•Python 3.4 or greater
Do I still miss something?
Sorry but I don't have any knowledge of Linux or Python. Google is my best friend at the moment