Posts: 66
Joined: Sun Apr 07, 2013 2:14 pm

Playing videos in python

Fri Mar 28, 2014 7:01 am

Basically I need a simple, easy to use library that will play full screen videos for me in python on the raspberry pi.
All the functionality I need is:
I also need to be able open the film at its first frame as a still, and then be able to play from there after it receives input.
It needs to be able to receive user input so will preferably run in the background in some form.

Any suggestions? I've already tried pygame.movie but it's just not working for me. I've also looked at pymedia but it looks tricky and I've read loads of people saying its buggy. Some examples of whichever library you suggest would be great too :)

Thanks for all your help in advance

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

Re: Playing videos in python

Fri Mar 28, 2014 8:46 am

The only way to do this (in a simple way) is using omxplayer. You can call it from Python as subprocess and send control commands via stdin or using the dbus interface.
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 “Beginners”