cr4zy88
Posts: 1
Joined: Tue May 29, 2012 7:52 am

Re: omxplayer - GPU enabled video player

Tue May 29, 2012 8:00 am

I just joined the forums after receiving my RPi yesterday and having a tinker with it all last night. I managed to get movies playing with omxplayer, so a HUGE thank you to all those in this thread who helped with that, especially spennig.

I do have one question regarding audio though. I managed to get audio via HDMI to my tv, and all was working fine. I then unplugged the HDMI cable while the movie was playing and plugged it into my av receiver, selected the appropriate input and all worked fine. I then quit the movie and reopened, but this time it would not play audio through the av receiver anymore. I even tried the -p pass through option, but that also didn't work.

So basically I can only get audio working if I start with it connected to my tv, then remove the HDMI lead and connect it to my amp while the movie is playing. Any ideas?

Thanks again for the help so far. :D

slide
Posts: 1
Joined: Wed May 30, 2012 7:33 pm

Re: omxplayer - GPU enabled video player

Wed May 30, 2012 7:38 pm

spennig - Could you possibly post instructions on compiling / making a deb? I'm trying to build a version for the Raspbian Hexxeh image and could use some help. ffmpeg from omxplayer built fine, but when i run make for omxplayer it complains of arm-unknown-linux-gnueabi-g++ Command not found and I can't seem to find it and dont even know if that is the correct compiler.

Thanks!

BagOfMostlyWater
Posts: 1
Joined: Fri Jun 01, 2012 5:51 am

Re: omxplayer - GPU enabled video player

Fri Jun 01, 2012 5:55 am

I did this on the Debian image and saw the same thing. I commented out the inclusion of Makefile.include in Makefile and got past it. There are a few other tweaks required (including adding -L/opt/vc/lib to LDFLAGS, ) but the player ultimately builds.

imica
Posts: 11
Joined: Wed Jan 11, 2012 1:27 pm
Contact: Website

Re: omxplayer - GPU enabled video player

Sat Jun 02, 2012 11:28 am

Firstly thanks for this, it is amazing.

Two keys that may help, "P" Pause, "Q" quite.

Left, right and down arrows, back, forward restart.

Steve

Sc0ut
Posts: 9
Joined: Tue Jan 17, 2012 11:10 am

Re: omxplayer - GPU enabled video player

Sat Jun 02, 2012 11:36 am

Hi everyone.

When I start omxplayer in Debian the 1080p movie starts, but the desktop is still seen. Is there a command that the player can make black borders on top and under the movie like it is normal.

Musicalbudgie
Posts: 7
Joined: Sun May 27, 2012 1:05 am

Re: omxplayer - GPU enabled video player

Sat Jun 02, 2012 2:49 pm

The easiest way to do that is to first not bother starting X with xinit. Log in with SSH and start the video, then run these commands by SSH again -

Code: Select all

clear > /dev/tty0
then

Code: Select all

echo 0 > /sys/class/graphics/fbcon/cursor_blink
It might be possible to do it by starting the video on TTY1 and then using another TTY (ctrl+alt+f2 then ctrl+alt+f1 to get back) to run the other commands if you don't have SSH access.

User avatar
spennig
Posts: 84
Joined: Mon Aug 29, 2011 11:34 am
Location: New Forest
Contact: Website

Re: omxplayer - GPU enabled video player

Sat Jun 02, 2012 3:21 pm

slide wrote:spennig - Could you possibly post instructions on compiling / making a deb? I'm trying to build a version for the Raspbian Hexxeh image and could use some help. ffmpeg from omxplayer built fine, but when i run make for omxplayer it complains of arm-unknown-linux-gnueabi-g++ Command not found and I can't seem to find it and dont even know if that is the correct compiler.

Thanks!
As you're discovered, the git source is set up for cross compilation and the build environment is complex, to say the least. I build it in an Arch VM (qemu), but building it on the device in Debian should be the same. You need to fix up Makefile, Makefile.include and Makefile.ffmpeg.

I've uploaded the native build versions of these files I used to create the Arch and Debian packages to http://seyrsnys.myzen.co.uk/rpi/omxplay ... ngs.tar.gz.

I must have made the Debian package in a Debian VM; I'll see if I can find it can recall how I did that, but iirc, it was pretty trivial / standard.

User avatar
spennig
Posts: 84
Joined: Mon Aug 29, 2011 11:34 am
Location: New Forest
Contact: Website

Re: omxplayer - GPU enabled video player

Sat Jun 02, 2012 3:39 pm

The deb build is at http://seyrsnys.myzen.co.uk/rpi/omxplay ... age.tar.xz. It's 3MB as it contains all the binary files (executable, libraries). There's a readme at the top of the archive that explains how to make the .deb, which once you've unpacked it is as simple as:

Code: Select all

cd debs
dpkg -b omxplayer /tmp/omxplayer_0.0.x-arm.deb # where x is the build/version number. 
Use as you see fit.

karapuzo
Posts: 2
Joined: Sat Jun 02, 2012 3:58 pm

Re: omxplayer - GPU enabled video player

Sat Jun 02, 2012 4:03 pm

Is there anyway to play with the aspect ratio using parameters for omxplayer?

My TV is a bit quirky - it's 1024x768 but the physical ration is 16:9 - so the pixels are in a sense rectangular instead of square.

omxplayer shows 16:9 video with large black bars across the top and bottom. (xbmc has the same problem - even after doing calibration)

When I am using VLC I am setting the ration to 4:3 (even thought the video is 16:9) and that fills the entire screen.

twin169
Posts: 6
Joined: Sat Jun 02, 2012 8:14 pm

Re: omxplayer - GPU enabled video player

Sat Jun 02, 2012 8:32 pm

hi all
i am a complete newbie to linux programing so be gentle. I would like a bit off advice setting up the omxplayer. I have attempted to install the program on my virtual box and on the raspberry pi but i i have had no joy. Can someone find time to help me through the process please i have downloaded the omxolayer-bin.tar.xz to the download folder on my pi. I have tried to follow the steps on this thread using root in the LXterminal here is what i get

root@marklmr1:/home/robert# tar xf omxplayer-bin.tar.xz
tar: omxplayer-bin.tar.xz: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
root@marklmr1:/home/robert#
root@marklmr1:/home/robert# sudo apt-get install libva-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libva-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@marklmr1:/home/robert#
root@marklmr1:/home/robert# sudo ln -s /lib/libpcre.so.3 /lib/libpcre.so.1
ln: creating symbolic link `/lib/libpcre.so.1': File exists
root@marklmr1:/home/robert#
root@marklmr1:/home/robert# http://seyrsnys.myzen.co.uk/rp......1-arm.deb
bash: http://seyrsnys.myzen.co.uk/rp......1-arm.deb: No such file or directory
root@marklmr1:/home/robert#


Please help i just want to play some videos
.


.

netomx
Posts: 80
Joined: Tue Oct 11, 2011 4:06 am

Re: omxplayer - GPU enabled video player

Sat Jun 02, 2012 11:40 pm

please just use the debian file on the first page.

geekscruff
Posts: 1
Joined: Sun Jun 03, 2012 8:02 am

Re: omxplayer - GPU enabled video player

Sun Jun 03, 2012 8:07 am

I have got omxplayer up and running, but I have a couple of problems, can anyone help?

1) I can't figure out how to use subtitles; I've tried omxplayer -t -o hdmo myfile.avi but it doesn't even play the video. How do I use an srt with a video?

2) My video is bigger than the screen, so the edges are cut off. I've tried tinkering with RPi''s confix.txt but omxplayer seems to ignore that

Thanks!

tk321
Posts: 31
Joined: Sat Jun 02, 2012 6:09 pm
Location: UK

Re: omxplayer - GPU enabled video player

Sun Jun 03, 2012 1:58 pm

spennig wrote: I've uploaded the native build versions of these files I used to create the Arch and Debian packages to http://seyrsnys.myzen.co.uk/rpi/omxplay ... ngs.tar.gz.

I must have made the Debian package in a Debian VM; I'll see if I can find it can recall how I did that, but iirc, it was pretty trivial / standard.
For native compilation you'd certainly want to remove the "-j9" in Makefile.ffmpeg:

Code: Select all

compile:
        cd ffmpeg; \
        make -j9
Still I'm failing to compile ffmpeg on Raspbian, running out of memory on the pi and getting an error like
"cc1: out of memory allocating ..." whilest compiling h264.c.

However, Debian and many other distributions have switched from ffmpeg to libav. Any chance to get omxplayer compile with libav instead of ffmpeg? This would simplify things a lot as libav dev packages are readily available in Debian/Raspbian/etc.

User avatar
spennig
Posts: 84
Joined: Mon Aug 29, 2011 11:34 am
Location: New Forest
Contact: Website

Re: omxplayer - GPU enabled video player

Sun Jun 03, 2012 5:33 pm

I built the original in a qemu VM with mem=192M (albeit on Arch rather than Debian). So it should be possible, modulo differences between arch and deb.

tk321
Posts: 31
Joined: Sat Jun 02, 2012 6:09 pm
Location: UK

Re: omxplayer - GPU enabled video player

Sun Jun 03, 2012 7:14 pm

Yes debian6/gcc-4.4.5 passes that hurdle on the pi (still gets close to the mem limit) but raspbian comes with gcc-4.6.3 which I guess uses a bit more memory and fails even on 224MB.

Is there a reason why omxplayer links with ffmpeg and not libav? Could that be changed easily or involve a lot of work?

User avatar
spennig
Posts: 84
Joined: Mon Aug 29, 2011 11:34 am
Location: New Forest
Contact: Website

Re: omxplayer - GPU enabled video player

Sun Jun 03, 2012 7:25 pm

tk321 wrote:Yes debian6/gcc-4.4.5 passes that hurdle on the pi (still gets close to the mem limit) but raspbian comes with gcc-4.6.3 which I guess uses a bit more memory and fails even on 224MB.

Is there a reason why omxplayer links with ffmpeg and not libav? Could that be changed easily or involve a lot of work?
I don't know. I merely compiled it as I'd read about the Pi's fabulous graphical capabilities, but had no means of otherwise demonstrating it. I too though it was overkill having to compile ffmpeg to make it work, but that was the lesser difficultly compared to working out how it actually worked. I'll give it a try, if no one else gets there first.

User avatar
spennig
Posts: 84
Joined: Mon Aug 29, 2011 11:34 am
Location: New Forest
Contact: Website

Re: omxplayer - GPU enabled video player

Sun Jun 03, 2012 7:39 pm

Just done:

Code: Select all

make clean; make
i.e. without building the embedded ffmpeg. ldd shows

Code: Select all

$ ldd omxplayer.bin 
	libWFC.so => /opt/vc/lib/libWFC.so (0x401de000)
	libGLESv2.so => /opt/vc/lib/libGLESv2.so (0x400ab000)
	libEGL.so => /opt/vc/lib/libEGL.so (0x400df000)
	libbcm_host.so => /opt/vc/lib/libbcm_host.so (0x40014000)
	libopenmaxil.so => /opt/vc/lib/libopenmaxil.so (0x40169000)
	libpthread.so.0 => /lib/libpthread.so.0 (0x4004b000)
	librt.so.1 => /lib/librt.so.1 (0x4003b000)
	libavutil.so.51 => /usr/lib/libavutil.so.51 (0x40111000)
	libavcodec.so.53 => /usr/lib/libavcodec.so.53 (0x401f1000)
	libavformat.so.53 => /usr/lib/libavformat.so.53 (0x40ecf000)
	libswscale.so.2 => /usr/lib/libswscale.so.2 (0x40181000)
	libpcre.so.1 => /usr/lib/libpcre.so.1 (0x40fcc000)
	libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x41026000)
	libm.so.6 => /lib/libm.so.6 (0x410ef000)
	libc.so.6 => /lib/libc.so.6 (0x4118e000)
	libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x412be000)
	libvchiq_arm.so => /opt/vc/lib/libvchiq_arm.so (0x4013c000)
	libvcos.so => /opt/vc/lib/libvcos.so (0x4009a000)
	libdl.so.2 => /lib/libdl.so.2 (0x401b9000)
	/lib/ld-linux.so.3 (0x40072000)
	libva.so.1 => /usr/lib/libva.so.1 (0x412e5000)
	libxvidcore.so.4 => /usr/lib/libxvidcore.so.4 (0x41300000)
	libx264.so.120 => /usr/lib/libx264.so.120 (0x413f1000)
	libvorbisenc.so.2 => /usr/lib/libvorbisenc.so.2 (0x41510000)
	libvorbis.so.0 => /usr/lib/libvorbis.so.0 (0x41686000)
	libtheoraenc.so.1 => /usr/lib/libtheoraenc.so.1 (0x416b9000)
	libtheoradec.so.1 => /usr/lib/libtheoradec.so.1 (0x416f9000)
	libspeex.so.1 => /usr/lib/libspeex.so.1 (0x41716000)
	libschroedinger-1.0.so.0 => /usr/lib/libschroedinger-1.0.so.0 (0x41736000)
	libz.so.1 => /usr/lib/libz.so.1 (0x417ef000)
	libopenjpeg.so.1 => /usr/lib/libopenjpeg.so.1 (0x4180a000)
	libopencore-amrwb.so.0 => /usr/lib/libopencore-amrwb.so.0 (0x401c4000)
	libopencore-amrnb.so.0 => /usr/lib/libopencore-amrnb.so.0 (0x41832000)
	libmp3lame.so.0 => /usr/lib/libmp3lame.so.0 (0x4185d000)
	libgsm.so.1 => /usr/lib/libgsm.so.1 (0x418d6000)
	librtmp.so.0 => /usr/lib/librtmp.so.0 (0x418e9000)
	libbz2.so.1.0 => /usr/lib/libbz2.so.1.0 (0x41906000)
	libogg.so.0 => /usr/lib/libogg.so.0 (0x41917000)
	liborc-0.4.so.0 => /usr/lib/liborc-0.4.so.0 (0x41923000)
	libssl.so.1.0.0 => /usr/lib/libssl.so.1.0.0 (0x41995000)
	libcrypto.so.1.0.0 => /usr/lib/libcrypto.so.1.0.0 (0x419ed000)
Just need to try it on a real hardware.

netomx
Posts: 80
Joined: Tue Oct 11, 2011 4:06 am

Re: omxplayer - GPU enabled video player

Sun Jun 03, 2012 7:43 pm

spennig wrote:Just done:

Code: Select all

make clean; make
i.e. without building the embedded ffmpeg. ldd shows

Code: Select all

$ ldd omxplayer.bin 
	libWFC.so => /opt/vc/lib/libWFC.so (0x401de000)
	libGLESv2.so => /opt/vc/lib/libGLESv2.so (0x400ab000)
	libEGL.so => /opt/vc/lib/libEGL.so (0x400df000)
	libbcm_host.so => /opt/vc/lib/libbcm_host.so (0x40014000)
	libopenmaxil.so => /opt/vc/lib/libopenmaxil.so (0x40169000)
	libpthread.so.0 => /lib/libpthread.so.0 (0x4004b000)
	librt.so.1 => /lib/librt.so.1 (0x4003b000)
	libavutil.so.51 => /usr/lib/libavutil.so.51 (0x40111000)
	libavcodec.so.53 => /usr/lib/libavcodec.so.53 (0x401f1000)
	libavformat.so.53 => /usr/lib/libavformat.so.53 (0x40ecf000)
	libswscale.so.2 => /usr/lib/libswscale.so.2 (0x40181000)
	libpcre.so.1 => /usr/lib/libpcre.so.1 (0x40fcc000)
	libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x41026000)
	libm.so.6 => /lib/libm.so.6 (0x410ef000)
	libc.so.6 => /lib/libc.so.6 (0x4118e000)
	libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x412be000)
	libvchiq_arm.so => /opt/vc/lib/libvchiq_arm.so (0x4013c000)
	libvcos.so => /opt/vc/lib/libvcos.so (0x4009a000)
	libdl.so.2 => /lib/libdl.so.2 (0x401b9000)
	/lib/ld-linux.so.3 (0x40072000)
	libva.so.1 => /usr/lib/libva.so.1 (0x412e5000)
	libxvidcore.so.4 => /usr/lib/libxvidcore.so.4 (0x41300000)
	libx264.so.120 => /usr/lib/libx264.so.120 (0x413f1000)
	libvorbisenc.so.2 => /usr/lib/libvorbisenc.so.2 (0x41510000)
	libvorbis.so.0 => /usr/lib/libvorbis.so.0 (0x41686000)
	libtheoraenc.so.1 => /usr/lib/libtheoraenc.so.1 (0x416b9000)
	libtheoradec.so.1 => /usr/lib/libtheoradec.so.1 (0x416f9000)
	libspeex.so.1 => /usr/lib/libspeex.so.1 (0x41716000)
	libschroedinger-1.0.so.0 => /usr/lib/libschroedinger-1.0.so.0 (0x41736000)
	libz.so.1 => /usr/lib/libz.so.1 (0x417ef000)
	libopenjpeg.so.1 => /usr/lib/libopenjpeg.so.1 (0x4180a000)
	libopencore-amrwb.so.0 => /usr/lib/libopencore-amrwb.so.0 (0x401c4000)
	libopencore-amrnb.so.0 => /usr/lib/libopencore-amrnb.so.0 (0x41832000)
	libmp3lame.so.0 => /usr/lib/libmp3lame.so.0 (0x4185d000)
	libgsm.so.1 => /usr/lib/libgsm.so.1 (0x418d6000)
	librtmp.so.0 => /usr/lib/librtmp.so.0 (0x418e9000)
	libbz2.so.1.0 => /usr/lib/libbz2.so.1.0 (0x41906000)
	libogg.so.0 => /usr/lib/libogg.so.0 (0x41917000)
	liborc-0.4.so.0 => /usr/lib/liborc-0.4.so.0 (0x41923000)
	libssl.so.1.0.0 => /usr/lib/libssl.so.1.0.0 (0x41995000)
	libcrypto.so.1.0.0 => /usr/lib/libcrypto.so.1.0.0 (0x419ed000)
Just need to try it on a real hardware.
If you dont have it, send it via debian package, i can test

User avatar
spennig
Posts: 84
Joined: Mon Aug 29, 2011 11:34 am
Location: New Forest
Contact: Website

Re: omxplayer - GPU enabled video player

Sun Jun 03, 2012 7:52 pm

At least on Arch, the binary against the distro libav* libraries runs just fine. I have a debian image on another SD; I'll give that a try.

User avatar
spennig
Posts: 84
Joined: Mon Aug 29, 2011 11:34 am
Location: New Forest
Contact: Website

Re: omxplayer - GPU enabled video player

Sun Jun 03, 2012 8:04 pm

I'll need to build it from source in Debian, I think, due to point versions in the distro libav* libaraies.

User avatar
spennig
Posts: 84
Joined: Mon Aug 29, 2011 11:34 am
Location: New Forest
Contact: Website

Re: omxplayer - GPU enabled video player

Sun Jun 03, 2012 8:22 pm

Sorry to say it fails to build against the Debian libav* libraries, at least libavfilter is too old.

tk321
Posts: 31
Joined: Sat Jun 02, 2012 6:09 pm
Location: UK

Re: omxplayer - GPU enabled video player

Sun Jun 03, 2012 8:36 pm

I don't think it's because libav is tool old in debian6, as I get the same compiler error on raspbian (debian7):

Code: Select all

DllAvFilter.h:55:37: fatal error: libavfilter/avcodec.h: No such file or directory
compilation terminated.
I guess it's just because ffmpeg and libav are not identical so changes to the sources are necessary when moving from ffmpeg to libav. Yet I'm not familiar with either package so I'm not a great help.

User avatar
spennig
Posts: 84
Joined: Mon Aug 29, 2011 11:34 am
Location: New Forest
Contact: Website

Re: omxplayer - GPU enabled video player

Sun Jun 03, 2012 8:53 pm

I don't believe that's the case.

In ArchLinux, it compiles fine against the unmodified distro libav* libararies, which are at newer than the Deb6 libraries (e.g.
/usr/lib/libavformat.so.52 (debian) vice /usr/lib/libavformat.so.53 (Arch).

tk321
Posts: 31
Joined: Sat Jun 02, 2012 6:09 pm
Location: UK

Re: omxplayer - GPU enabled video player

Sun Jun 03, 2012 9:08 pm

That's interesting. Do you have

Code: Select all

/usr/include/libavfilter/avcodec.h
on ArchLinux and if yes which package does it belong to? If no then I'm surprised it compiled as there is

Code: Select all

omxplayer/DllAvFilter.h:55
    ...
    #include <libavfilter/avcodec.h>
    ...

User avatar
spennig
Posts: 84
Joined: Mon Aug 29, 2011 11:34 am
Location: New Forest
Contact: Website

Re: omxplayer - GPU enabled video player

Sun Jun 03, 2012 9:22 pm

tk321 wrote:That's interesting. Do you have

Code: Select all

/usr/include/libavfilter/avcodec.h
on ArchLinux and if yes which package does it belong to? If no then I'm surprised it compiled as there is

Code: Select all

omxplayer/DllAvFilter.h:55
    ...
    #include <libavfilter/avcodec.h>
    ...
Indeed I do, otherwise I would not have been able to compile it!

Code: Select all

[jrh@alarm ~]$ uname -m
armv6l
[jrh@alarm ~]$ ls -l  /usr/include/libavfilter/avcodec.h
-rw-r--r-- 1 root root 2363 May 10 15:44 /usr/include/libavfilter/avcodec.h
The package is: extra/ffmpeg 20120509-1

Return to “Media centres”