katangawise
Posts: 6
Joined: Thu Feb 11, 2016 6:36 am

Raspberry Pi 3 - omxplayer from python 2.7

Mon May 16, 2016 9:11 am

Hello friends!

I want to know if it's possible to check in omxplayer that it's finished to play a video file.

I use this code to start the omxplayer:

Code: Select all

os.system("omxplayer -b /home/pi/Videos/file.mp4")
May be it is possible to run omxplayer so, that after playing the file it's closing itself and with polling to check if omxplayer process exists and if not -> to run the next file?

Thanks a lot!

gkreidl
Posts: 6335
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Raspberry Pi 3 - omxplayer from python 2.7

Mon May 16, 2016 9:55 am

Check the subprocess module.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

Return to “Python”