clacktronics
Posts: 60
Joined: Sat Mar 03, 2012 6:07 pm
Location: London
Contact: Website

Help compiling omxplayer from the AUR

Mon Aug 06, 2012 12:07 pm

Hello,

I am very new to arch and I am trying to work out how you compile as I want a very minimal system with just omxplayer that I can trigger from GPIO on it. I basically followed the elinux guide upto making a new user
http://elinux.org/ArchLinux_Install_Guide then tried to make omxplayer from git but it failed.

this is what I did

1. put the image on the SD card using dd in osx
2. ran as root did pacman -Syu
3. pacman -S sudo
4. made a new user with wheel acess
5. Logged in as the user then
6. pacman -S base-devel
7. mkdir omx then cd omx
8.wget the tarball archive from https://aur.archlinux.org/packages.php?ID=59770 and extracted it
9. makepkg -s

I get the error that defaulted and deleted functions only available with -std=c++11 pr -std=gnu++11 and a missing initilizer?? is this a generic error message or is it obvious what I am missing?
My Kickstarter for a analogue AV out - kck.st/1SuGDvV

User avatar
ph0ng
Posts: 38
Joined: Tue Jul 17, 2012 9:37 am
Location: Sweden

Re: Help compiling omxplayer from the AUR

Mon Aug 06, 2012 6:59 pm

The AUR tarball contains an Arch-specific Makefile which has not been updated to reflect the latest changes (subtitle support) in the Git source.

The Makefile update consists of adding -std=c++0x to CFLAGS, -lfreetype and -lz to LDFLAGS as well as OMXPlayerSubtitles.cpp, SubtitleRenderer.cpp and Unicode.cpp to SRC. See commit history for reference: https://github.com/huceke/omxplayer/com ... 223ee75e2c

If it still does not work, I am happy to assist!

User avatar
ph0ng
Posts: 38
Joined: Tue Jul 17, 2012 9:37 am
Location: Sweden

Re: Help compiling omxplayer from the AUR

Mon Aug 06, 2012 9:02 pm

UPDATE: The AUR tarball has been patched! Please grab the new one and confirm the fix instead of following the manual instructions above.

clacktronics
Posts: 60
Joined: Sat Mar 03, 2012 6:07 pm
Location: London
Contact: Website

Re: Help compiling omxplayer from the AUR

Mon Aug 06, 2012 9:27 pm

ace thanks! will give it a go when I can get my machine back on
My Kickstarter for a analogue AV out - kck.st/1SuGDvV

clacktronics
Posts: 60
Joined: Sat Mar 03, 2012 6:07 pm
Location: London
Contact: Website

Re: Help compiling omxplayer from the AUR

Tue Aug 07, 2012 10:18 am

cool, I did it and it compiled perfectly.

Doesn't work though! I am playing files of a USB stick that works under rasbian OMXplayer so I know its not the file. It doesn't wish me a nice day it just clears the screen and hangs.

I cant really understand the log file , it doesn't seem to be complaining and states all the libraries its using then opens a stream and ends at the .... audio

thanks very much for updating the repo for me!

Code: Select all

00:00:00 T:0   DEBUG: DllBcm: Using omx system library
00:00:00 T:0   DEBUG: DllOMX: Using omx system library
00:00:00 T:0   DEBUG: DllAvFormat: Using libavformat system library
00:00:00 T:0   DEBUG: DllAvUtilBase: Using libavutil system library
00:00:00 T:0   DEBUG: DllAvCodec: Using libavcodec system library
00:00:00 T:0   DEBUG: DllAvFormat: Using libavformat system library
00:00:00 T:0   DEBUG: DllOMX: Using omx system library
00:00:00 T:0   DEBUG: COMXCoreComponent::Initialize OMX.broadcom.clock input port 80 output port 81
00:00:00 T:0   DEBUG: DllAvUtilBase: Using libavutil system library
00:00:00 T:0   DEBUG: DllAvCodec: Using libavcodec system library
00:00:00 T:0   DEBUG: DllAvFormat: Using libavformat system library
00:00:00 T:0   DEBUG: DllOMX: Using omx system library
00:00:00 T:0   DEBUG: Previous line repeats 5 times.
00:00:00 T:0   DEBUG: COMXCoreComponent::Initialize OMX.broadcom.video_decode input port 130 output port 131
00:00:00 T:0   DEBUG: DllOMX: Using omx system library
00:00:00 T:0   DEBUG: COMXCoreComponent::Initialize OMX.broadcom.video_render input port 90 output port 90
00:00:00 T:0   DEBUG: DllOMX: Using omx system library
00:00:00 T:0   DEBUG: COMXCoreComponent::Initialize OMX.broadcom.video_scheduler input port 10 output port 11
00:00:00 T:0   DEBUG: DllOMX: Using omx system library
00:00:00 T:0   DEBUG: COMXCoreComponent::Initialize OMX.broadcom.text_scheduler input port 150 output port 151
00:00:00 T:0   DEBUG: COMXCoreComponent::AllocInputBuffers component(OMX.broadcom.video_decode) - iport(130), nBufferCountMin(1), nBufferCountActual(60), nBufferSize(81920), nBufferAlignmen(16)
00:00:00 T:0   DEBUG: COMXCoreComponent::AllocInputBuffers component(OMX.broadcom.text_scheduler) - iport(150), nBufferCountMin(1), nBufferCountActual(100), nBufferSize(1024), nBufferAlignmen(16)
00:00:00 T:0   DEBUG: COMXCoreComponent::AllocOutputBuffers component(OMX.broadcom.text_scheduler) - iport(151), nBufferCountMin(1), nBufferCountActual(1), nBufferSize(1024) nBufferAlignmen(16)
00:00:00 T:0   ERROR: COMXCoreComponent::DecoderEventHandler OMX.broadcom.video_decode - OMX_ErrorInsufficientResources, insufficient resources
00:00:00 T:0   DEBUG: COMXVideo::Open - decoder_component(0x0x1c504c8), input_port(0x82), output_port(0x83) deinterlace 0 hdmiclocksync 0
00:00:00 T:0   DEBUG: OMXThread::Create - Thread with id 1165239392 started
00:00:00 T:0   DEBUG: DllAvUtilBase: Using libavutil system library
00:00:00 T:0   DEBUG: DllAvCodec: Using libavcodec system library
00:00:00 T:0   DEBUG: DllAvFormat: Using libavformat system library
00:00:00 T:0   DEBUG: DllAvUtilBase: Using libavutil system library
00:00:00 T:0   DEBUG: DllAvCodec: Using libavcodec system library
00:00:00 T:0    INFO: COMXAudioCodecOMX::GetChannelMap - FFmpeg reported 1 channels, but the layout contains 0 ignoring
00:00:00 T:0   DEBUG: DllOMX: Using omx system library
00:00:00 T:0   DEBUG: Previous line repeats 2 times.
00:00:00 T:0   DEBUG: DllAvUtilBase: Using libavutil system library
00:00:00 T:0    INFO: CPCMRemap: I channel map: CE
00:00:00 T:0   DEBUG: CPCMRemap: Mapping mono audio to front left and front right
00:00:00 T:0   DEBUG: pcm->nPortIndex     : 0
00:00:00 T:0   DEBUG: pcm->eNumData       : 0
00:00:00 T:0   DEBUG: pcm->eEndian        : 1
00:00:00 T:0   DEBUG: pcm->bInterleaved   : 1
00:00:00 T:0   DEBUG: pcm->nBitPerSample  : 16
00:00:00 T:0   DEBUG: pcm->ePCMMode       : 0
00:00:00 T:0   DEBUG: pcm->nChannels      : 1
00:00:00 T:0   DEBUG: pcm->nSamplingRate  : 48000
00:00:00 T:0   DEBUG: OMX_AUDIO_ChannelCF
00:00:00 T:0   DEBUG: OMX_AUDIO_ChannelRF
00:00:00 T:0   DEBUG: pcm->nPortIndex     : 0
00:00:00 T:0   DEBUG: pcm->eNumData       : 0
00:00:00 T:0   DEBUG: pcm->eEndian        : 1
00:00:00 T:0   DEBUG: pcm->bInterleaved   : 1
00:00:00 T:0   DEBUG: pcm->nBitPerSample  : 16
00:00:00 T:0   DEBUG: pcm->ePCMMode       : 0
00:00:00 T:0   DEBUG: pcm->nChannels      : 2
00:00:00 T:0   DEBUG: pcm->nSamplingRate  : 48000
00:00:00 T:0   DEBUG: OMX_AUDIO_ChannelLF
00:00:00 T:0   DEBUG: OMX_AUDIO_ChannelRF
00:00:00 T:0   DEBUG: DllOMX: Using omx system library
00:00:00 T:0   DEBUG: COMXCoreComponent::Initialize OMX.broadcom.audio_render input port 100 output port 100
00:00:00 T:0   DEBUG: DllOMX: Using omx system library
00:00:00 T:0   DEBUG: COMXCoreComponent::Initialize OMX.broadcom.audio_decode input port 120 output port 121
00:00:00 T:0   DEBUG: DllOMX: Using omx system library
00:00:00 T:0   DEBUG: COMXCoreComponent::Initialize OMX.broadcom.audio_mixer input port 232 output port 231
00:00:00 T:0   DEBUG: COMXCoreComponent::AllocInputBuffers component(OMX.broadcom.audio_decode) - iport(120), nBufferCountMin(4), nBufferCountActual(31), nBufferSize(6144), nBufferAlignmen(16)
00:00:00 T:0   DEBUG: COMXAudio::Initialize Ouput bps 16 samplerate 48000 channels 2 device local buffer size 192000 bytes per second 96000 passthrough 0 hwdecode 0
00:00:00 T:0   DEBUG: COMXAudio::Initialize Input bps 16 samplerate 48000 channels 1 device local buffer size 192000 bytes per second 96000 passthrough 0 hwdecode 0
00:00:00 T:0   DEBUG: OMXThread::Create - Thread with id 1173628000 started
00:00:00 T:0   DEBUG: pcm->nPortIndex     : 232
00:00:00 T:0   DEBUG: pcm->eNumData       : 0
00:00:00 T:0   DEBUG: pcm->eEndian        : 1
00:00:00 T:0   DEBUG: pcm->bInterleaved   : 1
00:00:00 T:0   DEBUG: pcm->nBitPerSample  : 16
00:00:00 T:0   DEBUG: pcm->ePCMMode       : 0
00:00:00 T:0   DEBUG: pcm->nChannels      : 1
00:00:00 T:0   DEBUG: pcm->nSamplingRate  : 48000
00:00:00 T:0   DEBUG: OMX_AUDIO_ChannelCF
00:00:00 T:0   DEBUG: pcm->nPortIndex     : 100
00:00:00 T:0   DEBUG: pcm->eNumData       : 0
00:00:00 T:0   DEBUG: pcm->eEndian        : 1
00:00:00 T:0   DEBUG: pcm->bInterleaved   : 1
00:00:00 T:0   DEBUG: pcm->nBitPerSample  : 16
00:00:00 T:0   DEBUG: pcm->ePCMMode       : 0
00:00:00 T:0   DEBUG: pcm->nChannels      : 2
00:00:00 T:0   DEBUG: pcm->nSamplingRate  : 48000
00:00:00 T:0   DEBUG: OMX_AUDIO_ChannelLF
00:00:00 T:0   DEBUG: OMX_AUDIO_ChannelRF
 
My Kickstarter for a analogue AV out - kck.st/1SuGDvV

User avatar
ph0ng
Posts: 38
Joined: Tue Jul 17, 2012 9:37 am
Location: Sweden

Re: Help compiling omxplayer from the AUR

Tue Aug 07, 2012 10:34 am

clacktronics wrote:ERROR: COMXCoreComponent::DecoderEventHandler OMX.broadcom.video_decode - OMX_ErrorInsufficientResources, insufficient resources
Are you using the 128/128 MB memory split? If not, try it :)

clacktronics
Posts: 60
Joined: Sat Mar 03, 2012 6:07 pm
Location: London
Contact: Website

Re: Help compiling omxplayer from the AUR

Tue Aug 07, 2012 10:53 am

yes! it worked, thanks so much for your help

how come it needs more RAM ? is this because it is a newer version? :? or could it be to do with the speed of my system running out of buffer? looking at the log it is still having problems with insufficient resources
My Kickstarter for a analogue AV out - kck.st/1SuGDvV

User avatar
ph0ng
Posts: 38
Joined: Tue Jul 17, 2012 9:37 am
Location: Sweden

Re: Help compiling omxplayer from the AUR

Tue Aug 07, 2012 11:09 am

You are now allocating more ram to the gpu, which is needed when decoding high quality video. For example, H.264 uses multiple reference frames for motion prediction:
http://en.wikipedia.org/wiki/Reference_frame_(video) wrote:When decoding, reference frames must be stored in memory until they are no longer needed for further decoding. This can considerably raise the memory usage of the decoder for videos with large numbers of reference frames. The use of several reference frames also decreases locality of reference, which might cause a speed impact.
Perhaps the other distribution you tried had a different default memory split.

clacktronics
Posts: 60
Joined: Sat Mar 03, 2012 6:07 pm
Location: London
Contact: Website

Re: Help compiling omxplayer from the AUR

Tue Aug 07, 2012 12:40 pm

yes you are right , I was using Raspbian and it looks like it has a default 50:50 split makes sense.

I can play full 1080p video (Dune!) with no problems, now im off to learn how to make scripts to control the playback!

I have quite a slow SD card and USB stick, do you think it will load faster if I lower the video size down to PAL and use a faster SD and USB stick?
My Kickstarter for a analogue AV out - kck.st/1SuGDvV

User avatar
ph0ng
Posts: 38
Joined: Tue Jul 17, 2012 9:37 am
Location: Sweden

Re: Help compiling omxplayer from the AUR

Tue Aug 07, 2012 1:31 pm

It might, but I have a fast SD card and with ethernet playback I often observe a delay of up to one second before the video starts. I don't know where the bottleneck is, perhaps in omxplayer's initialization code. Since I only use it for watching movies it has never been an issue for me.

User avatar
ph0ng
Posts: 38
Joined: Tue Jul 17, 2012 9:37 am
Location: Sweden

Re: Help compiling omxplayer from the AUR

Tue Aug 07, 2012 4:59 pm

I almost forgot to congratulate you on the switch to Arch ;) By the way, is the project part of your work with the Haroon Mirza installation you mention on your website?

clacktronics
Posts: 60
Joined: Sat Mar 03, 2012 6:07 pm
Location: London
Contact: Website

Re: Help compiling omxplayer from the AUR

Tue Aug 07, 2012 5:19 pm

thanks! yes, if find the simple but long route is making me understand the system better, I could never take the time to compile on larger systems, especially hauling it back to its raw state when I broke it took so long. With the pi I just flash it a new disk.

yes it might get used in an installation, depends how far I get. I am actually coming to Stockholm next week to put up a work! no raspberry pi's though just an arduino and a load of PIC's
My Kickstarter for a analogue AV out - kck.st/1SuGDvV

User avatar
ph0ng
Posts: 38
Joined: Tue Jul 17, 2012 9:37 am
Location: Sweden

Re: Help compiling omxplayer from the AUR

Tue Aug 07, 2012 8:19 pm

OK, good luck with it! I live in the southernmost area of Sweden so Stockholm is quite a trip. Hopefully the weather has turned around by the time you arrive...

Return to “Arch”