PDA

View Full Version : Fixing SBEs with shntool


irishcrazy2005
2005-01-20, 12:54 AM
Okay guys, I am a newbie at working with shntool and checking for/fixing SBEs. I ran the -len command on the folder, and it shows a -b- in the CDR column for the last track. When I try to fix it with the -fix command, it tells me "error: need two or more files to process." Is it normal to have a -b- in last track? How do I fix it if it is not? Thanks for the help.

-Phil

RainDawg
2005-01-20, 12:59 PM
shntool will not fix a set of files the only SB that exists is in the last track. Obviously, when burned to a CD, the resultant gap that it will write to the end of this track will not be noticed. Personally, I prefer to fix these because I consider have SBs on a any track to be bad practice. shntool will do with the the pad -postpad command, performed only on the track in question.

I believe there is an option that can be added to the -fix command that will force it to pad the final track if it's the only one containing an SBE, but I use -pad for that so don't know from the top of my head.

uhclem
2005-01-20, 03:31 PM
You can tell shntool to fix the entire set and it will fix just the last track. I don't think you need to use the -noskip option but try it if the regular way doesn't work. But if you know it's just the last track I personally prefer the -pad argument as suggested by RainDawg

Q: Why are you concerned with fixing this last track? My view is that if all you are doing is archiving or burning files that you got from someone else just leave the last track as it is. An SBE on the very last track doesn't matter. BUT if you made these files yourself from wav files then it's good practice to get rid of that SBE even on the last track before you spread it around. It saves newbs like yourself the trouble of wondering what to do about it later.

irishcrazy2005
2005-01-20, 03:47 PM
You can tell shntool to fix the entire set and it will fix just the last track. I don't think you need to use the -noskip option but try it if the regular way doesn't work. But if you know it's just the last track I personally prefer the -pad argument as suggested by RainDawg

Q: Why are you concerned with fixing this last track? My view is that if all you are doing is archiving or burning files that you got from someone else just leave the last track as it is. An SBE on the very last track doesn't matter. BUT if you made these files yourself from wav files then it's good practice to get rid of that SBE even on the last track before you spread it around. It saves newbs like yourself the trouble of wondering what to do about it later.

Thanks for the info from both you and RainDawg. Like I said, I have never dealt with SBEs before, so that is why I was concerned about seening one at all. I figured that it didn't matter, but I wanted to be sure. I'm at work right now, but when I get home I will try the -pad command. Thanks again.

-Phil

bobs23
2005-01-20, 05:01 PM
How I have gotten around this is: I use Soundforge to do the processing, and I always add 3 sec of silence at the end. Then track in CDwave. I like to leave 2 sec of silence at the end. so I split 1 sec from the end of the file and then put the whole file to shnfix then delete the last 1 sec track. May not be perfect, but it works.

uhclem
2005-01-20, 05:36 PM
bobs, I don't completely understand your method, and since you are using shntool already you don't need to do it this way, i.e. you don't need to create a 1 sec track at the end.

In -fix mode shntool will automatically pad the last track if it needs it. Just add the 2 sec of silence at the end of the last track the way you like it, then run shntool over each musical set of files in -fix mode and it will fix the last track for you. Shntool takes wildcards, e.g. *.wav

But if you are confident that soundforge is cutting the tracks along sector boundaries and the issue is simply that the last track needs a little padding, then definitely just use -pad mode on the last track. The syntax would be:

shntool pad -postpad -o wav {filename}

New Homebrew
2005-01-20, 05:53 PM
FLAC frontend will add the necessary samples to the last track if you check "align on sector boundaries".

From CDWave, just save as wav files. Then encode to FLAC using FLAC Frontend with align sector boundaries checked off. That will take care of the last track so you don't have to try to shave it...

bobs23
2005-01-20, 09:37 PM
After a couple of discussions with the soundforge people, you can only get it to mark on the zero cross which is not always the sector boundry. I did some tests and the best I could get was about 60% correct. I put the 2 seconds of silence after the last track mostly for personal preferance, I just don't like having the last track end and the disc just jumps out. When I use shntool without the false ending, it doesn't fix the error on the end of the last track. Some people get tweaked about it. I'm most certainly not saying this method is gospel, it just works for me.

uhclem
2005-01-20, 11:02 PM
If soundforge can't cut along sector boundaries except by accident, I'd definitely use different software for cutting the wave file into tracks, e.g. CDWave.

Shntool can fix the last track even if it's the only track with an SBE. If it's not doing it, then you are probably doing something wrong. What mode and arguments do you use? Maybe if you can provide an example we could help.

RainDawg
2005-01-21, 09:03 AM
I agree....if Sound Forge is not reliably cutting on SBs, then just don't use it for that purpose. It sounds like you are performing quite a few more uncomfortable processes than is necessary. If you want to use SoundForge to track, then simply cut it how you want, with the additional silence at the end, and then run -fix on each set, knowing you'll have SBs on the tracks.

NINJA
2005-01-21, 09:09 AM
I agree....if Sound Forge is not reliably cutting on SBs, then just don't use it for that purpose. It sounds like you are performing quite a few more uncomfortable processes than is necessary. If you want to use SoundForge to track, then simply cut it how you want, with the additional silence at the end, and then run -fix on each set, knowing you'll have SBs on the tracks.


I USE CD ARCHITECH FOR TRACKING

MAKE ONE BIG WAV FILE IN SOUND FORGE

LOAD IT CD ARCHITECH TRACK AND BURN WITH CD ARCHITECH AND NO SBE'S

NO NEED TO CUT TRACKS INTO SEPERATE FILES

I CAN NEVER UNDERSTAND WHY SOMEONE WOULD WANT TO HAVE SEPERATE WAV FILES ? ONLY TO REASEMBLE THEM AGAIN TO BURN THE CD ?

NINJA
2005-01-21, 09:11 AM
I agree....if Sound Forge is not reliably cutting on SBs, then just don't use it for that purpose. It sounds like you are performing quite a few more uncomfortable processes than is necessary. If you want to use SoundForge to track, then simply cut it how you want, with the additional silence at the end, and then run -fix on each set, knowing you'll have SBs on the tracks.


SOUND FORGE IS A EDITING PROGRAM NOT FOR BURNING THATS WHY

IT IS NOT CONCERNED WITH SBE'S


CD ARCHITECH ON THE OTHER HAND IS FOR BURNING AND WILL AUTOMATICALLY CUT AT THE PROPER SECTOR BOUNDRIES

AT LEAST THATS BEEN MY EXPERIANCE

NINJA
2005-01-21, 09:13 AM
If soundforge can't cut along sector boundaries except by accident, I'd definitely use different software for cutting the wave file into tracks, e.g. CDWave.

Shntool can fix the last track even if it's the only track with an SBE. If it's not doing it, then you are probably doing something wrong. What mode and arguments do you use? Maybe if you can provide an example we could help.



ID SAY THAT IF YOU HAVE TO CUT YOUR WAV FILE UP

YOU NEED BETTER CD BURNER SOFTWARE

RainDawg
2005-01-21, 09:30 AM
I CAN NEVER UNDERSTAND WHY SOMEONE WOULD WANT TO HAVE SEPERATE WAV FILES ? ONLY TO REASEMBLE THEM AGAIN TO BURN THE CD ?
Because many people, myself included, never ever burn to CD. You're assuming that people store their music on CD, but I have not burned an audio CD is almost two years now. FLAC is simply the way go.

It could be argued that since I never even make audio CDs, that worrying about SBs is pointless anyway, but I worry about it only becauce it's bad practice to trade or seed to others files that are misaligned. If I had my way, no one would burn audio discs anymore, we'd all keep things in the much safer FLAC format, and no one would have to even think about all this SBE crap.

bobs23
2005-01-21, 10:22 AM
I do only use SF for WAV processing. I use CDWave for tracking. I'll give my cmd line syntax when I get home from work. I am assuming that I can add -pad to the end of the -fix cmd. CD arch. is a good program, I had it on trial for a while but I couldn't see paying $100 for it when cdwave is free. The only problem with my method is I end up with a file for the raw wave, processed wave, and the tracked wave.

Jskibum
2005-01-21, 11:12 AM
Until I get the hard disc player for my car, I'll keep burning away. Glad you don't have your way!

RainDawg
2005-01-21, 11:25 AM
Yes, you could certainly make a batch file with -pad after -fix. If the -fix is used, it will automatically pad the final track by defualt (unless you disable it) and thus the pad won't do anything. If only the last track has an SBE, then fix won't do anything which will leave pad to fix it. As long as you write the batch file with the switches setup correctly, there's no reason this won't reliably fix any set, regardless of where and how many SBEs are present.

RainDawg
2005-01-21, 11:27 AM
Until I get the hard disc player for my car, I'll keep burning away. Glad you don't have your way!
LOL...I'm being somewhat tongue in cheek here. My response was really meant to insinuate that it's not a forgone conclusion that someone is going to be burning things to a CD at all.

In a perfect world though..... ;).

uhclem
2005-01-21, 11:45 AM
In re-reading these posts I note that bobs did mention way back that he uses CDwave to cut his tracks, so I'm a tad puzzled as to why he brought up the issue of cutting tracks with soundforge.

As for Ninja, I think he's misunderstood the issue. As I read it, bobs wants to cut up the wave file for compression and seeding purposes, not merely to burn an audio CD. If all bobs wanted to do was burn an audio CD then I would agree that cutting wave file first into separate tracks is totally unnecessary. But, again, I don't think that's what he's talking about.

What I think it comes down to is bobs needs a little help using shntool. RainDawg and I are agreed that shntool in fix mode will fix all SBEs in a set of audio files, even if the SBE is only on the very last track. You don't need to use the -pad argument with fix mode as fix mode pads by default.

bobs23
2005-01-21, 02:51 PM
The SF comment was only to state that you shouldn't use it for tracking. When I get home from work I'll post my batch file. More than likely it's a bit off. I'm actaully a bit shocked I got it to work in the first place. In looking at the tutorials I can see it's a very powerful program with many uses, with me in the middle of TV season I get very little time to play. It has been a looong time since I have done anything remotely related to DOS.

bobs23
2005-01-21, 08:47 PM
Here is my fix batch file:
@<hidden> off
%~d1 & cd %*
for %%T in (shn flac wav ape) do if exist *.%%T shntool fix *.%%T
pause

What should I add to pad the last file?

uhclem
2005-01-22, 11:49 AM
bobs, I don't see anything wrong with this code. In fact, it looks eerily familiar to me as some code I once wrote and posted at STG for use with len mode.

As I posted above, shntool in fix mode pads the last track by default so you don't need to put anything in there to get it to pad.

I think we need some more information. Could you tell us what shntool actually says when it fixes a set that has an sbe on the last track?

As an aside, I would suggest the following:
- Put quotes around every *.%%T just in case your interpreter has trouble with spaces in filenames (which is a no no for audio trading anyway, but it happens).
- Using a batchfile for fix mode is risky because you might not always want the entire set of files treated as one set if the music is actually say 2 sets. Do keep that in mind.
- This batchfile will always output into wave format. I'm not sure that's what you really want when fixing shn, flac or ape. As I said I have a sneaking suspicion that I am the original author of this code, but I wrote it only for len mode, and someone has adapted it to fix mode, for which it was not really intended.

irishcrazy2005
2005-01-22, 12:29 PM
Okay, so I've now fixed all of my shows which had SBEs. I made a note in the text file that says "Fixed Sector Boundary Errors with shntool 2.0.3," and I made new fingerprint files for each of these. Is there anything else that I need to do before trading these?

-Phil

RainDawg
2005-01-23, 01:30 PM
Here is my fix batch file:
@<hidden> off
%~d1 & cd %*
for %%T in (shn flac wav ape) do if exist *.%%T shntool fix *.%%T
pause

What should I add to pad the last file?

Yes, just reading through the shntool documentation (I'm sure you'll all done this, right ;)) reveals that the fix command contains a special switch called -noskip. I've not tried it yet, but this should pad the final track with silence regardless of whether or not there are other SBEs in the set.

So, the code would look like this:

@<hidden> off
%~d1 & cd %*
for %%T in (shn flac wav ape) do if exist *.%%T shntool fix -noskip *.%%T
pause

I've not given it a whirl yet, please let me know how it works on sets with multiple SBEs and on sets with only a SBE on the final track.

bobs23
2005-01-23, 11:43 PM
OK here's something whacky. I pasted the above cmd. to a new batch file and it crashed all my other batches. I deleated this one and everything esle started working again :hmm: Now on a sidebar. I tried to do a print screen. I did it 2 ways. first I just hit print scren, then alt. print screen. I opened photoshop and thought I should just paste into a new window, but it was a no go. Is there something I'm missing? I was trying to show my batch file results.

uhclem
2005-01-23, 11:53 PM
Yes, just reading through the shntool documentation (I'm sure you'll all done this, right ;)) reveals that the fix command contains a special switch called -noskip. I've not tried it yet, but this should pad the final track with silence regardless of whether or not there are other SBEs in the set.

So, the code would look like this:

@<hidden> off
%~d1 & cd %*
for %%T in (shn flac wav ape) do if exist *.%%T shntool fix -noskip *.%%T
pause

I've not given it a whirl yet, please let me know how it works on sets with multiple SBEs and on sets with only a SBE on the final track.

I refreshed my memory on this, and the real purpose of the -noskip switch is for when your output format is different from your input format. Since by default shntool only fixes files that actually need it, if you run shntool on say wave files and want flac output you should use the -noskip argument otherwise only the files that are actually fixed will end up as flac, and you will then have to convert the remaining files to flac using another process. This is a waste of time, so -noskip tells shntool to convert every file, not just the ones that need fixing.

What this means is you do not need to use the -noskip argument just because only the last track has an SBE. As I've said before, provided you give shntool at least two files to work on (including the flawed last track) in fix mode, it will fix the sbe on the last track.