I have interactive plot via matplotlib with a click function. Currently, the click function gives me the time t. Now, Using moviepy and pygame, I am playing the video my jumping directly to that time instance. But during the play, I cannot control. I would like to have a pause and scroll bar to forward or backward the video. Similar to the windows media player. Is there some function associated with clip to pause the video when a keyboard button is pressed?
print('Playing video from time :', (t - 5, "to :", t + 5)
clip = VideoFileClip(self.videofile).subclip(int(t) - 5, int(t) + 5)
clip.preview()
pygame.quit() # currently it is called at the end of the my plot
function
I want to pause function. I looked for some functions like clip.show() but did not help me.