PDA

View Full Version : FLAC issues



Mark_H
2008-03-23, 09:36
I've been using a Squeezebox for a bunch of years now, serving FLACs to the boxes around my house without issue. I've always had things set up so that my FLACs are converted to WAV on the PC and only then streamed.

I noticed recently that tracks were getting chopped off in the last second or so (particularly noticeable on gapless albums).

And then today (while playing with my new Duet - yummy) I found that some FLACs wouldn't play at all... the tracks kept rebuffering but never playing...

When I turned FLAC options back to NATIVE, ie stream FLAC and decode in the client all the issues went away... turning back on the option to force transcoding into WAV prior to streaming brought back the problems...

So I have a solution (set FLAC decoding to NATIVE, although I'd prefer to stick with my original setup as I felt it sounded better), but I wanted to report the problem in case anybody has a similar setup and is noticing problems.

I've only noticed this issue (track truncation) in the past month so I guess it's a recent breakage...

Cheers,

Mark

gbrandwood
2008-03-23, 12:21
Hi Mark

Sorry, I don't have an answer for you - but I do have a question. Why convert to WAVs? Is there a benefit to this? Thanks, and good luck in finding a solution.

Gareth

Mark_H
2008-03-23, 15:08
Hi Mark

Sorry, I don't have an answer for you - but I do have a question. Why convert to WAVs? Is there a benefit to this? Thanks, and good luck in finding a solution.

Gareth

Many firmwares ago the sound seemed to degrade a tiny bit if you forced the client to do the FLAC decoding so I did the transcoding on the PC and served WAV so the client had no extra work to do. It always worked, until recently.

Cheers,

Mark

smc2911
2008-03-23, 15:33
What hardware SB are you on? I was under the impression that the impact of decoding FLAC at the hardware end was minimal. However, since WAV files are almost twice as large as a FLAC file, bandwidth could be an issue for you here if you are using wireless. Perhaps a neighbour has recently jumped onto the same channel as you (NetStumbler (http://netstumbler.com/) or a similar tool would confirm/deny this).

Mark_H
2008-03-24, 01:45
Pretty certain this is a FLAC issue with squeezebox. Since reverting to NATIVE I have noticed that some FLACs which did play no longer play...

Hardware is SB1, SB2 and now Duet receiver.

I *am* using wireless and am clear of neighbour interference according to Netstumbler...

Cheers,

Mark

smc2911
2008-03-24, 01:50
I have an SB3 and a Duet and have never had a problem with FLAC. Is it possible that the FLAC files themselves have been corrupted? Do they all play ok locally on the PC (e.g. using foobar2000 or mplayer)?

Mark_H
2008-03-24, 01:54
Yes, all the problem files play flawlessly locally. I use JRiver's Media Center. Softsqueeze 6.5 also played the problem files without issue...

The problem is repeatable so if there is any logging I can turn on I'd be happy to post logs...

Mark

smc2911
2008-03-24, 01:55
I'm stumped now...anyone else?

Mark_H
2008-03-24, 02:04
Here are the tags from one of the files which won't play. I wonder if there's anything here which might be causing issues?

Free Lossless Audio Codec (FLAC)
44.1 kHz Sample Rate
16 Bits Per Sample
2 Channels

Min Block Size = 4096
Max Block Size = 4096
Min Frame Size = 16
Max Frame Size = 14022
Padding Block = 7521 bytes

# of Pictures = 1
Type 3 (22539 bytes)

SeekTable Block (720 bytes):
# of points = 40

Vorbis Comment Block (838 bytes):
Vendor String = reference libFLAC 1.1.4 20070213
tracknumber = 3
title = Back to the River
releasecountry = PL
musicbrainz_trmid = f6ec107a-607e-40a9-befc-902a1211fbeb
musicbrainz_trackid = ad7e124f-4939-4bd0-9a26-34649ff9b5bd
musicbrainz_sortname = Riverside
musicbrainz_artistid = 985c5cc9-2dc1-49ac-8806-5b66586a2d58
musicbrainz_albumtype = single
musicbrainz_albumstatus = official
musicbrainz_albumid = 40f22603-3376-40b1-bd34-4d359efb0598
genre = Progressive Metal
date = 2007/01/01
artist = Riverside
album = 02 Panic Room
TOOL NAME = Media Center
TOOL VERSION = 12.0.388
PEAK LEVEL = 0.9885900020599365
BPM = 100
REPLAY GAIN = -14.801959991455078
ALBUM GAIN = -14.724499702453613
COUNTRY = Poland
NUMBER PLAYS = 4
LAST PLAYED = 1188851951
CD SINGLE = Yes
ALBUM PLAY ONLY = Yes
MY IPOD = Exclude

Mark_H
2008-03-24, 02:06
Then there is still the issue that if I use FLAC->WAV conversion on the PC *every* FLAC has the final second of play truncated...

Mark

consciouspnm
2008-03-24, 02:33
...moved to it's own thread as I don't think it's related anymore.

Phil Leigh
2008-03-24, 04:05
Many firmwares ago the sound seemed to degrade a tiny bit if you forced the client to do the FLAC decoding so I did the transcoding on the PC and served WAV so the client had no extra work to do. It always worked, until recently.

Cheers,

Mark

I did extensive blind testing on this with recent firmware and found no audible difference whatsoever.

What OS are you you using? sounds like a problem that is somewhere on your PC that affects the server-side decode process to me - can't see how this could be a firmware issue as it would impact everybody

If running Windows, try looking at task manager and see if anyhting odd happens near the end of a track.

Mark_H
2008-03-24, 04:22
I did extensive blind testing on this with recent firmware and found no audible difference whatsoever.

That's good to know as it was always something that bugged me a bit. My testing was done a couple of years back.



What OS are you you using? sounds like a problem that is somewhere on your PC that affects the server-side decode process to me - can't see how this could be a firmware issue as it would impact everybody

If running Windows, try looking at task manager and see if anyhting odd happens near the end of a track.

XP SP2.

I did some more testing...

With FLAC set to decode server side, playing a track pops flac.exe up into the process tree (as expected) and the track in question fails to work.

I then removed flac.exe from the server/bin subdirectory and tried again. This time no flac.exe (of course) in the process tree, but squeezecenter still attempted (and failed to play) - I assume it falls back to internal decoding if flac.exe isn't available.

Setting FLAC->NATIVE (eg client-side) once again the track works correctly.

And as noted, with FLAC->WAV server-side transcoding, which fails with the SB and Duet, it works perfectly well with SoftSqueeze (firmware 2)

Any debug logs I can turn on which might help?

Cheers,

Mark

Phil Leigh
2008-03-24, 07:21
not sure about debug options...
which version of FLAC.exe are you running? the 256Kb 1.1.3 version?

Mark_H
2008-03-24, 07:53
FLAC.exe reports version 1.2.1 which seems to be the latest stable release.

Cheers,

Mark

Anne
2008-03-24, 09:11
Not entirely sure this is the same, but I filed a bug concerning static noise on 24/96 flac with SB3 and SqueezeCenter. This worked perfectly on SlimServer 6.5.3.
The problem is resolved, I am just waiting for an explanation.
Because I am not sure is because I do not use flac normally, all my music is AppleLossless, and then a wav 24/44.1 download.
If searching under bugs you will see more bugs filed regarding this noise on flac.

mortod
2009-05-13, 09:35
I'm having similar problem with tracks finishing early. See http://forums.slimdevices.com/showthread.php?t=62770.

I use InguzDSP and so use flac.exe rather than native flac. mp3 files are OK, and older tracks in my library seem OK. Have tried downgrading my version of flac, though of course the problem could be in the version of flac used to create the track.

Moonbase
2009-05-13, 11:26
Wild shot, but your FLAC further above shows an older version was used. You might want to try upgrading your FLAC tool(s) to v1.2.1 and re-encode one of the problem albums to see if it might be a FLAC bug. I distinctly remember there was a bug in FLAC regarding encoding from stdin when a WAV contained "odd" chunks — and SC would (usually) do exactly that: Convert your WAV to FLAC for transmission to the SB.

FLAC Download link (http://flac.sourceforge.net/download.html)

Lossless re-compression (and updating to the latest FLAC version) of a file can be done using the flac command-line tool like this:

flac abc.flac --force
(You can of course specify additional options.)

mortod
2009-05-13, 14:23
Have fixed my problem - still not sure if flac related. I found that SC has to run as a user witl full admin rights (I had recently changed the user that owns SC to be a limited user). Not sure why that should effect flac processing of only some files.

dsdreamer
2009-05-15, 14:52
Have fixed my problem - still not sure if flac related. I found that SC has to run as a user witl full admin rights (I had recently changed the user that owns SC to be a limited user). Not sure why that should effect flac processing of only some files.

I can't account for the truncation of files by 1 second, but depending on the history of how and when the FLAC files were created some may have been owned by a different user and could not be read by a standard, non-privileged user. XP home tries to hide ownership and permission issues from the end-user, but they still exist under the hood and can cause unexpected issues.