View Full Version : Foobar conversion or shntool conversion?

2005-03-17, 07:19 PM
Hi all,

I have been reading the FAQ and this forum for a while, and I have come to what I consider a good grasp of foobar and shntool. The SHN to FLAC conversion tutorial was especially helpful. :clap:

However, I feel swamped with all the different methods of converting that are available. I have decided to convert all my SHNs to FLAC format eventually for the sake of easy fingerprinting and superior compression. A quick len check has revealed that many of my SHNs have SBEs. Now I am left with a dilemma. If I convert with foobar, I will be left with the SBEs. I can either use shntool -fix to convert to FLAC then use FlacFrontend to create fingerprints, or I can use shntool -conv to WAV, and use FlacFrontend with align on sector boundries to get my FLACS.

Is one of these ways "the best way"?

Thanks in advance.

PS. Is there a way to make shntool -fix just overwrite the old files instead of giving me the annoying -fixed suffixes?

2005-03-17, 07:25 PM
I'm sure there will be other more technical suggestions, but convert SHN to FLAC using foobar200, then use Traders Little Helper to easily fix the SBE's.

As far as the "fixed" name - pretty simple to right click > rename > and erase the "fixed" part

2005-03-17, 07:29 PM
convert, bit-verify (can be done with either foobar or shntool), then fix the SBEs. Fixing the SBEs with SHNtool/Trader's Little Helper/BatchEnc will be faster than doing it with FLAC frontend but is a tiny bit trickier. Notate everything you did in the info file.

2005-03-17, 08:49 PM
Convert from SHN to sector aligned FLAC files all in one step with shntool.

I use a simple batch file to create the fingerprint. It's simple because you just drag 'n' drop the folder containing your new flacs onto the batch file and voila it produces a fingerprint file for you in the folder. Here's the batch file I use:

@<hidden> off
%~d1 & cd "%~1"
for %%F in (*.flac) do metaflac --show-md5sum --with-filename "%%F" >> "%~n1-ffp.txt"

Yeah you might want to remove the '-fixed.' part from the files first, but it doesn't hurt to leave that there as a reminder that they were fixed.

I know many ppl here think you need to bit verify your flac files against your original shn files but that's really not necessary.

2005-03-20, 02:34 PM
Thanks for the help.

So the batch file to convert from SHN to sector aligned FLAC should be:

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

Is that right?

2005-03-20, 09:12 PM
It's been said numerous times that, unfortunately, a proper fix of a set of faulty shns can rarely be done by a simple batch file such as this. See this thread (http://www.thetradersden.org/forums/showthread.php?t=3859) for details.

2005-03-21, 01:38 PM
Convert from SHN to sector aligned FLAC files all in one step with shntool.

You don't mean use a batch file? How else is there to do it "all in one step"? :hmm:

2005-03-21, 01:54 PM
I think what uhclem is saying is that sometimes it takes more than one step. Please, please read this thread:

2005-03-21, 05:01 PM
I have read that thread, and I must be missing something because I don't see how that discussion applies to my question. After looking around, I have seen a few posts which state that one should not use batch files for fixing SBEs, but I have not seen one that explains what one should use. Can anyone point me towards this?

2005-03-21, 05:22 PM
I thought I had posted an answer earlier today but it seems to have mysteriously disappeared. So I will try again.

dancin_carrot, when I said don't use a batch file what I meant was don't try to create a single one-size-fits-all batch file for fixing each and every set that has SBEs. This is not a good idea for the reasons I discussed in the thread that Five linked to. Yes you are missing something, so please read it again.

By 'all in one step' I meant use shntool with the -o argument to produce output in whatever format you want (i.e. one step), instead of decompressing to wav then fixing the SBEs by converting to FLAC with FLAC frontend (which is two steps).

Here are your options for fixing SBEs with shntool:

1. Use the command line
2. Create a custom batch file for fixing the specific set of files in question. This was my preferred method until the advent of BatchEnc and TLH
3. Use a frontend such as BatchEnc or TLH

You should use one of the above. Pick whichever one you like best.

2005-03-21, 05:43 PM
The biggest problem that many people have using shntool is that they want to fix only a portion of the files in a directory at one time, which means using a simple wildcard like *.shn won't work because that will fix ALL the files.
so the gist of it is that you should be sensitive towards where the set breaks are and pad the last track of each set with silence. If you just run a batch file blindly over an entire show with multiple sets you will often end up a little piece of the second set being carried over to the first set and a little piece of the third set being carried over to the second and so on. Let's say that an opening set takes up the 1st cd and fades out at the end then the 2nd set starts at the beginning of the 2nd cd in that case you would want to pad the end of the first cd with silence rather than carrying over a little fragment of the beginning of the 2nd disc to the end of the first disc. If the 2nd set starts immediately with cheering it would just sound like a pop at the end of the 1st disc.

However, if the show is continuous from the end of disc one to the beginning of disc two you would want to carry over that little piece from the beginning of the 2nd disc rather than padding with silence.

Uhclem made a much more eloquent post on this topic in another thread somewhere, I thought it was in the thread linked above but it wasn't so sorry for the confusion.

If you don't see where I'm coming from I'll try to explain it better or perhaps we could persuade uhclem to post his recipie for fixing SBEs again...

2005-03-21, 05:58 PM
oh, and it's also worth mentioning to be very careful when running shntool on part of a show to add the correct tracks adjacent to the ones with the SBEs...

2005-03-23, 01:57 PM
A-ha.. I get it now. So the thing we have to watch our for, and the reason we shouldn't use one batch file for fixing shows, is the presence of set breaks. We can however, once we have the proper files selected using one of the frontends, convert straight to our preferred format while fixing the SBEs.

Thanks to uhclem and Five for your help.

2005-03-24, 04:26 PM
As for removing the -fixed from filenames, I'd suggest you use Lupas Rename - a very handy batch-renaming tool for Windows:


One little tip that had me stumped initially - after you've got the files how you want them, to actually perform the renaming you have to click on the exclamation mark [roughly top middle/rightish of the GUI window].

This really is an excellent program, with a realtime preview as you're constructing your filenames.

2005-03-29, 10:10 PM
Thanks for that link direwolf. I tried it out and it works great, just what I needed.