Ogg Support: Next Steps

Purpose of the 1.0.5 release was to get a decent feature set to Extras repository before the Maemo Summit. There are still some bigger issues to be fixed in the future releases.

Bugs

There’s a product for Ogg Support at the Maemo Extras Bugzilla. I’ve added the major issues there but do report any other issues you find.

Tags

Media Player and File Manager depend heavily on the open source Tracker for the meta data. Tracker has different meta data extractors for different mime types. GStreamer extractor is used by default for all audio/* and video/* mime types. The gstreamer extractor uses tagreadbin for getting the meta data from the media files.

For better efficiency tagreadbin uses only parsers for getting the meta data. Decoders may need e.g. separate DSP hardware, so using decoders for getting the meta data could be a very slow and heavy process.

Unfortunately Vorbis and Flac tags are not in the container and need a decoder for parsing them. Tracker provides a separate extractor for Vorbis that’s now packaged separately for Maemo by Ivan Frade. That’s not “product quality” and shouldn’t be used, so a proper solution will replace that one. The work for getting a tag parser for Vorbis and Flac to be used with tagreadbin has already been started. Hopefully the patch will be attached to the Gnome bugzilla at some point.

Gstreamer’s playbin(2) element reports tags while playing the media file and this already works with Vorbis and Flac. MP and FM need to know the meta data before they start to play the file but e.g. the Media Widget on the Desktop seems to get the tags from the playbin2 as it shows the tags for Flac as well.

Performance

The Vorbis decoder from xiph.org isn’t as fast as the FFmpeg’s Vorbis decoder on the n900.

There weren’t any GStreamer plugins for the FFmpeg’s Vorbis decoder until Felipe implemented one. The gst-av is still missing some features that need to be implemented before it can be taken into use, mainly tags and streaming.

If you are interested in the topic, I’m sure Felipe would be more than happy to apply patches :)

I’ll report numbers about performance comparisons between MP3 and Ogg later.

Ogg Support in Fremantle Extras

In my last post I asked for a wish list of features for the Ogg Support. I started the integration work based on those comments and now the 1.0.5 version for n900 has been promoted to Fremantle Extras repository.

The support for Vorbis audio is good: tags work, File Manager shows them too and knows how to launch Vorbis files in Media Player, etc. Flacs are missing tags but no magic is needed for that, just a new GStreamer element. Theora support is also included. I haven’t tested it much but at least the basic features seem to work.

I’ll tell more about the details at the Maemo Summit.

Wishlist for N900 ogg-support

Time to switch to a Linux phone and time to start preparing ogg-support for N900/Fremantle.

Hopefully everything will be easier to get working with the N900 since at least the closed source Metalayer Crawler is replaced with open source Tracker.

I would like to hear if there’s anything special people would like to get with ogg-support. Support for oggs in the built-in media player with tags is of course the first goal but is there something else that is a must? Theora? Flac?

Thanks.

Learning OpenGL ES 2.0

I got (again) interested on OpenGL ES 2.0 and bought OpenGL® ES 2.0 Programming Guide.

The examples on the book can be downloaded from http://www.opengles-book.com/. Those are meant to be compiled with Microsoft Visual Studio.

I made a small patch that adds initial support for Linux/X11. It doesn’t support texture loading (because I misplaced my png loader somewhere), the WinCreate() is copypaste code I don’t fully understand and the WinLoop() is missing some functionality. But at least the Chapter 1 Hello Triangle compiles and runs in Fremantle on Beagle board :)

Compile and install the libes in a normal autotools manner. Then you can compile the examples by exporting the PKG_CONFIG_PATH and running gcc:


gcc `pkg-config libes --cflags --libs` Hello_Triangle.c -o Hello_Triangle

As usual, patches are welcome :)

ALIP on n8x0

ARM and Movial announced a second stable release of ARM Linux Internet Platform (ALIP) generic repository. ALIP got other updates as well, see a blog post about them in Movial’s Sandbox or the actual release notes.

The Kaze project for n8x0 devices was updated to use the generic-2 branch as well. There are no built images provided, but ALIP is relatively easy to compile if one is already familiar with Scratchbox. The ALIP rootfs works with the Maemo kernel and initfs and it can be booted nicely from an MMC/SD card, so no need to destroy the Maemo from the device just to test ALIP.


Kaze on n8x0

ALIP requires newer SB components (and specific toolchains) but the newer SB components should work just fine with Maemo targets and Maemo toolchains. Or the newer SB can be installed in a different directory from tarballs and used concurrently with the Maemo SB.

Follow the From scratch instructions but replace alip-project with kaze-project and don’t pass the -cbeagleboard. You should pass -c multimedia to include 3rd party provided (by me actually) gst-ffmpeg to the build.

If you want to include WebKit engine and Midori UI to it, add “midori” to the components file.

Unfortunately the X driver for OMAPs (xf86-video-omapfb) in the stable branch in omap-repository has a bug concerning n8x0 devices and you should use master branch of it if you want to test video playback. The easiest way to switch using master branch for this component is to clone the n8x0 configuration repository and switch the branch before running the matrix install.


git clone git://linux.onarm.com/git/n8x0/config/n8x0.git
vi n8x0/suite/n8x0-recommended
# Add the branch: Component("xf86-video-omapfb", branch="master")
matrix install -c multimedia

After the install you should include the binary DSP tasks from the device (they are proprietary and cannot be distributed). Use the helper script (get_nokia_binaries.sh) in src/platform-n8x0 that fetches them from the device over ssh and reinstall the component before creating the rootfs image:


matrix install-only -c multimedia platform-n8x0

Lots of things are still broken:

  • Power button tries to suspend, which fails and does nothing.
  • WLAN encryption keys are not stored succesfully.
  • WPA doesn’t work (WEP and unencrypted do work).
  • Midori should be started after networking.
  • There’s no ssh client (but dbclient as it’s dropbear).
  • Power management.
  • Default XFCE theme doesn’t look cool.
  • Etc.

But I believe that with some work Kaze on n8x0 will become decent enough for everyday use and will provide up to date components long after Nokia has dropped the n8x0 support.

If you have any questions, visit #alip @ freenode.

PS. If you want an open source media engine with D-Bus API checkout the Octopus. It’s a work in progress but handles basic audio and video playback on n8x0 just fine :)

Ogg-support: in Extras

I promoted the ogg-support 0.9 to Extras repository. Feedback is welcome.

I’ve also managed to get the tags (except for the album) to show up in Metalayer Crawler. But that code isn’t even in SVN yet.

Kilikali shows all the tags properly and based on the GStreamer debug prints the MLC also gets the album tag but for some reason doesn’t write it to ~/.meta_storage SQL db.

Too bad the MLC is closed source so I can’t debug further why it rejects the album tag.

Ogg-support 0.9: Builder

I added the Theora support back to ogg-support and uploaded the source packages to extras-devel builder.

I didn’t change the mimetypes though, so all *.ogg files are seen as audio files even though they may contain video streams as well. I quickly transcoded the Big Buck Bunny video to lower resolution ogg containing Theora video and vorbis audio. The Media Player was able to show it although I should have used even lower resolution (and lower audio bitrate).

Comments are welcome.

New UI for Kilikali

Thanks to Movial Kilikali got a modern UI and looks quite nice now:

Kilikali UI

Kilikali development has moved to a GIT tree (branch generic-2) hosted by linux.onarm.com.

Although the UI got improved and the playback on n8x0 got fixes there are still some bigger task to be done. E.g. adding single files, adding directories recursively and skipping unknown media types. Integration with Light Media Scanner has also been discussed.

Ogg-support 0.8: Diablo

I finally compiled ogg-support for Diablo too. It’s available through the maemo downloads page.

I don’t know why the Chinook version didn’t work in Diablo any more. And I didn’t really want to start debugging why the Maemo’s mime libraries and the closed source Metalayer Crawler don’t want to work with the mimetypes copied from a desktop system. So, now there’s only one mimetype: audio/x-vorbis and no support for speex or theora anymore. On the good side, e.g. File Manager can now start OGGs to Media Player.

New feature is a Control Panel plugin to ignore the OGGs from the Maps application. After installing ogg-support wait several minutes for the Metalayer Crawler to finish and then start the CP plugin. Metalayer Crawler seems to be much much slower if you have the Media Player open while it indexes the files.

Linux on ARM

ARM (and Movial) has published a new site that provides Open Source components, middleware and utilities used to build a Linux Mobile software stack on ARM.

All components (applications, libraries, etc) are in GIT repositories. The build tool is called Matrix. Matrix clones all components under one directory and compiles them with a single command. With another command you get JFFS2 image although that’s not as simple as it should be.

ARM would like to get all contributions directly to upstream instead of providing large code dumps and states that developers are encouraged to participate in discussion forums and developer community of respective components used on this site. That’s why there are no new mailing lists nor forums available for the platform. There is #matrixhelp (#matrix was taken) on irc.ipv6.oftc.net for Matrix related issues though. Developing the components is convenient if you are familiar with GIT. It’s easy to test if your patch works and send it to the upstream project.

One of the supported hardware platforms is n8x0 which is nice as it’s commonly available. The downside is the closed source nature of it. There are two projects, example-project and Kaze that has n8x0 configured as one target platform. Kaze has XFCE desktop instead of Matchbox desktop that the example-project uses.

Kaze boots but most features need still work. WLAN works without encryption but WEP and WPA encryptions need to be fixed. ALSA works with alsa plugins through the DSP but the closed source DSP tasks need to be copied to the build system. Kaze has normal X.Org instead of Xomap, so there’s no XV extension, only stubs.