Bug 142579 - convert Replaygain values to iPod Soundcheck
Summary: convert Replaygain values to iPod Soundcheck
Alias: None
Product: amarok
Classification: Applications
Component: Collections/iPod iPhone (show other bugs)
Version: 2.3-GIT
Platform: openSUSE Linux
: NOR wishlist
Target Milestone: ---
Assignee: Amarok Developers
Depends on:
Reported: 2007-03-06 05:39 UTC by Biji
Modified: 2012-01-12 15:20 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.6
Sentry Crash Report:

Patch to add ReplayGain metadata to iPods (2.54 KB, patch)
2007-03-07 19:36 UTC, Michael Gorven

Note You need to log in before you can comment on or make changes to this bug.
Description Biji 2007-03-06 05:39:41 UTC
Version:            (using KDE KDE 3.5.1DevelKDE 1.2)
Installed from:    SuSE RPMsSuSE RPMs0SuSE RPMs

convert Replaygain values to iPod Soundcheck

I'm using mp3gain and *apply* dB change to the files (mp3 files altered)
so I can play in iPod with equal volume

I hope amarok can convert replaygain values (from replygain tag) to iPod iTunesDB' soundcheck value
so I don't have to alter mp3
Comment 1 Michael Gorven 2007-03-06 22:47:54 UTC
I have hacked Amarok to do exactly this, and it works for me. The problem with my implementation is that it only reads ReplayGain tags as written by mp3gain. This is because TagLib doesn't really support ReplayGain metadata. ReplayGain support in TagLib is supposedly in development, and I've been waiting for this before submitting my patch.
Comment 2 Michael Gorven 2007-03-07 19:36:15 UTC
Created attachment 19905 [details]
Patch to add ReplayGain metadata to iPods

Here is my patch against Amarok 1.4.5 which sets the Soundcheck field in the
iPod database based on the ReplayGain Track Gain. As I noted above, it can only
retrieve values as written by mp3gain since TagLib doesn't support ReplayGain
properly. It enters a default gain of -8dB if a track doesn't contain
ReplayGain metadata.
Comment 3 Biji 2007-03-08 04:37:06 UTC

I wonder what happen to files which already applied gain (mp3 files altered)
amarok should set Soundcheck value to 0 for these files

Comment 4 Michael Gorven 2007-03-08 11:43:19 UTC
It probably should, but it's not the ideal situation since you can't enable/disable Soundcheck on the iPod. It would be better to remove the adjustment from the files.
Comment 5 Marc Pignat 2009-01-06 12:02:10 UTC
*** This bug has been confirmed by popular vote. ***
Comment 6 Jan Essert 2009-04-22 14:56:27 UTC
Since amarok-2.1 now natively supports ReplayGain (and so I assume taglib does as well), this is perhaps not too difficult to implement anymore?
Comment 7 Ralf Engels 2011-01-12 20:11:26 UTC
Very good idea. I also noticed that some other tags supported by libgpod are not set.

I have started refactoring the stuff.
Comment 8 Matěj Laitl 2011-10-20 13:11:31 UTC
This is on my TODO list, but there are more severe Amarok iPod bugs, so this will have to wait a bit.
Comment 9 Matěj Laitl 2011-12-20 12:09:13 UTC
Git commit 9f0986a74551002da73d20bda6f3db414053ce75 by Matěj Laitl.
Committed on 19/12/2011 at 13:58.
Pushed by laitl into branch 'strohel-for-2.6'.

iPod collection: convert from ReplayGain to Sound Check and vice versa

By popular demand, we now convert ReplayGain values to Sound Check
values when transferring tracks to iPod. We also read Sound Check from
iPod and convert it to ReplayGain on-the-fly when playing a track off
an iPod in Amarok.

On the other hand, when transferring tracks from iPod to Amarok, Sound
Check from iPod is _not_ automatically copied (current limitation of
the ReplayGain implementation in Amarok), but Amarok picks up
ReplayGain information from meta-data stored inside the track. (Does
anyone know whether iTunes save Sound Check somewhere in song

It is currently hard-coded that *track* ReplayGain is used (Sound Check
is not able to differentiate between track and album gains), this could
be configurable in future (but hey, micro-options!) or it could respect
Settings -> Replay Gain Mode (tricky, the setting would be read *only
when the song is being transferred to iPod*)

FEATURE: 142579
DIGEST: volume normalization now works between Amarok and iPods

M  +2    -0    ChangeLog
M  +26   -0    src/core-impl/collections/ipodcollection/handler/IpodHandler.cpp
M  +2    -0    src/core-impl/collections/ipodcollection/handler/IpodHandler.h
M  +6    -0    src/core-impl/collections/ipodcollection/handler/capabilities/IpodReadCapability.cpp
M  +1    -0    src/core-impl/collections/ipodcollection/handler/capabilities/IpodReadCapability.h
M  +7    -1    src/core-impl/collections/ipodcollection/handler/capabilities/IpodWriteCapability.cpp
M  +1    -0    src/core-impl/collections/ipodcollection/handler/capabilities/IpodWriteCapability.h
M  +23   -0    src/core-impl/collections/mediadevicecollection/MediaDeviceMeta.cpp
M  +5    -0    src/core-impl/collections/mediadevicecollection/MediaDeviceMeta.h
M  +5    -0    src/core-impl/collections/mediadevicecollection/handler/MediaDeviceHandler.cpp
M  +6    -0    src/core-impl/collections/mediadevicecollection/handler/capabilities/ReadCapability.cpp
M  +1    -0    src/core-impl/collections/mediadevicecollection/handler/capabilities/ReadCapability.h
M  +7    -0    src/core-impl/collections/mediadevicecollection/handler/capabilities/WriteCapability.cpp
M  +1    -0    src/core-impl/collections/mediadevicecollection/handler/capabilities/WriteCapability.h

Comment 10 Daniel Faust 2012-01-12 15:17:26 UTC
Git commit 717342ed4aeba0df2328b28840820919ea3d13ec by Daniel Faust.
Committed on 12/01/2012 at 16:01.
Pushed by dfaust into branch 'master'.

Support embedded covers for ogg (read only) and flac files

M  +1    -0    ChangeLog
M  +1    -1    shared/tag_helpers/TagHelper.cpp
M  +208  -1    shared/tag_helpers/VorbisCommentTagHelper.cpp
M  +9    -0    shared/tag_helpers/VorbisCommentTagHelper.h

Comment 11 Daniel Faust 2012-01-12 15:20:27 UTC
sorry, wrong bug number :)