File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ def format_timedelta(td):
13
13
try :
14
14
result , ms = result .split ("." )
15
15
except ValueError :
16
- return result + ".00" .replace (":" , "-" )
16
+ return ( result + ".00" ) .replace (":" , "-" )
17
17
ms = int (ms )
18
18
ms = round (ms / 1e4 )
19
19
return f"{ result } .{ ms :02} " .replace (":" , "-" )
@@ -35,7 +35,7 @@ def main(video_file):
35
35
# iterate over each possible frame
36
36
for current_duration in np .arange (0 , video_clip .duration , step ):
37
37
# format the file name and save it
38
- frame_duration_formatted = format_timedelta (timedelta (seconds = current_duration )). replace ( ":" , "-" )
38
+ frame_duration_formatted = format_timedelta (timedelta (seconds = current_duration ))
39
39
frame_filename = os .path .join (filename , f"frame{ frame_duration_formatted } .jpg" )
40
40
# save the frame with the current duration
41
41
video_clip .save_frame (frame_filename , current_duration )
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ def format_timedelta(td):
13
13
try :
14
14
result , ms = result .split ("." )
15
15
except ValueError :
16
- return result + ".00" .replace (":" , "-" )
16
+ return ( result + ".00" ) .replace (":" , "-" )
17
17
ms = int (ms )
18
18
ms = round (ms / 1e4 )
19
19
return f"{ result } .{ ms :02} " .replace (":" , "-" )
You can’t perform that action at this time.
0 commit comments