Closed imababo closed 5 years ago
Ran into the same problem. See also this discussion Seems like there is no handy way to do it. So you will have to run something like the following in a loop or separate thread.
try:
stat = player.playback_status()
# check stat if you like, maybe reacting to Stopped if user can stop it..
except OMXPlayerDeadError err:
# presumably the video/audio playback ended. do what you need to do..
pass
I'm beginner on python. I develop video player with omxplayer. I want to do as follows:
I need anybody's help.
The below is snippet of my python codes:
def create_player(movie, args): global g_player g_player = OMXPlayer(movie, args)
def onStop(player): video = another.mp4 create_player(movie) g_player.play()
args = [] args.append('--no-osd') movie = video.mp4 create_player(movie, args) g_player.play()