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

Comments

5 participants
@szuniverse

szuniverse commented Feb 29, 2016

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

This comment has been minimized.

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

This comment has been minimized.

Member

adamcik commented Mar 1, 2016

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

@szuniverse

This comment has been minimized.

szuniverse commented Mar 1, 2016

Yes I think its the same bug

@szuniverse

This comment has been minimized.

szuniverse commented Mar 6, 2016

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

This comment has been minimized.

Contributor

SeeSpotRun commented Mar 8, 2016

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

This comment has been minimized.

Contributor

SeeSpotRun commented Mar 12, 2016

@SeeSpotRun

This comment has been minimized.

Contributor

SeeSpotRun commented Mar 15, 2016

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

This comment has been minimized.

Contributor

SeeSpotRun commented Mar 19, 2016

@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

This comment has been minimized.

szuniverse commented Mar 21, 2016

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

This comment has been minimized.

Contributor

SeeSpotRun commented Mar 21, 2016

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

This comment has been minimized.

szuniverse commented Mar 24, 2016

nice. it works fine! good job 👍 :)

@adamcik

This comment has been minimized.

Member

adamcik commented Mar 26, 2016

#1487 has been merged.

@ecoCuyo

This comment has been minimized.

ecoCuyo commented May 19, 2016

I am not sure were this issue is supposed to be posted so I will give it a try right here:
Since I installed mopidy on a fresh raspian jessie image I can neither play local stored m4a nor mp3 files.
It has a HifiBerry sound card installed (worked before) and mopidy runs as a service BUT SINCE REINSTALLATION the command "sudo mopidyctl local scan" results in errors for all found files.

EXAMPLE:

WARNING Failed local:track:DJ%20Wigs/Loungin%27/01%20Titel%2001.m4a: No audio found in file.

mopidy deps says:

$ mopidy deps
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
Executable: /usr/bin/mopidy
Platform: Linux-4.1.19+-armv6l-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
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
flump3dec
id3demux
id3v2mux
mad
mpegaudioparse
mpg123audiodec
vorbisdec
vorbisenc
vorbisparse
oggdemux
oggmux
oggparse
flacdec
flacparse
shout2send
Not found:
lamemp3enc

And the actual config looks like this:

$ sudo mopidyctl config
Running "/usr/bin/mopidy --config /usr/share/mopidy/conf.d:/etc/mopidy/mopidy.conf config" as user mopidy
[core]
cache_dir = /var/cache/mopidy
config_dir = /etc/mopidy
data_dir = /var/lib/mopidy
max_tracklist_length = 10000

[logging]
color = true
console_format = %(levelname)-8s %(message)s
debug_format = %(levelname)-8s %(asctime)s [%(process)d:%(threadName)s] %(name)s\n %(message)s
debug_file = /var/log/mopidy/mopidy-debug.log
config_file = /etc/mopidy/logging.conf

[audio]
mixer = software
mixer_volume =
output = autoaudiosink
buffer_time =

[proxy]
scheme =
hostname =
port =
username =
password =

[mpd]
enabled = true
hostname = 127.0.0.1
port = 6600
password =
max_connections = 20
connection_timeout = 60
zeroconf = Mopidy MPD server on $hostname
command_blacklist =
listall
listallinfo
default_playlist_scheme = m3u

[http]
enabled = true
hostname = 127.0.0.1
port = 6680
static_dir =
zeroconf = Mopidy HTTP server on $hostname

[stream]
enabled = true
protocols =
http
https
mms
rtmp
rtmps
rtsp
metadata_blacklist =
timeout = 5000

[m3u]
enabled = true
base_dir =
default_encoding = latin-1
default_extension = .m3u8
playlists_dir = /var/lib/mopidy/playlists

[softwaremixer]
enabled = true

[file]
enabled = true
media_dirs =
$XDG_MUSIC_DIR|Music
~/|Home
show_dotfiles = false
follow_symlinks = false
metadata_timeout = 1000

[local]
enabled = true
library = json
media_dir = /media/usb1/iTunes Music
scan_timeout = 1000
scan_flush_threshold = 100
scan_follow_symlinks = false
excluded_file_extensions =
.directory
.html
.jpeg
.jpg
.log
.nfo
.png

The music files did play well on the old installation and the file permission to all of them is set like this:

$ ls -l /media/usb1/iTunes\ Music/DJ\ Wigs/Loungin'/
total 155992
-rwxr-xr-x 1 mopidy audio 31944754 Mar 7 2011 01 Titel 01.m4a
-rwxr-xr-x 1 mopidy audio 44805884 Mar 7 2011 02 Titel 02.m4a
-rwxr-xr-x 1 mopidy audio 42822626 Mar 7 2011 03 Titel 03.m4a
-rwxr-xr-x 1 mopidy audio 40156581 Mar 7 2011 04 Titel 04.m4a

Could anyone point me in the right direction with my question as to how to solve this? If necessary I could provide further information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment