adamjakab / BeetsPluginBpmAnalyser

A beets plugin for obsessive-compulsive music geeks to add BPM information to their songs.
MIT License
26 stars 4 forks source link

AUBIO problem? #8

Open friki67 opened 1 year ago

friki67 commented 1 year ago

Hello!

It worked for a while. Then begun to give me [ERROR]

I did beet -vv bpmanalyser bpm:0 and got:

user configuration: /home/archlinux/.config/beets/config.yaml
data directory: /home/archlinux/.config/beets
plugin paths: 
inline: adding item field albumartistcomp
Sending event: pluginload
library database: /mnt/main/data/beets/musiclibrary.db
library directory: /mnt/storage/data/media/music
Sending event: library_opened
bpmanalyser: External script path: /home/archlinux/.local/lib/python3.10/site-packages/beetsplug/bpmanalyser/get_song_bpm.py
bpmanalyser: Analysing[/mnt/storage/data/media/music/Compilations/Blondie-The Best Of Blondie [1981]/01 - Blondie - Heart Of Glass.mp3]...
bpmanalyser: calling external script: /home/archlinux/.local/lib/python3.10/site-packages/beetsplug/bpmanalyser/get_song_bpm.py
bpmanalyser: Analysing[/mnt/storage/data/media/music/Compilations/Blondie-The Best Of Blondie [1981]/02 - Blondie - Dreaming.mp3]...
bpmanalyser: calling external script: /home/archlinux/.local/lib/python3.10/site-packages/beetsplug/bpmanalyser/get_song_bpm.py
bpmanalyser: [mp3 @ 0x55b42f923c80] Estimating duration from bitrate, this may be inaccurate
[mp3float @ 0x55b42f9295c0] Header missing
Traceback (most recent call last):
  File "/home/archlinux/.local/lib/python3.10/site-packages/beetsplug/bpmanalyser/get_song_bpm.py", line 52, in <module>
    bpm = _analyse_tempo(file_name)
  File "/home/archlinux/.local/lib/python3.10/site-packages/beetsplug/bpmanalyser/get_song_bpm.py", line 27, in _analyse_tempo
    samples, read = src()
RuntimeError: AUBIO ERROR: source_avcodec: error when sending packet for /mnt/storage/data/media/music/Compilations/Blondie-The Best Of Blondie [1981]/02 - Blondie - Dreaming.mp3

bpmanalyser: Bpm[ERROR]: - /mnt/storage/data/media/music/Compilations/Blondie-The Best Of Blondie [1981]/02 - Blondie - Dreaming.mp3
bpmanalyser: Analysing[/mnt/storage/data/media/music/Compilations/Blondie-The Best Of Blondie [1981]/03 - Blondie - The Tide Is High.mp3]...
bpmanalyser: calling external script: /home/archlinux/.local/lib/python3.10/site-packages/beetsplug/bpmanalyser/get_song_bpm.py
bpmanalyser: [mp3 @ 0x560c51ffc680] Estimating duration from bitrate, this may be inaccurate
[mp3float @ 0x560c52002fc0] Header missing
Traceback (most recent call last):
  File "/home/archlinux/.local/lib/python3.10/site-packages/beetsplug/bpmanalyser/get_song_bpm.py", line 52, in <module>
    bpm = _analyse_tempo(file_name)
  File "/home/archlinux/.local/lib/python3.10/site-packages/beetsplug/bpmanalyser/get_song_bpm.py", line 27, in _analyse_tempo
    samples, read = src()
RuntimeError: AUBIO ERROR: source_avcodec: error when sending packet for /mnt/storage/data/media/music/Compilations/Blondie-The Best Of Blondie [1981]/01 - Blondie - Heart Of Glass.mp3

bpmanalyser: Bpm[ERROR]: - /mnt/storage/data/media/music/Compilations/Blondie-The Best Of Blondie [1981]/01 - Blondie - Heart Of Glass.mp3
bpmanalyser: Analysing[/mnt/storage/data/media/music/Compilations/Blondie-The Best Of Blondie [1981]/04 - Blondie - In The Flesh.mp3]...
bpmanalyser: calling external script: /home/archlinux/.local/lib/python3.10/site-packages/beetsplug/bpmanalyser/get_song_bpm.py
^Cbpmanalyser: [mp3 @ 0x555d86993480] Estimating duration from bitrate, this may be inaccurate
Traceback (most recent call last):
  File "/home/archlinux/.local/lib/python3.10/site-packages/beetsplug/bpmanalyser/get_song_bpm.py", line 52, in <module>
    bpm = _analyse_tempo(file_name)
  File "/home/archlinux/.local/lib/python3.10/site-packages/beetsplug/bpmanalyser/get_song_bpm.py", line 28, in _analyse_tempo
    is_beat = o(samples)
KeyboardInterrupt

bpmanalyser: Bpm[ERROR]: - /mnt/storage/data/media/music/Compilations/Blondie-The Best Of Blondie [1981]/04 - Blondie - In The Flesh.mp3
bpmanalyser: [mp3 @ 0x5653b01a0680] Estimating duration from bitrate, this may be inaccurate
Traceback (most recent call last):
  File "/home/archlinux/.local/lib/python3.10/site-packages/beetsplug/bpmanalyser/get_song_bpm.py", line 52, in <module>
    bpm = _analyse_tempo(file_name)
  File "/home/archlinux/.local/lib/python3.10/site-packages/beetsplug/bpmanalyser/get_song_bpm.py", line 28, in _analyse_tempo
    is_beat = o(samples)
KeyboardInterrupt

bpmanalyser: Bpm[ERROR]: - /mnt/storage/data/media/music/Compilations/Blondie-The Best Of Blondie [1981]/03 - Blondie - The Tide Is High.mp3
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/beets/ui/__init__.py", line 1285, in main
    _raw_main(args)
  File "/usr/lib/python3.10/site-packages/beets/ui/__init__.py", line 1272, in _raw_main
    subcommand.func(lib, suboptions, subargs)
  File "/home/archlinux/.local/lib/python3.10/site-packages/beetsplug/bpmanalyser/command.py", line 116, in func
    self.analyse_songs()
  File "/home/archlinux/.local/lib/python3.10/site-packages/beetsplug/bpmanalyser/command.py", line 161, in analyse_songs
    self.execute_on_items(items, analyse, msg='Analysing tempo...')
  File "/home/archlinux/.local/lib/python3.10/site-packages/beetsplug/bpmanalyser/command.py", line 186, in execute_on_items
    for _ in e.map(func, items):
  File "/usr/lib/python3.10/concurrent/futures/_base.py", line 621, in result_iterator
    yield _result_or_cancel(fs.pop())
  File "/usr/lib/python3.10/concurrent/futures/_base.py", line 319, in _result_or_cancel
    return fut.result(timeout)
  File "/usr/lib/python3.10/concurrent/futures/_base.py", line 453, in result
    self._condition.wait(timeout)
  File "/usr/lib/python3.10/threading.py", line 320, in wait
    waiter.acquire()
KeyboardInterrupt

How can I fix it? Can you help me?

adamjakab commented 7 months ago

Hi, it looks like aubio is bailing out on missing mp3 header issue: [mp3float @ 0x560c52002fc0] Header missing. Is this happening to all your files or only to certain ones?

adamjakab commented 7 months ago

Hi @friki67 - can you update to the latest version and retry? This plugin now (from v1.4.0) converts audio files to wav format using before running the analysis, so there is a good chance that it will now work.