PDA

View Full Version : Problem with FLAC tags



Florent DANIEL
2004-07-28, 15:05
Hello,

I've juste corrected tags on most of my audio files, but it now appears that
some of them aren't recognized anymore by SlimServer. The concerned files now
appears under "Pas d'artiste/Pas d'album" ("No artist/No album", I was using
french language when scanning), and clicking on them doesn't display any
comments, although the metaflac command doesn't seem to report any problems.
Here's an example of an incorrect display on the web interface :

Title:
The Afghan Whigs-01-Retarded
File Format:
FLAC
File Length:
20,915,213 Bytes
Location:
file:///home/music/albums/A/The_Afghan_Whigs-Up_In_It/The_Afghan_Whigs-01-Retarded.flac
(Download)
Date Modified:
vendredi, 23 juillet 2004, 22h32:01

Here's the output of metaflac --list on this file, which shows that comments
are present (block #2) :

METADATA block #0
type: 0 (STREAMINFO)
is last: false
length: 34
minumum blocksize: 4608 samples
maximum blocksize: 4608 samples
minimum framesize: 14 bytes
maximum framesize: 13023 bytes
sample_rate: 44100 Hz
channels: 2
bits-per-sample: 16
total samples: 9058140
MD5 signature: 46ef62fa838bb6f25eaaa46c45b54382
METADATA block #1
type: 3 (SEEKTABLE)
is last: false
length: 360
seek points: 20
point 0: sample_number=0, stream_offset=0, frame_samples=4608
point 1: sample_number=451584, stream_offset=760464, frame_samples=4608
point 2: sample_number=903168, stream_offset=1861388, frame_samples=4608
point 3: sample_number=1354752, stream_offset=2949815, frame_samples=4608
point 4: sample_number=1810944, stream_offset=4048079, frame_samples=4608
point 5: sample_number=2262528, stream_offset=5139826, frame_samples=4608
point 6: sample_number=2714112, stream_offset=6248406, frame_samples=4608
point 7: sample_number=3170304, stream_offset=7372290, frame_samples=4608
point 8: sample_number=3621888, stream_offset=8468212, frame_samples=4608
point 9: sample_number=4073472, stream_offset=9582196, frame_samples=4608
point 10: sample_number=4525056, stream_offset=10703748,
frame_samples=4608
point 11: sample_number=4981248, stream_offset=11802378,
frame_samples=4608
point 12: sample_number=5432832, stream_offset=12888084,
frame_samples=4608
point 13: sample_number=5884416, stream_offset=13940011,
frame_samples=4608
point 14: sample_number=6340608, stream_offset=15049839,
frame_samples=4608
point 15: sample_number=6792192, stream_offset=16175190,
frame_samples=4608
point 16: sample_number=7243776, stream_offset=17279213,
frame_samples=4608
point 17: sample_number=7695360, stream_offset=18409054,
frame_samples=4608
point 18: sample_number=8151552, stream_offset=19516614,
frame_samples=4608
point 19: sample_number=8603136, stream_offset=20432429,
frame_samples=4608
METADATA block #2
type: 4 (VORBIS_COMMENT)
is last: false
length: 145
vendor string: reference libFLAC 1.1.0 20030126
comments: 6
comment[0]: title=Retarded
comment[1]: artist=Afghan Whigs
comment[2]: album=Up In It
comment[3]: date=1990
comment[4]: tracknumber=01
comment[5]: genre=Indie
METADATA block #3
type: 1 (PADDING)
is last: false
length: 0
METADATA block #4
type: 1 (PADDING)
is last: true
length: 3987

And here's the output of the same command on another file, which is perfectly
recognized by SlimServer :

METADATA block #0
type: 0 (STREAMINFO)
is last: false
length: 34
minumum blocksize: 4608 samples
maximum blocksize: 4608 samples
minimum framesize: 14 bytes
maximum framesize: 15766 bytes
sample_rate: 44100 Hz
channels: 2
bits-per-sample: 16
total samples: 9832536
MD5 signature: c8faeb8b1b0d4a9a22e9515261142a46
METADATA block #1
type: 3 (SEEKTABLE)
is last: false
length: 396
seek points: 22
point 0: sample_number=0, stream_offset=0, frame_samples=4608
point 1: sample_number=442368, stream_offset=988375, frame_samples=4608
point 2: sample_number=889344, stream_offset=2193539, frame_samples=4608
point 3: sample_number=1336320, stream_offset=3287053, frame_samples=4608
point 4: sample_number=1783296, stream_offset=4437182, frame_samples=4608
point 5: sample_number=2230272, stream_offset=5562732, frame_samples=4608
point 6: sample_number=2677248, stream_offset=6734322, frame_samples=4608
point 7: sample_number=3124224, stream_offset=8112691, frame_samples=4608
point 8: sample_number=3571200, stream_offset=9425224, frame_samples=4608
point 9: sample_number=4018176, stream_offset=10427436, frame_samples=4608
point 10: sample_number=4465152, stream_offset=11519215,
frame_samples=4608
point 11: sample_number=4912128, stream_offset=12680407,
frame_samples=4608
point 12: sample_number=5359104, stream_offset=13803772,
frame_samples=4608
point 13: sample_number=5806080, stream_offset=15065728,
frame_samples=4608
point 14: sample_number=6253056, stream_offset=16417850,
frame_samples=4608
point 15: sample_number=6700032, stream_offset=17612839,
frame_samples=4608
point 16: sample_number=7147008, stream_offset=18758059,
frame_samples=4608
point 17: sample_number=7593984, stream_offset=19947008,
frame_samples=4608
point 18: sample_number=8040960, stream_offset=21259259,
frame_samples=4608
point 19: sample_number=8487936, stream_offset=22624200,
frame_samples=4608
point 20: sample_number=8934912, stream_offset=23974207,
frame_samples=4608
point 21: sample_number=9381888, stream_offset=25330616,
frame_samples=4608
METADATA block #2
type: 4 (VORBIS_COMMENT)
is last: false
length: 146
vendor string: reference libFLAC 1.1.0 20030126
comments: 6
comment[0]: title=Candy grounded
comment[1]: artist=Ashbury Faith
comment[2]: album=Zed
comment[3]: date=1997
comment[4]: tracknumber=01
comment[5]: genre=Rock
METADATA block #3
type: 1 (PADDING)
is last: true
length: 3990

The details of this file appears like this on the web interface :

Title:
Candy grounded
Artist:
Ashbury Faith
Album:
Zed
Genre:
Rock
Track:
1
File Format:
FLAC
Duration:
3:42
Year:
1997
File Length:
26,058,648 Bytes
Bitrate:
934kbps CBR
Location:
file:///home/music/albums/A/Ashbury_Faith-Zed/Ashbury_Faith-01-Candy_grounded.flac
(Download)
Date Modified:
vendredi, 23 juillet 2004, 22h24:54

This problem didn't exist before my re-tagging of most of the files, but I
don't understand why just some of them are affected, and most aren't ?
Currently it affects 374 songs on a total of 12188, and I still haven't found
a common point between problematic files, so any suggestions would be
welcome...

Florent

PS: I'm using 5.2.1, stable version

David Brittain
2004-07-29, 00:14
Hi Florent

Are you seeing any errors in slimserver.log, see my previous email where
I had a similar problem:

http://lists.slimdevices.com/archives/discuss/2004-July/032201.html

If you see the same, then it could be the bug I found in FLAC.pm which
is a CPAN module used by slimserver. I reported this to the module's
author so hopefully it will get fixed and slimserver will eventually
pick up the change.

If you are familiar with applying patches, then the change you need is:

--- /home/david/FLAC.pm 2004-07-17 16:59:58.000000000 +0100
+++ FLAC.pm 2004-07-17 17:33:56.903991464 +0100
@@ -344,6 +344,9 @@
my $metadataBlockLength = (BLOCKLENFLAG & $metadataBlockHeader);
$lastBlockFlag = (LASTBLOCKFLAG &
$metadataBlockHeader)>>31;

+ # If the block size is zero go to the next block
+ $metadataBlockLength or next;
+
# Read the contents of the metadata_block
read $fh, my $metadataBlockData, $metadataBlockLength or return
-1;

Dave

Florent DANIEL wrote:

>Hello,
>
>I've juste corrected tags on most of my audio files, but it now appears that
>some of them aren't recognized anymore by SlimServer. The concerned files now
>appears under "Pas d'artiste/Pas d'album" ("No artist/No album", I was using
>french language when scanning), and clicking on them doesn't display any
>comments, although the metaflac command doesn't seem to report any problems.
>Here's an example of an incorrect display on the web interface :
>
>Title:
>The Afghan Whigs-01-Retarded
>File Format:
>FLAC
>File Length:
>20,915,213 Bytes
>Location:
>file:///home/music/albums/A/The_Afghan_Whigs-Up_In_It/The_Afghan_Whigs-01-Retarded.flac
>(Download)
>Date Modified:
>vendredi, 23 juillet 2004, 22h32:01
>
>Here's the output of metaflac --list on this file, which shows that comments
>are present (block #2) :
>
>METADATA block #0
> type: 0 (STREAMINFO)
> is last: false
> length: 34
> minumum blocksize: 4608 samples
> maximum blocksize: 4608 samples
> minimum framesize: 14 bytes
> maximum framesize: 13023 bytes
> sample_rate: 44100 Hz
> channels: 2
> bits-per-sample: 16
> total samples: 9058140
> MD5 signature: 46ef62fa838bb6f25eaaa46c45b54382
>METADATA block #1
> type: 3 (SEEKTABLE)
> is last: false
> length: 360
> seek points: 20
> point 0: sample_number=0, stream_offset=0, frame_samples=4608
> point 1: sample_number=451584, stream_offset=760464, frame_samples=4608
> point 2: sample_number=903168, stream_offset=1861388, frame_samples=4608
> point 3: sample_number=1354752, stream_offset=2949815, frame_samples=4608
> point 4: sample_number=1810944, stream_offset=4048079, frame_samples=4608
> point 5: sample_number=2262528, stream_offset=5139826, frame_samples=4608
> point 6: sample_number=2714112, stream_offset=6248406, frame_samples=4608
> point 7: sample_number=3170304, stream_offset=7372290, frame_samples=4608
> point 8: sample_number=3621888, stream_offset=8468212, frame_samples=4608
> point 9: sample_number=4073472, stream_offset=9582196, frame_samples=4608
> point 10: sample_number=4525056, stream_offset=10703748,
>frame_samples=4608
> point 11: sample_number=4981248, stream_offset=11802378,
>frame_samples=4608
> point 12: sample_number=5432832, stream_offset=12888084,
>frame_samples=4608
> point 13: sample_number=5884416, stream_offset=13940011,
>frame_samples=4608
> point 14: sample_number=6340608, stream_offset=15049839,
>frame_samples=4608
> point 15: sample_number=6792192, stream_offset=16175190,
>frame_samples=4608
> point 16: sample_number=7243776, stream_offset=17279213,
>frame_samples=4608
> point 17: sample_number=7695360, stream_offset=18409054,
>frame_samples=4608
> point 18: sample_number=8151552, stream_offset=19516614,
>frame_samples=4608
> point 19: sample_number=8603136, stream_offset=20432429,
>frame_samples=4608
>METADATA block #2
> type: 4 (VORBIS_COMMENT)
> is last: false
> length: 145
> vendor string: reference libFLAC 1.1.0 20030126
> comments: 6
> comment[0]: title=Retarded
> comment[1]: artist=Afghan Whigs
> comment[2]: album=Up In It
> comment[3]: date=1990
> comment[4]: tracknumber=01
> comment[5]: genre=Indie
>METADATA block #3
> type: 1 (PADDING)
> is last: false
> length: 0
>METADATA block #4
> type: 1 (PADDING)
> is last: true
> length: 3987
>
>And here's the output of the same command on another file, which is perfectly
>recognized by SlimServer :
>
>METADATA block #0
> type: 0 (STREAMINFO)
> is last: false
> length: 34
> minumum blocksize: 4608 samples
> maximum blocksize: 4608 samples
> minimum framesize: 14 bytes
> maximum framesize: 15766 bytes
> sample_rate: 44100 Hz
> channels: 2
> bits-per-sample: 16
> total samples: 9832536
> MD5 signature: c8faeb8b1b0d4a9a22e9515261142a46
>METADATA block #1
> type: 3 (SEEKTABLE)
> is last: false
> length: 396
> seek points: 22
> point 0: sample_number=0, stream_offset=0, frame_samples=4608
> point 1: sample_number=442368, stream_offset=988375, frame_samples=4608
> point 2: sample_number=889344, stream_offset=2193539, frame_samples=4608
> point 3: sample_number=1336320, stream_offset=3287053, frame_samples=4608
> point 4: sample_number=1783296, stream_offset=4437182, frame_samples=4608
> point 5: sample_number=2230272, stream_offset=5562732, frame_samples=4608
> point 6: sample_number=2677248, stream_offset=6734322, frame_samples=4608
> point 7: sample_number=3124224, stream_offset=8112691, frame_samples=4608
> point 8: sample_number=3571200, stream_offset=9425224, frame_samples=4608
> point 9: sample_number=4018176, stream_offset=10427436, frame_samples=4608
> point 10: sample_number=4465152, stream_offset=11519215,
>frame_samples=4608
> point 11: sample_number=4912128, stream_offset=12680407,
>frame_samples=4608
> point 12: sample_number=5359104, stream_offset=13803772,
>frame_samples=4608
> point 13: sample_number=5806080, stream_offset=15065728,
>frame_samples=4608
> point 14: sample_number=6253056, stream_offset=16417850,
>frame_samples=4608
> point 15: sample_number=6700032, stream_offset=17612839,
>frame_samples=4608
> point 16: sample_number=7147008, stream_offset=18758059,
>frame_samples=4608
> point 17: sample_number=7593984, stream_offset=19947008,
>frame_samples=4608
> point 18: sample_number=8040960, stream_offset=21259259,
>frame_samples=4608
> point 19: sample_number=8487936, stream_offset=22624200,
>frame_samples=4608
> point 20: sample_number=8934912, stream_offset=23974207,
>frame_samples=4608
> point 21: sample_number=9381888, stream_offset=25330616,
>frame_samples=4608
>METADATA block #2
> type: 4 (VORBIS_COMMENT)
> is last: false
> length: 146
> vendor string: reference libFLAC 1.1.0 20030126
> comments: 6
> comment[0]: title=Candy grounded
> comment[1]: artist=Ashbury Faith
> comment[2]: album=Zed
> comment[3]: date=1997
> comment[4]: tracknumber=01
> comment[5]: genre=Rock
>METADATA block #3
> type: 1 (PADDING)
> is last: true
> length: 3990
>
>The details of this file appears like this on the web interface :
>
>Title:
>Candy grounded
>Artist:
>Ashbury Faith
>Album:
>Zed
>Genre:
>Rock
>Track:
>1
>File Format:
>FLAC
>Duration:
>3:42
>Year:
>1997
>File Length:
>26,058,648 Bytes
>Bitrate:
>934kbps CBR
>Location:
>file:///home/music/albums/A/Ashbury_Faith-Zed/Ashbury_Faith-01-Candy_grounded.flac
>(Download)
>Date Modified:
>vendredi, 23 juillet 2004, 22h24:54
>
>This problem didn't exist before my re-tagging of most of the files, but I
>don't understand why just some of them are affected, and most aren't ?
>Currently it affects 374 songs on a total of 12188, and I still haven't found
>a common point between problematic files, so any suggestions would be
>welcome...
>
>Florent
>
>PS: I'm using 5.2.1, stable version
>

Dan Sully
2004-07-29, 12:36
* David Brittain <slimdevices (AT) pippo (DOT) demon.co.uk> shaped the electrons to say...

>http://lists.slimdevices.com/archives/discuss/2004-July/032201.html
>
>If you see the same, then it could be the bug I found in FLAC.pm which
>is a CPAN module used by slimserver. I reported this to the module's
>author so hopefully it will get fixed and slimserver will eventually
>pick up the change.

I've just commited this update to Audio::FLAC, and to SlimServer.

-D
--
C program run, C program crash, C programmer cry.