Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Copy multiple .mp3 files to mopidy server machin #1474

Closed
szuniverse opened this issue Feb 29, 2016 · 13 comments
Closed

Bug: Copy multiple .mp3 files to mopidy server machin #1474

szuniverse opened this issue Feb 29, 2016 · 13 comments
Labels
A-audio Area: Audio layer C-bug Category: This is a bug

Comments

@szuniverse
Copy link

I copied 20 mp3 files to mopidy server
location:
/home/pi/Music
when I try to local scan with this command:
sudo mopidyctl local scan

WARNING Failed local:track:Fekete%20Teve/Fekete%20Teve%20-%20R%C5%91zse-Dalok%20%282011%29/01%20-%20Fekete%20Teve%20-%20Szeptember.mp3: Track shorter than 100ms

But It is a valid mp3 file becuase I can play via terminal:

omxplayer 01\ -\ Fekete\ Teve\ -\ Szeptember.mp3

If I run the sudo mopidyctl local scan several times sometimes mopidy scan is successfuly but mostly not.

@jodal
Copy link
Member

jodal commented Mar 1, 2016

Please run the command mopidy deps and provide the last section, from "GStreamer:" and down. This will tell us what MP3 decoding elements you have in your GStreamer installation.

@adamcik
Copy link
Member

adamcik commented Mar 1, 2016

Dupe of #935, or maybe same root cause at least?

@szuniverse
Copy link
Author

Yes I think its the same bug

@szuniverse
Copy link
Author

Here is the mopidy deps output:

pi@musicbox ~ $ mopidy deps
Executable: /usr/bin/mopidy
Platform: Linux-4.1.10-v7+-armv7l-with-debian-8.0
Python: CPython 2.7.9 from /usr/lib/python2.7
Mopidy: 2.0.0 from /usr/lib/python2.7/dist-packages
  Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
  requests>=2.0: 2.4.3 from /usr/lib/python2.7/dist-packages
  tornado>=2.3: 3.2.2 from /usr/lib/python2.7/dist-packages
Mopidy-MusicBox-Webclient: 2.1.1 from /usr/local/lib/python2.7/dist-packages
  setuptools: 5.5.1 from /usr/lib/python2.7/dist-packages
  Mopidy>=1.1.0: 2.0.0 from /usr/lib/python2.7/dist-packages
    Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
    requests>=2.0: 2.4.3 from /usr/lib/python2.7/dist-packages
    tornado>=2.3: 3.2.2 from /usr/lib/python2.7/dist-packages
Mopidy-Local-Images: 1.0.0 from /usr/local/lib/python2.7/dist-packages
  uritools>=1.0: 1.0.1 from /usr/local/lib/python2.7/dist-packages
    ipaddress>=1.0.6: 1.0.16 from /usr/local/lib/python2.7/dist-packages
  Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
  setuptools: 5.5.1 from /usr/lib/python2.7/dist-packages
  Mopidy>=1.1: 2.0.0 from /usr/lib/python2.7/dist-packages
    Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
    requests>=2.0: 2.4.3 from /usr/lib/python2.7/dist-packages
    tornado>=2.3: 3.2.2 from /usr/lib/python2.7/dist-packages
Mopidy-Spotify-Web: 0.3.0 from /usr/local/lib/python2.7/dist-packages
  setuptools: 5.5.1 from /usr/lib/python2.7/dist-packages
  Mopidy>=0.19.0: 2.0.0 from /usr/lib/python2.7/dist-packages
    Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
    requests>=2.0: 2.4.3 from /usr/lib/python2.7/dist-packages
    tornado>=2.3: 3.2.2 from /usr/lib/python2.7/dist-packages
  Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
  Mopidy-Spotify>=1.2.0: 3.0.0 from /usr/lib/python2.7/dist-packages
    Mopidy>=2.0: 2.0.0 from /usr/lib/python2.7/dist-packages
      Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
      requests>=2.0: 2.4.3 from /usr/lib/python2.7/dist-packages
      tornado>=2.3: 3.2.2 from /usr/lib/python2.7/dist-packages
    Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
    pyspotify>=2.0.5: 2.0.5 from /usr/lib/python2.7/dist-packages
      cffi>=1.0.0: 1.1.2 from /usr/lib/python2.7/dist-packages
        pycparser: 2.10 from /usr/lib/python2.7/dist-packages
    requests>=2.0: 2.4.3 from /usr/lib/python2.7/dist-packages
  requests: 2.4.3 from /usr/lib/python2.7/dist-packages
  spotipy: 2.3.7 from /usr/local/lib/python2.7/dist-packages
    requests>=1.0: 2.4.3 from /usr/lib/python2.7/dist-packages
Mopidy-Spotify: 3.0.0 from /usr/lib/python2.7/dist-packages
  Mopidy>=2.0: 2.0.0 from /usr/lib/python2.7/dist-packages
    Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
    requests>=2.0: 2.4.3 from /usr/lib/python2.7/dist-packages
    tornado>=2.3: 3.2.2 from /usr/lib/python2.7/dist-packages
  Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
  pyspotify>=2.0.5: 2.0.5 from /usr/lib/python2.7/dist-packages
    cffi>=1.0.0: 1.1.2 from /usr/lib/python2.7/dist-packages
      pycparser: 2.10 from /usr/lib/python2.7/dist-packages
  requests>=2.0: 2.4.3 from /usr/lib/python2.7/dist-packages
GStreamer: 1.4.4.0 from /usr/lib/python2.7/dist-packages/gi
  Detailed information: 
    Python wrapper: python-gi 3.14.0
    Relevant elements:
      Found:
        uridecodebin
        souphttpsrc
        appsrc
        alsasink
        osssink
        oss4sink
        pulsesink
        id3demux
        id3v2mux
        lamemp3enc
        mad
        mpegaudioparse
        mpg123audiodec
        vorbisdec
        vorbisenc
        vorbisparse
        oggdemux
        oggmux
        oggparse
        flacdec
        flacparse
        shout2send
      Not found:
        flump3dec

@SeeSpotRun
Copy link
Contributor

I wonder if this is a similar upstream bug to https://bugzilla.gnome.org/show_bug.cgi?id=762660.

Maybe you could try the following on a couple of files that do/don't scan correctly:

$ gst-launch-1.0 filesrc location=foo.mp3 \
! mpegaudioparse ! fakesink \
num-buffers=2 silent=false -v -m | grep --color -E "duration|preroll|"

... to see if gstreamer is returning the data in an unexpected order, in which case we should file an upstream bug report.

@SeeSpotRun
Copy link
Contributor

Upstream bug filed at https://bugzilla.gnome.org/show_bug.cgi?id=763553

@SeeSpotRun
Copy link
Contributor

Upstream fix applied by the good folks at gstreamer. This should fix #935, #1453, #1474 and #1480.

To benefit from the upstream fix you will either need to compile gstreamer from source (https://cgit.freedesktop.org/gstreamer/gstreamer/) or wait for gstreamer 1.7.91 to be released for your distro.

In the meantime I'll raise a pull request with a workaround for mopidy.

@SeeSpotRun
Copy link
Contributor

@szuniverse: : if you have a chance, could you please test using https://github.com/SeeSpotRun/mopidy/tree/fix/gstreamer_not_pushing_tags_2 to see if this fixes the problem? This branch has a workaround in mopidy/audio/scan.py to address an upstream bug in gstreamer.

Alternatively if you are feeling adventurous you could try compiling gstreamer from git source...

@szuniverse
Copy link
Author

Could you help me how can I install this branch? I am using raspberry pi with latest RASPBIAN JESSIE.
and i usually install mopidy with these commands:

https://docs.mopidy.com/en/latest/installation/debian/

@SeeSpotRun
Copy link
Contributor

There are a couple of options but the quick and dirty is just to replace file /usr/lib/python2.7/dist-packages/mopidy/audio/scan.py with the updated version:

$ cp  /usr/lib/python2.7/dist-packages/mopidy/audio/scan.py scan.py.bak
$ wget https://raw.githubusercontent.com/SeeSpotRun/mopidy/fix/gstreamer_not_pushing_tags_2/mopidy/audio/scan.py
$ sudo cp scan.py   /usr/lib/python2.7/dist-packages/mopidy/audio/scan.py

This just makes a backup copy of the original, downloads the new version and then copies it over the original. You may need to install the wget utility first using sudo apt-get install wget
Then restart mopidy.
You can revert using:

$ sudo cp scan.py.bak /usr/lib/python2.7/dist-packages/mopidy/audio/scan.py

@szuniverse
Copy link
Author

nice. it works fine! good job 👍 :)

@adamcik
Copy link
Member

adamcik commented Mar 26, 2016

#1487 has been merged.

@ecoCuyo

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-audio Area: Audio layer C-bug Category: This is a bug
Projects
None yet
Development

No branches or pull requests

5 participants