You are not logged in.

#1 2026-06-20 17:00:52

beiliangs
Member
Registered: 2026-06-20
Posts: 2

vlc cannot get the correct information of Audio CDs

Hello everyone,

I tried to play a CD with vlc and found it fetched incorrect CDDB information. All CDs I have were matched to wrong titles and covers.

I checked the `PKGBUILD` file and vlc's source code and found that:

in `modules/access/cdda.c`,there is:

#ifdef HAVE_GCRYPT
static char * BuildMusicbrainzDiscID( const vcddev_toc_t *p_toc,
                                      int i_total, int i_first, int i_last )
{
    ...

    return out;
}
#else
# define BuildMusicbrainzDiscID(a, b, c, d) (NULL)
#endif

and in function `GetMusicbrainzInfo`:

    /* Build DISC ID based on SHA1 */
    char *psz_disc_id = BuildMusicbrainzDiscID( p_toc,
                                                i_total, i_first, i_last );
    if( psz_disc_id )
    {
        recording = musicbrainz_lookup_recording_by_discid( &cfg, psz_disc_id );
    }
    else /* Fuzzy lookup using TOC */
    {
        ...
    }

It means if macro `HAVE_GCRYPT` is undefined, function `BuildMusicbrainzDiscID` will always returns NULL and it falls back to fuzzy lookup in function `GetMusicbrainzInfo`, which is easier to get a wrong result.

And in `PKGBUILD`:

build() {
  local configure_options=(
    ....
    --disable-libgcrypt
    ....
  )

DO undefined `HAVE_GCRYPT` and DO returns a wrong result for me.

I tried to build from the source code with flag `--enable-libgcrypt` in `PKGBUILD` and then it works perfectly to get the correct information.
All of my changes:

makedepends=(
  libgcrypt    # add depend
  ...
)
build() {
  local configure_options=(
    ...
    --enable-libgcrypt    # replace `--disable-libgcrypt`
    ....
  )
package_vlc() {
  ...
  rmdir -v --ignore-fail-on-non-empty "$pkgdir/usr/lib/vlc/plugins/"{access{,_output},audio_{filter,output},codec,control,demux,gui,keystore,logger,meta_engine,misc,mux,notify,packetizer,services_discovery,spu,stream_{extractor,filter,out},text_renderer,vaapi,vdpau,video_{chroma,filter,output}}
# add flag `--ignore-fail-on-non-empty` to ignore errors in deleting empty directories
}

I don't know if these changes have any side effects to my system.
But I wonder why `libgcrypt` is excluded from vlc. As a widely included depend lib, exclude it will never make the system simpler.

What should I do next?

Offline

#2 Yesterday 13:24:03

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,125

Re: vlc cannot get the correct information of Audio CDs

Is vlc-plugin-cddb installed ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#3 Yesterday 13:45:16

beiliangs
Member
Registered: 2026-06-20
Posts: 2

Re: vlc cannot get the correct information of Audio CDs

Lone_Wolf wrote:

Is vlc-plugin-cddb installed ?

Thanks for reply!

Yes, I had installed it by installing vlc-plugin-all.
And I checked it:

% > pacman -Q vlc-plugin-cddb
vlc-plugin-cddb 3.0.23_2-8

Offline

#4 Yesterday 14:08:29

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,213

Re: vlc cannot get the correct information of Audio CDs

build from the source code with flag `--enable-libgcrypt` in `PKGBUILD` and then it works perfectly

https://gitlab.archlinux.org/archlinux/ … ef0d327dc2
https://bugs.archlinux.org/task/57670

*) libgcrypt: is only necessary for the update-check[2] in vlc. Since we use the configure option
--disable-update-check and we only want pacman to handle the updates anyway,
there is no need for libgcrypt.

This might have changed since 2018 (notably https://en.wikipedia.org/wiki/Freedb was shut down in 2020 and had likely been the relevant database since 2001/2) and since nobody™ has optical drives anymore…

=> https://gitlab.archlinux.org/archlinux/ … work_items

Offline

Board footer

Powered by FluxBB