Bug 476068 - Lyrics tag in music files not honored/noticed
Summary: Lyrics tag in music files not honored/noticed
Status: RESOLVED NOT A BUG
Alias: None
Product: Elisa
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR major
Target Milestone: ---
Assignee: Matthieu Gallien
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2023-10-25 01:20 UTC by Nate Graham
Modified: 2023-10-26 20:37 UTC (History)
1 user (show)

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


Attachments
Song with Lyrics tag that doesn't show lyrics in Elisa (3.31 MB, video/ogg)
2023-10-25 01:20 UTC, Nate Graham
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2023-10-25 01:20:44 UTC
Created attachment 162549 [details]
Song with Lyrics tag that doesn't show lyrics in Elisa

Git master everything on Plasma 6 with Elisa


STEPS TO REPRODUCE
1. Play a song with a "Lyrics" ID3 tag
2. Open Now Playing view


OBSERVED RESULT
No lyrics detected. They don't show up in the Metadata editor window, either.


EXPECTED RESULT
Lyrics in all relevant places.


ADDITIONAL INFORMATION
Sample song that reproduces the issue is attached.

Possibly related to Bug 476067; maybe caused by the same thing?
Comment 1 Jack Hill 2023-10-25 10:19:47 UTC
I can't reproduce with that file. FWIW ogg containers use Vorbis comments to store metadata. Can you try with an mp3 to see if it also happens with ID3 tags?
Comment 2 Nate Graham 2023-10-25 20:21:37 UTC
I tried with an MP3 file too; same issue. 

Are you also building Elisa on top of Plasma 6? What's your Qt version? Mine's 6.5.2 right now.
Comment 3 Jack Hill 2023-10-25 20:38:56 UTC
On Wednesday, 25 October 2023 21:21:37 BST you wrote:
> https://bugs.kde.org/show_bug.cgi?id=476068
> 
> --- Comment #2 from Nate Graham <nate@kde.org> ---
> I tried with an MP3 file too; same issue.
> 
> Are you also building Elisa on top of Plasma 6? What's your Qt version?
> Mine's 6.5.2 right now.

I'm running it on Plasma 5 still but I can give it a test on Plasma 6 soon. Qt is 6.6 here.

Could you run the taglibextractortest and taglibwritertest for KFileMetadata? I can see they have a test for the lyrics field here https://invent.kde.org/frameworks/kfilemetadata/-/blob/master/autotests/taglibextractortest.cpp?ref_type=heads#L204
Comment 4 Jack Hill 2023-10-25 20:46:18 UTC
Btw check you have taglib-devel or libtag-devel installed too. I recently had issues because I forgot to install that package so Elisa wasn't scanning files properly. I didn't realise it for a while because the database was already populated using the distro version of Elisa.
Comment 5 Nate Graham 2023-10-26 20:03:30 UTC
Ah, that's definitely worth following up. I'm not building TagLib from source right now. I'll give it a go and see if that helps.
Comment 6 Nate Graham 2023-10-26 20:37:38 UTC
Yep, that was it.

I ran into one gotcha: by default taglib only builds a static library (.a) rather than a shared library (.so) which caused kfilemetadata to fail during compilation because it couldn't link a static library into a dynamic one:

[ 93%] Linking CXX shared module ../../bin/kf6/kfilemetadata/writers/kfilemetadata_taglibwriter.so
/usr/bin/ld: /home/nate/kde/usr6/lib64/libtag.a(mpegfile.cpp.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: failed to set dynamic section sizes: bad value
collect2: error: ld returned 1 exit status

It turns out that taglib has an off-by-default CMake option to build shared libs, and after doing that I had to actually delete the buil static libs that got installed earlier. After I did that, kfilemetadata and Elisa linkes against the .so and all was well again.

I've added these to my kdesrc-buildrc file:

# For TagLib, because Fedora doesn't have a Qt6 build of it yet
module utfcpp
    repository git@github.com:nemtrif/utfcpp.git
end module

# For KFileMetadata and Elisa, because Fedora doesn't have a Qt6 build of it yet
module taglib
    repository git@github.com:taglib/taglib.git
    cmake-options -DBUILD_SHARED_LIBS=TRUE
end module

And ensured that I build those from source every day as well.

Thanks so much for pointing me on the right path, Jack!