File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 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):
1313 try :
1414 result , ms = result .split ("." )
1515 except ValueError :
16- return result + ".00" .replace (":" , "-" )
16+ return ( result + ".00" ) .replace (":" , "-" )
1717 ms = int (ms )
1818 ms = round (ms / 1e4 )
1919 return f"{ result } .{ ms :02} " .replace (":" , "-" )
@@ -35,7 +35,7 @@ def main(video_file):
3535 # iterate over each possible frame
3636 for current_duration in np .arange (0 , video_clip .duration , step ):
3737 # 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 ))
3939 frame_filename = os .path .join (filename , f"frame{ frame_duration_formatted } .jpg" )
4040 # save the frame with the current duration
4141 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):
1313 try :
1414 result , ms = result .split ("." )
1515 except ValueError :
16- return result + ".00" .replace (":" , "-" )
16+ return ( result + ".00" ) .replace (":" , "-" )
1717 ms = int (ms )
1818 ms = round (ms / 1e4 )
1919 return f"{ result } .{ ms :02} " .replace (":" , "-" )
You can’t perform that action at this time.
0 commit comments