Bug 1820 - 24/48 audio files (WAV or FLAC) not playing on SB2
: 24/48 audio files (WAV or FLAC) not playing on SB2
Status: CLOSED FIXED
Product: SB 2/3
Classification: Unclassified
Component: Audio
: 14
: PC Windows XP
: P2 normal (vote)
: ---
Assigned To: Vidur Apparao
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-07-14 11:37 UTC by Michel Fombellida
Modified: 2008-12-18 11:37 UTC (History)
0 users

See Also:
Category: ---


Attachments
-d_source log file (20.82 KB, text/plain)
2005-07-14 13:23 UTC, Michel Fombellida
Details
Flac analysis file - 01 drive.ana (1.18 MB, text/plain)
2005-07-15 14:43 UTC, Michel Fombellida
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michel Fombellida 2005-07-14 11:37:28 UTC
Hi,

Running Slimserver 6.1B2 on XP SP2, Squeezebox2 FW14.

I have ripped the content of some DVD-A. The resulting files are 24bits at 
48khz PCM WAV files. I can play them directly on the computer (with Media 
Player or Adobe Audition). I also converted them in FLAC (please find below the 
result of Metaflac on one of them, at least the beginning, it confirms 24/48).

When I try to play these files on the SB2, I get some kind of loud statis with 
some low level music in the background. I get the same result with both WAV and 
FLAC and both on analog (headphone) or digital outputs.

In slimserver->File types, both WAV and FLAC are set to play natively on the 
SB2 (i.e. no conversion on the server).

The files are quite big. If needed I can email them or let me know if I can 
upload one of them somewhere. Let me know.

Michel

_______________________

METADATA block #0
  type: 0 (STREAMINFO)
  is last: false
  length: 34
  minumum blocksize: 4608 samples
  maximum blocksize: 4608 samples
  minimum framesize: 16 bytes
  maximum framesize: 27660 bytes
  sample_rate: 48000 Hz
  channels: 2
  bits-per-sample: 24
  total samples: 13017200
  MD5 signature: 55f3e288a4fd14210e5253e2055ea097
METADATA block #1
  type: 3 (SEEKTABLE)
  is last: false
  length: 486
  seek points: 27
    point 0: sample_number=0, stream_offset=0, frame_samples=4608
    point 1: sample_number=479232, stream_offset=1685213, frame_samples=4608
    point 2: sample_number=963072, stream_offset=3845903, frame_samples=4608
__________________________
Comment 1 Michel Fombellida 2005-07-14 13:23:29 UTC
Created attachment 636 [details]
-d_source log file

I've played first the .wav file and then the .flac file.
Comment 2 Vidur Apparao 2005-07-14 15:39:48 UTC
Michel, the wav->flc conversion seems to be disabled. Can you playback the WAV
files with that reenabled?
Comment 3 Vidur Apparao 2005-07-14 17:12:03 UTC
Also, try attaching the FLAC file to this bug. If it's too large, I'll see about
finding a place to upload it.
Comment 4 Michel Fombellida 2005-07-15 01:27:56 UTC
Yes, I play WAV natively and FLAC natively. I'll enable the WAV to FLAC 
conversion and try again later today. I'll keep you informed.

I already tried to attach the files (both WAV and FLAC) but they are too big...

Michel
Comment 5 Vidur Apparao 2005-07-15 14:04:55 UTC
Hmm...a flac -a of the file you sent me results in:

flac 1.1.1, Copyright (C) 2000,2001,2002,2003,2004 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.

bug1820.flac: analyzing, 16% complete

bug1820.flac: ERROR while decoding data
              state = FLAC__STREAM_DECODER_END_OF_STREAM

What do you get if you do a flac -a (analyze) on the file? I wonder if there are
any compatibility issues between flac 1.1.1 and 1.1.2 (which was used to encode
the file, I believe).
Comment 6 Michel Fombellida 2005-07-15 14:29:06 UTC
I just only managed to upload the file successfuly a few minutes ago after 
several interrupted transfers. I guess the file you tried was not complete. 
Could you try again. On the file that is now in the FTP site. 

I did flac -a and got:

D:\Music Storage\R.E.M\Automatic For The People>flac -a "01 Drive.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.

01 Drive.flac: done

Note that the WAV file is transfering at the moment, still more than 1 hour to 
go.

Michel
Comment 7 Vidur Apparao 2005-07-15 14:38:27 UTC
You're probably right - I grabbed the file too early. I'll have to wait for Dan
to come back (it's his FTP server) to grab the complete file. In the meantime,
could you attach the flac -a output to the bug? Thanks.
Comment 8 Michel Fombellida 2005-07-15 14:43:25 UTC
Created attachment 645 [details]
Flac analysis file - 01 drive.ana

Analysis file generated by Flac 1.1.2 (-a) on "01 drive.flac"
Comment 9 Vidur Apparao 2005-07-15 14:45:52 UTC
Looking at the analysis, I wonder if this is related to bug 1508.
Comment 10 Michel Fombellida 2005-07-15 15:03:20 UTC
I tried the work-around suggested in bug 1508 (disable the built-in flac 
decoding and use the server) but it doesn't help. Note that once the wav file 
will be uploaded (45 minutes to go) you should be able to check that it also 
doesn't work. So I am not sure the problem relates to flac decoding. Note that 
this wav file plays fine with other players like Media-player or inside Adobe 
Audition.
Comment 11 Vidur Apparao 2005-07-15 15:07:10 UTC
Well...the WAV issue is known (surprisingly, this is the first time it's made
the bug database). The hardware can play back 24-bit audio, but the server has a
bug that doesn't correctly send it the right parameters (it's interpreting the
input as 16-bit). FWIW, the WAV->FLAC conversion should fix this problem. 

The FLAC issue is separate and my speculation is still that the problem is
similar to the one mentioned in bug 1508.
Comment 12 Michel Fombellida 2005-07-15 15:41:28 UTC
OK, I didn't know about the Wav issue. I've set the WAV->FLAC conversion and 
guess what... it works. So yes, it looks like it is related.

But then I am not sure I understand what's happening: the WAV file is converted 
to FLAC on the server, FLAC is streamed to the SB2 and then the SB2 use the 
built-in FLAC decoder... so what's the difference between that and sending the 
FLAC file directly from the server?

In any case the wav file is now also uploaded to the FTP site!

Cheers,
Michel  
Comment 13 Vidur Apparao 2005-07-15 15:49:46 UTC
The difference probably relates to the encoding parameters. The 24-bit FLAC that
you've encoded seems to have FLAC frames that we're having problems with in the
hardware. I'm guessing that the encoding parameters for the on-the-fly result in
files that we're more comfortable with. The quality is the same, of course, but
the compression factor may be different.
Comment 14 Michel Fombellida 2005-07-15 16:07:07 UTC
Another test... I have another DVD-A with 24/96 source (Donald Fagen-
Karmakiriad). Now that I have set Wav to Flac conversion on the server, playing 
these 24/96 wav files works as well... except that they are too slow, the files 
are just playing at half speed. Should be easy to fix, no?
Comment 15 Vidur Apparao 2005-07-15 16:18:38 UTC
Heh, no. If they are getting transcoded to 96KHz FLAC files, we're not currently
able to play them on the SB2. 48KHz is the highest sample rate we support.

I'm not sure if this is possible, but you may be able to get flac to downsample
to 48KHz. If you can figure out the parameters that allow you to do this, you
should be able to modify the wav->flc in your convert.conf file to get these to
work.
Comment 16 Michel Fombellida 2005-07-16 00:43:34 UTC
Downsampling is not an audiophile word ;-) I'll wait you support higher 
frequencies then (96 and 192). I hope it will be doable, you would then cover 
the whole range. Is there already a request for enhancement about that, should 
I file one?

So if I summarize this bug report, we see 2 issues.

1) 24/48 WAV files don't work if streamed directly (not recognised as 24bits), 
they have first to be transcoded to FLAC on the server side.

2) some 24/48 FLAC files are not interpreted correctly by the SB2 (appears 
similar to bug 1508).
Comment 17 Michel Fombellida 2005-07-16 11:35:22 UTC
I found another issue... although some 24/48 WAV files are playing just fine 
with the server side transcoding to FLAC as mentioned above (for example like 
the file I sent you), I found several tracks on the same album that are causing 
problems. These tracks usually start playing correctly but then at some stage 
the music obviously slows down and artifacts are added (it sounds as if samples 
are skipped). It affects both the SB2 digital and analog outputs. Pausing, 
unpausing doesn't help, but sometime the artifacts comes and go during the 
song. It seems systematic on some tracks and always happens at the same 
location on these tracks.

I've played these tracks on the PC with Adobe Audition and they play fine, so 
it looks like a SB2 specific issue.

Let me know if you want one of these track to the same location.
Comment 18 Vidur Apparao 2005-07-17 13:00:04 UTC
Still tracking this down. Hoping to get it in for 6.1.
Comment 19 Vidur Apparao 2005-07-17 17:36:10 UTC
Fixed with firmware 15 (just checked in). Michel, this will probably also fix
the WAV files your having problems transcoding to FLAC.
Comment 20 Michel Fombellida 2005-07-18 11:27:37 UTC
I just installed the new version with FW 15 but unfortunately I still have 
problems with most of these 24/48 files. 

Here is a summary of a few tests done with different 24/48 WAV and FLAC files 
and various settings (tracks extracted from 2 different disks):

1) WAV->WAV->built in: gives kind of white noise, doesn't work at all.

2) WAV->FLAC->FLAC: plays OK but at some stage, on most tracks, the music slows 
down and the music becomes very jerky (like skipping samples).

3) FLAC->FLAC->built in: plays OK but at some stage, on most tracks, the music 
is jerky (sounds very similar to 2).  

Hope this helps, if you need some of these files let me know.
Comment 21 Chris Owens 2008-03-11 11:28:29 UTC
This bug was marked resolved in Slimserver 6.1, which is several versions ago.  If you're still seeing this bug, please re-open it.  Thanks!