Hi I am thinking of ripping albums to a single flac file with embedded cuesheet. As track and index points have to be on a 588 sample boundary due to the CD TOC standard working in 588 sample frames, I thought it may be beneficial to rip CDs with a blocksize of 588 samples. According to the format page on sourcefourge a stream is subset if "The blocksize bits in the frame header must be 0001-1110. The blocksize must be <=16384; if the sample rate is <= 48000Hz, the blocksize must be <=4608. As far as I can tell, this means that a blocksize of 588 should be subset, although the blocksize would be a 16 bit value at the end of the frame header. However when I try encoding with flac 1.2.1 it says that only the blocksizes that can be represented in the 4 bits in the early part of the frame header. Which is correct? Can anyone forsee any problems with encoding with a block size of 588 samples? Best Regards Howard Meridian Audio Ltd - www.meridian-audio.com - Registered in England Registered Office: 11 Latham Road, Huntingdon, Cambs, PE29 6YE, UK Company Registration No. 2710631 VAT Registered No. GB576660505
rappard at dds.nl
2008-May-20 18:20 UTC
[Flac-dev] are 588 sample frames subset or nonsubset?
> I am thinking of ripping albums to a single flac file with embedded > cuesheet. As track and index points have to be on a 588 sample boundary due > to the CD TOC standard working in 588 sample frames, I thought it may be > beneficial to rip CDs with a blocksize of 588 samples.[snipped rest] Perhaps a dumb question, perhaps a refutation: since you're ripping CDs that (I assume) already conform to the Red Book standard, aren't blocksizes (a multiple of) 588 samples anyway? See also http://en.wikipedia.org/wiki/Compact_Disc#Data_structure. Cheers, Martin
hi Howard, I'll check into the discrepancy but having the FLAC blocksize match the CD sample frame size is probably not desirable. the optimal blocksize for FLAC is relative to the stationarity of the signal and the 588 sample frame is not related to that, it's an artifact of optimal storage on CD. Josh --- Howard Farrar <howard.farrar at meridian.co.uk> wrote:> Hi > > I am thinking of ripping albums to a single flac file with embedded > cuesheet. As track and index points have to be on a 588 sample > boundary due > to the CD TOC standard working in 588 sample frames, I thought it may > be beneficial to rip CDs with a blocksize of 588 samples. > > According to the format page on sourcefourge a stream is subset if > > "The blocksize bits in the frame header must be 0001-1110. > The blocksize must be <=16384; > if the sample rate is <= 48000Hz, the blocksize must be <=4608. > > As far as I can tell, this means that a blocksize of 588 should be > subset, > although the blocksize would be a 16 bit value at the end of the > frame > header. > > However when I try encoding with flac 1.2.1 it says that only the > blocksizes > that can be represented in the 4 bits in the early part of the frame > header. > > Which is correct? Can anyone forsee any problems with encoding with > a block > size of 588 samples? > > Best Regards > > Howard > > > Meridian Audio Ltd - www.meridian-audio.com - Registered in England > Registered Office: 11 Latham Road, Huntingdon, Cambs, PE29 6YE, UK > Company Registration No. 2710631 VAT Registered No. GB576660505
Hi Josh I realise that the compression ratio is related to the signal stationarity and blocksize, but the tests I have performed seemed to indicate that using a blocksize of 588 samples only looses about 1% of compression ratio against a blocksize of 1152 or 4608 samples. Encoding with a blocksize of 588 samples would have benefits for the rest of my system. Howard -----Original Message----- From: Josh Coalson [mailto:xflac at yahoo.com] Sent: 23 May 2008 21:03 To: howard.farrar at meridian.co.uk; flac-dev at xiph.org Subject: Re: [Flac-dev] are 588 sample frames subset or nonsubset? hi Howard, I'll check into the discrepancy but having the FLAC blocksize match the CD sample frame size is probably not desirable. the optimal blocksize for FLAC is relative to the stationarity of the signal and the 588 sample frame is not related to that, it's an artifact of optimal storage on CD. Josh --- Howard Farrar <howard.farrar at meridian.co.uk> wrote:> Hi > > I am thinking of ripping albums to a single flac file with embedded > cuesheet. As track and index points have to be on a 588 sample > boundary due > to the CD TOC standard working in 588 sample frames, I thought it may > be beneficial to rip CDs with a blocksize of 588 samples. > > According to the format page on sourcefourge a stream is subset if > > "The blocksize bits in the frame header must be 0001-1110. > The blocksize must be <=16384; > if the sample rate is <= 48000Hz, the blocksize must be <=4608. > > As far as I can tell, this means that a blocksize of 588 should be > subset, > although the blocksize would be a 16 bit value at the end of the > frame > header. > > However when I try encoding with flac 1.2.1 it says that only the > blocksizes > that can be represented in the 4 bits in the early part of the frame > header. > > Which is correct? Can anyone forsee any problems with encoding with > a block > size of 588 samples? > > Best Regards > > Howard > > > Meridian Audio Ltd - www.meridian-audio.com - Registered in England > Registered Office: 11 Latham Road, Huntingdon, Cambs, PE29 6YE, UK > Company Registration No. 2710631 VAT Registered No. GB576660505
ok, the docs are correct and the stream encoder is being too strict in what it allows. I've checked in a fix but in the meantime you can encode with the --lax argument if you are using a blocksize of 588 and the resulting files will still be subset. Josh --- Josh Coalson <xflac at yahoo.com> wrote:> hi Howard, I'll check into the discrepancy but having the FLAC > blocksize match the CD sample frame size is probably not desirable. > the optimal blocksize for FLAC is relative to the stationarity of > the signal and the 588 sample frame is not related to that, it's > an artifact of optimal storage on CD. > > Josh > > --- Howard Farrar <howard.farrar at meridian.co.uk> wrote: > > > Hi > > > > I am thinking of ripping albums to a single flac file with embedded > > cuesheet. As track and index points have to be on a 588 sample > > boundary due > > to the CD TOC standard working in 588 sample frames, I thought it > may > > be beneficial to rip CDs with a blocksize of 588 samples. > > > > According to the format page on sourcefourge a stream is subset if > > > > "The blocksize bits in the frame header must be 0001-1110. > > The blocksize must be <=16384; > > if the sample rate is <= 48000Hz, the blocksize must be <=4608. > > > > As far as I can tell, this means that a blocksize of 588 should be > > subset, > > although the blocksize would be a 16 bit value at the end of the > > frame > > header. > > > > However when I try encoding with flac 1.2.1 it says that only the > > blocksizes > > that can be represented in the 4 bits in the early part of the > frame > > header. > > > > Which is correct? Can anyone forsee any problems with encoding > with > > a block > > size of 588 samples? > > > > Best Regards > > > > Howard > > > > > > Meridian Audio Ltd - www.meridian-audio.com - Registered in England > > Registered Office: 11 Latham Road, Huntingdon, Cambs, PE29 6YE, UK > > Company Registration No. 2710631 VAT Registered No. GB576660505 > > > > > _______________________________________________ > Flac-dev mailing list > Flac-dev at xiph.org > http://lists.xiph.org/mailman/listinfo/flac-dev >