beetbox / beets

music library manager and MusicBrainz tagger
http://beets.io/
MIT License
12.78k stars 1.82k forks source link

It hangs to import with replaygain: gstreamer #885

Closed simonbcn closed 9 years ago

simonbcn commented 10 years ago

Ubuntu 14.04 64 bits

I try to import a mp3 folder with replaygain: gstreamer but beets hangs.

$ beet -v im /dunehd/Musica\ pendiente/Safari/
user configuration: /home/simon/.config/beets/config.yaml
Sending event: pluginload
artresizer: method is 1
Sending event: library_opened
data directory: /home/simon/.config/beets
library database: /home/simon/.beets/musiclibrary.blb
library directory: /home/simon/Música/PC
Sending event: import_task_start
/usr/lib/python2.7/dist-packages/gobject/constants.py:24: Warning: g_boxed_type_register_static: assertion 'g_type_from_name (name) == 0' failed
  import gobject._gobject
/usr/lib/python2.7/dist-packages/gst-0.10/gst/__init__.py:193: Warning: cannot register existing type 'GstObject'
  from _gst import *
/usr/lib/python2.7/dist-packages/gst-0.10/gst/__init__.py:193: Warning: g_once_init_leave: assertion 'result != 0' failed
  from _gst import *
/usr/lib/python2.7/dist-packages/gst-0.10/gst/__init__.py:193: Warning: g_type_register_static: assertion 'parent_type > 0' failed
  from _gst import *
/usr/lib/python2.7/dist-packages/gst-0.10/gst/__init__.py:193: Warning: interface type 'GstImplementsInterface' or prerequisite type '<invalid>' invalid
  from _gst import *
$ beet version
beets version 1.3.7
plugins: echonest_tempo, discogs, lastgenre, replaygain, embedart, scrub, chroma, beatport, fetchart
$ cat .config/beets/config.yaml
directory: "/home/simon/M\xFAsica/PC"
library: /home/simon/.beets/musiclibrary.blb
threaded: yes
color: yes
plugins: chroma replaygain fetchart lastgenre scrub embedart echonest_tempo beatport discogs
art_filename: folder

match:
   strong_rec_thresh: 0.10

fetchart:
   maxwidth: 300
   cover_names: front folder cover 

embedart:
   maxwidth: 300

import:
   art: true

paths:
   default: $albumartist/$album/$track - $title
   singleton: $artist - $title
   comp: Varios/$album/$track - $title

replaygain:
   backend: gstreamer
   overwrite: true

lastgenre:
   canonical: ''
   fallback: ''
   multiple: true
   force: no
yevgenybezman commented 10 years ago

You are using an old version of the GStreamer python bindings. Please upgrade to a version higher than 1.0 (you're using 0.10).

simonbcn commented 10 years ago

I have installed python-gst-1.0 and python-gst0.10. I have uninstalled python-gst0.10 and now it seems work well. I think beets should be select the right gst version automatically.

yevgenybezman commented 10 years ago

The code requires 1.0 and I've had luck running it with 1.0 and 0.1 installed concurrently. Are you sure you had 1.0 installed when it hung?

sampsyo commented 10 years ago

We've seen some hangs when using both versions simultaneously, as can happen when the chroma plugin is also enabled. Could that have been the case here?

simonbcn commented 10 years ago

Yes, I had installed both versions.

yevgenybezman commented 10 years ago

@sampsyo chroma uses acoustid, which in turn uses audioread, which in turn uses gstreamer. Maybe you're not enforcing the correct version in audioread?

Edit: Seems audioread uses the pre-1.0 bindings. I guess they don't like being imported simultaneously.

sampsyo commented 10 years ago

We are enforcing the correct version, but the correct version is (unfortunately) still 0.10 for audioread. See also: https://github.com/sampsyo/audioread/issues/11

yevgenybezman commented 10 years ago

Any reason? (other than lack of time)

sampsyo commented 10 years ago

Nope; just time.

gwern commented 10 years ago

FWIW, I ran into a similar issue while trying to run on Debian testing, where it would hang indefinitely after printing some errors. (This was a little disturbing since the manual warns you to expect the initial import to be very slow so I was unsure if it was broken or just very slow until I googled the error and got here.) Doing a sudo apt-get remove python-gst0.10 got it running again

But I am uncertain if the chroma plugin was working or not during my import. To be safe I ran beet fingerprint; beet submit after I was finished.