After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 776140 - Remove mad plugin
Remove mad plugin
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-ugly
git master
Other Linux
: Normal enhancement
: 1.11.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-12-15 15:19 UTC by Tim-Philipp Müller
Modified: 2017-03-20 17:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
cerbero: remove libmad and mad plugin (5.50 KB, patch)
2016-12-15 19:31 UTC, Tim-Philipp Müller
committed Details | Review

Description Tim-Philipp Müller 2016-12-15 15:19:34 UTC
I wonder if we should just remove the mad plugin entirely.

Reasons:

 - libmad is GPL
 - libmad is completely unmaintained
 - libmad is slow

The main reason to keep it around and at a high rank was because it was the only mp3 decoder that could handle so-called 'freeform' mp3s with higher-than-specced bitrates.

This is no longer the case and libmpg123 handles those just fine in recent versions.

If we don't decide to remove the mad plugin, we should at least remove it from the binaries we ship via cerbero.
Comment 1 Sebastian Dröge (slomo) 2016-12-15 16:44:56 UTC
Yes
Comment 2 Tim-Philipp Müller 2016-12-15 19:31:08 UTC
Created attachment 342040 [details] [review]
cerbero: remove libmad and mad plugin
Comment 3 Sebastian Dröge (slomo) 2016-12-15 19:50:50 UTC
Comment on attachment 342040 [details] [review]
cerbero: remove libmad and mad plugin

Could do the same for libmpeg2, gst-libav has higher rank anyway
Comment 4 Sebastian Dröge (slomo) 2016-12-16 11:31:10 UTC
Do you have an opinion on libmpeg2? Or a52dec? Or dtsdec? Same situation basically :)
Comment 5 Tim-Philipp Müller 2016-12-16 12:02:58 UTC
I don't know if the situation is as clear-cut with those, there are not exactly dozens of alternative decoders. I think it's good to have alternatives outside of gst-libav as well, and I think for the two audio codecs the gst-libav decoders are not feature-equivalent for multichannel audio. libmpeg2 I don't know. I don't want to remove everything just because we have gst-libav.

'mad' just stood out for me. I'm not in a hurry about any of the others.
Comment 6 Sebastian Dröge (slomo) 2016-12-16 12:14:53 UTC
Let's ignore those others for now then until someone sees a need
Comment 7 Tim-Philipp Müller 2016-12-28 10:59:32 UTC
commit 2f767fb24ac8ee001bde7e1452b46a4f8fe3a719
Author: Tim-Philipp Müller <tim@centricular.com>
Date:   Wed Dec 28 10:42:15 2016 +0000

    mad: remove plugin
    
    We have better replacements such as the mpg123 plugin.
    The main reason to keep around mad was for 'freeform'
    mp3 support, but mpg123 can handle those too nowadays.
    Also, mad is GPL and has been unmaintained for years.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=776140
Comment 8 Yaakov Selkowitz 2017-03-20 16:24:41 UTC
(In reply to Tim-Philipp Müller from comment #5)
> I don't know if the situation is as clear-cut with those, there are not
> exactly dozens of alternative decoders. I think it's good to have
> alternatives outside of gst-libav as well, and I think for the two audio
> codecs the gst-libav decoders are not feature-equivalent for multichannel
> audio. libmpeg2 I don't know. I don't want to remove everything just because
> we have gst-libav.

There are also legal issues to consider.  Some distros cannot distribute ffmpeg/libav because some parts are still encumbered.  However, for example, AC-3 just freed up as of today[1], so a separate a52dec-based decoder could be shipped.

Therefore, it would be helpful NOT to remove things just because gst-libav can do them the same or better; just use rankings instead to give it precedence where desired.

[1] https://ac3freedomday.org/
Comment 9 Yaakov Selkowitz 2017-03-20 16:47:29 UTC
I just did a quick code check[1], and gst-plugins-base/tests/examples/seek/jsseek.c needs to be updated, and it looks like phonon-gstreamer needs to be patched.  Perhaps someone could do a deeper search to make sure there aren't other such cases (particularly in other programming languages); unfortunately "mad" is also the ISO 639-2 language code for Madurese, so searching just for that returns a lot of false positives.

[1] https://codesearch.debian.net/search?q=gst_.*%22mad%22
Comment 10 Tim-Philipp Müller 2017-03-20 17:21:52 UTC
core:

commit b84cb752005b8cf15f079afd046b777c870dc687
Author: Tim-Philipp Müller <tim@centricular.com>
Date:   Mon Mar 20 16:54:22 2017 +0000

    tools: replace mentions of 'mad' on the gst-launch-1.0 man page
    
    The 'mad' plugin has been removed. Mention mpg123audiodec instead.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=776140

-base:

commit c8949d678f69d8a8ef333ce70dfdbf54bd30fb1b
Author: Tim-Philipp Müller <tim@centricular.com>
Date:   Mon Mar 20 16:57:58 2017 +0000

    examples: jsseek: update for removal of mad plugin
    
    https://bugzilla.gnome.org/show_bug.cgi?id=776140

-good:

commit f26edcdf340edd8eda361490f16ca8e84133f153
Author: Tim-Philipp Müller <tim@centricular.com>
Date:   Mon Mar 20 17:03:32 2017 +0000

    docs: update two references to the removed 'mad' plugin
    
    https://bugzilla.gnome.org/show_bug.cgi?id=776140

-ugly:

commit fac622571c8a1b46ab1c1874da041a65997c15ce
Author: Tim-Philipp Müller <tim@centricular.com>
Date:   Mon Mar 20 17:06:16 2017 +0000

    REQUIREMENTS: update for mad mp3 decoder removal
    
    https://bugzilla.gnome.org/show_bug.cgi?id=776140

-bad:

commit 24ee6089476ad67cf6eac03bfbf18593c9c17d78
Author: Tim-Philipp Müller <tim@centricular.com>
Date:   Mon Mar 20 17:15:54 2017 +0000

    Update for 'mad' mp3 decoder removal
    
    https://bugzilla.gnome.org/show_bug.cgi?id=776140
Comment 11 Yaakov Selkowitz 2017-03-20 17:28:43 UTC
(In reply to Tim-Philipp Müller from comment #10)
> -base:
> 
> commit c8949d678f69d8a8ef333ce70dfdbf54bd30fb1b
> Author: Tim-Philipp Müller <tim@centricular.com>
> Date:   Mon Mar 20 16:57:58 2017 +0000
> 
>     examples: jsseek: update for removal of mad plugin
>     
>     https://bugzilla.gnome.org/show_bug.cgi?id=776140

This one contains a typo:

-  a_decoder = gst_element_factory_make_or_warn ("mpg13audiodec", "a_dec");
+  a_decoder = gst_element_factory_make_or_warn ("mpg123audiodec", "a_dec");
Comment 12 Tim-Philipp Müller 2017-03-20 17:44:51 UTC
Ah indeed, thanks, I'll fix it. (To be fair, I don't know if anyone has tested this example in the last few years, it all looks very dubious ;))