View Full Version : format-independent SBE detection with foobar2000

2004-12-11, 07:26 PM
(copied from the Foobar2000 SHN > FLAC Conversion: A Visual Guide thread - I thought people might find this useful :))

SBE checking code for foobar2000

To add file format independent SBE indication to your playlist, append the following code to your playlist formatting string (Preferences -> Display -> Title formatting, Playlist tab):


The result looks kinda like this:
http://img106.exs.cx/img106/4883/fb2ksbe5wa.th.png (http://img106.exs.cx/my.php?loc=img106&image=fb2ksbe5wa.png)

Tracks with a red number after the playing time have an SBE. For example, in the screenshot above, only the Stolen Ogre tracks have SBEs.

Some tech details on the numbers: The number displayed says how many samples would fall in the last sector of this track when burning it on cd. So if it says 587, the track is just one sample shy of sector alignment, while 325 would mean that 263 samples are missing (or that there are 325 too many, depending on how you look at it ;))

note the nifty PacMan progress bar :D

2004-12-11, 08:21 PM
Hey, great idea! I just put in a slightly varied version of what you just did...made the tracklength green if it's SB aligned and red if it's not. Show's what one can do with a bit of ingenuity.

2004-12-11, 10:28 PM
bloody brilliant! :clap:

2004-12-17, 07:33 AM
great information, another good point for foobar!
now, this leads me to another question: fixing can be done with shntool, so far thats ok with me, but how to fix if shntool wont run on my pc? (note: i use w2000, i think it depend on the "emulated" dos mode...) will a replaygain with foobar solve this or must i work on every file with cdwave or another wave-editor? or is burning with feurio a better way? :confused:

2004-12-17, 07:38 AM
shntool works fine on NTs DOS emulator....

Replaygain has absolutely nothing to do with sector boundaries. It is just a value for adjusting the volume during playback to bring the output into "normal" range.

2004-12-17, 07:55 AM
thx for the fast answer ... i tried shntool once more, but it opens and is closed one second later ... replaygain wont work, as you said, what about working on the files with a waveeditor?

2004-12-17, 08:05 AM
What are you doing to use shntool? A lot of people have issues with it, but it's always because it's not setup properly.

Have you read through the shntool guides I have at www.audiophilia.net?

Also, note that I have a standalone program that is going to act as a frontend and proper installer for shntool and related programs that I've coded, though it's a few weeks away from being a reasonably effective "beta" product. If you can't get shntool running, and can be patient while I put a few touches on this thing, you'll have a nice way to use shntool without needing command line at all.

Finally, the only two other ways I can think of correct SBEs are to combine the whole show into a single wav file and split it up with CDWav or to decode to wav and use FLAC Frontend (make sure you have the newest version) to compress back to FLAC using the "sector align" option.

If you need help checking your shntool setup after reading the pages I setup, feel free to PM me.

2004-12-17, 08:13 AM
so youre the guy who coded the audiophilia stuff, wow ... before annoying you with more dump questions ( :) ), ill read your shntoolguides, maybe i can set it up then, would be easier for both of us ...

but thx, if i cant get it to work, ill send you a pm