New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to pause and seek at a moment? #8
Comments
Hello @Akascape, I wouldn't recommend using def seek_pause(seek_sec=0):
vid_player.seek(seek_sec)
vid_player.play()
vid_player.pause()
seek_pause(5) Let me know if this worked for u. |
@PaulleDemon I tried this method but it was not working. Thats why I used the time method. Please let me know if this is happening in your system also. |
@Akascape Hmm sorry I hadn't tested that, my laptop is given for repair, I am using my phone. I have updated the previous code if that doesn't work try the below def seek(sec):
vid_player.seek(sec)
vid_player.after(5, vid_player.pause) # test this, the first parameter is time in milliseconds, u can change this according to ur need.
seek(20) |
@PaulleDemon The previous code didn't work but the next one worked, but we have to add another line: def seek(sec):
vid_player.seek(sec)
vid_player.play() #have to play it so that it displays the seeked frame
vid_player.after(50, vid_player.pause)
seek(20) |
I am a little bit confused on the seek method, when I seek to a part while the video is paused then it doesn't display the frame, means it only displays the seeked part when it is played.
I tried this method after seek while pausing the video and it worked but we have to use the time module and I think its not accurate;
Any fix for this? I just want to display the video frame when seeked without playing it.
The text was updated successfully, but these errors were encountered: