Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating final video hangs #49

Closed
Michel-NL opened this issue Feb 18, 2016 · 11 comments
Closed

Creating final video hangs #49

Michel-NL opened this issue Feb 18, 2016 · 11 comments
Assignees
Labels
Milestone

Comments

@Michel-NL
Copy link
Contributor

Don't know if it is my configuration or something else.
I did this now 5 times and everytime with the same results that it hangs around step 24507. Have to press CTRL-C to get back to the prompt.
What do you think it could be?

michel@ubuntu:~$ cd project-cars-replay-enhancer-0.3-devel/
michel@ubuntu:~/project-cars-replay-enhancer-0.3-devel$ python3 ReplayEnhancer.py race4.json
Creating video.
Using Track: Sonoma Raceway
[MoviePy] >>>> Building video ../data/video/output/race4.mp4
[MoviePy] Writing audio in race4TEMP_MPY_wvf_snd.mp3
[MoviePy] Done.
[MoviePy] Writing video ../data/video/output/race4.mp4
 24%|████████▏                         | 24507/101298 [37:54<1:58:25, 10.81it/s]

^CAborting...
michel@ubuntu:~/project-cars-replay-enhancer-0.3-devel$ python3 ReplayEnhancer.py race4.json
Creating video.
Using Track: Sonoma Raceway
[MoviePy] >>>> Building video ../data/video/output/race4.mp4
[MoviePy] Writing audio in race4TEMP_MPY_wvf_snd.mp3
[MoviePy] Done.
[MoviePy] Writing video ../data/video/output/race4.mp4
 24%|████████▏                         | 24507/101298 [40:41<2:09:03,  9.92it/s]^CAborting...
michel@ubuntu:~/project-cars-replay-enhancer-0.3-devel$

@SenorPez
Copy link
Owner

This doesn't seem to be an issue with the Replay Enhancer, since at that point it's completely in the MoviePy script (and by extension, FFMPEG, which is the renderer).
http://stackoverflow.com/questions/16523746/ffmpeg-hangs-when-run-in-background
Zulko/moviepy#13

I've made a pair of checkins (because I did it wrong the first time) that enables logging for FFMPEG. It'll show up wherever your file is being created... so in your case, ../data/video/output/race4.mp4.log. That might provide more info... or if I'm thinking it's getting hung up by not having a log file to print to, solve your issue?

@SenorPez
Copy link
Owner

Ignore all that.

I found a dataset that causes the issue on my machine.
I think it's a hang in the Replay Enhancer.
I'm investigating right now!

@SenorPez SenorPez added the bug label Feb 18, 2016
@SenorPez SenorPez added this to the 0.3 Release milestone Feb 18, 2016
@SenorPez SenorPez self-assigned this Feb 18, 2016
@SenorPez
Copy link
Owner

The problem appears to be the font scaling for the "PIT" indicator. While I'm not sure why it's happening only on certain datasets, I'm working on engineering a fix.

Great catch.

@Michel-NL
Copy link
Contributor Author

ok..great that you found the bug :)

@SenorPez
Copy link
Owner

@Michel-NL: Checkin made that should solve the issue.

Additionally, I modified the "custom" video parameters. It's a hidden option that allows me to toy with various outputs. It should now be set to render your video through the problem frame (#24507).

Run python3 ReplayEnhancer -u race4.json to use the custom settings. It'll render frames 24000 through 27000. If it's successful, you should see a "PIT" indicator around 17 seconds in... that was the problem child that has now been fixed.

Sorry about this... it was a really sloppy mistake, and based on your text output, wasted a lot of your time. 😦

@Michel-NL
Copy link
Contributor Author

okay I did run the test. All works fine, did see the pit signs scrolling through the players.
Now running the complete video.

No problem...My server is doing all the hard work :)

@SenorPez
Copy link
Owner

Fingers are crossed that everything renders okay. If you're having success, we should be on track for a release.

Also, if you upload them to YouTube, I'd LOVE to see them!

@Michel-NL
Copy link
Contributor Author

Here it is the first full video :)
https://youtu.be/vAu5Zao2zyw

How reliable do you think the red lines are? take a look at around 30 minutes. I drive in second place and if you are looking at the red lines, then number 1 and 3 should be around me.

@Michel-NL
Copy link
Contributor Author

second video https://youtu.be/T3O0an7WVqU

@SenorPez
Copy link
Owner

Love it! I've one final tweak to make, and then I'm going to package 0.3 and release it. There's probably a few things that will be in a 0.3.1 (like adding drivers that didn't race in the current race to the Series Standings), but it looks like we're solid.

As for the red lines: They're as accurate as the telemetry provides. There's a field that indicates the percentage of the lap completed. It sometimes goes a little wonky (most noticeable on pit stops), but otherwise is okay.

Keep in mind, too, that the length of the red line is the entire length of the track. So, for example, on a track like Sonoma (2.5 miles), with a 100-pixel red line, each pixel represents nearly 1,000 feet. That's not a huge distance at race speeds.

@Michel-NL
Copy link
Contributor Author

Okay I understand the red lines. I think its a solid release 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants