normalize-mp3 0.7.7 fails at line 741 (0.7.6 worked)

Bug #109581 reported by Adam Funk
8
Affects Status Importance Assigned to Milestone
normalize-audio (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: normalize-audio

$ normalize-mp3 -a -20dB PayHerNoMind.mp3
Decoding PayHerNoMind.mp3...
Can't exec "": No such file or directory at /usr/bin/normalize-mp3 line 741.
Error decoding, stopped at /usr/bin/normalize-mp3 line 746.

I'd never seen this error until I just upgraded from Edgy to Feisty.

Revision history for this message
Adam Funk (a-funk) wrote :

I've downgraded to 0.7.6-7 (the Edgy version) and that works as before.

Revision history for this message
gmax.jp (gmax-jp) wrote :

I've commented out MP3DECODE and MP3DECODE initialization and the problem solved....

--- normalize-mp3.orig 2007-04-29 00:40:53.000000000 +0900
+++ normalize-mp3 2007-04-29 00:45:39.000000000 +0900
@@ -26,12 +26,12 @@
 # %b becomes bitrate of re-encoded file, as specified by the -b option
 # Example: $OGGENCODE="oggenc -Q -b %b -o %m %w"

-$MP3DECODE = " -q -o %w %m";
-$MP3ENCODE = " -quiet %w %m";
-$OGGDECODE = "oggdec -Q -o %w %m";
-$OGGENCODE = "oggenc -Q -b %b -o %m %w";
-$FLACDECODE = "";
-$FLACENCODE = "";
+#$MP3DECODE = " q -o %w %m";
+#$MP3ENCODE = " -quiet %w %m";
+#$OGGDECODE = "oggdec -Q -o %w %m";
+#$OGGENCODE = "oggenc -Q -b %b -o %m %w";
+#$FLACDECODE = "";
+#$FLACENCODE = "";

 # The %w etc. substitutions should *not* be used in the following, as
 # this script knows about their options already.

Revision history for this message
M Hickford (hickford) wrote :

It's clear from the following lines at the start of /usr/bin/normalize-mp3 that the paths to an mp3 encoder and decoder is missing.

$OGGDECODE = "oggdec -Q -o %w %m";
$OGGENCODE = "oggenc -Q -b %b -o %m %w";
$MP3DECODE = " -q -o %w %m";
$MP3ENCODE = " -quiet %w %m";

I specified lame as the encoder, and mp3-decoder as the decoder. (mp3-decoder is a symlink to the default decoder, mpg321, for which i had to fiddle the arguments slightly, as below)

$MP3DECODE = "mp3-decoder -q --wav %w %m";
$MP3ENCODE = "lame -quiet %w %m";

Revision history for this message
gmax.jp (gmax-jp) wrote :

Matt, your fix works greatly for me and met package dependency.
I've installed mpg123 instead though "normalize-audio" proposed to install mpg321.

Thanks a lot.

Revision history for this message
gmax.jp (gmax-jp) wrote :

Oops, slight change needed ;-)

> $MP3ENCODE = "lame -quiet %w %m";

$MP3ENCODE = "lame --quiet %w %m";

Revision history for this message
Adam Funk (a-funk) wrote :

Thanks to both of you!

Revision history for this message
Daniel T Chen (crimsun) wrote :

Is this symptom still reproducible in 8.10 beta?

Changed in normalize-audio:
status: New → Incomplete
Revision history for this message
Pedro Villavicencio (pedro) wrote :

We are closing this bug report because it lacks the information we need to investigate the problem, as described in the previous comments. Please reopen it if you can give us the missing information, and don't hesitate to submit bug reports in the future. To reopen the bug report you can click on the current status, under the Status column, and change the Status back to New. Thanks again!.

Changed in normalize-audio:
status: Incomplete → Invalid
Revision history for this message
Adam Buchbinder (adam-buchbinder) wrote :

There's been no change in the package between Gutsy and Jaunty. I'm disappointed in the tendency to stop by a bug which (a) is trivial to reproduce, (b) is in a package which hasn't changed in a full year, (c) crashes in the normal use case, requiring manual cleanup (the source file is deleted by the time of the crash), along with actual data lossage (say goodbye to your tags), and (d) contains a patch which clearly hasn't been applied... and mark it as 'Incomplete' so that if the original reporter isn't paying attention to it after a year and a half, it can be shuffled under the rug and forgotten. *Especially* when it's so trivial to reproduce.

$ dpkg -l |grep normalize-audio |awk '{ print $3 }'
0.7.7-2
$ normalize-mp3 test.mp3
Decoding test.mp3...
Running normalize...
Re-encoding test.mp3...
Can't exec "": No such file or directory at /usr/bin/normalize-mp3 line 797.
Error encoding, stopped at /usr/bin/normalize-mp3 line 802.

There are several problems with the package: it recommends vorbis-tools and flac, but no MP3 encoder. The "defaults" (see the find_{mp3,ogg,flac}{en,de}code() functions in the script) are never actually used, because the packager didn't comment out the "for local setup" variables at the top of the script for some inscrutable reason. Apart from all of this, it identifies files by their extensions rather than using 'file' or some interface into libmagic to do so.

The quickest and simplest way to fix this particular mess is to simply comment out the declarations of $MP3ENCODE and $MP3DECODE at the top of the script; it'll default to a the more robust method of finding an available encoder. It'll still fail if (lame|notlame|bladeenc) isn't installed, so an MP3 encoder should be added to the Recommends field as well. (It only Suggests an MP3 decoder.)

In any case, the command is misnamed; 'normalize-audio' is happy to normalize MP3s, though it does it by setting a tag rather than destructively decoding and reencoding the file. Seeing the commands available in package 'normalize-audio', the user might be forgiven for thinking that 'normalize-mp3' is the one that works on MP3s, and end up putting their music through generation loss at the very least. "normalize-audio-destructive" might be a better name, as decoding and reencoding lossy compression is a destructive process. (On the other hand, it works with FLAC files, and that's nondestructive.) I'm not sure precisely how to fix it, but it's misleading at best as it stands now.

Changed in normalize-audio (Ubuntu):
status: Invalid → Confirmed
Revision history for this message
Joachim Reichel (joachim-reichel-googlemail) wrote :

This bug has been fixed in the Debian revision 0.7.7-7.

Changed in normalize-audio (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.