Cant get mp3 to work, gstreamer issue

Hi,

I have researched a lot having trouble with playing any mp3 through gstreamer. My system is Ubuntu 16.04, I installed mopidy through apt-get.

I ensured I installed all gstreamer1.0 plugins to support mp3.

gst-inspect-1.0 |grep mp3
gives me e.g. those items:
flump3dec: flump3dec: Fluendo MP3 Decoder (C build)
mad: mad: mad mp3 decoder

I can play mp3 files directly with gst-launch.

Obviously I do NOT have an mp3 plugin for gst 0.10.

Could it be that mopidy is using 0.10? Would I see this somewhere?

I wanted to try and get an mp3 plugin for 0.10 too but there does not seem to be one available for 16.04.

I keep getting this error:
GStreamer warning: gst-stream-error-quark: No decoder available for type 'audio/mpeg, mpegversion=(int)1, mpegaudioversion=(int)1, layer=(int)3, rate=(int)44100, channels=(int)2, parsed=(boolean)true'. (6)

Mopidy v2.0 uses gstreamer1.0 only. If you run sudo mopidyctl deps it’ll tell you what version of Mopidy you’ve got and it’ll list the gstreamer elements it’s found.

My Ubuntu 16.04 installation shows the following for your command :

libav:  avmux_mp3: libav MP3 (MPEG audio layer 3) formatter (not recommended, use id3v2mux instead)
libav:  avdec_mp3on4float: libav MP3onMP4 decoder
libav:  avdec_mp3on4: libav MP3onMP4 decoder
libav:  avdec_mp3adufloat: libav ADU (Application Data Unit) MP3 (MPEG audio layer 3) decoder
libav:  avdec_mp3adu: libav ADU (Application Data Unit) MP3 (MPEG audio layer 3) decoder
libav:  avdec_mp3float: libav MP3 (MPEG audio layer 3) decoder
libav:  avdec_mp3: libav MP3 (MPEG audio layer 3) decoder
mad:  mad: mad mp3 decoder
mpg123:  mpg123audiodec: mpg123 mp3 decoder
lame:  lamemp3enc: L.A.M.E. mp3 encoder
flump3dec:  flump3dec: Fluendo MP3 Decoder (C build)

Something else must be wrong with my installation, since sudo mopidyctl deps gives me the output below. I tried to figure out what directory is missing by putting some debug output into posixpath.py but that did not help as I understand os.getcwd is supposed to return the working dir of a process.

I tried to purge mopidy and reinstall but this did not help :frowning:

Preformatted text sudo mopidyctl deps
sh: 0: getcwd() failed: No such file or directory
Running "/usr/bin/mopidy --config /usr/share/mopidy/conf.d:/etc/mopidy/mopidy.conf deps" as user mopidy
sh: 0: getcwd() failed: No such file or directory
sh: 0: getcwd() failed: No such file or directory
sh: 0: getcwd() failed: No such file or directory
Traceback (most recent call last):
  File "/usr/bin/mopidy", line 9, in <module>
    load_entry_point('Mopidy==2.1.0', 'console_scripts', 'mopidy')()
  File "/usr/local/lib/python2.7/dist-packages/mopidy/__main__.py", line 59, in main
    args.config_overrides)
  File "/usr/local/lib/python2.7/dist-packages/mopidy/config/__init__.py", line 89, in load
    return _validate(raw_config, schemas)
  File "/usr/local/lib/python2.7/dist-packages/mopidy/config/__init__.py", line 196, in _validate
    result, error = schema.deserialize(values)
  File "/usr/local/lib/python2.7/dist-packages/mopidy/config/schemas.py", line 66, in deserialize
    result[key] = self[key].deserialize(value)
  File "/usr/local/lib/python2.7/dist-packages/mopidy/config/types.py", line 304, in deserialize
    expanded = path.expand_path(value)
  File "/usr/local/lib/python2.7/dist-packages/mopidy/internal/path.py", line 102, in expand_path
    path = os.path.abspath(path)
  File "/usr/lib/python2.7/posixpath.py", line 364, in abspath
    cwd = os.getcwd()
OSError: [Errno 2] No such file or directory

Ok I fixed that issue by removing /usr/local/bin/mopidy. Obviously something leftover from a manual installation that I tried before. Now having just /usr/bin/mopidy

mopidy deps outputs:

GStreamer: 1.8.2.0 from /usr/lib/python2.7/dist-packages/gi
  Detailed information:
    Python wrapper: python-gi 3.20.0
    Relevant elements:
      Found:
        uridecodebin
        souphttpsrc
        appsrc
        alsasink
        osssink
        oss4sink
        pulsesink
        flump3dec
        id3demux
        id3v2mux
        lamemp3enc
        mad
        mpegaudioparse
        mpg123audiodec
        vorbisdec
        vorbisenc
        vorbisparse
        oggdemux
        oggmux
        oggparse
        flacdec
        flacparse
        shout2send
      Not found:
        none

So based on that I would say everything seems to be fine. But still getting the error from the first post.

Could you paste your entire deps output? Maybe something is still screwed up there.

sure, here we go. Thanks for helping

http://paste.ubuntu.com/23815532/

Ok guys. I resolved the issue. I installed a test setup on an amazon cloud server and then compared everything to my local setups, all files, configs, etc.

Long story short, at the end of the day it turned out that a typo in my output configuration caused the problem. I configured pulsesink with device=sink_name and i mis-spelled the sink name. Correcting this fixed the issue.

I am still wondering about the error message which does not really fit, but now it works.