Kyle->GetThoughts();



Playing OGG files on Nokia n810
18 April 2009 @ 02:19 PM MST
Current Music: Trendy Mixes
Current Mood: Quite Well
I'm getting ready for a road trip and decided it would be convenient to use my n810 both as my GPS device and as my music provider. I have an iPod, but it's going to be a long trip, and I only have one place to plug things in. The n810 will have to be plugged in order to provide GPS for the trip. The iPod's battery might last the trip, but it would just be easier, and with fewer cords and cables to use one device.

Also, my iPod doesn't play ogg files, so the ogg files I have in my music library (many) are not available to enjoy.

So, let's get OGG support working on the n810. For some reason the Nokia execs decided not to include OGG support out-of-the-box. No one seems to be clear on why, it's a free format, whereas it does come with support for WMA and RealAudio which both require licensing fees (It also supports MP3 by default, which also requires a licensing fee, but MP3 is so prevalent not including would be dumb).


There are 2 packages claiming to provide OGG support for Maemo OS2008: mogg and Ogg Support.

Ogg Support shows up in the repositories by default so I figured that would be the easiest place to start. Unfortunately, it failed to install and I couldn't find any information online about what the problem might be. So, that didn't work out.

With Ogg Support out of the running, I tried mogg, but it is not in the repositories and using the "Click to Install" link from its Maemo.org page didn't work. So, we do things the hard way. I downloaded the .deb files myself from the mogg release history details. For OS2008, scroll down the page to that section (should be highlighted). You'll need to grab: gstreamer0.10-plugins-ivorbis_0.2-2_armel.deb, libvorbisidec1_1.2.0-mogg1_armel.deb, and mogg_0.4.1_all.deb.

Once you've got those on your n810, you'll need to fire up a root terminal session. If you don't know how to get root access follow these instructions. Then we'll use dpkg to install the files in this order: libvorbisidec1_1.2.0-mogg1_armel.deb, gstreamer0.10-plugins-ivorbis_0.2-2_armel.deb, mogg_0.4.1_all.deb:
~ $ root
BusyBox v1.6.1 (2008-09-18 09:43:17 EEST) Built-in shell (ash)
Enter 'help' for a list of built-in commands.
Nokia-N810-43-7:~# dpkg --install libvorbisidec1_1.2.0-mogg1_armel.deb
Selecting previously deselected packages libvorbisidec1.
(Reading database ... 15386 files and directories currently installed.)
Unpacking libvorbisidec1 (from libvorbisidec1_1.2.0-mogg1_armel.deb) ...
Setting up libvorbisidec1 (1.2.0-mogg1) ...
Nokia-N810-43-7:~# dpkg --install gstreamer0.10-plugins-ivorbis_0.2-2_armel.deb
(Reading database ... 15391 files and directories currently installed.)
Unpacking gstreamer0.10-plugins-ivorbis (from gstreamer0.10-plugins-ivorbis_0.2-2_armel.deb) ...
Setting up gstreamer0.10-plugins-ivrobis (1:0.2-2) ...
Nokia-N810-43-7:~# dpkg --install mogg_0.4.1_all.deb
[ lots of output ]
* Updating MIME database in /usr/share/mime...
[ more output]
Restarting Media Player Daemon: mediaplayer-engine.
Restarting Metalayer Crawler: metalayer-crawler0.
Stopping media-server
Starting media-server
Nokia-N810-43-7:~#


Once this was done the built-in media player does play OGG files, however the tags weren't being read. So my fun times continued. I decided that I'd ditch trying to use the built-in media player for my music. I turned to YouAmp. Before messing with a different media player, I decided I should uninstall the packages I just installed:
Nokia-N810-43-7:~# dpkg --remove mogg
...
Nokia-N810-43-7:~# dpkg --remove gstreamer0.10-plugins-ivorbis
...
Nokia-N810-43-7:~# dpkg --remove libvorbisidec1
...
Nokia-N810-43-7:~#


Then I installed YouAmp from the repositories which went smoothly. I configured it to look in my Music folder on my external SD card and it found my test OGG file just fine, and read the tag information. Unfortunately, it didn't actually play the file for me. When running it from the command line (so I could see some error output, hopefully) I was told: "python2.5[7343]: GLIB MESSAGE default - don’t know how to handle application/ogg
Error: GStreamer encountered a general stream error."

Someone else posted this error in the comments on the YouAmp page linked above. The response was that for OGG you need to install "gstreamer0.10-plugins-ivorbis". Well, crap, doesn't that look oddly familiar. Hoping for a cleaner solution than hacked in .deb packages I did an "apt-cache search ivorbis" and found "gstreamer0.10-plugins-bad-ivorbis". The "bad" means that this package isn't quite up to snuff yet, but probably works. So I gave it a shot and used "apt-get install gstreamer0.10-plugins-bad-ivorbis" which also installed the "libvorbisidec1" dependency. Now, YouAmp plays OGG files and reads tag information correctly, but it doesn't properly read the time information from the file. So it will play the OGG file, but you can't jump within the file and you can't see how long / how close to done it is. Lame. My previous hack with the built-in media player at least did that part correctly.

So, now an idea comes to me to try the previously attempted library packages with YouAmp! Let's see how this turns out for us. First, we remove the repository packages of "gstreamer0.10-plugins-bad-ivorbis" and "libvorbisidec1": "apt-get remove gstreamer0.10-plugins-bad-ivorbis", "apt-get remove libvorbisidec1".

Then we reinstall the packages obtained from the mogg release files (see above). Now we run YouAmp and.... SUCCESS! We can now play OGG files, jump within the file, read the tag data, and know how long the file is. We're ready for our road trip!

[This Entry]


Replies: 2 Comments

 On Sunday, April 19th @ 02:40, Mom said:
Kyle,
This post could not possibly be any more boring. I would like to read something in English.

 On Sunday, April 19th @ 08:33, la soeur said:
The kind words of a mother.