Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] problems merging omxplayer (modified time.h)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
mvaterlaus
Apprentice
Apprentice


Joined: 01 Oct 2010
Posts: 234
Location: Switzerland

PostPosted: Mon Aug 19, 2013 3:18 pm    Post subject: [solved] problems merging omxplayer (modified time.h) Reply with quote

hi folks,
I have a problem when trying to compile omxplayer from the xwm overlay. After the struggle with ffmpeg (which I updated to version 1.0.7), I now get other compile errors (see below). I first thought, that it is due to the wrong gcc version, so I upgraded to gcc-4.7.0 as mentioned in [1]. But I still receive the same compiler errors. Then I recently (3 days ago) updated the whole system and did an rpi-update. After that, I installed the following libs, because they are mentioned in [2]. But all these actions didn't resolve the problem.

* libva1
* libpcre3
* libidn11
* libusb-1.0-0

so now, here are the error messages causing the compile to abort:

http://pastebin.com/TsujLchH

and here is the emerge --info output:

http://pastebin.com/Ereba9aG

Then I read the bug report [3] which states, that ffmpeg in version > 1.x introduces it's own modified time.h file, which is causing the conflict. unfortunately, the bug does not state a solution to this problem. Can I simply delete the file or do I have to modify the source code to make it compile?


[1]https://github.com/huceke/omxplayer/issues/111#issuecomment-13348001
[2]https://github.com/huceke/omxplayer/commit/5b369233293f3fe927fcfec0a9844d7f16e5e934
[3]https://bugs.gentoo.org/show_bug.cgi?id=421683#c28

[edit]ffmpeg version added[/edit]


Last edited by mvaterlaus on Thu Aug 22, 2013 9:43 am; edited 2 times in total
Back to top
View user's profile Send private message
mvaterlaus
Apprentice
Apprentice


Joined: 01 Oct 2010
Posts: 234
Location: Switzerland

PostPosted: Tue Aug 20, 2013 3:29 pm    Post subject: Reply with quote

Good news. I solved the problem(s). There occured another one after fixing the issue with the time.h file from /usr/include/libavutil/. According to [1], -I /usr/lib/libavutil should never be passed to the compiler. Therefore the current omxplayer-9999-Makefile.patch has to be modified. The new $INCLUDES line is as follows:

Code:

+INCLUDES=-I/usr/include/freetype2 -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -I/opt/vc/include -Ilinux -I/usr/include/libavcodec -I/usr/include/libavfilter -I/usr/include/libavformat -I/usr/include/libswscale -I/usr/include/libswresample -I.


After that, I had another error, which stated, that either libswrescale or libavrescale has to be enabled. The solution also lies in the file omxplayer-9999-Makefile.patch, where the CFLAGS variable needs to be altered, because the -DHAVE_LIBSWRESAMPLE_SWRESAMPLE_H flag is missing. The line now looks as shown below:

Code:

+CFLAGS+=-std=c++0x -DSTANDALONE -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -D_LINUX -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CMAKE_CONFIG -D__VIDEOCORE4__ -U_FORTIFY_SOURCE -Wall -DHAVE_OMXLIB -DUSE_EXTERNAL_FFMPEG  -DHAVE_LIBAVCODEC_AVCODEC_H -DHAVE_LIBAVUTIL_OPT_H -DHAVE_LIBAVUTIL_MEM_H -DHAVE_LIBAVUTIL_AVUTIL_H -DHAVE_LIBAVFORMAT_AVFORMAT_H -DHAVE_LIBAVFILTER_AVFILTER_H -DHAVE_LIBSWRESAMPLE_SWRESAMPLE_H -DOMX -DOMX_SKIP64BIT -ftree-vectorize -pipe -DUSE_EXTERNAL_OMX -DTARGET_RASPBERRY_PI -DUSE_EXTERNAL_LIBBCM_HOST -Wno-psabi


The last thing to do is modifying the docdoc statement in the src_install function of the ebuild. The following codeblock shows the change:
Code:

src_install() {
    dobin ${PN}{,.bin}
    dodoc README            //---> change to "docdoc README.md"
}



I will attach a modified omxplayer-9999-Makefile.patch in the gentoo bugtrack [2]


[1]http://trac.ffmpeg.org/ticket/1783#comment:4
[2]https://bugs.gentoo.org/show_bug.cgi?id=421683
Back to top
View user's profile Send private message
mvaterlaus
Apprentice
Apprentice


Joined: 01 Oct 2010
Posts: 234
Location: Switzerland

PostPosted: Thu Sep 05, 2013 1:14 pm    Post subject: Reply with quote

so, after a bit of testing, I have the latest news for merging omxplayer under gentoo. The following requirements must be met:


  • >= gcc-4.7.0 (in testing, you need to unmask it with package.accept_keywords)
  • =ffmpeg-1.0.7
  • latest raspberrypi-userland-bin (either through portage or through rpi-update. With rpi-update you have to provide a package.provided with an entry for raspberrypi-userland-bin)
  • patches described in the post above


so with all the info in this thread, one should be able to merge omxplayer without any issues
Back to top
View user's profile Send private message
aleiphoenix
n00b
n00b


Joined: 03 Sep 2012
Posts: 27

PostPosted: Thu Sep 12, 2013 2:54 pm    Post subject: Reply with quote

update: I have to run it with `LD_LIBRARY_PATH=/opt/vc/lib omxplayer.bin /path/to/video`, I can now play video without problem. I've tried -o local, but cannot get audio working .

=================

With the above instructions, I managed to compile the omxplayer but cannot run it.

Here's the error info.

when i ran `/usr/bin/omxplayer`

/usr/omxplayer.bin does not exists, exiting

when i ran `/usr/bin/omxplayer.bin`

/usr/bin/omxplayer.bin: symbol lookup error: /opt/vc/lib/libGLESv2.so: undefined symbol: client_tls

I'm using media-libs/raspberrypi-userland-bin, neither 0_p20130711 nor 1_pre20130715 worked. now emerging raspberrypi-userland-9999, hope that working.
Back to top
View user's profile Send private message
RedW
n00b
n00b


Joined: 13 Sep 2013
Posts: 2

PostPosted: Fri Sep 13, 2013 9:07 am    Post subject: Reply with quote

aleiphoenix wrote:
I can now play video without problem. I've tried -o local, but cannot get audio working.


Hello aleiphoenix.
I experienced similar problems (no audio, regardles of -o). Adjusting amount of memory given to gpu fixed the problem.

Currently I'm using dynamic split(cma) and my config.txt includes:
Code:
gpu_mem_512=316
gpu_mem_256=128
cma_lwm=16
cma_hwm=32
cma_offline_start=16


Due to some timing bugs, you might need to replace console=tty1 with console=ttyAMA0,115200 in your cmdline.txt to get the cma working. [1]

I'm not sure if it's relevant, but I'm using media-libs/raspberrypi-userland-0_pre20130131 and sys-boot/raspberrypi-firmware-0_p20130815.

[1] http://www.raspberrypi.org/phpBB3/viewtopic.php?f=29&t=19334&start=190
Back to top
View user's profile Send private message
aleiphoenix
n00b
n00b


Joined: 03 Sep 2012
Posts: 27

PostPosted: Fri Sep 13, 2013 4:22 pm    Post subject: Reply with quote

RedW wrote:


Hello aleiphoenix.
I experienced similar problems (no audio, regardles of -o). Adjusting amount of memory given to gpu fixed the problem.

Currently I'm using dynamic split(cma) and my config.txt includes:
Code:
gpu_mem_512=316
gpu_mem_256=128
cma_lwm=16
cma_hwm=32
cma_offline_start=16


Due to some timing bugs, you might need to replace console=tty1 with console=ttyAMA0,115200 in your cmdline.txt to get the cma working. [1]

I'm not sure if it's relevant, but I'm using media-libs/raspberrypi-userland-0_pre20130131 and sys-boot/raspberrypi-firmware-0_p20130815.

[1] http://www.raspberrypi.org/phpBB3/viewtopic.php?f=29&t=19334&start=190


After update to sys-boot/raspberrypi-firmware-1_pre20130807, and adjust the memory setting, omxplayer now can ouput audio without problem!

You saved my day, thanks!.


Just for record, I'm using media-libs/raspberrypi-userland-9999.


And one more thing, the omxplayer version in xmw's ebuild is from https://github.com/huceke/omxplayer, which is no longer actively being developed. Shall we consider change the source version to https://github.com/popcornmix/omxplayer ?

popcornmix/omxplayer depends on dbus and a 'seperate' ffmpeg version 2.0, which has been masked (it breaks the portage tree).
Back to top
View user's profile Send private message
RedW
n00b
n00b


Joined: 13 Sep 2013
Posts: 2

PostPosted: Fri Sep 13, 2013 7:46 pm    Post subject: Reply with quote

Yes, I'm also using huceke version. I couldn't compile popcornmix version yet (some errors). I will probably try to solve that in few days or weeks, because I'm a bit short on time now.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum