Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 346251 - app-pda/gtkpod: normalize volume doesn't work for .mp3 files with ApeV2 tags
Summary: app-pda/gtkpod: normalize volume doesn't work for .mp3 files with ApeV2 tags
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo PDA Herd
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-21 04:02 UTC by Mark Purtill
Modified: 2014-05-31 16:10 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Purtill 2010-11-21 04:02:45 UTC
Normalize Volume does not work for mp3 files not generated by lame.  It looks like mp3gain is successfully run, and the APEv2 tag is inserted into the file, but gtkpod can't read it.  (I'm using the stable mp3gain-1.4.6.)

Reproducible: Always

Steps to Reproduce:
1. Make sure Edit > Preferences > Music > Commands has the right path to mp3gain under "mp3gain executable".
2. Select an mp3 file (not made by lame)
3. Choose Tools > Normalize Volume > Selected Tracks

Actual Results:  
A box pops up saying the file "could not be normalized".

Expected Results:  
gtkpod successfully reads the APE tag giving the normalization information

I also tried using the more recent mp3gain-1.5.2 and added the "-s i" option, which is supposed to store the gain information in an ID3v2 tag, but it looks like the tag it uses isn't one of the ones gtkpod looks for.


I traced the code with gdb.  Here's a traceback for where the code appears to fail:

#0  mp3_get_track_ape_replaygain (path=0x1b7c590 "/usr/non-gentoo/music/mp3/stone_temple_pilots/purple/hidden_track.mp3", gd=0x7f849b7fdc90) at mp3file.c:2276
#1  0x000000000047cfbd in mp3_read_soundcheck (path=0x1b7c590 "/usr/non-gentoo/music/mp3/stone_temple_pilots/purple/hidden_track.mp3", track=0x2120210) at mp3file.c:2422
#2  0x000000000045806c in read_soundcheck (track=0x2120210) at file.c:2568
#3  0x000000000048e9a9 in nm_get_soundcheck (track=0x2120210) at tools.c:234
#4  0x000000000048eb85 in th_nm_get_soundcheck (track=0x2120210) at tools.c:304
#5  0x00007f84a98cf066 in g_thread_create_proxy (data=0x2898430) at gthread.c:1893
#6  0x00007f84a89e3894 in start_thread (arg=<value optimized out>) at pthread_create.c:297
#7  0x00007f84a875527d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

The lines at position #0 are:

	if (fread(dbuf, 1, data_length, file) != data_length)
		goto rg_fail;

The fread fails.  I don't understand the code well enough to see what's going wrong, but I suspect it's something earlier in mp3_get_track_ape_replaygain.

# emerge --info
Portage 2.1.8.3 (default/linux/amd64/10.0/desktop, gcc-4.4.3, glibc-2.11.2-r3, 2.6.34-gentoo-r12 x86_64)
=================================================================
System uname: Linux-2.6.34-gentoo-r12-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q6600_@_2.40GHz-with-gentoo-2.0.1
Timestamp of tree: Thu, 18 Nov 2010 16:45:01 +0000
distcc 3.1 x86_64-pc-linux-gnu [disabled]
ccache version 2.4 [disabled]
app-shells/bash:     4.1_p7
dev-java/java-config: 2.1.11-r1
dev-lang/python:     2.5.4-r4, 2.6.5-r3, 3.1.2-r4
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 2.0.1-r1
sys-apps/openrc:     0.6.4
sys-apps/sandbox:    2.3-r1
sys-devel/autoconf:  2.13, 2.65-r1
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.18-r3, 2.20.1-r1
sys-devel/gcc:       4.1.2, 4.3.4, 4.4.3-r2, 4.5.1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA dlj-1.1 PUEL AdobeFlash-10.1"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -ggdb -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/games/angband/edit/ /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=core2 -ggdb -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests buildpkg distlocks fixpackages installsources news parallel-fetch protect-owned sandbox sfperms splitdebug strict unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
GENTOO_MIRRORS="ftp://buurin/old-distfiles ftp://ftp.ntua.gr/pub/linux/gentoo/ ftp://lug.mtu.edu/gentoo/ http://lug.mtu.edu/gentoo/ http://ftp.ntua.gr/pub/linux/gentoo/ ftp://de-mirror.org/distro/gentoo/ http://130.208.16.26/pub/gentoo/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en_US en ja_JP ja"
MAKEOPTS="-j5 -l16"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/vmware /usr/local/portage/layman/sunrise /usr/local/portage/layman/kde-sunset /usr/local/portage/layman/wirelay /usr/local/portage /usr/local/ubuntu-overlay-read-only"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="CJK X Xaw3d a52 aac aalib acl acpi alsa amd64 anthy bbdb berkdb blender bluetooth branding bzip2 cairo cdr cjk cli consolekit cracklib crypt cups cxx dbus doc dri dts dvd dvdr emacs emboss encode esd exif fam ffmpeg firefox flac fontconfig fortran freewnn gdbm gif gimp gpm graphviz gtk hal iconv imagemagick immqt-bc ipv6 jadetex java java6 joystick jpeg kde kdehiddenvisibility lcms ldap libnotify lm_sensors mad maildir matroska mbox midi mikmod mmx mng modules mp3 mp4 mpeg mplayer mudflap mule multilib ncurses nls nptl nptlonly nvidia ogg opengl openmp pam pango pcre pdf perl pic png ppds pppd python qt3support qt4 quicktime readline ruby scanner sdl session speex spell sse sse2 ssl startup-notification svg sysfs tcpd theora tiff truetype unicode usb v4l v4l2 vcd vdpau vorbis wmf x264 xcb xine xinerama xml xorg xulrunner xv xvid xvmc zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_US en ja_JP ja" PHP_TARGETS="php5-2" RUBY_TARGETS="ruby18" SANE_BACKENDS="epson epson2" USERLAND="GNU" VIDEO_CARDS="vesa nv nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Samuli Suominen gentoo-dev 2012-02-23 07:01:20 UTC
NEWS file for 2.1.1 says:

BUGFIX: Reintroduce track normalization
BUGFIX: Fix for track volume control

So I believe this is now fixed. Reopen with new test data if not.
Comment 2 Mark Purtill 2012-03-14 04:18:17 UTC
I downloaded the test file from mp3gain (at http://mp3gain.sourceforge.net/maxampdemo.zip) and tried adding the first file (Song clip 1 (max amp 32075).mp) to the ipod (adding it to a local repository also works), and then clicked on the file and choose Normalize.  Looking at the mp3 file, I do see what looks like the ApeV2 flags at the end of the file, but gtkpod reports the file "could not be normalized.  Unknown error."
Comment 3 Justin Lecher gentoo-dev 2013-01-11 16:10:10 UTC
Fixed in 2.1.3?
Comment 4 Mikle Kolyada archtester Gentoo Infrastructure gentoo-dev Security 2014-05-31 16:10:38 UTC
Works fine for me in 2.1.4