Bug 495931 - Ability to preserve song metadata after edit
Summary: Ability to preserve song metadata after edit
Status: RESOLVED FIXED
Alias: None
Product: kwave
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR minor
Target Milestone: ---
Assignee: Thomas Eschenbacher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-07 17:49 UTC by witchhunter
Modified: 2025-01-05 10:28 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description witchhunter 2024-11-07 17:49:02 UTC
SUMMARY

After audio files are edited metadata of original file is not preserved. Embedded information like artist, title, front cover pics, lyrics are gone.

STEPS TO REPRODUCE
1. Open song e.g. mp3 file
2. Delete the portion of the file
3. Save the file

OBSERVED RESULT
Song metadata is not preserved.

EXPECTED RESULT
Song metadata should be preserved.
Comment 1 Mark Penner 2024-11-27 03:08:38 UTC
I've been digging into this and I think I understand what's happening, but haven't decided how best to fix it.
Comment 2 Thomas Eschenbacher 2024-12-03 11:03:21 UTC
This needs some more specific information, I cannot reproduce/confirm that.
For example the "title" and "artist" are preserved.
Front cover pics and lyrics... yes, that might be. In order to provide support for this kind of meta data, I need the name of ID3 tag, an idea of how this should be mapped to some internal meta data identifier that already exist, or a new mapping. And in the best case some field in the file info dialog.
Comment 3 Thomas Eschenbacher 2024-12-03 11:35:56 UTC
For realizing support for this, we need several steps:
1. create a new "FileProperty" for generic "application specific" data
2. make an entry in Kwave::FileInfo::PropertyTypesMap and make sure that this type of meta data does not produce warning messages when saving under a different file format
3. add another FileProperty with the original mime type from which the meta data was read in, so that it can be identified as relevant when saving (internal tag).
4. in the DecoderMP3: set the "original mime type" + encode all "unsupported" ID3 tags into an application specific container
5. in the EncoderMP3: check if the current mime type is identical (or compatible to) the original mime type + encode all application specific meta data into a ID3 tag

After that we should check other file formats too, Ogg/Vorbis and FLAC may need the same treatment.
Comment 4 Thomas Eschenbacher 2025-01-05 10:17:18 UTC
should work now, see https://invent.kde.org/multimedia/kwave/-/issues/7
Comment 5 Thomas Eschenbacher 2025-01-05 10:28:19 UTC
should work now, at least for the use case where you import a MP3 file and save it again as MP3.
Support for more complex use cases like loading from MP3, saving into some other format, opening that file and saving as MP3 are still to do.