Archive

Archive for January, 2012

Ubuntu TV fully accelerated on a Pandaboard with Ubuntu LEB

January 16, 2012 15 comments

As described on my previous post about Ubuntu TV support on a Pandaboard, we were still missing proper support for texture streaming on a Pandaboard, to have the video playback also working and fully accelerated.

This weekend Rob Clark managed to create the first version of the TI’s specific eglImage support at Qtmobility, posting the code at his gitorious account, and for the first time we’re fully able to use Ubuntu TV on a ARM device, using a Pandaboard.

Demo video with the Ubuntu TV UI (accelerated with Qt and OpenGL ES 2.0) and with video decode support of 720p and 1080p:

The code support for TI’s eglImage still needs a few clean-ups, but we hope to be able to push the support at Ubuntu in the following weeks (make it good enough to try at least a package patch).

For people wanting to try it out, a few packages are already available at Linaro’s Overlay PPA, and the remaining ones should be available later today (Qt and Qtmobility), so people can easily run it with our images.

Hope you enjoy, and we’ll make sure we’re always working on keeping and improving the current support, so Ubuntu TV also rocks with ARM :-)

Cheers!

Ubuntu TV UI at Pandaboard, and next steps

January 10, 2012 17 comments

Yesterday Canonical announced the first UI concept for the Ubuntu TV. Together with the announcement, the first code drop was released, so we could read and understand better the technologies used, and how this will behave on an ARM environment, mostly at a Pandaboard (that we already have OpenGL ES 2 and video decode working).

Getting Ubuntu TV to work

If are still using Oneiric, you can just follow the guide presented at https://wiki.ubuntu.com/UbuntuTV/Contributing, where you’ll find all needed steps to try Ubuntu TV at your machine.

As it’s quite close with Unity 2D (similar code base), and also based on Qt, I decided to follow the steps described at wiki page and see if it should work correctly.

First issue we found with Qt, was that it wasn’t rendering at full screen when using with latest PowerVR SGX drivers, so any application you wanted to use with Qt Opengl would just show itself on a small part of the screen. Luckily TI (Nicolas Dechesne and Xavier Boudet) quickly provided me a new release of the driver, fixing this issue (version that should be around later today at the Linaro Overlay), so I could continue my journey :-)

Next problem was that Qt was enabling brokenTexSubImage and brokenFBOReadBack for the SGX drivers based on the old versions available for Beagle, and seems this is not needed anymore with the current version available at Pandaboard (still to be reviewed with TI, so a proper solution can be forwarded to Qt).

Code removed, patch applied and package built (after many hours), and I was finally able to successfully open the Ubuntu TV interface at my Panda :-)

UI Navigation on a Pandaboard, with Qt and OpenGL ES2.0

Running Ubuntu TV is quite simple if you’re already running the Unity 2D interface. All you need to do is to make sure you kill all unity-2d components and that you’re running metacity without composite enabled. Other than that you just run ”unity-2d-shell -opengl” and voilà ;-)

Here’s a video of the current interface running on my Panda:

As you can see from the video, I didn’t actually play any video, and that’s because currently we’re lacking a generic texture handler for OpenGL ES with Gstreamer at Qtmobility (there’s only one available, but specifically for Meego). Once that’s fixed, the video playback should behave similarly as with XBMC (but with less hacks, as it’s a native GST backend).

Next steps, enabling proper video decode

Looking at what would be needed to finally be able to play the videos, and to make it something useful at your Pandaboard, the first thing is that we need to improve Qtmobility to have a more generic (but unfortunately still specific to Omap) way handle texture streaming with Gstreamer and OpenGL ES. Rob Clark added a similar functionality at XBMC, creating support for ”eglImage”, so we just need to port the work and make sure it works properly with Qtmobility.

Once that’s ported, the video should be streamed as a texture at the video surface, making it also work transparently with QML (the way it’s done with Ubuntu TV).

If you know Qt and Gstreamer, and also want to help getting it to work properly on your panda, here follows a few resources:

As soon video decoding is working properly, a new blog post should be around explaining the details and how to reproduce it at your own Panda with Ubuntu LEB :-)

Cheers!

HW video decode and XBMC support on a Pandaboard with Ubuntu LEB

January 6, 2012 51 comments

Part of the effort we spent during the Linaro 11.12 cycle was to try to enable at Pandaboard not only hardware graphics support (GLES with PVR SGX), but also hardware accelerated video decode, as TI had released all needed userspace to be used at Ubuntu Oneiric (11.10) release.

Unfortunately it didn’t just work with our images because at that time we were using a newer kernel already, based on the 3.1 series that is maintained by the Linaro TI Landing Team. Bug 880840 has all the details.

Luckily Sebastien Jan (from TI) was able to find the root cause of the problem, that was causing so much frame drops that was making the video playback basically unusable. The problem was related with PM support at omap’s hwspinlock implementation, as you can check at this link.

Kernel fix properly integrated and available at the Overlay PPA used by our Linaro Ubuntu Evaluation Build images, and finally able to have a similar user experience as was expected when TI delivered the user space components at their own PPA.

If you want to try it by yourself, just be sure you’re using at least linux-image-3.1.1-6-linaro-lt-omap at your board (all hwpacks >= 20110105 should have it included by default).

Playing videos with HW decode acceleration

Since today you’ll also easily find all the needed packages to enable HW video decode acceleration at our images (Pandaboard only at the moment, more boards coming soon). We just included and copied all needed packages from the TI PPA, so you don’t even need to enable it when installing the additional packages.

Installing the extra packages for video decode at your Pandaboard:

  • Grab the latest Pandaboard hwpack (lt-panda-x11-base-oneiric) and Ubuntu Desktop image from http://snapshots.linaro.org/oneiric (as example I used hwpack_linaro-lt-panda-x11-base_20120106-0_armel_supported.tar.gz and linaro-o-ubuntu-desktop-tar-20120105-0.tar.gz)
  • Create a Ubuntu LEB pandaboard image on a SD card, following the instructions described at https://wiki.linaro.org/Platform/DevPlatform/Ubuntu/ImageInstallation
  • Boot the card and install the ubuntu-omap4-extras-multimedia package: $ sudo apt-get install ubuntu-omap4-extras-multimedia
  • Reboot your pandaboard
  • Play a video with any video player that’s compatible with Gstreamer (e.g. Totem)

In the future we should also have this completely integrated at the hwpack itself, but unfortunately this is not possible at the moment without increasing the image size too much.

XBMC support

Another awesome thing we worked during previous cycle (11.12) was to make an XBMC version available that would use both GLES and Gstreamer, so it could also be used with a Pandaboard. Avik Sil did a great work making it all work with our images, and we were finally able to have XBMC 11 Beta (Eden) available at our Overlay PPA.

For proper support for Gstreamer Rob Clark did an awesome work improving the current patches, and also improving the support quite a bit. At our package you’ll find all latest patches available from Rob, from his current development tree.

To start using XBMC with the Ubuntu LEB image at your Pandaboard, you just need to install the xbmc package, with $ sudo apt-get install xbmc. For best user experience, please use the XBMC session available at LightDM (just log-out the default session and select XBMC instead). This will work a lot better because then there will be no other window manager or compositor taking extra resources from your board.

We also hope to deliver a set-top box image by the end of the current cycle (12.01), that will have XBMC installed by default. Please check the blueprint https://blueprints.launchpad.net/linaro-ubuntu/+spec/create-a-set-top-box-leb-image if you want to follow the progress of it.

Bugs and Issues

Unfortunately not everything is working perfectly at the moment, and issues with the Gstreamer and hw video decode support on Pandaboard are expected. The most annoying one that’s currently affecting XBMC is the issues with seek, as sometimes the video goes faster than the audio, and then it stops for a while until it’s in sync again. We hope to get this fixed soon, but that depends a bit of how much time Rob can spend on it.

In case of any other bug while trying to get video decode to work on your Pandaboard, don’t hesitate to open a bug at https://bugs.launchpad.net/linaro-ubuntu/+filebug or ping aviksil, robclark or rsalveti at #linaro on freenode.

Cheers!

Update: Check bug https://bugs.launchpad.net/linaro-ubuntu/+bug/915456 for the video hanging issue. Without polling XBMC should now play most videos just fine.

Update 2: XBMC-ready image already available at http://snapshots.linaro.org/oneiric/linaro-o-linarotv-xbmc/, just be sure to flash with http://snapshots.linaro.org/oneiric/lt-panda-x11-base-oneiric/.

Update 3: There’s a mem leak at the gst decode codec, check bug https://bugs.launchpad.net/ubuntu-omap4-extras-multimedia/+bug/915768 for progress on that.

Follow

Get every new post delivered to your Inbox.