Getting duration from an MP3 file is platform sensitive?!

i am finding that for a bunch of MP3 files i have, while beets using
acousticid._fingerprint_file_audioread() is able to decode on MacOS
using its core audio macca, beets on Linux (ubuntu 18.04) using
gstreamer (BackendClass = audioread.gstdec.GstAudioFile)
is NOT.

i’ve traced the exception back to audioread.gstdec.__init__ around
line 255. after self.pipeline.set_state(Gst.State.PLAYING) is
called, self.read_exc = MetadataMissingError('duration not available',).

I see a bit of discussion in this beetbox issue from 2016 that seems related? It seems you fellows decided it was some bug in gstreamer code? Is this a problem for anyone else more recently?

Indeed; it does seem like a GStreamer issue. Maybe you could consider checking to make sure all the relevant GStreamer plugins you need are installed? Sometimes missing components can cause weird problems like this…

hmm, seems like i have lots, see below. any guess how i could focus on the “relevant” ones? i’m not able to trace any further into the stack, it goes into goes into thread management routines?

$ apt list | grep gstreamer 
baresip-gstreamer/bionic,bionic 0.5.7-1build1 amd64
gir1.2-gstreamer-1.0/bionic-updates,now 1.14.5-0ubuntu1~18.04.1 amd64 [installed]
gnome-twitch-player-backend-gstreamer-cairo/bionic-updates 0.4.1-2ubuntu0.18.04.1 amd64
gnome-twitch-player-backend-gstreamer-clutter/bionic-updates 0.4.1-2ubuntu0.18.04.1 amd64
gnome-twitch-player-backend-gstreamer-opengl/bionic-updates 0.4.1-2ubuntu0.18.04.1 amd64
gstreamer-qapt/bionic,bionic 3.0.4-0ubuntu1 amd64
gstreamer0.10-qapt/bionic,bionic,bionic,bionic 3.0.4-0ubuntu1 all
gstreamer1.0-alsa/bionic-updates,now 1.14.5-0ubuntu1~18.04.1 amd64 [installed]
gstreamer1.0-clutter-3.0/bionic,bionic,now 3.0.26-1 amd64 [installed]
gstreamer1.0-crystalhd/bionic,bionic 1:0.0~git20110715.fdd2f19-12 amd64
gstreamer1.0-doc/bionic-updates,bionic-updates 1.14.5-0ubuntu1~18.04.1 all
gstreamer1.0-espeak/bionic,bionic 0.4.0-3 amd64
gstreamer1.0-fluendo-mp3/bionic,bionic 0.10.32.debian-1 amd64
gstreamer1.0-gl/bionic-updates,now 1.14.5-0ubuntu1~18.04.1 amd64 [installed]
gstreamer1.0-gtk3/bionic-updates,now 1.14.5-0ubuntu1~18.04.1 amd64 [installed,automatic]
gstreamer1.0-libav/bionic-updates 1.14.5-0ubuntu1~18.04.1 amd64
gstreamer1.0-libav-dbg/bionic-updates 1.14.5-0ubuntu1~18.04.1 amd64
gstreamer1.0-nice/bionic,bionic 0.1.14-1 amd64
gstreamer1.0-omx-bellagio-config/bionic,bionic 1.12.4-1 amd64
gstreamer1.0-omx-generic/bionic,bionic 1.12.4-1 amd64
gstreamer1.0-omx-generic-config/bionic,bionic 1.12.4-1 amd64
gstreamer1.0-opencv/bionic-updates 1.14.5-0ubuntu1~18.04.1 amd64
gstreamer1.0-packagekit/bionic-updates,now 1.1.9-1ubuntu2.18.04.5 amd64 [installed]
gstreamer1.0-plugins-bad/bionic-updates,now 1.14.5-0ubuntu1~18.04.1 amd64 [installed]
gstreamer1.0-plugins-bad-dbg/bionic-updates 1.14.5-0ubuntu1~18.04.1 amd64
gstreamer1.0-plugins-bad-doc/bionic-updates,bionic-updates 1.14.5-0ubuntu1~18.04.1 all
gstreamer1.0-plugins-base/bionic-updates,now 1.14.5-0ubuntu1~18.04.1 amd64 [installed]
gstreamer1.0-plugins-base-apps/bionic-updates,now 1.14.5-0ubuntu1~18.04.1 amd64 [installed]
gstreamer1.0-plugins-base-dbg/bionic-updates 1.14.5-0ubuntu1~18.04.1 amd64
gstreamer1.0-plugins-base-doc/bionic-updates,bionic-updates 1.14.5-0ubuntu1~18.04.1 all
gstreamer1.0-plugins-good/bionic-updates,now 1.14.5-0ubuntu1~18.04.1 amd64 [installed]
gstreamer1.0-plugins-good-dbg/bionic-updates 1.14.5-0ubuntu1~18.04.1 amd64
gstreamer1.0-plugins-good-doc/bionic-updates,bionic-updates 1.14.5-0ubuntu1~18.04.1 all
gstreamer1.0-plugins-ugly/bionic-updates,now 1.14.5-0ubuntu1~18.04.1 amd64 [installed]
gstreamer1.0-plugins-ugly-dbg/bionic-updates 1.14.5-0ubuntu1~18.04.1 amd64
gstreamer1.0-plugins-ugly-doc/bionic-updates,bionic-updates 1.14.5-0ubuntu1~18.04.1 all
gstreamer1.0-pocketsphinx/bionic,bionic 0.8.0+real5prealpha-1ubuntu2 amd64
gstreamer1.0-pulseaudio/bionic-updates,now 1.14.5-0ubuntu1~18.04.1 amd64 [installed]
gstreamer1.0-python3-dbg-plugin-loader/bionic-updates 1.14.5-0ubuntu1~18.04.1 amd64
gstreamer1.0-python3-plugin-loader/bionic-updates 1.14.5-0ubuntu1~18.04.1 amd64
gstreamer1.0-qt5/bionic-updates 1.14.5-0ubuntu1~18.04.1 amd64
gstreamer1.0-rtsp/bionic-updates 1.14.5-0ubuntu1~18.04.1 amd64
gstreamer1.0-rtsp-dbg/bionic-updates 1.14.5-0ubuntu1~18.04.1 amd64
gstreamer1.0-tools/bionic-updates,now 1.14.5-0ubuntu1~18.04.1 amd64 [installed]
gstreamer1.0-vaapi/bionic-updates 1.14.5-0ubuntu1~ubuntu18.04.1 amd64
gstreamer1.0-vaapi-doc/bionic-updates,bionic-updates 1.14.5-0ubuntu1~ubuntu18.04.1 all
gstreamer1.0-x/bionic-updates,now 1.14.5-0ubuntu1~18.04.1 amd64 [installed]
libcanberra-gstreamer/bionic,bionic 0.30-5ubuntu1 amd64
libgstreamer-gl1.0-0/bionic-updates,now 1.14.5-0ubuntu1~18.04.1 amd64 [installed]
libgstreamer-ocaml/bionic,bionic 0.2.0-2build4 amd64
libgstreamer-ocaml-dev/bionic,bionic 0.2.0-2build4 amd64
libgstreamer-opencv1.0-0/bionic-updates 1.14.5-0ubuntu1~18.04.1 amd64
libgstreamer-plugins-bad1.0-0/bionic-updates,now 1.14.5-0ubuntu1~18.04.1 amd64 [installed,automatic]
libgstreamer-plugins-bad1.0-dev/bionic-updates 1.14.5-0ubuntu1~18.04.1 amd64
libgstreamer-plugins-base1.0-0/bionic-updates,now 1.14.5-0ubuntu1~18.04.1 amd64 [installed]
libgstreamer-plugins-base1.0-dev/bionic-updates 1.14.5-0ubuntu1~18.04.1 amd64
libgstreamer-plugins-good1.0-0/bionic-updates,now 1.14.5-0ubuntu1~18.04.1 amd64 [installed]
libgstreamer-plugins-good1.0-dev/bionic-updates 1.14.5-0ubuntu1~18.04.1 amd64
libgstreamer1-perl/bionic,bionic,bionic,bionic 0.003-3 all
libgstreamer1.0-0/bionic-updates,now 1.14.5-0ubuntu1~18.04.1 amd64 [installed]
libgstreamer1.0-0-dbg/bionic-updates 1.14.5-0ubuntu1~18.04.1 amd64
libgstreamer1.0-dev/bionic-updates,now 1.14.5-0ubuntu1~18.04.1 amd64 [installed]
libgstreamerd-3-0/bionic,bionic 3.7.5-2build1 amd64
libgstreamerd-3-dev/bionic,bionic 3.7.5-2build1 amd64
libgstreamermm-1.0-1/bionic,bionic 1.10.0+dfsg-1 amd64
libgstreamermm-1.0-dev/bionic,bionic 1.10.0+dfsg-1 amd64
libgstreamermm-1.0-doc/bionic,bionic,bionic,bionic 1.10.0+dfsg-1 all
libqt5gstreamer-1.0-0/bionic,bionic 1.2.0-5 amd64
libqt5gstreamer-dev/bionic,bionic 1.2.0-5 amd64
libqt5gstreamerquick-1.0-0/bionic,bionic 1.2.0-5 amd64
libqt5gstreamerui-1.0-0/bionic,bionic 1.2.0-5 amd64
libqt5gstreamerutils-1.0-0/bionic,bionic 1.2.0-5 amd64
libreoffice-avmedia-backend-gstreamer/bionic-updates,bionic-security,now 1:6.0.7-0ubuntu0.18.04.10 amd64 [installed]
liquidsoap-plugin-gstreamer/bionic,bionic 1.1.1-7.2ubuntu1 amd64
mkchromecast-gstreamer/bionic,bionic,bionic,bionic 0.3.8.1-1 all
phonon-backend-gstreamer/bionic,bionic 4:4.9.0-1 amd64
phonon-backend-gstreamer-common/bionic,bionic 4:4.9.0-1 amd64
phonon4qt5-backend-gstreamer/bionic,bionic 4:4.9.0-1 amd64
qml-module-qtgstreamer/bionic,bionic 1.2.0-5 amd64
qtgstreamer-doc/bionic,bionic,bionic,bionic 1.2.0-5 all
qtgstreamer-plugins-qt5/bionic,bionic 1.2.0-5 amd64
ruby-gstreamer/bionic,bionic 3.2.4-1 amd64

Sorry; I’m not an expert on Gstreamer or its Debian packaging—maybe an Ubuntu discussion forum would have answers about this? (Also, it’s not guaranteed that Gstreamer packages are the issue—it’s really just a guess. :slight_smile: )