This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from moviepy.video.io.ffmpeg_tools import ffmpeg_extract_subclip | |
def convert_time_to_seconds(time): | |
# ChatGPT wrote this function | |
try: | |
hour, minute, second = map(int, time.split(":")) | |
return hour * 3600 + minute * 60 + second | |
except: | |
minute, second = map(int, time.split(":")) | |
return minute * 60 + second |