Closed zykure closed 1 year ago
Where in the videocutter.py
file should the abovementioned code added?
Apparently the code changed and the getGOPbisections
is now in the file libs/videoservice.py
on line 591. I have VidCutter version 6.0.5.1.
But in that version, the fix I suggested here is already added (you can tell by the keyframes = [ ... ]
line.) I guess we can close this issue then.
This was already reported in #290 which was closed. The issue still exists in the latest version. From what I can gather it is a string-formatting problem that should be easy to fix, see below for an idea.
I had this issue with recent version 6.0.5.1 installed on Manjaro Linux (Python 3.10.4, libmpv 109.1). The error is reproducible when I open the same project file again, as long as SmartCut mode is enabled. Luckily this is fixable with a few code edits.
Log output:
I did some debugging and traced the issue down to a wrongly formatted keyframe timestamp. All keyframes are given as float values, except the last one which is a string in
H:MM:SS.nnn
format. Hence, the comparison operator fails as indicated in the error message. In my case, thekeyframes
object in thegetGOPbisections()
method contains:I was able to add a workaround that simply converts all timestamps to floats, but the actual issue is probably somewhere in the
getKeyframes()
method which produces the non-float value. Updated code invideocutter.py
: