SenorPez / project-cars-replay-enhancer

Project CARS Replay Enhancer: Combines telemetry data with replay video to improve Project CARS replays.
MIT License
12 stars 1 forks source link

t_start should be smaller than the clip's duration #103

Closed Michel-NL closed 7 years ago

Michel-NL commented 7 years ago

Config file has these values: "sync_racestart" : 0.0, "video_skipend" : 137, "video_skipstart" : 1475

Video what I want to use has also quali session, so I want to skip that. https://www.youtube.com/watch?v=041POVq_vo4

Trying replayenhancer -s option and gives me this error.

michel@SRV-VM-UBUNTU:~/replayenhancer$ replayenhancer -s race1-Spa_ok.json
Traceback (most recent call last):
  File "/usr/local/bin/replayenhancer", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.5/dist-packages/replayenhancer/__init__.py", line 240, in main
    sync=args.sync)
  File "/usr/local/lib/python3.5/dist-packages/replayenhancer/__init__.py", line 123, in make_video
    ).subclip(start_time, end_time)
  File "<decorator-gen-39>", line 2, in subclip
  File "/usr/local/lib/python3.5/dist-packages/moviepy/decorators.py", line 89, in wrapper
    return f(*new_a, **new_kw)
  File "<decorator-gen-38>", line 2, in subclip
  File "/usr/local/lib/python3.5/dist-packages/moviepy/decorators.py", line 29, in apply_to_mask
    newclip = f(clip, *a, **k)
  File "<decorator-gen-37>", line 2, in subclip
  File "/usr/local/lib/python3.5/dist-packages/moviepy/decorators.py", line 41, in apply_to_audio
    newclip = f(clip, *a, **k)
  File "/usr/local/lib/python3.5/dist-packages/moviepy/Clip.py", line 385, in subclip
    "duration (%.02f)."%self.duration)
ValueError: t_start (209.59) should be smaller than the clip's duration (-1338.00).
Michel-NL commented 7 years ago

Ok I think i have it. It must be the total time in seconds for the end of the video. "video_skipend" : 5455, "video_skipstart" : 1468

But then I have the next thing...It isn't playing a complete lap, so I can't set the sync value. It plays 30 seconds and then its showing the results image.

I will create a new issue fot this.

SenorPez commented 7 years ago

This should be accounted for in the UI Configurator anyway.

Default values should set themselves to 0.00 and the video duration anyway, to make life easier.