Taperssection.com

Gear / Technical Help => Post-Processing, Computer / Streaming / Internet Devices & Related Activity => Topic started by: herrmann2burn on January 18, 2007, 11:02:03 PM

Title: Flac help-Sector alignment
Post by: herrmann2burn on January 18, 2007, 11:02:03 PM
I am trying to flac up a show that i split into tracks in CD WAve but when i am flacing it, it is saying sector alignment is causing 118 samples to be carried over, and on the last track it is causing 587 zero saples to be appended.  This starts on the 7th track.
How can i fix this?

What affect would this have on the  wav's if converted back? (Just wondering about this, i didnt delete input files.)
Thanks
Rhys
Title: Re: Flac help-Sector alignment
Post by: Gordon on January 19, 2007, 01:21:13 AM
it is fixing sector boundary errors.  that is good not bad.  you shouldn't have them if you used cdwave but it happens.
Title: Re: Flac help-Sector alignment
Post by: herrmann2burn on January 19, 2007, 12:02:32 PM
it is fixing sector boundary errors.  that is good not bad.  you shouldn't have them if you used cdwave but it happens.
Thanks Gordon for answering.
I did have the align sector boundries box check in the frontend.
But does this have any affect on any data per file?  If say, someone was to unflac only one track, would the end of the track be cut from the carried over samples?
If i kept these flacs, and converted to wav, and then re-flac'd would they have the same fingerprint?
Im setting this up for a BT so i really dont feel like dealing with a headache down the road.
Thanks,
Rhys
Title: Re: Flac help-Sector alignment
Post by: JasonSobel on January 19, 2007, 12:13:41 PM
ok, here's some more answers to you.

Quote
But does this have any affect on any data per file?  If say, someone was to unflac only one track, would the end of the track be cut from the carried over samples?

in theory, yes.  that's how it fixes the sector boundary errors.  but keep in mind that each sector is just 1/75th of a second.  so, any data moved from one track to the next will be less than 1/75th of a second.  I doubt you'd be able to notice that.

Quote
If i kept these flacs, and converted to wav, and then re-flac'd would they have the same fingerprint?

if you de-coded these fixed FLAC files to WAV, and then re-encoded those WAV files to FLAC, when it re-encodes, it wouldn't have to fix any SBE's, so it would not change the files, and the resulted FLACs would have the same Fingerprint as the FLACs that you just made.

one other thing to keep in mind is that CD Wave ALWAYS cuts on a sector boundary.  however, if, at the end of a set, on the last track you don't snip off a tiny portion with CD Wave at the very end, the last file will probably not be cut on a CD Sector.  so, if you want to avoid this in the future, just snip off a little bit at the end of each set, and you'll be good to go :)
Title: Re: Flac help-Sector alignment
Post by: herrmann2burn on January 19, 2007, 12:18:36 PM
Jason,
Thanks for the info and the help!
-rhys
Title: Re: Flac help-Sector alignment
Post by: terrapinj on January 19, 2007, 04:05:05 PM
when you FLAC do it a set at a time as opposed to the whole show at once to avoid any carry overs from the end of a set if you don't trim off the end in CD Wave
Title: Re: Flac help-Sector alignment
Post by: F.O.Bean on January 21, 2007, 09:31:34 PM
when you FLAC do it a set at a time as opposed to the whole show at once to avoid any carry overs from the end of a set if you don't trim off the end in CD Wave

thats a PITA tho, but i feel you

i have never ehard a difference using flacs SBE alignment, i say use it, you'll never hear it
Title: Re: Flac help-Sector alignment
Post by: panther65 on January 22, 2007, 03:08:08 PM
What do you mean trim off the end in cdwave? I've just encountered for the first time, SBEs when encoding wavs to flacs using cdwave and flacfrontend. Not sure what I did to cause this. Used Audacity to edit file at 16/44.1 and exported as wav file. Tracked files in cdwave, then encoded in FFE and checked "align on sector boundries" and the last file of set one had SBEs as well as the remaining files.
Title: Re: Flac help-Sector alignment
Post by: JasonSobel on January 22, 2007, 03:29:48 PM
What do you mean trim off the end in cdwave? I've just encountered for the first time, SBEs when encoding wavs to flacs using cdwave and flacfrontend. Not sure what I did to cause this. Used Audacity to edit file at 16/44.1 and exported as wav file. Tracked files in cdwave, then encoded in FFE and checked "align on sector boundries" and the last file of set one had SBEs as well as the remaining files.

from the CD Wave FAQ:

"the last file of a set may also be not aligned, because the original data wasn't, and CDWave does not add extra padding data to the file."

basically, unless the original file that you are starting with end perfectly on a multiple of 588 samples (i.e. 1/75th of a second, i.e. one CD sector), the last file of a set isn't going to end of a Sector Boundary.

a simple way to avoid this is to cut off a little bit a the set, could be less than a second.  then throw away this junk track.  all the previous tracks will then be cut perfectly on cd sector boundaries.  so that explains why the last song of the set had SBE's.  all of the remaining files did NOT have SBE's to begin with, but once it finds a file that needs to be fixed, all the rest following them will be affected.  here's an example:  assume 4 songs per set, and each set takes up a whole CD.

d1t01 - fine
d1t02 - fine
d1t03 - fine
d1t04 - SBE
d2t01 - fine
d2t02 - fine
d2t03 - fine
d2t04 - fine

how the programs fix a SBE is to take a tiny portion of the audio from the next track, in this case d2t01, and fill up the last sector of the previous track with that data.  it basically shifts a tiny portion of data from d2t01 to the d1t04 file.  ok, so now d1t04 is fixed, but by taking the audio data from d2t01, now that one ends with an incomplete sector, so it takes a tiny portion of audio from the beginning of the next track d2t02 to fill up the last sector of d2t01.  but now d2t02 ends with an incomplete sector, etc, etc, etc...

does this help explain it?
Title: Re: Flac help-Sector alignment
Post by: panther65 on January 22, 2007, 04:00:09 PM
Wow, thanks for that detailed explaination. Once flacfrontend detects these errors, are they then fixed at the end of the encoding process?
Title: Re: Flac help-Sector alignment
Post by: terrapinj on January 23, 2007, 12:41:50 PM
Wow, thanks for that detailed explaination. Once flacfrontend detects these errors, are they then fixed at the end of the encoding process?

as long as you check the box to Align on Sector Boundaries
Title: Re: Flac help-Sector alignment
Post by: F.O.Bean on January 23, 2007, 07:01:31 PM
Wow, thanks for that detailed explaination. Once flacfrontend detects these errors, are they then fixed at the end of the encoding process?

as long as you check the box to Align on Sector Boundaries

yep, once encoded, the SBE's are history. gone forever. you can decode/encode again as many times as you want and still get the same fingerprint :)
Title: Re: Flac help-Sector alignment
Post by: dnsacks on January 23, 2007, 07:06:30 PM
just be sure that the files are loaded into the flac frontend in proper playback order (i.e. d1t1, d1t2, d1t3, etc.) as the flac program will use that order to carry over the non-compliant samples.  If the files aren't in proper playback order (say d1t1, d2t3, d1t2), you'd be carrying the non-compliant samples from d1t1 over to d2t3.

Title: Re: Flac help-Sector alignment
Post by: Teen Wolf Blitzer on January 25, 2007, 12:48:17 AM
Hmm.  I read somewhere that the only box you should check in frontend is verify.  Leave all others blank.  ( I have no idea where I read it but I did) That's what's Ive always done.  I track in cdwav and snip off the beginning and ends and I shntool check the files and they always checkout so I'm going with it.
Title: Re: Flac help-Sector alignment
Post by: F.O.Bean on January 25, 2007, 01:23:24 AM
Hmm.  I read somewhere that the only box you should check in frontend is verify.  Leave all others blank.  ( I have no idea where I read it but I did) That's what's Ive always done.  I track in cdwav and snip off the beginning and ends and I shntool check the files and they always checkout so I'm going with it.

for awhile the sector align in frontend wasnt correctly adapted, but maybe since 2003-2004 its been rock solid, according to mike wren :)