package/omxplayer: new package
PATCH v2 1/1 package/omxplayer: new package
OMXplayer uses openMAX on the RPi to play videos with hardware acceleration.
Compared to using a gstreamer pipe, OMXplayer uses a complete "tunnel-mode", in which the video is piped (after demuxing) into the hardware, all the way down to the display, whereas gstreamer composes the video using the eglgles sink, which uses mem-to-mem copies.
So, when playing a locally-stored 1080p video, OMXplayer averages 20% (with peaks up to ~30%, depending on the complexity of the video) CPU, while gstreamer bursts up to 40+% when playing 720p and totally chokes on a 1080p video; all on an non-overclocked RPi-1.
Note that we have to depend on rpi-userland. rpi-userland is a GLES/EGL provider, so it can't be selected (as all providers of a virtual package can't).
---
Changes v1 -> v2:
- change $(shell ...) to ... (Thomas)
- don't select rpi-userland
- update to the latest git master; drop parts of our patch
- add hash file
- typoes in patch' commit log
--- package/Config.in | 1 + .../0001-Makefiles-clean-up-the-cruft.patch | 67 ++++++++++++++++++++++ package/omxplayer/Config.in | 38 ++++++++++++ package/omxplayer/omxplayer.hash | 3 + package/omxplayer/omxplayer.mk | 46 +++++++++++++++ 5 files changed, 155 insertions(+) create mode 100644 package/omxplayer/0001-Makefiles-clean-up-the-cruft.patch create mode 100644 package/omxplayer/Config.in create mode 100644 package/omxplayer/omxplayer.hash create mode 100644 package/omxplayer/omxplayer.mk
package/Config.in +1 -0
@@ -33,6 +33,7 @@ menu "Audio and video applications" source "package/multicat/Config.in" source "package/musepack/Config.in" source "package/ncmpc/Config.in" + source "package/omxplayer/Config.in" source "package/on2-8170-libs/Config.in" source "package/opus-tools/Config.in" source "package/pulseaudio/Config.in"
package/omxplayer/0001-Makefiles-clean-up-the-cruft.patch new file +67 -0
67 lines not on this page · raw message
package/omxplayer/Config.in new file +38 -0
@@ -0,0 +1,38 @@ +# Note: boost has an architecture-specific dependency option, but +# it only refers to a NIOSII toolchain. Since OMXplayer depends on +# ARM, we can't be using that toolchain to start with. However, +# for consistenmcy, we still propagate that dependency. + +config BR2_PACKAGE_OMXPLAYER + bool "omxplayer" + depends on BR2_arm + depends on BR2_USE_MMU # dbus + depends on BR2_PACKAGE_BOOST_ARCH_SUPPORTS # boost + depends on BR2_INSTALL_LIBSTDCPP # boost + depends on BR2_TOOLCHAIN_HAS_THREADS # boost, libusb + depends on BR2_USE_WCHAR # boost + depends on BR2_PACKAGE_RPI_USERLAND + select BR2_PACKAGE_BOOST + select BR2_PACKAGE_DBUS + select BR2_PACKAGE_FFMPEG + select BR2_PACKAGE_FFMPEG_AVRESAMPLE + select BR2_PACKAGE_FFMPEG_SWSCALE + select BR2_PACKAGE_FREETYPE + select BR2_PACKAGE_LIBIDN + select BR2_PACKAGE_LIBUSB + select BR2_PACKAGE_PCRE + select BR2_PACKAGE_ZLIB + help + OMXPlayer is a commandline OMX player for the Raspberry Pi. It was + developed as a testbed for the XBMC Raspberry PI implementation + and is quite handy to use standalone. + + https://github.com/popcornmix/omxplayer + +comment "omxplayer needs rpi-userland and a toolchain w/ C++, threads, wchar, dynamic library" + depends on BR2_arm + depends on BR2_USE_MMU + depends on BR2_PACKAGE_BOOST_ARCH_SUPPORTS + depends on !BR2_PACKAGE_RPI_USERLAND + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS \ + || !BR2_USE_WCHAR || BR2_STATIC_LIBS
package/omxplayer/omxplayer.hash new file +3 -0
@@ -0,0 +1,3 @@ +# Locally computed +sha1 23eb444757e445c127a7114ae233569cac64f984 omxplayer-6c90c7503ba4658221774759edf7f2ae816711de.tar.gz +sha256 93ebfd654314231749936e4fc09f5ec4a361806cdb640d7579a5106921e00299 omxplayer-6c90c7503ba4658221774759edf7f2ae816711de.tar.gz
package/omxplayer/omxplayer.mk new file +46 -0
46 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH v2 1/1 package/omxplayer: new package
Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Yann" == Yann E MORIN <[email protected]> writes:
OMXplayer uses openMAX on the RPi to play videos with hardware acceleration.
Compared to using a gstreamer pipe, OMXplayer uses a complete "tunnel-mode", in which the video is piped (after demuxing) into the hardware, all the way down to the display, whereas gstreamer composes the video using the eglgles sink, which uses mem-to-mem copies.
Quoted 8 lines
So, when playing a locally-stored 1080p video, OMXplayer averages 20% (with peaks up to ~30%, depending on the complexity of the video) CPU, while gstreamer bursts up to 40+% when playing 720p and totally chokes on a 1080p video; all on an non-overclocked RPi-1.
Note that we have to depend on rpi-userland. rpi-userland is a GLES/EGL provider, so it can't be selected (as all providers of a virtual package can't).
Is this specific to the RPI or could it conceptually work with other OMX implementations? If it is specific, then perhaps we should call it rpi-omxplayer instead?
Quoted 47 lines
Signed-off-by "Yann E. MORIN" <[email protected]>Cc Maxime Hadjinlian <[email protected]>Cc Thomas Petazzoni <[email protected]>---
Changes v1 -> v2:
- change $(shell ...) to...(Thomas)
- don't select rpi-userland
- update to the latest git master; drop parts of our patch
- add hash file
- typoes in patch' commit log--- package/Config.in | 1 + .../0001-Makefiles-clean-up-the-cruft.patch | 67 ++++++++++++++++++++++ package/omxplayer/Config.in | 38 ++++++++++++ package/omxplayer/omxplayer.hash | 3 + package/omxplayer/omxplayer.mk | 46 +++++++++++++++ 5 files changed, 155 insertions(+) create mode 100644 package/omxplayer/0001-Makefiles-clean-up-the-cruft.patch create mode 100644 package/omxplayer/Config.in create mode 100644 package/omxplayer/omxplayer.hash create mode 100644 package/omxplayer/omxplayer.mkpackage/Config.in +1
-0@@ -33,6 +33,7 @@ menu "Audio and video applications" source "package/multicat/Config.in" source "package/musepack/Config.in" source "package/ncmpc/Config.in" + source "package/omxplayer/Config.in" source "package/on2-8170-libs/Config.in" source "package/opus-tools/Config.in" source "package/pulseaudio/Config.in"package/omxplayer/0001-Makefiles-clean-up-the-cruft.patch new file +6
-0@@ -0,0 +1,67 @@ +From 563dafc1129848419482b540d149d0b8687cac1e Mon Sep 17 00:00:00 2001 +From: "Yann E. MORIN" <[email protected]> +Date: Sun, 10 Apr 2016 16:22:53 +0200 +Subject: [PATCH] Makefiles: clean up the cruft + +Most of the variables that Makefile.include tries (but fails) to set,
package/omxplayer/0001-Makefiles-clean-up-the-cruft.patch line 16
Quoted 10 lines
package/omxplayer/0001-Makefiles-clean-up-the-cruft.patch new file +10
-0+are already available from Buildroot's variables: + - AR, AS, CC, CXX, OBJDUMP... + - CFLAGS, CXXFLAGS, CPPFLAGS... + +This leaves us with a few select variables that define include and +library paths local to the omxplayer package, plus a few optimisations. + +Finally, also remove hard-coded, absolute paths pointing to the host +system (won't work for cross-compilation, so our paranoid wrapper would +catch those paths).
Is this likely to get accepted upstream? If not, perhaps just overriding these variables on the make command line would be easier to maintain?
Signature · 1 line
Bye, Peter Korsgaard
PATCH v2 1/1 package/omxplayer: new package
Peter, All,
On 2016-05-05 08:28 +0200, Peter Korsgaard spake thusly:
Quoted 15 lines
Quoted 14 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Yann" == Yann E MORIN <[email protected]> writes:
OMXplayer uses openMAX on the RPi to play videos with hardware acceleration.
Compared to using a gstreamer pipe, OMXplayer uses a complete "tunnel-mode", in which the video is piped (after demuxing) into the hardware, all the way down to the display, whereas gstreamer composes the video using the eglgles sink, which uses mem-to-mem copies.
So, when playing a locally-stored 1080p video, OMXplayer averages 20% (with peaks up to ~30%, depending on the complexity of the video) CPU, while gstreamer bursts up to 40+% when playing 720p and totally chokes on a 1080p video; all on an non-overclocked RPi-1.
Quoted 7 lines
Quoted 3 lines
Note that we have to depend on rpi-userland. rpi-userland is a GLES/EGL provider, so it can't be selected (as all providers of a virtual package can't).
Is this specific to the RPI or could it conceptually work with other OMX implementations?
*Conceptually*, I guess it could be used on other platforms that have OpenMAX. However:
- I have not tested another platform (I lacke HW with OpenMAX)
- the buildsystem has hard-coded references to libcvhost and other libs from rpi-userland
- there are a (very) few har-coded referecnes to VCHI macros
So, I would not make it generic, and would just keep the dependency on rpi-userland, at least until someone can prove it builds and runs on another platform...
Quoted 2 lines
If it is specific, then perhaps we should call it
rpi-omxplayer instead?
Well, upstream calls it "omxplayer" so I don't think we should rename it. But I don't care much...
[--SNIP--]
Quoted 17 lines
Quoted 17 lines
package/omxplayer/0001-Makefiles-clean-up-the-cruft.patch new file +11
-0@@ -0,0 +1,67 @@ +From 563dafc1129848419482b540d149d0b8687cac1e Mon Sep 17 00:00:00 2001 +From: "Yann E. MORIN" <[email protected]> +Date: Sun, 10 Apr 2016 16:22:53 +0200 +Subject: [PATCH] Makefiles: clean up the cruft + +Most of the variables that Makefile.include tries (but fails) to set, +are already available from Buildroot's variables: + - AR, AS, CC, CXX, OBJDUMP... + - CFLAGS, CXXFLAGS, CPPFLAGS... + +This leaves us with a few select variables that define include and
Quoted 8 lines
package/omxplayer/0001-Makefiles-clean-up-the-cruft.patch line 16
Quoted 5 lines
package/omxplayer/0001-Makefiles-clean-up-the-cruft.patch new file +5
-0+library paths local to the omxplayer package, plus a few optimisations. + +Finally, also remove hard-coded, absolute paths pointing to the host +system (won't work for cross-compilation, so our paranoid wrapper would +catch those paths).Is this likely to get accepted upstream? If not, perhaps just overriding these variables on the make command line would be easier to maintain?
Probably not upstreamable, unfortunately... :-(
However, passing variables on the command line risks silently breaking in the future when we update and the variables change (appear/disapear), while a patch would fail to apply and we would catch it.
So, I'd prefer we keep the patch. After all, it's not very complex, and is limited to just removing a bumch of variables assignments, so is pretty easy to rebase...
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH v2 1/1 package/omxplayer: new package
In reply to Yann E. MORINHello,
package/omxplayer/Config.in line 17
Quoted 12 lines · Yann E. MORIN
package/omxplayer/Config.in new file +12
-0+config BR2_PACKAGE_OMXPLAYER + bool "omxplayer" + depends on BR2_arm + depends on BR2_USE_MMU # dbus + depends on BR2_PACKAGE_BOOST_ARCH_SUPPORTS # boost + depends on BR2_INSTALL_LIBSTDCPP # boost + depends on BR2_TOOLCHAIN_HAS_THREADS # boost, libusb + depends on BR2_USE_WCHAR # boost + depends on BR2_PACKAGE_RPI_USERLAND + select BR2_PACKAGE_BOOST + select BR2_PACKAGE_DBUS + select BR2_PACKAGE_FFMPEG
There is a FFMPEG_ARCH_SUPPORTS Config.in option now, so I've added this dependency, and applied your patch.
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com