You are not logged in.

#1 2004-12-11 16:02:46

mico
Member
From: Slovenia
Registered: 2004-02-08
Posts: 247

gstreamer musepack plugin

Does it work for you? I can read tags in amarok, but not add the files to playlist and play them. Rhythmbox won't even load the files. XMMS plays fine, probably because it doesn't use gstreamer, just the musepack library.

Offline

#2 2004-12-11 17:08:26

JGC
Developer
Registered: 2003-12-03
Posts: 1,664

Re: gstreamer musepack plugin

Can you play the musepack files by running "gst-launch-ext-0.8 <yourmusefile>" ?

If gst-launch-0.8 can't play the files by constructing gst plugin pipes together, then rhythmbox can't either. As far as I know, rhythmbox has some media types hardcoded in it, but I'm not sure about that.

Offline

#3 2004-12-11 17:52:34

mico
Member
From: Slovenia
Registered: 2004-02-08
Posts: 247

Re: gstreamer musepack plugin

No, I can't. This is the output:

No suitable pipe found for extension mpc.

Offline

#4 2005-01-04 16:51:18

Lefungus
Member
Registered: 2004-03-28
Posts: 26

Re: gstreamer musepack plugin

Wait for gst-plugins-0.8.7.

musepack plugin in 0.8.6 can't read tags and can violently crash depending on your libmusepack version

Offline

#5 2005-01-06 13:02:28

mico
Member
From: Slovenia
Registered: 2004-02-08
Posts: 247

Re: gstreamer musepack plugin

I just upgraded gst-plugins to 0.8.7, ran gst-register as user and it still doesn't work with rhythmbox nor with gst-launch*. I don't know how, but it DOES work with amarok, only after chaning engine (sound system) from xine to either arts or gstreamer.

I'd still prefer rhytmbox, because amarok crashes sometimes.

Offline

#6 2005-01-06 14:17:51

JGC
Developer
Registered: 2003-12-03
Posts: 1,664

Re: gstreamer musepack plugin

Musepack works with new gst-plugins:
gst-launch filesrc location=unt.mpc ! decodebin ! alsasink

The plugin works correct, so if your gstreamer app doesn't pick it up, it's either that your gstreamer app isn't using the freshly generated registry after installation of the plugin, or that your application is doing something wrong.

Offline

#7 2005-01-06 14:50:51

mico
Member
From: Slovenia
Registered: 2004-02-08
Posts: 247

Re: gstreamer musepack plugin

I see, you have to specify the whole pipeline. It still doesn't work with gst-launch-ext-0.8 which should automatically construct proper pipes. Maybe that is why amarok plays mpc and rhythmbox doesn't.

Offline

#8 2005-01-06 16:20:54

JGC
Developer
Registered: 2003-12-03
Posts: 1,664

Re: gstreamer musepack plugin

gst-launch-ext is just a program that looks at the extention of a file. I looked into the rhtyhmbox code and it uses this:
gst-launch filesrc location=unt.mpc ! spider ! volume ! osssink

The spider plugin does the actual media recognition, the volume thing is the volume adjustment plugin inside gstreamer and osssink is the output plugin here.

The problem with totem is that it has to know the file format to store it in the music library. If it doesn't know the file, it skips it and you can't play it, no matter what gstreamer thinks of it. The recognized media types are in metadata/rb-metadata-gst.c

I will see if I can make rhythmbox play more than only these few formats.

Offline

#9 2005-01-06 17:59:31

JGC
Developer
Registered: 2003-12-03
Posts: 1,664

Re: gstreamer musepack plugin

I hacked musepack in there, and since that file contains a static list of all supported plugins, I will add the supported codecs as dependency to rhythmbox again (I thought rhythmbox will extend them, but that wasn't true).

I have to clean up the package a bit and then I will release a new version of the rhythmbox package.
Changelog:
- depend on codecs/plugins again
- support musepack plugin
- ipod support enabled (doesn't add extra dependency, so why not?)
- multimedia keys support

if you have any whishes with additional codecs other than musepack, flac, mp3, aac/mp4 or ogg/vorbis that are supported by GStreamer, please tell me so I can hack them in.

Offline

#10 2005-01-06 18:39:17

mico
Member
From: Slovenia
Registered: 2004-02-08
Posts: 247

Re: gstreamer musepack plugin

Thanks, JGC. I tried to add musepack support to rhythmbox myself with slightly modified patch I found on this page, but it didn't work.

As far as other codecs are concerned, I think current codecs + musepack would be enough for me, maybe other users will add some wishes here.

Offline

#11 2005-01-07 10:16:18

JGC
Developer
Registered: 2003-12-03
Posts: 1,664

Re: gstreamer musepack plugin

Made some changes to the code now, What my plans are:

- make mp3 (mad plugin) and ogg (vorbis & ogg plugin) static dependencies, since these files are the most used
- Note in postinstall about supported mediaformats and what plugins used to get them
All other plugins are autodetected and optional:
- aac/mp4 (faad plugin)
- flac (flac plugin)
- mod (mikmod plugin)
- wma (ffmpeg plugin)
- musepack (musepack plugin)

I did some speedups on the plugin detection code (50% time win per plugin), so detecting these extra plugins just increases startup time by a few seconds on a slow system (finding 3 plugins on my laptop takes 6 seconds, after modifying it took only 2 seconds)

If there's any other format rhythmbox should play, please tell me, I can add detection for it.

Offline

#12 2005-01-07 16:22:15

Lefungus
Member
Registered: 2004-03-28
Posts: 26

Re: gstreamer musepack plugin

Did you notify rhythmbox devs about your changes ? I hacked myself rhythmbox to support musepack, but I guess the best way is to have this fixed in the official release.

For the genre tag reading, I submitted already a very tiny patch to gstreamer which will be applied after gst-plugins-0.8.7 sadly.

BTW, I'd like to know if people using musepack and rhythmbox get correct length and bitrate reading.

Offline

#13 2005-01-07 18:27:20

mico
Member
From: Slovenia
Registered: 2004-02-08
Posts: 247

Re: gstreamer musepack plugin

What am I doing wrong here?!? I still can't load mpc files in rhythmbox 0.8.8-4.

Lefungus wrote:

I hacked myself rhythmbox to support musepack

Lefungus, could you paste your PKGBUILD and the patch?

Offline

#14 2005-01-07 23:25:06

JGC
Developer
Registered: 2003-12-03
Posts: 1,664

Re: gstreamer musepack plugin

The package is in extra new with the patch, the patch we use for rhythmbox went upstream. They way rhythmbox uses to detect plugins annoys me because they are slow, so I replaced them with functions that are more than twice as fast. Rhythmbox does now detect if the optional plugins are installed or not.

Offline

#15 2005-01-09 15:29:37

Lefungus
Member
Registered: 2004-03-28
Posts: 26

Re: gstreamer musepack plugin

mico wrote:

What am I doing wrong here?!? I still can't load mpc files in rhythmbox 0.8.8-4.
Lefungus, could you paste your PKGBUILD and the patch?

My hack is actually almost the same as the one shown in your link.

Offline

#16 2005-01-10 21:50:47

Thikasabrik
Member
Registered: 2004-02-23
Posts: 92

Re: gstreamer musepack plugin

I can't get this new rhythmbox to play musepack either, but it does play wma now. I suspect it is because my mpcs are tagged with APEv2.. does rhythmbox/the musepack element allow tag reading from APEv2 tags? Otherwise, I have no idea what it could be. Using the gst-launch command (manual pipe) the files play just fine.

edit: Actually, now I do have another idea. mpc files show as application/octet-stream in nautilus... I guess the mime system needs to recognise musepack files before rhythmbox can ID them. How to go about adding musepack mime-data, I don't know..

Offline

#17 2005-01-14 20:54:19

JGC
Developer
Registered: 2003-12-03
Posts: 1,664

Re: gstreamer musepack plugin

rhythmbox uses the mimetype returned by gst-typefind, so you're out of luck with adding custom mime types.

Offline

#18 2005-02-10 18:51:27

Thikasabrik
Member
Registered: 2004-02-23
Posts: 92

Re: gstreamer musepack plugin

Finally got around to making this work... gst-typefind recognises my ape tagged mpcs as application/x-apetag, so changing the musepack bit of the patch to...

+    if ((elt = gst_element_factory_find ("musepackdec")) != NULL) {
+        add_supported_type (md, "audio/x-musepack", NULL, "Musepack");
+        add_supported_type (md, "application/x-apetag", NULL, "Musepack");
+    }

does the trick. Works good. Now my only problem with rhythmbox is that it doesn't get the replaygain info from my ape tagged mp3s.... Is it possible to persuade RB to check for apetags as well as id3 on mp3? I have a feeling it is not designed with multiple tagged files in mind... but I might be wrong..

Offline

#19 2005-02-10 20:04:27

mico
Member
From: Slovenia
Registered: 2004-02-08
Posts: 247

Re: gstreamer musepack plugin

Hey, this really works! The patch needs also this adjustment:
from:

@@ -123,14 +123,23 @@

to:

@@ -123,14 +123,24 @@

Replaygain: for mp3 files I use mp3gain, that way they will surely be played at proper sound level. What about musepack, I think the replaygain info is not being read and all mpc files sound terribly loud. I think rhythmbox reads replaygain info only for flac and ogg vorbis. And amarok is even worse, it doesn't read this info on any files.

Offline

#20 2005-02-11 00:50:30

Thikasabrik
Member
Registered: 2004-02-23
Posts: 92

Re: gstreamer musepack plugin

Hmmm. I haven't tested this very thoroughly, but files still seem to play.. see if this gives you musepack replaygain..

+   if ((elt = gst_element_factory_find ("musepackdec")) != NULL) {
+      add_supported_type (md, "audio/x-musepack", NULL, "Musepack");
+      add_supported_type (md, "application/x-apetag", "apetag", "Musepack");
+   }

edit: don't think it works... but it might at least give decent field lengths. Although I can't even remember if that was a problem before...

Offline

#21 2005-02-11 12:30:25

Thikasabrik
Member
Registered: 2004-02-23
Posts: 92

Re: gstreamer musepack plugin

Another update... it would be pretty simple to allow reading of replaygain info from apetags by patching gst-plugins. The problem is that musepack apparently has it's own method for storing replaygain independent of tagging.. which is probably a whole lot more obscure. Foobar2000 doesn't seem to put rg info into an ape tag for musepack, but it does for mp3. Replaygain for mp3s might work then? Only if you can persuade RB to try to read an apetag from an mp3.

edit: This patch turns off replaygain completely. As far as I can tell...

--- rhythmbox-0.8.8/shell/rb-shell-player.c    2004-09-16 23:03:10.000000000 +0100
+++ rhythmbox-0.8.8/shell/rb-shell-player.c.RGoff    2005-02-11 12:37:29.000000000 +0000
@@ -1409,19 +1409,6 @@
     double entry_album_gain = 0;
     double entry_album_peak = 0;
     
-    if (entry != NULL) {
-        rhythmdb_read_lock (player->priv->db);
-                 entry_track_gain = rhythmdb_entry_get_double (player->priv->db,
-                                  entry, RHYTHMDB_PROP_TRACK_GAIN);
-                 entry_track_peak = rhythmdb_entry_get_double (player->priv->db,
-                                  entry, RHYTHMDB_PROP_TRACK_PEAK);
-                 entry_album_gain = rhythmdb_entry_get_double (player->priv->db,
-                                  entry, RHYTHMDB_PROP_ALBUM_GAIN);
-                 entry_album_peak = rhythmdb_entry_get_double (player->priv->db,
-                                  entry, RHYTHMDB_PROP_ALBUM_PEAK);
-        rhythmdb_read_unlock (player->priv->db);
-    }
-
     rb_player_set_replaygain (player->priv->mmplayer, entry_track_gain, 
                   entry_track_peak, entry_album_gain, entry_album_peak);
 }

Obviously this is a temporary solution, but it does help a little bit. I'm not a c programmer, but I will look into the possibility of reading RG info from mpc.. at least I may be able to submit an enhancement request for gst-plugins.

Offline

#22 2005-02-11 13:11:49

mico
Member
From: Slovenia
Registered: 2004-02-08
Posts: 247

Re: gstreamer musepack plugin

Yes, musepack has special (binary) fields at the beginning of file for replaygain info.

Ogg vorbis stores it as vc and so does flac.

mp3 is in most cases modified directly, but some programs (like mp3gain) add also the standard 4 pieces of information + some undo info as apetags. Most players (maybe none except foobar2k) don't care about apetags on mp3 files.

Offline

Board footer

Powered by FluxBB