i cant get the chroma plugin working on all my ubuntu unicorn boxes. i have the feeling that i didnt had the problem with the previous beets version. i checked all installed packages named in the doc.
and i even installed libchromaprint-tools to have the fpcalc command. i still get the error:
fingerprinting of '/home/myuser/Musik/Kill Holiday/Somewhere Between the Wrong Is Right/01 Somewhere Between the Wrong Is Right.flac' failed: audio could not be decoded
if i use the fpcalc command on that file... it gives me the fingerprint. so i think that it can be decoded somehow. im pretty stuck with finding the error. anything i could try?
my config:
directory: ~/Musik/beets
paths:
singleton: Non-Album/$artist/$title
plugins: chroma
This error comes from pyacoustid, in _fingerprint_audio_read(): it catches a DecodeError from audioread, which happens because no backend could read the music. Please try to determine which backends are available: try the following
import gst # accourding to your post, this should work...
import mad
And do you have ffmpeg available on the commad-line?
If using GST, you need 3 elements: uridecodebin, audioconvert and appsink. You may be missing one of those 3. Are there other plugin packages available on ubuntu? Is something like gstreamer0.10-plugins-base available?
i "investigated" a little and i think the problem is that i try to run beets in a virtualenv. import gst doesnt work in the venv. now i installed everything system-wide and it works. mmhhh not the best way but it works now.
Right! That's a recurring problem in the python ecosystem (cf. matplotlib, opencv...). You should be able to get it working in a virtual environment by creating/updating it with the --system-site-packages option.
so... im sorry for generating just hot air with this bugreport and thanks for all the informations and help :)
No problem, the doc should probably mention that point (I'll update it). Enjoy beets!
—
Tagada tsouin tsouin
On Wed, Jan 21, 2015 at 4:38 PM, xsteadfastx [email protected]
wrote:
Closed #1250.
Reply to this email directly or view it on GitHub:
https://github.com/sampsyo/beets/issues/1250#event-222387751
I've the same problem but I'm not as python-savvy as xsteadfastx
I've installed beets using pip.
thanks!
Maybe you're having a different but related problem?
i even went as far as to install virtualenv :D removed it now. do i create another ticket or shall we keep it in here?
from my experience with beets, you shouldnt use virtualenv for beets. just install it as normal user with "pip install --user beets". but i dont know if this solves the problem you have with chroma.
Hello everyone, I am in the same case as bolisaf:
Does anyone has a clue? Thanks a lot
Finally I get it working by modifying the def fingerprint_file(path, maxlength=MAX_AUDIO_LENGTH): function of the acoustid.py file:
def fingerprint_file(path, maxlength=MAX_AUDIO_LENGTH):
"""Fingerprint a file either using the Chromaprint dynamic library
or the fpcalc command-line tool, whichever is available. Returns the
duration and the fingerprint.
"""
path = os.path.abspath(os.path.expanduser(path))
'''if have_audioread and have_chromaprint:
return _fingerprint_file_audioread(path, maxlength)
else:
return _fingerprint_file_fpcalc(path, maxlength)'''
return _fingerprint_file_fpcalc(path, maxlength)
I just forced acoustid to use the fpcalc commands... Not a real solution but a least it works...
Hi everyone, fingerprinting fails on my machine with a similar error message. Importing gst and mad works. ffmpeg and fpcalc commands are available. fpcalc works fine by itself, but beets fails with the following output.
$ beet fingerprint
/home/daniel/Musik/Collection/A Perfect Circle/Mer De Noms/Disc 00/The Hollow.m4a: fingerprinting
fingerprint generation failed: audio could not be decoded
/home/daniel/Musik/Collection/A Perfect Circle/Mer De Noms/Disc 00/Magdalena.m4a: fingerprinting
Traceback (most recent call last):
File "/usr/bin/beet", line 9, in <module>
load_entry_point('beets==1.3.8', 'console_scripts', 'beet')()
File "/usr/share/beets/beets/ui/__init__.py", line 964, in main
_raw_main(args)
File "/usr/share/beets/beets/ui/__init__.py", line 954, in _raw_main
subcommand.func(lib, suboptions, subargs)
File "/usr/share/beets/beetsplug/chroma.py", line 181, in fingerprint_cmd_func
write=config['import']['write'].get(bool))
File "/usr/share/beets/beetsplug/chroma.py", line 287, in fingerprint_item
_, fp = acoustid.fingerprint_file(item.path)
File "/usr/local/lib/python2.7/dist-packages/acoustid.py", line 321, in fingerprint_file
return _fingerprint_file_audioread(path, maxlength)
File "/usr/local/lib/python2.7/dist-packages/acoustid.py", line 264, in _fingerprint_file_audioread
fp = fingerprint(f.samplerate, f.channels, iter(f), maxlength)
File "/usr/local/lib/python2.7/dist-packages/acoustid.py", line 206, in fingerprint
fper.feed(block)
File "/usr/local/lib/python2.7/dist-packages/chromaprint.py", line 119, in feed
raise TypeError('data must be bytes, buffer, or memoryview')
TypeError: data must be bytes, buffer, or memoryview
Any ideas?
Hi! A fix has been committed for that issue in pyacoustid: https://github.com/beetbox/pyacoustid/pull/31
Great, thanks! Do you know when it might be available via pip? I guess that's faster than waiting for the corresponding Mint update.
Pretty soon! I'll release it in a few days.
It worked! :) There was one error in the middle of fingerprinting ~1,700 songs, but that's all. Thanks again!
Traceback (most recent call last):
File "/usr/bin/beet", line 9, in <module>
load_entry_point('beets==1.3.8', 'console_scripts', 'beet')()
File "/usr/share/beets/beets/ui/__init__.py", line 964, in main
_raw_main(args)
File "/usr/share/beets/beets/ui/__init__.py", line 954, in _raw_main
subcommand.func(lib, suboptions, subargs)
File "/usr/share/beets/beetsplug/chroma.py", line 181, in fingerprint_cmd_func
write=config['import']['write'].get(bool))
File "/usr/share/beets/beetsplug/chroma.py", line 287, in fingerprint_item
_, fp = acoustid.fingerprint_file(item.path)
File "/usr/local/lib/python2.7/dist-packages/acoustid.py", line 321, in fingerprint_file
return _fingerprint_file_audioread(path, maxlength)
File "/usr/local/lib/python2.7/dist-packages/acoustid.py", line 262, in _fingerprint_file_audioread
with audioread.audio_open(path) as f:
File "/usr/local/lib/python2.7/dist-packages/audioread/__init__.py", line 83, in audio_open
if _ca_available():
File "/usr/local/lib/python2.7/dist-packages/audioread/__init__.py", line 57, in _ca_available
lib = ctypes.util.find_library('AudioToolbox')
File "/usr/lib/python2.7/ctypes/util.py", line 248, in find_library
return _findSoname_ldconfig(name) or _get_soname(_findLib_gcc(name))
File "/usr/lib/python2.7/ctypes/util.py", line 237, in _findSoname_ldconfig
f = os.popen('LC_ALL=C LANG=C /sbin/ldconfig -p 2>/dev/null')
OSError: [Errno 12] Cannot allocate memory
"Cannot allocate memory!" The sounds serious. Would you mind filing a bug in the audioread repository?
I found that installing ffmpeg fixed this for me on WSL (Windows Subsystem for Linux). beet fingerprint now works fine.
Had the same issue on a Debian system, installing ffmpeg fixes this.
Most helpful comment
Had the same issue on a Debian system, installing ffmpeg fixes this.