This video is about Ken Thompson’s work on TBOplayer. (KenT on the Raspberry Pi forums, KenT2 on Github – where you can download his work.)
Ken’s written a GUI (graphical user interface) for Omxplayer – the only video player currently available which can utilise the full capabilities of the Raspberry Pi’s GPU. (Graphics Processing Unit).
The reason he did this was for a museum display, where they want to play four different videos which are to be user-selectable by pressing buttons. Ken needed to complete the project for £500 or under. And the Raspberry Pi seemed like a good place to start.
TBOplayer is written in Python and Tkinter. You can check out the code at GitHub
This was filmed on location in the wilds of Milton Keynes at the National Museum of Computing, where many rare species of computer still live in their natural habitats. The MK Raspberry Jam was so “happening” that I had to overdub the video as there was so much background noise from these and other wild creatures known as geeks.
Script runs smoothly, but it doesn’t seem to like adding tracks from the menu when they have spaces in their file paths.
Best off speaking to the author about that. I’m just a lowly reviewer :)
In command line, I would suggest wrapping quotes around the file path, in a GUI, that’s harder to do. Linux seems to regard spaces in file paths as an abomination. ;)
Thanks for the comment, I’ll look into the problem of spaces in filenames.
I was wondering if there is a way to disable the hotkeys for the TBO Player, All the hotkeys but the F11? Please let me know…. Thank you for developing it.
There is an update on github which fixes the spaces in filenames bug. It also adds an Add button which duplicates track>add menu.
Excellent – that’s a quick response. Well done Ken. :-)
Haven’t installed this yet but I will. It looks like it runs under xwindows. I have problems with omxplayer under xwindows due to memory split. What memory split do you recommend for xwindows and omxplayer?
There’s a thread on the Pi forums where someone’s talking about 168/88 split with LXDE open
If Ken happens by, perhaps he can tell us what he’s using?
Hello, 192/64 and it seems to work fine. When i tried with less than 64MB for the GPU it didnt work.
sudo raspi-config to change the memory split)
TBOPlayer doesn’t show any seek-bar and buttons are not visible in front of the video, is it normal?
I understood that he just wanted to have buttons and a playlist.
I think it’s not hard to made it so i’ll search for it.
Have fun, bye.
As far as playing a single track goes TBOPlayer is just a wrapper for OMXplayer; it will do what OMXPlayer does no more, no less.
The default 192/64 has worked fine for the few test videos I have tried and X runs fine with these settings. I think maybe some unusual high def videos do need more gpu. If a video does not play with TBOPlayer then try running it from the command line.
Not seeing the buttons on top a video is, I understand, a limitation of OMXPlayer. If anyone knows how to fix this, especially in Python I would love to know. All the functions you need during playing have keyboard bindings. Use the help menu to find what they are; they are slightly different to the standard omxplayer ones. ‘Just buttons and a playlist’ is perhaps a bad description on my part as most of the buttons are not very useful except for audio tracks.
There is no seek bar because OMXPlayer does not allow seeking in the way that is compatible with a seek bar. It does have skip forward and skip backwards keys, however the skip 600 functionality appears to be broken.
I have provided a progress display (minutes and seconds). It would be relatively easy to add a Tkinter widget to turn this into a passive bar. An exercise for the reader but not much use as you cannot see it except on audio only tracks (where it doesn’t work anyway (TBOPlayer limitation, bug fix welcome)).
Hi, thank you for your answer. I will make the passive bar. Then with the skip forward and skip backwards keys, i will try to emulate the ‘seek’ function.
I didnt know ‘tkinter’ but i think it is possible to integrate the video in a Frame to get something more user friendly.
I cant search for it today but next week i will have a solution ( I hope :-) ).
Thank you very much for your share. This is a beautiful work.
I’ve started a similar thing with a web based frontend (based on PHP, code is here: https://github.com/kifj/omxplayer-ui/). I’ll have a close look on how you integrated omxplayer, as you have already solved features I wanted to implement too. If I can reuse the approach, I’ll list you as the original source.
Of course you can use it. After all its hardly original, thank Mr Baiter for the original idea.
If you look at my pipresents repository /KenT2/pipresents you will see a much more elegant version of the omxplayer interface software.
Have installed the player onto the Wheezy version of raspian. It appears to work with most media formats I have tried which is great, as this is often a limitation of other players.
Just a couple of points – I have found that the volume buttons do not appear to have any effect (however the keyboard ‘+’ and ‘-‘ keys can be used instead). I would also be grateful for some advice on how to size played videos to 100% of their native size. Reason is that have tried playing some small sized vids from places like utube and they are expanded to fill the whole screen. As a result the images pixellate a lot. Playing at the native resolution should mean that the image quality is optimal.
In OMXPlayer the volume control works only while the track is playing, by which time the buttons are often obscured! OK for audio tracks though.
Not sure about resizing videos, you need to read about omxplayer. omxplayer has a -r option which might do what you want, just enter -r into the appropriate field in TBOPlayer options,
Tried the -r option but it does not appear to make any difference sadly. Furthermore when click on q to quit you are left with a black screen – i.e. it does not return you to XWindows, so I had no option but to just switch off at the wall to get back to where I was before. I’ve since seen others have had similar experiences using the -r switch.
Are you aware of any n-going development of the OMXPlayer itself which might sort these niggles – Would be useful as an upgrade download, or would possibly feature in the next distro.
I thought the black screen problem has been fixed, mind you one of the latest sudo apt-get upgrades has broken it again; I’m sure it will be re-fixed soon.
omxplayer is being developed here by the community:
Its a slow process though as its very complicated software.
Loving the GUI, I have added files from a mounted share and have them saved in a playlist.
Will the playlist option automatically repeat all tracks in the playlist? as I am thinking of using this for Hold music
and is there a way to get this to load on boot (in case power fails)
You can repeat a playlist, there is an option in Options.
You can start TBOPlayer at Boot, instructions are in the Pi Presents Manual which is in my Github repository. However, having started, TBOPlayer does not automatically load and play a playlist. However its not complex code and you could modify it to do so.
Alternatively use Pi Presents and use a ‘mediashow’ or liveshow. It does everything you want and more.
running the script gives me error (python tboplayer.py)
Traceback (most recent call last):
File “tboplayer.py”, line 1201, in
bplayer = TBOPlayer()
File “tboplayer.py”, line 506, in __init__
self.root = tk.Tk()
File “/usr/lib/python2.7/lib-tk/Tkinter.py”, line 1712, in __init__
self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: no display name and no $DISPLAY environment variable
Could I be doing anything wrong. I am using the latest image posted on http://www.raspberrypi.org/
I followed these instruction – https://github.com/KenT2/tboplayer
You need to run TBOPlayer from the LXDE. It uses Tkinter which uses X windows.
Excellent work . I’m using very well and works . I just wanted to see if possible Increase mtamaño Sources Interface .
The menu bar and botoen with larger letters .