# importing vlc module
import vlc
# importing time module
import time
# creating vlc media player object
media_player = vlc.MediaPlayer()
# media object
media = vlc.Media("1mp4.mkv")
# setting media to the media player
media_player.set_media(media)
# start playing video
media_player.play()
# wait so the video can be played for 3 seconds
# irrespective for length of video
time.sleep(3)
# pausing the video
media_player.set_pause(1)
above code is from website geeksforgeeks.com and it’s suppose to pause video after 5 sec but it’s not working
media_player.pause()
i tried this method but it’s also not working
New contributor
Swayam Shrikondwar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.