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 626285 - 'lame' element is deprecated, should use 'lamemp3enc' instead
'lame' element is deprecated, should use 'lamemp3enc' instead
Status: RESOLVED FIXED
Product: banshee
Classification: Other
Component: GStreamer
git master
Other Linux
: Normal normal
: 1.x
Assigned To: Banshee Maintainers
Banshee Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-08-06 23:52 UTC by nyall
Modified: 2010-11-26 01:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gstreamer lame => lamemp3enc (3.02 KB, patch)
2010-10-31 20:55 UTC, Raimo Radczewski
none Details | Review
Better Patch ;-P (3.06 KB, patch)
2010-11-01 21:19 UTC, Raimo Radczewski
none Details | Review
This one should be ok. (3.06 KB, patch)
2010-11-01 21:24 UTC, Raimo Radczewski
none Details | Review
gstreamer lame => lamemp3enc + naming fix (3.73 KB, patch)
2010-11-05 21:12 UTC, Raimo Radczewski
committed Details | Review

Description nyall 2010-08-06 23:52:52 UTC
The 'lame' encoder element has been deprecated from gstreamer (see  http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-ugly-plugins/html/gst-plugins-ugly-plugins-lame.html ).

This should be replaced by the 'lamemp3enc' element, which has a simpler interface and defaults to higher quality mp3s:
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-ugly-plugins/html/gst-plugins-ugly-plugins-lamemp3enc.html
Comment 1 Raimo Radczewski 2010-10-31 20:55:46 UTC
Created attachment 173607 [details] [review]
gstreamer lame => lamemp3enc

I have written a patch that replaces lame with lamemp3enc. It was necessary to remove average bitrate and presets, as lamemp3enc doesn't seem to support those. Nevertheless, VBR and CBR work fine so far.
Comment 2 Gabriel Burt 2010-10-31 20:59:14 UTC
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-ugly-plugins/html/gst-plugins-ugly-plugins-lamemp3enc.html says that it does implement GstPreset -- not sure if that's replacing the old preset property, though.
Comment 3 Raimo Radczewski 2010-10-31 21:10:36 UTC
I read that too, but didn't find any further information about GstPreset. Overall, i think its enough to have banshee's own default values, users who wish to tweak the quality should be satisfied with either cbr or vbr
Comment 4 Raimo Radczewski 2010-11-01 21:19:04 UTC
Created attachment 173654 [details] [review]
Better Patch ;-P

Better commit message
Comment 5 Raimo Radczewski 2010-11-01 21:24:51 UTC
Created attachment 173655 [details] [review]
This one should be ok.

Hope this patch is ok
Comment 6 David Nielsen 2010-11-05 02:46:57 UTC
I am happy to see you working on this Raimo, could you please check with this bug[1] to ensure that we do not encode lower than expected quality for vbr mode.

[1] https://bugzilla.gnome.org/show_bug.cgi?id=482776
Comment 7 Raimo Radczewski 2010-11-05 06:17:11 UTC
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-ugly-plugins/html/gst-plugins-ugly-plugins-lamemp3enc.html
As far as I see lamemp3enc does not offer anything like vbr-max/min settings. Its so basic, i even had to remove presets from the whole audio-profile. It seems to only understand cbr and vbr quality (not even abr)

About the encoding quality:
I'm not at home but i will do some encodings to try this later.
Comment 8 Raimo Radczewski 2010-11-05 15:16:04 UTC
Test Case:
- Encode from CD to WAV, MP3 with V0 and MP3 with V9
- Take WAV and manually encode with lame to MP3 with V0 and V9

Results:
-rwxr-xr-x 1 raimo root 2198535 2010-11-05 16:04 01. Genesis-Lame-V0.mp3
-rwxr-xr-x 1 raimo root 2199951 2010-11-05 15:53 01. Genesis-Banshee-V0.mp3
-rwxr-xr-x 1 raimo root  606989 2010-11-05 16:07 01. Genesis-Lame-V9.mp3
-rwxr-xr-x 1 raimo root  608614 2010-11-05 16:06 01. Genesis-Banshee-V9.mp3

Guess those few (kilo)bytes difference are due to the metadata.
Comment 9 Dave Steinberg 2010-11-05 18:44:33 UTC
As someone who was actively looking at bug 482776, I should add that the main issue in that bug seemed to resolve itself at some point after my last comment there, due to a fix in gstreamer (it started using lame's default vbr-min-bitrate and vbr-max-bitrate values, instead of its own weird ones). Raimo, given your test results, it definitely looks like you've got VBR working right.

There were a couple of additional issues that I had addressed in my patches on that bug:

1. ABR is currently all wrong. The idea with ABR is that you're supposed to specify your target average bit rate, and lame attempts to hit that target using variable bit rate encoding. Specifying a quality does nothing, and so all ABR encoding is done with a default target bitrate (128k, no doubt). But since ABR isn't available in lamemp3enc and you're removing this mode, I suppose this won't be an issue anymore. Yay!

2. I thought the label "VBR Mode" wasn't very good, since one option, Constant Bitrate, isn't a VBR mode. Also, VBR is an acronym that might not be familiar to the user. So, in my patch, I changed that label to just "Mode" and the "VBR Quality" label to just "Quality". I would suggest doing the same in the new patch.

Finally, regarding the lack of support for presets, I should point out that those are just aliases. So you could keep them and do the translation manually, but I'd say losing them wouldn't be that bad.

Medium: -V 4
Standard: -V 2
Extreme: -V 0
Insane: -b 320

Source: http://wiki.hydrogenaudio.org/index.php?title=LAME

Thanks to Raimo for doing this work and to David for mentioning it on the other bug!
Comment 10 Raimo Radczewski 2010-11-05 21:12:23 UTC
Created attachment 173915 [details] [review]
gstreamer lame => lamemp3enc + naming fix

Thanks Dave for pointing out the naming mistake.

Imho the whole encoding part of Banshee is way too userfriendly (e.g. i would like to have a custom naming template and a seperate directory, but thats a different issue). I think it makes sense to offer the same slider as other plugins feature.

I noticed that LAME uses V2 as default for encoding, which makes sense to me. I therefore changed the default value for vbr_quality to 7 (9-7 => 2 ;) ).
Comment 11 David Nielsen 2010-11-23 03:33:36 UTC
Looks sane to me. Using my N900 to test as a transcoding target, valid high quality mp3s were created which played back without issue. Great work Raimo.
Comment 12 Alex Launi 2010-11-26 01:19:19 UTC
Review of attachment 173915 [details] [review]:

Looks good to me
Comment 13 Alex Launi 2010-11-26 01:21:47 UTC
Review of attachment 173915 [details] [review]:

Looks good to me
Comment 14 Alex Launi 2010-11-26 01:30:59 UTC
Review of attachment 173915 [details] [review]:

Looks good thanks