OpenWrt Forum Archive

Topic: MPD refuses to index and play ogg/vorbis files

The content of this topic has been archived on 17 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi,

This is my first post on this forum. I just flashed my planex router to install a soundcard and play music via mpd.
Everything went fine, I got it to work and mpd plays music, but only mp3s.

I have libvorbis, libvorbisidec and libogg installed on an usb drive, but I made symlinks to all the libraries in /usr/lib. Still mpd does not want to add ogg files to the library, and if a do install a file by entering it directly in the database, it won't play it.

I really don't know where to go from there...
Any idea?

Little update

When I give as a music directory a directory containing only ogg files, the indexing process does not detect anything

Here is the output on a Folder with three ogg files:

root@OpenWrt:/mnt/disk1/home# mpd mpd.conf -v --no-daemon --stdout
config: loading file mpd.conf
path: path_set_fs_charset: fs charset is: UTF-8
Failed to load database: Failed to open database file "/opt/home/database": No such file or directory
disabling the last.fm playlist plugin because account is not configured
daemon: opening pid file
daemon: writing pid file
update: spawned thread for update job id 1
state_file: Loading state file /opt/home/state
state_file: failed to open /opt/home/state: No such file or directory
update: starting
database: removing empty directories from DB
database: sorting DB
database: writing DB
update: finished

Here is the output on a folder with mp3 files:

root@OpenWrt:/mnt/disk1/home# mpd mpd.conf -v --no-daemon --stdout
config: loading file mpd.conf
path: path_set_fs_charset: fs charset is: UTF-8
Failed to load database: Failed to open database file "/opt/home/database": No such file or directory
disabling the last.fm playlist plugin because account is not configured
daemon: opening pid file
daemon: writing pid file
update: spawned thread for update job id 1
state_file: Loading state file /opt/home/state
state_file: failed to open /opt/home/state: No such file or directory
update: starting
update: added /Supertramp - Breakfast in America - Breakfast in America.mp3
update: added /Pat Metheny - Secret Story - Always and Forever.mp3
update: added /John Scofield & Pat Metheny - I Can See Your House From Here - No Matter What.mp3
update: added /Dave Holland - Prime Directive - Jugglers Parade.mp3
mad: detected LAME version 3.91 ("LAME3.91 ")
mad: LAME peak found: 0.000000
mad: encoder delay is 576, encoder padding is 1188
update: added /Nouvelle Vague - The Killing Moon.mp3
update: added /Thom Yorke - The Eraser - The Eraser.mp3
update: added /Dire Straits - Dire Straits - Sultans of Swing.mp3
update: added /Safri Duo - Episode II - Everything Epilogue.mp3
update: added /Steely Dan - Two Against Nature - Gaslighting Abbie.mp3
update: added /Pat Metheny Group - Offramp - Au Lait.mp3
update: added /Pat Metheny - Secret Story - The Truth Will Always Be.mp3
update: added /Pat Metheny Group - Quartet - As I Am.mp3

 etc. etc.

update: added /Suspended Variation II.mp3
mad: detected LAME version 3.97 ("LAME3.97 ")
mad: LAME peak found: 0.000000
mad: LAME track gain found: -0.300000
mad: encoder delay is 576, encoder padding is 1212
update: added /The First Touch.mp3
update: added /The Wizard's Song.mp3
update: added /Vignette.mp3
database: removing empty directories from DB
database: sorting DB
database: writing DB
update: finished

My mpd should be able of ogg support since

root@OpenWrt:/mnt/disk1/home# mpd -V
mpd (MPD: Music Player Daemon) 0.16.1 

Copyright (C) 2003-2007 Warren Dukes <warren.dukes@gmail.com>
Copyright (C) 2008-2010 Max Kellermann <max@duempel.org>
This is free software; see the source for copying conditions.  There is NO
warranty; not even MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Supported decoders:

[mad] mp3 mp2
[oggflac] ogg oga
[flac] flac
[audiofile] wav au aiff aif
[faad] aac

Supported outputs:

shout null fifo alsa httpd recorder 

Supported encoders:

null vorbis wave flac 

Supported protocols:

file:// http:// mms:// mmsh:// mmst:// mmsu://

ANy idea?

(Last edited by benjou on 11 Apr 2011, 13:11)

I'm bringing this topic up since it is the only issue that prevent my streaming sound system to be a killer. It kind of suck for a Linux-based solution not to play ogg files!

benjou wrote:

I'm bringing this topic up since it is the only issue that prevent my streaming sound system to be a killer. It kind of suck for a Linux-based solution not to play ogg files!

works for me.

root@Alix:~# mpd --version
mpd (MPD: Music Player Daemon) 0.16.1 

Copyright (C) 2003-2007 Warren Dukes <warren.dukes@gmail.com>
Copyright (C) 2008-2010 Max Kellermann <max@duempel.org>
This is free software; see the source for copying conditions.  There is NO
warranty; not even MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Supported decoders:

[mad] mp3 mp2
[oggflac] ogg oga
[flac] flac

Supported outputs:

null fifo oss httpd recorder 

Supported encoders:

null wave flac 

Supported protocols:

file:// http:// mms:// mmsh:// mmst:// mmsu://
flux wrote:

works for me.

sorry, i was wrong. I've just tested it and it actually doesn't work for me either. Ogg files aren't listed in the database. That's strange. I was pretty sure it worked for me! Maybe it was a newer version from the trunk that I've tested some time age and got an imression that ogg files do work...

(Last edited by flux on 19 Apr 2011, 23:33)

Thanks! I feel less lonely.
I was worried that the problem stemmed from the fact that I have my libvorbis and libovorbisidec and libogg on an usb drive and that I had not made correct symlinks (although I'm pretty sure I did...)
Probably a problem in the compilation of that package. Do you have any idea how to compile it? I'm a beginner in Openwrt, though I have some experience with linux in general. Or do you know where I could get an alternative package?

Thanks again!

benjou wrote:

Thanks! I feel less lonely.
I was worried that the problem stemmed from the fact that I have my libvorbis and libovorbisidec and libogg on an usb drive and that I had not made correct symlinks (although I'm pretty sure I did...)
Probably a problem in the compilation of that package. Do you have any idea how to compile it? I'm a beginner in Openwrt, though I have some experience with linux in general. Or do you know where I could get an alternative package?

Thanks again!

well I suppose there is some problem with the 0.16.1 version of the mpd. Still think that ogg worked with the 0.15.8. They've changed the db format in this new 0.16.1 version and it could be that they screwed something during this transition. Well to test you can compile the older version. Here are the changes that were made to upgrade to 0.16.1

Interestingly, they seem to have switched from liboggflac decoder to tremor decoder. This may have broken ogg reading.

I don't think that it's a db problem. The db is a flat text file, one can edit it manually and enter ogg files (which I did). The ogg files are then visible in your mpd client but mpd refuses to play them.

I'll have to give a try to compiling 0.15.8. Is there a tutorial how to compile and make packages under openwrt?

benjou wrote:

I don't think that it's a db problem. The db is a flat text file, one can edit it manually and enter ogg files (which I did). The ogg files are then visible in your mpd client but mpd refuses to play them.

yep, I didn't mean the db file itself but all the code behind that handles local files.
Ok, if you wanna try the older mpd version the easiest way would be to install it from the repositories for your hardware. Don't know what image you are using currently (trunk snapshot I suppose) but all backfire rc's (up to rc4) are compiled with the mpd 0.15.8. You can try to opkg the package and if it doesn't work then you indeed need to recompile the package yourself. Start reading from here then http://wiki.openwrt.org/doc/start#building

Ok that's very odd. I uninstalled my version of mpd (from snapshot/trunk indeed) and downloaded either mpd_0.15.8-5_ar71xx.ipk, mpd_0.15.8-4_ar71xx.ipk, mpd_0.15.8-2_ar71xx.ipk or mpd_0.15.8-1_ar71xx.ipk from the various RCs of backfire, but whenever I try to install these, I get the 0.16.1 version see below:

root@OpenWrt:/mnt/disk1/home# opkg install --force-downgrade -d usb mpd_0.15.8-4_ar71xx.ipk 
Installing mpd (0.15.8-4) to usb...
Configuring mpd.
Collected errors:
 * resolve_conffiles: Existing conffile /opt/etc/mpd.conf is different from the conffile in the new package. The new conffile will be placed at /opt/etc/mpd.conf-opkg.
root@OpenWrt:/mnt/disk1/home# mpd -V
mpd (MPD: Music Player Daemon) 0.16.1

Copyright (C) 2003-2007 Warren Dukes <warren.dukes@gmail.com>
Copyright (C) 2008-2010 Max Kellermann <max@duempel.org>
This is free software; see the source for copying conditions.  There is NO
warranty; not even MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Supported decoders:

[mad] mp3 mp2
[oggflac] ogg oga
[flac] flac
[audiofile] wav au aiff aif
[faad] aac

Supported outputs:

shout null fifo alsa httpd recorder 

Supported encoders:

null vorbis wave flac 

Supported protocols:

file:// http:// mms:// mmsh:// mmst:// mmsu://

It uses the right file, it says it install the right verion (0.15.8) but then I get the latest version (0.16). In one of these version can I play ogg files.
What am I doing wrong here?
Thanks for your help!

benjou wrote:

Ok that's very odd. I uninstalled my version of mpd (from snapshot/trunk indeed) and downloaded either mpd_0.15.8-5_ar71xx.ipk, mpd_0.15.8-4_ar71xx.ipk, mpd_0.15.8-2_ar71xx.ipk or mpd_0.15.8-1_ar71xx.ipk from the various RCs of backfire, but whenever I try to install these, I get the 0.16.1 version see below:

root@OpenWrt:/mnt/disk1/home# opkg install --force-downgrade -d usb mpd_0.15.8-4_ar71xx.ipk

I'd delete the mpd completely first and then either edit the /etc/opkg.conf so it would point to the backfire (the very first line) and then would call (opkg update; opkg install mpd...). Or install it manually package by package but this would be very time consuming because mpd has lots of dependencies (I suppose around 10 additional packages needs to be downloaded and installed )

Still it is highly probable that the older version will not work because it was compiled for different kernel version and with different libs. So compiling it yourself would still be a better option.

Ok thanks for your help anyway. I'll try to learn how to compile things for my router.
Is there a place that I can file a bug report for the non working ogg in the present version of mpd?

benjou wrote:

Ok thanks for your help anyway. I'll try to learn how to compile things for my router.
Is there a place that I can file a bug report for the non working ogg in the present version of mpd?

https://dev.openwrt.org/newticket

and you try to ask on the freenode.org #mpd irc channel

Any news on this?

The discussion might have continued from here.