import math def milliseconds_to_framenumber(milliseconds,framerate)->int: """ This function takes a time in ms and a framerate then converts the time in ms to a framenumber :params: :milliseconds (int) : the millisecond time to convert :framerate (int) : the framerate of the video :return (int): the framenumber correspondind to the millisecond """ return math.floor(milliseconds * framerate / 1000)