Trying to use chroma plugin but keep getting the same error

I was suggested to come over here from github. I followed the instructions to install the latest snapshot of beets but still have an error when using the chroma plugin. Here is my config.yaml file; maybe you can see an error that my untrained eyes do not. I also had to comment out the smartplaylist and emebdart plugins because they were working incorrectly.

directory: D:/medialibrary/music
library: ~/data/musiclibrary.db
        copy: no
        move: yes
        log: beetslog.txt
        bell: yes
art_filename: albumart

    - bpd 
    - chroma 
    - fromfilename 
    - acousticbrainz 
    - fetchart
    # - emebdart
    - lastgenre
    - lyrics
    - mbsync
    - the
    - duplicates
    - mbcollection
    - mbsubmit 
    - fuzzy
    - missing
    - spotify
    - web
    - popularity
    # - smartplaylist 
    # - barcode

pluginpath: ~/beets/myplugins

#Plugins list
    auto: true
    apikey: <key>
    cautious: true
        - cover 
        - front 
        - art 
        - album 
        - folder
    enforce_ratio: 0.5%
    google_API_key: <key>
    sources: musixmatch google
    port: 6600
    password: <password>
    volume: 100
    user: <username>
    pass: <password>
# smartplaylist:
#     relative_to: D:/medialibrary/music
#     playlist_dir: D:/medialibrary/music/Playlists
#     forward_slash: yes
#     playlists:
#         - name: all.m3u
#           query: ''
#         - name: beatles.m3u
#           query: 'artist:Beatles'
#         - name: popular.m3u
#             query: 'popularity:70..'
#         - name: popular_rock.m3u
#             query: 'popularity:60.. genre:Rock'
#         - name: 'Chronological Beatles'
#             query: 'artist:Beatles year+'
# match:
#     distance_weights:
#         barcode: 1.0

    color: yes
        text_success: green
        text_warning: yellow
        text_error: red
        text_highlight: red
        text_highlight_minor: lightgray
        action_default: turquoise
        action: blue

    default: $genre/$albumartist/$album/$track $title
    singleton: Singletons/$artist - $title
    comp: $genre/$album/$track $title
    albumtype:soundtrack: Soundtracks/$album/$track $title

I’m just curious if I just need to place fpcalc at a different folder so that it can be found. I followed the instructions to make sure the path leads to where the fpcalc.exe is found as well.

Here’s the error that I get when I run the program

PS C:\Users\[USER]> beet import F:\Music
Import of the directory:
was interrupted. Resume (Y/n)? y
Resuming interrupted import of F:\Music
chroma: fingerprinting of b'F:\\Music\\01 Marvins Room.m4a' failed: fpcalc not found
chroma: fingerprinting of b'F:\\Music\\01 Summer Nights.mp3' failed: fpcalc not found
chroma: fingerprinting of b"F:\\Music\\02 I'm Coming Home In A Flash (Avicii's Ultra Bootleg).mp3" failed: fpcalc not found
<so on and so forth with songs until I hit Ctrl-C>

Otherwise, the program seems to work ok when I comment out the chroma plugin and its options.

Yo! Can you explain a little more about what you’ve tried so far? Where did you put fpcalc? Can you invoke it already by typing fpcalc at the command line? That’s what you need to do—make sure it’s in a location that’s on your %PATH%.

Hey there,

I’ll do my best to write down everything I tried.
I started with Python 3.8.4. Following the instructions on this page, I attempted to install Chromaprint as a dynamic library but couldn’t figure out how so I ended up downloading the binary package fpcalc.exe and placing it both in my C:\Program Files\chromaprint-fpcalc-1.5.0-windows-x86_64 and C:\Users\<user>\AppData\Roaming\beets while making sure to add both of these folders to my shell search path (or at least I think that’s what I did based on these instructions). Then I made sure that the chroma plugin was active by trying to follow the instructions listed in this page on how to add in plugins (as you can see from my config.yaml) file above.

After none of that working, I scoured the web for an answer and the best I could find was to downgrade to python 3.8.3; which I tried without success (sadly). Then I posted on the github forum (which ended up leading me here) and was suggested I follow these instructions to make sure I have the latest version of beets. After following these instructions and getting no success, I figured maybe I should try to update to 3.8.4, but that didn’t help either. At this point, the only way to get the program to run on my Windows 10 (2004 update) is to comment out the plugins that you see above (including the chroma plugin), which is a little sad because I have different tracks that I could really use the audio fingerprinting for and I’d rather give this a shot than using different software.

I am not sure how to check if I can invoke fpcalc or not unfortunately. I am 99.999% sure that the file is in a folder that is on my %PATH%.

Thank you for your prompt response, I really hope that we can get this straightened out, as I don’t believe I can be the only one experiencing this situation.

The thing to do is to open a new command-line window and try typing fpcalc. If that works (and prints a help message or something), then you’re all set. If it says “command not found” or similar, then the %PATH% settings need more fiddling.

That’s the crux of it! Python versions and such are a red herring here.

Hey there @adrian,

When I type fpcalc in a cmd prompt I get this (which makes me thing that the %PATH% settings are correct:

ERROR: No input files

C:\Users\,[USER]>fpcalc F:\Music
ERROR: Could not open the input file (Permission denied)

C:\Users\[USER]>fpcalc "F:\Music\VA - VH1 100 Greatest Hard Rock Songs (2020) Mp3 320kbps [PMEDIA] ⭐️"
ERROR: Could not open the input file (No such file or directory)

C:\Users\[USER]>fpcalc "F:\Music"
ERROR: Could not open the input file (Permission denied)

Theoretically speaking, it should work right?

Weird! It certainly seems as if everything’s in order.

If the PATH settings aren’t working (although I do not immediately see why they are not), an alternate is to set the environment variable FPCALC to point to the executable, i.e., to the fpcalc.exe file, wherever it may be.

Hey @adrian, I sincerely appreciate all of the help trying to untangle this web. I tried adding fpcalc.exe to the PATH settings as suggested but got this error:

PS C:\Users\[user]> beet imp F:\Music
Import of the directory:
was interrupted. Resume (Y/n)? y
Resuming interrupted import of F:\Music
chroma: fingerprinting of b'F:\\Music\\Eminem - Guilty Conscience.mp3' failed: fpcalc exited with status 3


Can you try?

fpcalc "F:\Music\Eminem - Guilty Conscience.mp3"

I think the error is related to permission errors.

I notice a new fpcalc binary was released, so I’ll test as well.

Tested win10 - fpcaclv1.5.0 (latest) and all worked.
Tested WSL (Ubuntu 20.04) - fpcalcv1.4.3 on the same file and all worked, same output for both files.

1 Like

Hey there man,

Here’s what happened when I ran that command (I have a sneaking suspicion, the issue may be due to the file itself not the program)

❯ fpcalc "F:\5tb\Music\Eminem - Guilty Conscience.mp3"
ERROR: Error decoding audio frame (Invalid data found when processing input)


edit: So, I ended up stumbling on a potential solution: using MP3val-frontend 0.1.1 to identify which mp3 files might have been corrupted and which ones were ok. It can even fix many of the ones which seem to have problems. I have a sneaking suspicion that the problem is due to the files being corrupted. Once I clean up my library (which will take a while), I will try the fix again and report back with what I found.

I have used that program as well to clean up my library. :slight_smile:

I was going to suggest to use ffmpeg to verify like this

ffmpeg.exe -i "F:\5tb\Music\Eminem - Guilty Conscience.mp3" -f null -

I find this useful for a “quick” verify of integrity.

I have also used foobar2000 to verify the integrity of files. It is very quick.

Good luck, shout out if you need any more help

Hey @arogl, which component did you use through foobar2000 to verify file integrity?

install this component if not already installed
File Integrity Verifier

In foobar2000:

  1. select all tracks you wish to verify
  2. Right click and choose verify integrity

Hope that helps.