PDA

View Full Version : FLAC stops playing prematurely



Mitch Harding
2005-12-20, 11:56
Hi everyone,

I was curious if anyone had ever seen a problem like this before.

I own both a SB and SB2, both wired. Most of my music is in FLAC format
,although I do have a small set of MP3 files in my library as well. On my
SB FLAC files are transcoded to WAV (since it's wired, I have no bitrate
limiting) and on my SB2 they are played natively. My server is installed on
a Windows XP box. I am running one of the 6.2.2 nightlies (4-5 days old, I
think).

Anyway, last night I was listening to a FLAC file on my SB and about halfway
through the music abruptly stopped and it begin playing the next song in the
playlist. I hit the "back" button on the remote to play the problem song
again, and again it skipped to the next song at the very same moment as
before.

Curious, I listed to the same track on the SB2, and it played fine to
completion.

The most significant difference between the SB and SB2 in this case as the
transcoding, so I changed the server setting to force all FLAC files to be
transcoded to WAV (instead of using the native FLAC playback on the SB2).
Once I did this, the problem reproduced on the SB2 as well.

Next I checked the level of FLAC I had installed on my server. Turns out it
was 1.1.1. I saw that 1.1.2a was available for download. I installed that,
but the problem still happens.

The next step I'm going to try is to see if I can reproduce this using
Winamp or some other media player.

Anyway, does anyone have any suggestions for debug here? I'd assume it's a
bad FLAC file except that the SB2 has no problem with it when decoding
natively -- and I have no idea how my FLAC file would have become corrupted,
assuming it wasn't somehow misencoded initially.

Thanks in advance for any help or suggestions.

Mitch

Mitch Harding
2005-12-20, 12:09
Well, flac -t revealed the problem:

C:\test>flac -t dog.flac

flac 1.1.2, Copyright (C) 2000,2001,2002,2003,2004,2005 Josh Coalson
flac comes with ABSOLUTELY NO WARRANTY. This is free software, and you are
welcome to redistribute it under certain conditions. Type `flac' for
details.

dog.flac: testing, 45% completedog.flac: *** Got error code
0:FLAC__STREAM_DECOD
ER_ERROR_STATUS_LOST_SYNC
dog.flac: *** Got error code 0:FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC


dog.flac: ERROR while decoding data
state = FLAC__STREAM_DECODER_READ_FRAME

C:\test>

My guess is that when running flac.exe directly against the file, it pukes
when it hits that point. And so when transcoding, the stream to the player
ends at that point, and it goes to the next track.

But when I'm streaming flac, the server side has no idea that there's
anything wrong with the file. So it keeps sending data to the player past
the point of this error. And I guess the player just plays what it is
given. Careful listening to native decoding of this track on the SB2 now
does reveal a small hiccup at the point of the error. I guess I just never
noticed it before.

Anyway, I'll re-rip and encode the track. Mystery solved. Sorry to spam
the list prematurely!

Mitch

On 12/20/05, Mitch Harding <mitcharf (AT) gmail (DOT) com> wrote:
>
> Hi everyone,
>
> I was curious if anyone had ever seen a problem like this before.
>
> I own both a SB and SB2, both wired. Most of my music is in FLAC format
> ,although I do have a small set of MP3 files in my library as well. On my
> SB FLAC files are transcoded to WAV (since it's wired, I have no bitrate
> limiting) and on my SB2 they are played natively. My server is installed on
> a Windows XP box. I am running one of the 6.2.2 nightlies (4-5 days old,
> I think).
>
> Anyway, last night I was listening to a FLAC file on my SB and about
> halfway through the music abruptly stopped and it begin playing the next
> song in the playlist. I hit the "back" button on the remote to play the
> problem song again, and again it skipped to the next song at the very same
> moment as before.
>
> Curious, I listed to the same track on the SB2, and it played fine to
> completion.
>
> The most significant difference between the SB and SB2 in this case as the
> transcoding, so I changed the server setting to force all FLAC files to be
> transcoded to WAV (instead of using the native FLAC playback on the SB2).
> Once I did this, the problem reproduced on the SB2 as well.
>
> Next I checked the level of FLAC I had installed on my server. Turns out
> it was 1.1.1. I saw that 1.1.2a was available for download. I installed
> that, but the problem still happens.
>
> The next step I'm going to try is to see if I can reproduce this using
> Winamp or some other media player.
>
> Anyway, does anyone have any suggestions for debug here? I'd assume it's
> a bad FLAC file except that the SB2 has no problem with it when decoding
> natively -- and I have no idea how my FLAC file would have become corrupted,
> assuming it wasn't somehow misencoded initially.
>
> Thanks in advance for any help or suggestions.
>
> Mitch
>

DrNic
2005-12-20, 17:44
Well, flac -t revealed the problem:

C:\test>flac -t dog.flac

flac 1.1.2, Copyright (C) 2000,2001,2002,2003,2004,2005 Josh Coalson
flac comes with ABSOLUTELY NO WARRANTY. This is free software, and you are
welcome to redistribute it under certain conditions. Type `flac' for
details.

dog.flac: testing, 45% completedog.flac: *** Got error code
0:FLAC__STREAM_DECOD
ER_ERROR_STATUS_LOST_SYNC
dog.flac: *** Got error code 0:FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC


dog.flac: ERROR while decoding data
state = FLAC__STREAM_DECODER_READ_FRAME

C:\test>

My guess is that when running flac.exe directly against the file, it pukes
when it hits that point. And so when transcoding, the stream to the player
ends at that point, and it goes to the next track.

But when I'm streaming flac, the server side has no idea that there's
anything wrong with the file. So it keeps sending data to the player past
the point of this error. And I guess the player just plays what it is
given. Careful listening to native decoding of this track on the SB2 now
does reveal a small hiccup at the point of the error. I guess I just never
noticed it before.

Anyway, I'll re-rip and encode the track. Mystery solved. Sorry to spam
the list prematurely!

Mitch


Thanks for posting back with the answer Mitch!
Its good to see if the problems get remedied, especially as the answer to this (I presume uncommon?) problem is now searchable from the forum!

Nic

Mitch Harding
2005-12-20, 17:50
No problem at all.

The only mysterious thing for me is that when I encode the files, I use the
-V flag to verify the encoding. I wonder if EAC doesn't check the return
code from the flac command when it kicks off the encoding. I always review
the output logs of EAC before assuming the files are good.

Anyway, this has given me an excuse to brush up on my Perl. I'm going to
write a program to run "flac -t" on every file in my library, to see if
there are any other bad files lurking in there.

On 12/20/05, DrNic <DrNic.20d74z (AT) no-mx (DOT) forums.slimdevices.com> wrote:
>
>
> Mitch Harding Wrote:
> > Well, flac -t revealed the problem:
> >
> > C:\test>flac -t dog.flac
> >
> > flac 1.1.2, Copyright (C) 2000,2001,2002,2003,2004,2005 Josh Coalson
> > flac comes with ABSOLUTELY NO WARRANTY. This is free software, and you
> > are
> > welcome to redistribute it under certain conditions. Type `flac' for
> > details.
> >
> > dog.flac: testing, 45% completedog.flac: *** Got error code
> > 0:FLAC__STREAM_DECOD
> > ER_ERROR_STATUS_LOST_SYNC
> > dog.flac: *** Got error code
> > 0:FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC
> >
> >
> > dog.flac: ERROR while decoding data
> > state = FLAC__STREAM_DECODER_READ_FRAME
> >
> > C:\test>
> >
> > My guess is that when running flac.exe directly against the file, it
> > pukes
> > when it hits that point. And so when transcoding, the stream to the
> > player
> > ends at that point, and it goes to the next track.
> >
> > But when I'm streaming flac, the server side has no idea that there's
> > anything wrong with the file. So it keeps sending data to the player
> > past
> > the point of this error. And I guess the player just plays what it is
> > given. Careful listening to native decoding of this track on the SB2
> > now
> > does reveal a small hiccup at the point of the error. I guess I just
> > never
> > noticed it before.
> >
> > Anyway, I'll re-rip and encode the track. Mystery solved. Sorry to
> > spam
> > the list prematurely!
> >
> > Mitch
> >
>
> Thanks for posting back with the answer Mitch!
> Its good to see if the problems get remedied, especially as the answer
> to this (I presume uncommon?) problem is now searchable from the
> forum!
>
> Nic
>
>
> --
> DrNic
> ------------------------------------------------------------------------
> DrNic's Profile: http://forums.slimdevices.com/member.php?userid=92
> View this thread: http://forums.slimdevices.com/showthread.php?t=19293
>
>

tass
2005-12-21, 17:10
It's very possible that the file corrupted after it was encoded and verified... or you had an unstable FLAC version doing the encoding that messed it up.

Mitch Harding
2005-12-21, 18:44
Is it really that likely that the file would become corrupted just sitting
there in the filesystem? If so, what would cause that? I'd figure disk
failure would cause large problems than an occasional corrupted file.

I think all of my FLAC files were encoded with 1.1.1 or 1.1.2 -- I had
thought both were stable levels, although of course I could be mistaken.

On 12/21/05, tass <tass.20f0ez (AT) no-mx (DOT) forums.slimdevices.com> wrote:
>
>
> It's very possible that the file corrupted after it was encoded and
> verified... or you had an unstable FLAC version doing the encoding that
> messed it up.
>
>
> --
> tass
> ------------------------------------------------------------------------
> tass's Profile: http://forums.slimdevices.com/member.php?userid=1231
> View this thread: http://forums.slimdevices.com/showthread.php?t=19293
>
>