beets
beets copied to clipboard
replaygain: Analyze in parallel
Problem
The replaygain
plugin doesn’t appear to make use of multicore capacities. On my machine, I see increased activity on only one core out of four.
In my opinion, it would be useful to be able to configure the plugin to analyze different albums or tracks at the same time.
Setup
- OS: Arch Linux
- Python version: 2.7.12
- beets version: 1.3.18
- Turning off plugins made problem go away (yes/no): n/a
My configuration (output of beet config
) is:
replaygain:
backend: gstreamer
auto: yes
targetlevel: 89
overwrite: no
embedart:
remove_art_file: no
compare_threshold: 0
auto: yes
ifempty: no
maxwidth: 0
plugins: fromfilename embedart fetchart mbsync replaygain scrub duplicates missing random
directory: ~/Media/music
import:
copy: no
write: no
library: ~/Media/musiclibrary.blb
scrub:
auto: yes
missing:
count: no
total: no
fetchart:
auto: yes
minwidth: 0
sources:
- filesystem
- coverart
- itunes
- amazon
- albumart
google_engine: 001442825323518660753:hrh5ch1gjzm
enforce_ratio: no
cautious: no
maxwidth: 0
store_source: no
google_key: REDACTED
fanarttv_key: REDACTED
cover_names:
- cover
- front
- art
- album
- folder
duplicates:
count: no
full: no
format: ''
keys: []
move: ''
tag: ''
path: no
copy: ''
tiebreak: {}
album: no
strict: no
checksum: ''
merge: no
delete: no
Good call. See also #673 and #663.
Do you think it makes sense to have this be specific to the replaygain plugin, without going further into https://github.com/beetbox/beets/pull/673 and https://github.com/beetbox/beets/pull/663?
Sure, at least as a first step! We can always generalize it later.
I've been trying to call beet replaygain --threads=32
but only one core is being used, still.
Which backend are you using?
We don't support parallel processing for gstreamer
and audiotools
currently.
I tried gstreamer and then ffmpeg. Both had the same problem. I was running
beet replaygain --threads=32 -a -w -f
The relevant section from beet config
output:
replaygain:
backend: ffmpeg
threads: 16
overwrite: no
auto: yes
parallel_on_import: no
per_disc: no
peak: 'true'
targetlevel: 89
r128: [Opus]
r128_targetlevel: 84
EDIT: nevermind, started the command again and it started spawning more ffmpeg processes than before. It still spawns fewer than 32 and takes a while to ramp up from 0 to more than 1, but it eventually does get there.