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

mopidy-scan does not read metadata consistently from alac files? #236

Closed
christerr opened this Issue Nov 10, 2012 · 5 comments

Comments

2 participants
@christerr

christerr commented Nov 10, 2012

I have a problem with the output created from mopidy-scan on my alac files, consequently I am not able to build a functional library. I believe the files are tagged correctly as illustrated by the mp4info example below, but the output from mopidy-scan is empty for the relevant data fields:

$ cat tag_cache | less

info_begin
mpd_version: 0.16.0
fs_charset: UTF-8
info_end
directory: Dropkick Murphys
mtime: 1352027452
begin: Dropkick Murphys
directory: Dropkick Murphys/Going Out in Style
mtime: 1352027646
begin: Going Out in Style
songList begin
key: 01 Hang 'em High.m4a
file: Dropkick Murphys/Going Out in Style/01 Hang 'em High.m4a
Time: 239
Artist: 
Title: 
Album: 
Track: 0
Date: 

While mp4info shows the following for the same file:

$ mp4info /mnt/music/Dropkick\ Murphys/Going\ Out\ in\ Style/01\ Hang\ \'em\ High.m4a 
mp4info version 2.0.0
/mnt/music/Dropkick Murphys/Going Out in Style/01 Hang 'em High.m4a:
Track   Type    Info
1   audio   alac, 239.426 secs, 1035 kbps, 44100 Hz
 Name: Hang 'em High
 Artist: Dropkick Murphys
 Sort Artist: Dropkick Murphys
 Encoded with: Lavf53.32.100
 Release Date: 2011-03-01
 Album: Going Out in Style
 Track: 1 of 13
 Disk: 1 of 1
 Genre: Punk
 BPM: 0
 Comments:
 Part of Compilation: no
 Album Artist: Dropkick Murphys
 Sort Album Artist: Dropkick Murphys
@jodal

This comment has been minimized.

Member

jodal commented Nov 14, 2012

Hi,

To figure out if this is a GStreamer or Mopidy issue, could you try extracting the tags using GStreamer and paste the result here?

Here's an example where I've extracted tags from a flac file using GStreamer:

$ gst-launch -t playbin uri="file:///home/jodal/local/music/Röyksopp/Junior/01 - Happy Up Here.flac" 
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
FOUND TAG      : found by element "flacparse0".
           title: Happy Up Here
          artist: Röyksopp
    track number: 1
     track count: 11
           album: Junior
        album ID: http://musicbrainz.org/release/5f9ff8e2-8007-4c2d-9559-b98ec27ff776.html
 album artist ID: http://musicbrainz.org/artist/1c70a3fc-fa3c-4be1-8b55-c3192db8a884
       artist ID: http://musicbrainz.org/artist/1c70a3fc-fa3c-4be1-8b55-c3192db8a884
        track ID: http://musicbrainz.org/track/04175385-dc10-4c35-9767-4120818d1a09
 artist sortname: Röyksopp
            date: 2009-03-20
FOUND TAG      : found by element "flacdec0".
     audio codec: FLAC
           title: Happy Up Here
          artist: Röyksopp
    track number: 1
     track count: 11
           album: Junior
        album ID: http://musicbrainz.org/release/5f9ff8e2-8007-4c2d-9559-b98ec27ff776.html
 album artist ID: http://musicbrainz.org/artist/1c70a3fc-fa3c-4be1-8b55-c3192db8a884
       artist ID: http://musicbrainz.org/artist/1c70a3fc-fa3c-4be1-8b55-c3192db8a884
        track ID: http://musicbrainz.org/track/04175385-dc10-4c35-9767-4120818d1a09
 artist sortname: Röyksopp
            date: 2009-03-20
FOUND TAG      : found by element "flacparse0".
 minimum bitrate: 185128
         bitrate: 26906
 maximum bitrate: 185128

The output will continue as long as the track plays. Just press CTRL+C to exit as soon as you hear sound.

@christerr

This comment has been minimized.

christerr commented Nov 14, 2012

Thank you. It seems like GStreamer picks up the tags correctly:

$ gst-launch-0.10 -t playbin uri="file:///mnt/music/Dropkick Murphys/Going Out in Style/01 Hang 'em High.m4a"
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
FOUND TAG      : found by element "qtdemux0".
     audio codec: Apple lossless audio
FOUND TAG      : found by element "qtdemux0".
           title: Hang 'em High
          artist: Dropkick Murphys
    album artist: Dropkick Murphys
           album: Going Out in Style
            date: 2011-03-01
         encoder: Lavf53.32.100
    track number: 1
     track count: 13
     disc number: 1
      disc count: 1
           genre: Punk
 artist sortname: Dropkick Murphys
album artist sortname: Dropkick Murphys
        album ID: 3ecb6512-1f85-4dad-bb36-207544b8db2d
       artist ID: e8374874-4178-4869-b92e-fef6bf30dc04
 album artist ID: e8374874-4178-4869-b92e-fef6bf30dc04
        track ID: ee5ed656-7df7-435c-8008-d5bc4b538f45
@jodal

This comment has been minimized.

Member

jodal commented Nov 14, 2012

@adamcik I feel this is more your table. Any input?

@jodal

This comment has been minimized.

Member

jodal commented Nov 14, 2012

@christerr Could you send me the file in question on mail to stein.magnus@jodal.no?

@jodal

This comment has been minimized.

Member

jodal commented Nov 14, 2012

Ok, there's nothing wrong with your setup. The bug is in Mopidy.

If you compare the output of gst-launch with the FLAC file and the ALAC file, you'll see that the ALAC file output prints "FOUND TAG" with just the "audio codec" field first, and then "FOUND TAG" with all the interesting data. Mopidy's music scanner considers itself done with a track the first time it gets any tag data, thus it never gets anything from under the second header.

With a lot of studying of http://burtonini.com/bzr/gakuraku/tag-reader.c, I got the scanner to work with your track as well. Basically, I don't skip to the next track until the first buffer of a track reaches the end of the GStreamer pipeline. This way, I'm sure all tag events have already been processed. I'll make a pull request and have @adamcik review it before merge.

The fix will be in Mopidy 0.9, which we'll release any day now.

@jodal jodal closed this in bcaeca7 Nov 14, 2012

adamcik added a commit that referenced this issue Nov 14, 2012

Merge pull request #242 from jodal/feature/scanner-multiple-tag-sets
scanner: Support multiple tag sets per track (fixes #236)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment