omxplayer - GPU enabled video player


169 posts   Page 1 of 7   1, 2, 3, 4, 5 ... 7
by spennig » Sun May 06, 2012 5:26 pm
I compiled omxplayer (somewhat competent and comprehensive CLI video player using the Rpi GPU). Seems to work rather well.

Obviously, one should compile from source or install it from one's signed distribution packages, but as these options are either non-trivial or non-existent, you may find a binary archive at:

http://seyrsnys.myzen.co.uk/rp.....bin.tar.xz

Please note that:

* It assumes the GPU libraries are in /opt/vc/lib;

* It's compiled on an upto-date Arch (which may or may not match your system);

* It's rooted at usr, so in the unlikely event that you trust the me and the archive, as root:

# cd / ; tar -xf $TMP/omxplayer-bin.tar.xz

Where $TMP is where-ever you put the archive.

Works nicely for me.

-jh
User avatar
Posts: 84
Joined: Mon Aug 29, 2011 11:34 am
Location: New Forest
by dom » Sun May 06, 2012 5:41 pm
The link doesn't work for me.

Don't you need to install a list of packages first?

I wonder if pepedog can get this added as an Arch package?
Moderator
Moderator
Posts: 3861
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge
by spennig » Sun May 06, 2012 5:46 pm
Sorry, the forum editor (i.e. mea culpa) screwed up the link:

http://seyrsnys.myzen.co.uk/rp.....bin.tar.xz

(there's a space at the end in the original post).

I'll see if I can put it in the AUR, but you really don't want to build it on the device (or even Qemu, it takes hours, due to building git ffmpeg).

-jh
User avatar
Posts: 84
Joined: Mon Aug 29, 2011 11:34 am
Location: New Forest
by spennig » Sun May 06, 2012 5:54 pm
And you don't need any extra packages, it includes a private version of the ffmpeg libraries under /usr/lib/omxplayer
User avatar
Posts: 84
Joined: Mon Aug 29, 2011 11:34 am
Location: New Forest
by dom » Sun May 06, 2012 6:40 pm
Trying it in debian. It needs:

sudo apt-get install libpcre-dev libva-dev

sudo ln -s /usr/lib/libpcre.so  /usr/lib/libpcre.so.1

(possibly others as I have quite a few packages installed)

LD_LIBRARY_PATH=omxplayer/usr/lib/omxplayer/ omxplayer/usr/bin/omxplayer.bin dell/temp/test/big_buck_bunny_1080p_h264_ac3.mkv

and video plays.
Moderator
Moderator
Posts: 3861
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge
by spennig » Sun May 06, 2012 6:47 pm
Indeed,  I really meant "you don't any extra packages in my obscenely overloaded Arch instance ...."

You will certainly need extra packages in any other distro, and some patience in making it work (just as one does to navigate the omxplayer build environment).
User avatar
Posts: 84
Joined: Mon Aug 29, 2011 11:34 am
Location: New Forest
by spennig » Sun May 06, 2012 8:34 pm
There's an Arch AUR package 'omxplayer-bin' . The raw tar ball has been updated with instructions based on Dom's comments for Debian installation --- I'll maybe see if I can make a .deb package tomorrow).
User avatar
Posts: 84
Joined: Mon Aug 29, 2011 11:34 am
Location: New Forest
by dom » Mon May 07, 2012 11:50 am
Just tried on a clean debian image:

wget http://seyrsnys.myzen.co.uk/rp.....bin.tar.xz

tar xf omxplayer-bin.tar.xz

sudo apt-get install libva-dev

sudo ln -s /lib/libpcre.so.3 /lib/libpcre.so.1

LD_LIBRARY_PATH=omxplayer/usr/lib/omxplayer/ omxplayer/usr/bin/omxplayer.bin dell/temp/test/big_buck_bunny_1080p_h264_ac3.mkv

were all that is needed to run it.

A deb package would be very useful.
Moderator
Moderator
Posts: 3861
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge
by spennig » Mon May 07, 2012 1:55 pm
Your every wish .... (if only). There is now a deb:

http://seyrsnys.myzen.co.uk/rp......1-arm.deb

# dpkg -i omxplayer_0.0.1-arm.deb
####  .... fails with missing dependencies ...
# apt-get -f install
### fetches the missing dependencies, configures the sym links etc
$ omxplayer --help
Usage: omxplayer [OPTIONS] [FILE]
Options :
-h / --help print this help
-a / --alang language audio language : e.g. ger
-n / --aidx index audio stream index : e.g. 1
-o / --adev device audio out device : e.g. hdmi/local
-i / --info dump stream format and exit
-s / --stats pts and buffer stats
-p / --passthrough audio passthrough
-d / --deinterlace deinterlacing
-w / --hw hw audio decoding
-3 / --3d switch tv into 3d mode
-y / --hdmiclocksync adjust display refresh rate to match video
-t / --sid index show subtitle with index
-r / --refresh adjust framerate/resolution to video
User avatar
Posts: 84
Joined: Mon Aug 29, 2011 11:34 am
Location: New Forest
by dom » Mon May 07, 2012 3:19 pm
This is excellent.

It worked on my existing image, but to be sure I've gone back to clean debian image and it works great.

wget http://seyrsnys.myzen.co.uk/rp......1-arm.deb

sudo dpkg -i omxplayer_0.0.1-arm.deb

sudo apt-get -f install

Thank you for this.

I know it's probably much harder, but is an xbmc deb file possible?
Moderator
Moderator
Posts: 3861
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge
by spennig » Mon May 07, 2012 4:13 pm
I would think very much harder (and, alas, beyond my immediate needs, skills, aspirations).
User avatar
Posts: 84
Joined: Mon Aug 29, 2011 11:34 am
Location: New Forest
by jacksonliam » Sat May 12, 2012 6:08 pm
Thanks for that deb package, works really well!
User avatar
Posts: 151
Joined: Tue Feb 07, 2012 10:09 pm
by artesea » Sun May 13, 2012 9:41 pm
Found this to be nice and simple using the deb package, however my Pi is connected to the TV via composite and is 4:3, my videos are MP4 16:9.
At the moment it's cropping the edges off, but I want the full picture, is there a setting anywhere to get it to letterbox?
Nothing available on the TV itself, and trying to hit every letter on the keyboard didn't result in any changes to the output.
User avatar
Posts: 10
Joined: Thu Feb 23, 2012 8:30 pm
by artesea » Mon May 14, 2012 8:43 pm
Fixed it so I now have letterboxing by using config.txt, however I'm left with several ~ along the top and codec info and flashing _ along the bottom?
Any tricks to black them out?
User avatar
Posts: 10
Joined: Thu Feb 23, 2012 8:30 pm
by pieter » Tue May 15, 2012 11:30 am
dom wrote:I know it's probably much harder, but is an xbmc deb file possible?


Debian sid/unstable has xbmc: http://packages.debian.org/sid/xbmc
Eventually it will land in Testing and then in Stable.
Posts: 34
Joined: Mon Aug 22, 2011 7:12 am
by Spider.007 » Sat May 19, 2012 12:24 pm
@spennig can't you get this package in a 'official' archlinuxarm repo so everyone can install this player with just pacman -S, instead of needing to extract custom archives? :)
Posts: 34
Joined: Sat May 19, 2012 11:24 am
by alexeames » Sat May 19, 2012 2:29 pm
Installed OK on a fresh Debian card. My mp4 vids not playing any sound though. Would that be a setting I need to tweak?
My Pi uses 2 watts - what what? ---- HiRes early production Pi photos RS Front Back | Farnell Front Back
User avatar
Posts: 2018
Joined: Sat Mar 03, 2012 11:57 am
Location: UK
by dom » Sat May 19, 2012 2:46 pm
alexeames wrote:Installed OK on a fresh Debian card. My mp4 vids not playing any sound though. Would that be a setting I need to tweak?


Check the command line arguments. You can choose analogue/hdmi/passthrough.
Moderator
Moderator
Posts: 3861
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge
by alexeames » Sat May 19, 2012 3:49 pm
dom wrote:
alexeames wrote:Installed OK on a fresh Debian card. My mp4 vids not playing any sound though. Would that be a setting I need to tweak?


Check the command line arguments. You can choose analogue/hdmi/passthrough.


Awesome Dom thanks :)

I hadn't spotted those. Now it works fine on hdmi using

omxplayer -o hdmi <filename>
My Pi uses 2 watts - what what? ---- HiRes early production Pi photos RS Front Back | Farnell Front Back
User avatar
Posts: 2018
Joined: Sat Mar 03, 2012 11:57 am
Location: UK
by le4thab » Sat May 19, 2012 8:20 pm
hey all i have posted a new thread incase this is the incorrect place to ask but here goes...
followed the above instructins to install but i am not a commandline person (too much of a noob atm) and would like a gui.is this possible?can someone point me in the right direction?
thanks James
Posts: 52
Joined: Fri Jan 06, 2012 10:55 pm
by spennig » Sat May 19, 2012 8:45 pm
You have the source code, if you want a gui ....

And I'm not convinced that having multiple threads on the same application helps anyone, rather it makes it more difficult to search for useful information (IMHO of course).
User avatar
Posts: 84
Joined: Mon Aug 29, 2011 11:34 am
Location: New Forest
by le4thab » Sat May 19, 2012 9:00 pm
i am sorry but i do not follow?lol i think there is a problem anyway.i have managed to locate movies and ehrn i direct omxplayer at them it just says "have a nice day ;)"
Posts: 52
Joined: Fri Jan 06, 2012 10:55 pm
by alexeames » Sun May 20, 2012 9:58 am
le4thab wrote:i am sorry but i do not follow?lol i think there is a problem anyway.i have managed to locate movies and ehrn i direct omxplayer at them it just says "have a nice day ;)"


I got that until I did it right. ;)

If you make sure you are in the directory where the file you want to play is, it's easier.
Then all you do is type
Code: Select all
omxplayer -o hdmi yourvideofile.mp4


and it will play on your hdmi screen with sound through HDMI. If no sound you can omit the -o hdmi

If you are not running the command from the directory where the media file is, you will have to specify its path. I had fun and games yesterday trying to play a vid from a USB stick (first had to learn how to locate and mount the stick and make a directory for it :lol: )

By the way, since installing omxplayer, X fails to start. It gives me a blank screen and hangs. I can still login via ssh to shut it down, and then the display comes back. Is there a quick fix or do I have to have a separate SD card for my omxplayer install and others? (No spares at the moment as my 8Gig Sandisk is incompatible :( )

Are there any other controls apart from "P" for pause? Any fast forward and rewind? I've tried a few keystrokes to no avail. (edit to add - some success with left and right cursor keys :) )
My Pi uses 2 watts - what what? ---- HiRes early production Pi photos RS Front Back | Farnell Front Back
User avatar
Posts: 2018
Joined: Sat Mar 03, 2012 11:57 am
Location: UK
by spennig » Sun May 20, 2012 11:23 am
alexeames wrote:By the way, since installing omxplayer, X fails to start. It gives me a blank screen and hangs. I can still login via ssh to shut it down, and then the display comes back. Is there a quick fix or do I have to have a separate SD card for my omxplayer install and others? (No spares at the moment as my 8Gig Sandisk is incompatible :( )

Are there any other controls apart from "P" for pause? Any fast forward and rewind? I've tried a few keystrokes to no avail. (edit to add - some success with left and right cursor keys :) )


I have no problems with X and omxplayer; I tend to logout to lxdm before switching to a console to run it, just to free up memory.

There are a set of key-presses and effects in omxplayer.cpp, including p and space to pause, arrow keys to move, q to quit, s for subtitles and more that you can RTFS for.
User avatar
Posts: 84
Joined: Mon Aug 29, 2011 11:34 am
Location: New Forest
by alexeames » Sun May 20, 2012 6:29 pm
spennig wrote:I have no problems with X and omxplayer; I tend to logout to lxdm before switching to a console to run it, just to free up memory.


Solved that issue by deleting the .deb omxplayer image from SD card and another large mp4
It must have been a lack of space on the SD card, as it worked first time once I'd cleared some space.
The only card I've got that works with the Pi is a 2 Gig (more on the way though).

Thanks for the keys. I had trouble finding the source file, but got there in the end (google is your friend - sometimes) :mrgreen:
My Pi uses 2 watts - what what? ---- HiRes early production Pi photos RS Front Back | Farnell Front Back
User avatar
Posts: 2018
Joined: Sat Mar 03, 2012 11:57 am
Location: UK