PDA

View Full Version : Foobar2000 SHN > FLAC Conversion: A Visual Guide


Five
2004-12-02, 03:52 AM
Here's the visual tutorial based on (and quoting from) these threads:
http://www.thetradersden.org/forums/showthread.php?t=761
http://www.thetradersden.org/forums/showthread.php?t=928

Lemmieknow what you think.

SHN to FLAC Conversions Using Foobar2000

First off, special thanks to RainDawg who wrote much of the text included here and gave me the knowledge to create this visual tutorial.

As for converting, it is acceptable and encouraged to convert SHN to FLAC, as the former is an outdated and obsolete codec. FLAC has numerous advantages, and you can read a little more about the major differences in the FAQ's audio types and descriptions entry:
http://www.thetradersden.org/forums...o#faq_filetypes

Foobar2000 Installation and Configuration

Now, foobar2000 is the complete solution to PLAYING your files, but you may not realize that it comes with an enormous amount of plugins that help you do everything else with those files too. First, make sure you've got the Special Installer version 0.8.3 (http://foobar2000.org/) (the most complete and up to date version) from the foobar2000 blogiste.

When you install this program, make sure you include all of the plugins (some may not be useful to you, but they are all fun to play with and learn what options are out there). This will make sure that you have the diskwriter plugin, which will allow you to do direct file conversions.

When the foobar2000 installer promts you to select installation type, select "Full".

http://img57.exs.cx/img57/9166/foobar_fullinstallation.th.gif (http://img57.exs.cx/img57/9166/foobar_fullinstallation.gif)

The next thing you need to do is configure foobar2000. Go to Foobar2000>Preferences.

http://img57.exs.cx/img57/9728/selectpreferences.th.gif (http://img57.exs.cx/img57/9728/selectpreferences.gif)

On the left, click on "Diskwriter". Under "Output presets" press the "Add new" button. A new window will appear with the title "Select file writer". Select FLAC.

http://img64.exs.cx/img64/8889/add_preset_select_flac.th.gif (http://img64.exs.cx/img64/8889/add_preset_select_flac.gif)

A new window will appear with the title "FLAC encoding settings". Set "Compression level" to 8. Since FLAC decompresses at the same speed no matter what the compression setting is during encoding, it is best to encode your FLACs with the maximum available compression.

The padding is a certain amount of space left at the beginning of the file, before the audio portion, for adding tags (aka Vorbis comments). You can force this to be something other than the default 4096, but it's not recommended. What creating this default space does is allow people to add and edit tags without having to rewrite the entire file....

Unles you're putting a sick amount of information (pages of text for a single track) the 4096 should be plenty. Of couse, it's awfully rude to decrease this value as people who download your seeds WILL want the freedom to add whatever tags they choose.

Click "OK".

http://img64.exs.cx/img64/7311/flac_compression_settings.th.gif (http://img64.exs.cx/img64/7311/flac_compression_settings.gif)

Next, configure foobar2000 so that filenames aren't changed and the output is in the same directory as the source files. Set "Output directory" to "Same as source file directory" and under "Output file name formatting put "%_filename%" (no quotes). More formatting options can be found here (http://www.foobar2000.net/titleformat_help.html).

Your diskwriter preferences should appear as below. Click "Save all".

http://img64.exs.cx/img64/3694/flac_save_all.th.gif (http://img64.exs.cx/img64/3694/flac_save_all.gif)

foobar2000 is now installed and configured for the conversion.

Conversion

Before starting the conversion, check the md5s using md5summer (http://www.md5summer.org) or similar program. All files must be "OK".

http://img103.exs.cx/img103/6590/md5summer.th.gif (http://img103.exs.cx/img103/6590/md5summer.gif)

Now rename the .md5 file in a way that reflects that it is only associated with the old SHN files. I usually add "shn_" to the beginning of the filename. Do not delete this file. It can be useful as another means to identify which version of the show this is. Do not edit this file other than the filename.

Now you are almost ready to begin conversion. This is a good time to fix spelling mistakes, rename your files to etree format, add a zero before the track numbers 1-9, etc. When you're done, drag and drop all of the SHN files into foobar2000.

http://img64.exs.cx/img64/5099/dragndropshns.th.gif (http://img64.exs.cx/img64/5099/dragndropshns.gif)

Press Ctrl + A to select all files, then right-click on one of the files and select Convert>Run conversion.

http://img64.exs.cx/img64/3305/runconversion.th.gif (http://img64.exs.cx/img64/3305/runconversion.gif)

A new window will appear with the title "Select file writer preset". FLAC : compression level 8, 4096 bytes padding should be the default setting, if not then select it from the drop-down menu and click "OK".

http://img68.exs.cx/img68/7493/selectfilewriterpreset.th.gif (http://img68.exs.cx/img68/7493/selectfilewriterpreset.gif)

A progress window will appear. This will take a few minutes.

http://img68.exs.cx/img68/1356/converting.gif

Bit-compare

When the conversion is finished, select all of the newly-created FLACs and drag and drop them into foobar2000 together with the SHNs which are still there.

http://img68.exs.cx/img68/5251/addconvertedfiles.th.gif (http://img68.exs.cx/img68/5251/addconvertedfiles.gif)

At this point you should have the complete SHN and FLAC sets in foobar2000's playlist. Do some simple math... in my example I have 14 SHNs + 14 FLACs = 28 files in foobar2000... yup, we're ready to start. Select all (Ctrl + A), right-click and select "Bit-compare tracks..."

http://img68.exs.cx/img68/9039/bit-compare.th.gif (http://img68.exs.cx/img68/9039/bit-compare.gif)

First time you will see some one-time information. Click "OK".

http://img99.exs.cx/img99/6233/bitcompareonetime.gif

A progress bar will appear, as well as the Console window. Wait a few minutes for it to finish.

http://img99.exs.cx/img99/3163/comparingfiles.gif

Now it's time to check the results:

INFO (foo_bitcompare) : Comparing:
INFO (foo_bitcompare) : location: "file://D:\sp1992-09-12.flac16\sp1992-09-12d1t01.shn" (0)
INFO (foo_bitcompare) : location: "file://D:\sp1992-09-12.flac16\sp1992-09-12d1t01.flac" (0)
INFO (foo_shn) : cannot find / read external metadata tag file
INFO (foo_shn) : internal seektable will be used.
INFO (foo_bitcompare) : No differences in decoded data found.
INFO (foo_bitcompare) : Finished successfully.
INFO (foo_bitcompare) : Comparing:
INFO (foo_bitcompare) : location: "file://D:\sp1992-09-12.flac16\sp1992-09-12d1t02.shn" (0)
INFO (foo_bitcompare) : location: "file://D:\sp1992-09-12.flac16\sp1992-09-12d1t02.flac" (0)
INFO (foo_shn) : cannot find / read external metadata tag file
INFO (foo_shn) : internal seektable will be used.
INFO (foo_bitcompare) : No differences in decoded data found.
INFO (foo_bitcompare) : Finished successfully.
INFO (foo_bitcompare) : Comparing:
INFO (foo_bitcompare) : location: "file://D:\sp1992-09-12.flac16\sp1992-09-12d1t03.shn" (0)
INFO (foo_bitcompare) : location: "file://D:\sp1992-09-12.flac16\sp1992-09-12d1t03.flac" (0)
INFO (foo_shn) : cannot find / read external metadata tag file
INFO (foo_shn) : internal seektable will be used.
INFO (foo_bitcompare) : No differences in decoded data found.
INFO (foo_bitcompare) : Finished successfully.
INFO (foo_bitcompare) : Comparing:
INFO (foo_bitcompare) : location: "file://D:\sp1992-09-12.flac16\sp1992-09-12d1t04.shn" (0)
INFO (foo_bitcompare) : location: "file://D:\sp1992-09-12.flac16\sp1992-09-12d1t04.flac" (0)
INFO (foo_shn) : cannot find / read external metadata tag file
INFO (foo_shn) : internal seektable will be used.
INFO (foo_bitcompare) : No differences in decoded data found.
INFO (foo_bitcompare) : Finished successfully.
INFO (foo_bitcompare) : Comparing:
INFO (foo_bitcompare) : location: "file://D:\sp1992-09-12.flac16\sp1992-09-12d1t05.shn" (0)
INFO (foo_bitcompare) : location: "file://D:\sp1992-09-12.flac16\sp1992-09-12d1t05.flac" (0)
INFO (foo_shn) : cannot find / read external metadata tag file
INFO (foo_shn) : internal seektable will be used.
INFO (foo_bitcompare) : No differences in decoded data found.
INFO (foo_bitcompare) : Finished successfully.
INFO (foo_bitcompare) : Comparing:
INFO (foo_bitcompare) : location: "file://D:\sp1992-09-12.flac16\sp1992-09-12d1t06.shn" (0)
INFO (foo_bitcompare) : location: "file://D:\sp1992-09-12.flac16\sp1992-09-12d1t06.flac" (0)
INFO (foo_shn) : cannot find / read external metadata tag file
INFO (foo_shn) : internal seektable will be used.
INFO (foo_bitcompare) : No differences in decoded data found.
INFO (foo_bitcompare) : Finished successfully.
INFO (foo_bitcompare) : Comparing:
INFO (foo_bitcompare) : location: "file://D:\sp1992-09-12.flac16\sp1992-09-12d1t07.shn" (0)
INFO (foo_bitcompare) : location: "file://D:\sp1992-09-12.flac16\sp1992-09-12d1t07.flac" (0)
INFO (foo_shn) : cannot find / read external metadata tag file
INFO (foo_shn) : internal seektable will be used.
INFO (foo_bitcompare) : No differences in decoded data found.
INFO (foo_bitcompare) : Finished successfully.
INFO (foo_bitcompare) : Comparing:
INFO (foo_bitcompare) : location: "file://D:\sp1992-09-12.flac16\sp1992-09-12d1t08.shn" (0)
INFO (foo_bitcompare) : location: "file://D:\sp1992-09-12.flac16\sp1992-09-12d1t08.flac" (0)
INFO (foo_shn) : cannot find / read external metadata tag file
INFO (foo_shn) : internal seektable will be used.
INFO (foo_bitcompare) : No differences in decoded data found.
INFO (foo_bitcompare) : Finished successfully.
INFO (foo_bitcompare) : Comparing:
INFO (foo_bitcompare) : location: "file://D:\sp1992-09-12.flac16\sp1992-09-12d1t09.shn" (0)
INFO (foo_bitcompare) : location: "file://D:\sp1992-09-12.flac16\sp1992-09-12d1t09.flac" (0)
INFO (foo_shn) : cannot find / read external metadata tag file
INFO (foo_shn) : internal seektable will be used.
INFO (foo_bitcompare) : No differences in decoded data found.
INFO (foo_bitcompare) : Finished successfully.
INFO (foo_bitcompare) : Comparing:
INFO (foo_bitcompare) : location: "file://D:\sp1992-09-12.flac16\sp1992-09-12d1t10.shn" (0)
INFO (foo_bitcompare) : location: "file://D:\sp1992-09-12.flac16\sp1992-09-12d1t10.flac" (0)
INFO (foo_shn) : cannot find / read external metadata tag file
INFO (foo_shn) : internal seektable will be used.
INFO (foo_bitcompare) : No differences in decoded data found.
INFO (foo_bitcompare) : Finished successfully.
INFO (foo_bitcompare) : Comparing:
INFO (foo_bitcompare) : location: "file://D:\sp1992-09-12.flac16\sp1992-09-12d1t11.shn" (0)
INFO (foo_bitcompare) : location: "file://D:\sp1992-09-12.flac16\sp1992-09-12d1t11.flac" (0)
INFO (foo_shn) : cannot find / read external metadata tag file
INFO (foo_shn) : internal seektable will be used.
INFO (foo_bitcompare) : No differences in decoded data found.
INFO (foo_bitcompare) : Finished successfully.
INFO (foo_bitcompare) : Comparing:
INFO (foo_bitcompare) : location: "file://D:\sp1992-09-12.flac16\sp1992-09-12d1t12.shn" (0)
INFO (foo_bitcompare) : location: "file://D:\sp1992-09-12.flac16\sp1992-09-12d1t12.flac" (0)
INFO (foo_shn) : cannot find / read external metadata tag file
INFO (foo_shn) : internal seektable will be used.
INFO (foo_bitcompare) : No differences in decoded data found.
INFO (foo_bitcompare) : Finished successfully.
INFO (foo_bitcompare) : Comparing:
INFO (foo_bitcompare) : location: "file://D:\sp1992-09-12.flac16\sp1992-09-12d1t13.shn" (0)
INFO (foo_bitcompare) : location: "file://D:\sp1992-09-12.flac16\sp1992-09-12d1t13.flac" (0)
INFO (foo_shn) : cannot find / read external metadata tag file
INFO (foo_shn) : internal seektable will be used.
INFO (foo_bitcompare) : No differences in decoded data found.
INFO (foo_bitcompare) : Finished successfully.
INFO (foo_bitcompare) : Comparing:
INFO (foo_bitcompare) : location: "file://D:\sp1992-09-12.flac16\sp1992-09-12d1t14.shn" (0)
INFO (foo_bitcompare) : location: "file://D:\sp1992-09-12.flac16\sp1992-09-12d1t14.flac" (0)
INFO (foo_shn) : cannot find / read external metadata tag file
INFO (foo_shn) : internal seektable will be used.
INFO (foo_bitcompare) : No differences in decoded data found.
INFO (foo_bitcompare) : Finished successfully.

Q: Now, it says that there were no differences found, and I'm cool with that.

The part where it says that it cannot find / read external blah blah blah. No seektable loaded, etc.

Is this cause for concern?

A: No cause for concern here. foo_shn is the SHN decoder plugin for foobar2000. This is just giving you a little feedback about the SHN file:

INFO (foo_shn) : cannot find / read external metadata tag file

This means that there is no .tag file associated with the SHN file. Since SHN does not have any inherant support for tagging, foo_shn can write metadeta to a .tag file. This obviously doesn't have one, but that's fine.

INFO (foo_shn) : cannot find / load external seektable file.

Again, foo_shn is looking for either appended to external seektables. It didn't find any, which means that the SHNs are not seekable (in most other players). The line below that, however, shows just one reason why foobar is the best player out there: it is making up for the lack of a seektable by generating one on the fly so that the end user will never have to worry if the original files were seekable or not.

The foo_bitcompare plugin is just telling you which files it is comparing, and then returns the result that no differences were found. You've successfully completed a SHN > FLAC conversion!

The fastest way to check for errors is to look for the word "ERROR" anywhere on the left-hand side of the log. If you only see the word "INFO", then there were no errors. For an example of what an error looks like, I compared two different files and snapped a pic of the Console window:

http://img53.exs.cx/img53/6466/console_error.th.gif (http://img53.exs.cx/img53/6466/console_error.gif)

Don't rely on your machine "beeping". Mine didn't.

So long as there are no errors, feel free to delete the SHN files now.

Fingerprinting and Updating Lineage

So at this point hopefully you've finished your conversion and have finished a successful verification. Congratulations! There is just a little bit more to do.

FLAC fingerprints: Get FLAC frontend (http://www.mikewren.com/flac/) and install it if you haven't already. Drag and drop your new FLAC files into FLAC frontend. It's a nice touch to keep them in the correct order, so grab the set from the first file (circled). Push "Fingerprint".

http://img53.exs.cx/img53/4614/fingerprint.th.gif (http://img53.exs.cx/img53/4614/fingerprint.gif)

Save the generated .txt file in the same folder with the FLACs.

http://img52.exs.cx/img52/1231/saveffp.th.gif (http://img52.exs.cx/img52/1231/saveffp.gif)

If you are feeling paranoid, push the "Test" button to verify your FLACs again using FLAC frontend.

Always include in your lineage how you did to the files what you did. The above example would include:

SHN > foobar2000 0.8.3 (convered and bitverified identical) > FLAC


Note: this will NOT look at, change, or correct any sector boundary issues. If you have SBEs that you need to correct, this needs to be done with shntool. If you run a conversion with FLAC Frontend, there IS an option to correct SBEs, but if the files are in the wrong order in the original window, you're going to have screwed up the entire set.

Feel free to also add tags to your FLAC files:
http://www.thetradersden.org/forums/showthread.php?t=1140

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):

$ifgreater($mod(%_length_samples%,588),0,$rgb(180,90,90,180,90,90)$num($mod(%_length_samples%,588),3),)

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.


note the nifty PacMan progress bar :D

RainDawg
2004-12-02, 07:37 AM
Awesome Five! Thanks for putting this together. I am going to go through and correct some spelling mistakes that were actually mine from the original comments I made in other threads :). Also, I am going to add the link at the top for the Special Installer, which is required if you want diskwriter, bitcompare, and shn all in one easy to install package.

Thanks a lot for putting this up, it looks great and a lot of people should get some use out of it.

Five
2004-12-02, 07:43 AM
:thumbsup

I fixed a couple of the spelling mistakes just now and added a link to the blogsite... fix it up as you see fit just let me know if you do anything drastic.

Andy L
2004-12-02, 11:36 AM
Nice guide there, Five. I never knew that FLAC decompresses at the same speed regardless of compression setting.

Maybe you (i.e. the mods) could make it site policy to include foo_bitcompare logs with a seed whenever a format conversion has been done? If someone is prepared to follow that tutorial through from beginning to end, a quick copy and paste job to a text file wouldn't hurt.

Five
2004-12-02, 04:35 PM
Nice guide there, Five. I never knew that FLAC decompresses at the same speed regardless of compression setting.

Maybe you (i.e. the mods) could make it site policy to include foo_bitcompare logs with a seed whenever a format conversion has been done? If someone is prepared to follow that tutorial through from beginning to end, a quick copy and paste job to a text file wouldn't hurt.
Thanks. I wanted to make something that's as user-friendly as possible with tons of pics. This way hopefully everyone who looks at will will say to themselves "oh, there's even a screenshot showing you how to drag and drop, I can do this!".

As for requiring a foo_bitcompare log this is a great idea I'll think about that. Gotta say, since it requires copying and pasting a lot of data from a small window which can contain data from previous comparisons I'm not sure if everyone would find it easy to comply. When every seed with EAC in the lineage has a log included we can begin to ask for this as well.

feralicious
2004-12-03, 12:58 PM
Thanks Five! Looking forward to trying this out. And using up any free time I thought I would have to go through ALL my shows and convert them when necessary. ;)

Doctor Bob Gordon
2004-12-04, 01:23 AM
Five,

I have problems configuring the output of Diskwriter. After installing FLAC 1.1.1 which includes a new foobar2000 plugin, FLAC no longer appears on the list of file writers, but below Diskwriter on the left. It seems the only way to create a profile for FLAC is using the Legacy 0.7 output...

thanks

dBG

malick
2004-12-05, 02:40 PM
is there a way to check for SBEs from recently downloaded .flac files? The Frontend seems to only allow for that check during encoding.

thanks, and I'll be getting the latest foobar in just a second...

RainDawg
2004-12-05, 02:50 PM
is there a way to check for SBEs from recently downloaded .flac files? The Frontend seems to only allow for that check during encoding.
It actually, it doesn't have a check, it only has an option to correct them if it sees it...no way to preview the results before encoding.

shntool is the only way to do this:
http://www.audiophilia.net/shntool-shnlen.htm

ffooky
2004-12-05, 03:59 PM
Nice guide there, Five. I never knew that FLAC decompresses at the same speed regardless of compression setting.

Maybe you (i.e. the mods) could make it site policy to include foo_bitcompare logs with a seed whenever a format conversion has been done? If someone is prepared to follow that tutorial through from beginning to end, a quick copy and paste job to a text file wouldn't hurt.

I convert from SHN to FLAC with shntool. If you wanted to insist on such a palaver, the policy would have to allow for an shntool-md5 of the original and converted sets as an alternative.

Five
2004-12-05, 05:01 PM
Five,

I have problems configuring the output of Diskwriter. After installing FLAC 1.1.1 which includes a new foobar2000 plugin, FLAC no longer appears on the list of file writers, but below Diskwriter on the left. It seems the only way to create a profile for FLAC is using the Legacy 0.7 output...

thanks

dBG
this is a new one for me... I'm sure this will get worked out by the programmers soon, in the meantime I guess the best thing to do would be 1) check the md5s 2) decompress the SHNs 3) Encode to FLAC with FLAC frontend 4) Drop all the SHNs and FLACs into foobar2000 and do the bit-compare 5) delete the SHNs, generate FFPs, update the info file.

hope this helps

Five
2004-12-05, 05:06 PM
is there a way to check for SBEs from recently downloaded .flac files? The Frontend seems to only allow for that check during encoding.

thanks, and I'll be getting the latest foobar in just a second...
Yes, you'll have to use SHNtool follow the link provided by RainDawg a couple posts up. I should probably add that into the tutorial. Most likely I'll write up another tutorial which encompasses checking for SBEs with or without SHNtool in case some people are still feeling command-line impaired. I'll also have to make a section for mp3-sourced detection, this is only the beginning!

Doctor Bob Gordon
2004-12-05, 05:15 PM
this is a new one for me... I'm sure this will get worked out by the programmers soon, in the meantime I guess the best thing to do would be 1) check the md5s 2) decompress the SHNs 3) Encode to FLAC with FLAC frontend 4) Drop all the SHNs and FLACs into foobar2000 and do the bit-compare 5) delete the SHNs, generate FFPs, update the info file.

hope this helps

Thanks.

dorrcoq
2004-12-05, 08:13 PM
Hi, Jamie - tried this today for the first time, and......IT WORKED! LOL Thanks, man, excellent tutorial.

Dennis

Five
2004-12-05, 09:24 PM
Hi, Jamie - tried this today for the first time, and......IT WORKED! LOL Thanks, man, excellent tutorial.

Dennis
:thumbsup

ssamadhi97
2004-12-11, 08:05 PM
is there a way to check for SBEs from recently downloaded .flac files? The Frontend seems to only allow for that check during encoding.

thanks, and I'll be getting the latest foobar in just a second...

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):

$ifgreater($mod(%_length_samples%,588),0,$rgb(180,90,90,180,90,90)$num($mod(%_length_samples%,588),3),)

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.


note the nifty PacMan progress bar :D

jbeck57143
2004-12-21, 05:16 PM
I just converted some SHNS to FLAC. The SHN file was 740MB, the resultant FLAC file was only 344MB--Everything bit compared okay, but when I converted the flac files to wav one track failed the md5 check. I converted the shn of the same track to wav and that one was okay. The two wavs aren't quite the same size: The one from the flac file is 60,153KB, the one from the SHN (which was okay) is 60,154KB

i have no idea why that is

Jim

RainDawg
2004-12-21, 05:25 PM
99/100 times this is caused by addition data being embedded into the header of the .wav file. FLAC ignores and throws away non-audio data, so this header would dissappear during a WAV > FLAC > WAV transition. SHN does not trash this data, so the audio fingerprints will match even though the expanded .wav file is not identical to the one that created the initial shns.

You can run an shntool -len check on the .shn files, and it will tell if you there is additional data in the header, confirming this suspicion.

jbeck57143
2004-12-21, 05:34 PM
I just looked at the shntool results that came with the shn file. Here's what it says for the track in question:

length
5:49.14

expanded size
61596688

cd
---

WAVE
-e

problems
---xx

filename
bd1980-01-21d1t08.shn

What does "e" mean under "wave"?
Jim

ssamadhi97
2004-12-21, 06:16 PM
The second entry will contain an 'e' if the WAVE file contains extra RIFF chunks, other than the required 'fmt'
and 'data' chunks.

copied straight from shntool documentation. *HINT HINT*

jbeck57143
2004-12-21, 06:30 PM
Thanks! Boy am I a pinhead--I just found it in the tutorial--which I hadn't started reading yet. I haven't used shntool (I just got it).

Jim

ssamadhi97
2004-12-21, 08:54 PM
I can relate actually.. shntool's documentation structure isn't clean, I would've expected this kind of information either in the parameter-specific help of the exe itself or in the readme, but not just buried in some (ok, "the") tutorial. :hmm:

RainDawg
2004-12-21, 09:40 PM
By the way, when the FLAC is around half of the SHN, as in this case, that is the result of the audio being mono. For truly mono material, it is not uncommon to get this enormous improvement of the compression ratio :).

malick
2005-01-08, 04:00 PM
I got this, but where did you generate that output? Or have you created a whole ton of different interfaces to your foobar screen? I'd be interested in more code and how you did that. The programming part is a foreign language to me, so I'd be just copying and pasting.

thanks, great tip.

malick


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):

$ifgreater($mod(%_length_samples%,588),0,$rgb(180,90,90,180,90,90)$num($mod(%_length_samples%,588),3),)

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.


note the nifty PacMan progress bar :D

pmonk
2005-01-17, 04:57 PM
Thank you!

cmaz
2005-03-01, 04:43 PM
Hi,

sorry to be posting to what might be a dead thread, but i hope somebody is still around to answer...

i've just got foobar2000 and am not very experienced with it. i'm trying to follow this tutorial on how to convert SHN to FLAC. i've got foobar2000 v0.8.3 special and installed. Now, i go to <preferences> <diskwriter> and click <add new> but i don't get all the different options that i see on the screenshot from Five. All i have are
Legacy 0.7 output support
WAV (PCM 32bit floating point)
WAV (PCM, fixed-point)

What have i forgotten to do?

Five
2005-03-01, 05:38 PM
Okay, try uninstalling and reinstall. Pay special attention at the beginning when it asks you "select the type of install". The default is "normal", so make sure you select "full" from the dropdown menu before pushing "next".
http://img57.exs.cx/img57/9166/foobar_fullinstallation.gif

Then the extra options should be available when you push "add new".

hope this helps

cmaz
2005-03-01, 05:57 PM
Five,

Thanks, that did the trick. :clap:

Five
2005-03-01, 06:43 PM
:thumbsup

a thread is never dead so long as there's something on-topic to add.

RainDawg
2005-03-02, 08:48 AM
Yes, basically what happened is that you may have unselected the proper plugin during install (forget which one though :eek: ) that gives you a wide range of encoding options. By reinstalling with that plugin included, you should be good to go!

feralicious
2005-03-06, 09:39 PM
Finally got around to doing this stuff and it works great!
Gonna try out the tagging now...

pmonk
2005-04-03, 08:30 AM
Bump

range_hood
2005-05-27, 08:29 AM
I stumbled upon this by accident. Why do I have to click through users signatures to find such useful threads ;) .
Thatīs definately worth to be included in the tutorials subforum of Technobabble :D .

AAR.oner
2005-05-28, 10:20 AM
I stumbled upon this by accident. Why do I have to click through users signatures to find such useful threads ;) .
Thatīs definately worth to be included in the tutorials subforum of Technobabble :D .

working on it...

at this point, Five & RainDawg & Lynne pretty much all have very useful inks in their sigs...i'm sure theres some too, but they're the ones i can think of off the top of my head

pix
2005-06-11, 01:56 PM
For some reason, I don't have the FLAC option in my drop down menu in Foobar. I installed the special eidition with all the plugins.

Karst
2005-06-11, 03:07 PM
Did you configure it right? :cool:

Five
2005-06-12, 09:42 PM
For some reason, I don't have the FLAC option in my drop down menu in Foobar. I installed the special eidition with all the plugins.
I think there might be an issue with the latest version of FLAC ... does anybody know about this?

I'm looking into it.

see if you can get it working by going thru the steps again slowly.

azhusker71
2005-06-15, 02:53 AM
thanks for the guide been trying to convert shn.flac for awhile now...I have the 0.8.3 but the flac doesn't come up???what I'm I doiung wrong...thanks for the help :confused:

darkstarjunkie
2005-06-15, 05:28 AM
I think there might be an issue with the latest version of FLAC ... does anybody know about this?


Yep. I had the same problem, so I got the latest version of the foo_flaccer (the flac encoder) from here (http://www.saunalahti.fi/cse/foobar2000.php?changes=foo_flaccer). Download the zip for flaccer v0.5.2, unzip to your foobar2000\components directory & restart foobar. Seems you also need to have the latest version of flac (v1.1.2) installed, since the plugin uses those libraries.

Another very very useful plugin for foobar2000 not mentioned in this thread (as far as i could see) is the amazing Trader's Friend (http://www.hydrogenaudio.org/forums/index.php?showtopic=11995&) which will auto-tag your FLACs by reading the accompanying .txt file. Artist, track names, date, album etc. is read from the txtfile and tags added. It's fabulous. It's been made with live shows / etree standards in mind, and it actually understands most of the txtfiles you feed it! Sometimes, when things are too un-standard, you may have to edit the txtfile to get it to work. See the above link for lots of info on what the plugin will understand. Get version 0.5 (http://www.stud.uni-karlsruhe.de/~uzbs/fb2k/foo_tradersfriend/foo_tradersfriend-0.5.zip) or version 0.6 preview (http://www.stud.uni-karlsruhe.de/~uzbs/fb2k/foo_tradersfriend/foo_tradersfriend-0.6.0pre.zip) (0.6 is probably the best one, but it's not completely finished. works like charm for me anyway.)

ssamadhi97
2005-06-15, 11:55 AM
foo_tradersfriend discussion thread (http://www.hydrogenaudio.org/forums/index.php?showtopic=11995&hl=) (on hydrogenaudio)

Five
2005-06-22, 11:52 PM
thanks darkstar. that fixed it right up.

I've also been using foo_tradersfriend for ages. It's great stuff.

unholyone
2006-02-17, 11:29 PM
What .dll in the foobar2k components is the one that makes it possible to convert .shn to .FLAC?

SIRMick
2006-03-21, 03:56 PM
[QUOTE=Five]Here's the visual tutorial based on (and quoting from) these threads:
http://www.thetradersden.org/forums/showthread.php?t=761
http://www.thetradersden.org/forums/showthread.php?t=928

Lemmieknow what you think.

SHN to FLAC Conversions Using Foobar2000

Unfortunately the shn plugin is not supported by the latest version of Foobar ;-(

ssamadhi97
2006-03-21, 09:26 PM
For the time being, foo_shn - now renamed to foo_input_shorten - is available together with foo_tradersfriend in foosion's stable components package.

You can download the whole package at http://foosion.foobar2000.org/0.9/

guygee
2006-03-24, 12:26 PM
This one deserves a sticky. Also, adding tags with the tapers name/lineage in the comments field is a great idea, since if someone introduces a CD-R generation the tag comments will be lost: another check on validity of lineage. Great post!

Five
2006-03-24, 02:06 PM
thanks man

I gotta update it a little for foobar v0.9 and put it in the FAQ one of these days

bullpinjohn
2006-11-01, 08:04 PM
I can't find diskwriter, I'm using foobar2000_0.9.4.1,
I used the link for shn plugin, I don't think it's there anymore, I want to play shn in foobar2000. Any suggestions.

SIRMick
2006-11-02, 01:52 AM
I can't find diskwriter, I'm using foobar2000_0.9.4.1,
I used the link for shn plugin, I don't think it's there anymore, I want to play shn in foobar2000. Any suggestions.

You can get the shn plugin from here http://foosion.foobar2000.org/0.9/

bodeaga
2007-08-29, 08:17 AM
OMG!!! :mad: :down:
As for converting, it is acceptable and encouraged to convert SHN to FLAC, as the former is an outdated and obsolete codec. FLAC has numerous advantages, and you can read a little more about the major differences in the FAQ's audio types and descriptions entry:
http://www.thetradersden.org/forums...o#faq_filetypes

shn to flac converted files should not be shared in hubs or torrented.... once converted the tth root will be diffrent as will the md5 checksum leaving you at the sole source for that show. i say leave them as the taper/uploader made them. converted files should be for your own use and thats it!!!!! :nono: :hmm: :down:

Jabaxo
2007-08-29, 08:28 AM
Converting from SHN to FLAC is bad bad bad!

Backing up in original data format is the key ingredient to successfully archiving and restoring filesets with their original TTH

If everyone starts converting original SHN shows there is going to be mania in the trading community.

John from California may have just read your article. Along with Joe from Alaska, Wendy from Canada, Jack from England, Roberto from Brazil, and Surferdude from Hawaii.

Let's say all of these people were in a Led Zeppelin trading group and each of them obtained the same exact bootleg over the last 5 years.

Each of them never directly traded with each other and they dont know each other. However through the next month each of them are going to read that article and they are going to want to try and "help" the community like you just "tried" to. And theyt follow your advice and by pure coincedence all convert or re-rip their SHN bootleg into FLAC by means of a combination of different softwares.

Now one seeds on Dime, one seeds on a private tracker, one seeds bootleg archive, another one seeds on Echoes Hub etc etc

Now we have the original zep shn boot circulating along with 4 more different FLAC rips of the same show. By the time this propagates into each community and and gets incorrectly distributed, everyone is going to be confused and some people very angry that there is alot of work to be done

5 different rips of the same boot circulating with all different TTH matches is not something our communities need. We need to spend less time fixing things that are not broken, and concentrate and focus our energy on the now and the future to make things simpler and get these mp3 traders to understand the concept of lossless audio. NOT find ways to convert lossless audio into other lossless formats and shit in our own backyard.

Think of what happens when this happens to 1000 boots x 5 conversions. Who is going to fix this? When Jane in Iowa had a bad TTH set in a show and she asks for help with disc1 track 7? Pierre in france send it to her and it extracts fine, but it doesnt match her TTH file set. - She doesnt know any better and then decides to make NEW ffp/md5s and delete her old ones. (This way she has a matching set from 2 different sources that she may trade and really fuck up the communities.

So now let me ask you again............

What are you recommending? You were saying WHAT? Did the leader of the mp3 community send you over as a drone to secretly try and plant this horrible information into our heads or did you think this, blood-curdling festering boil on the butt of humanity yourself?

Tubular
2007-08-29, 09:28 AM
But if you include a .wav .md5 or .st5 in all your seeds you can see that the audio data is exactly the same! Fixing SBEs is where it gets more complicated because there are so many different ways to fix them. No portable players or server type home players support SHN, but a lot of them support FLAC. I say everything should be converted to FLAC and be done with it. If there was a database, like db.etree.org, for all shows, you could access it any time and get the .wav .md5 or .st5 and verify that your set matches, then do a conversion following instructions provided on exactly how it was done. You convert using the same process they did so you get the same result. The TTH root won't match, though. But if everyone followed the same instructions for converting, and everyone converted, the TTH root WILL match. Just my 2 cents and opinion.

Jabaxo
2007-08-29, 09:42 AM
No portable players or server type home players support SHN

Correct, but ya know, they invented something thats newer on the market and really cool. Its called CDs!!! They just came out. Have you ever heard of them? Oh and I hear that they are supported by most home and portable players.

Tubular
2007-08-29, 09:51 AM
:lol CD players came out in 1983! When did portable audio file players come out? Oh, around 2000. I would love to be able to someday burn a data DVD with FLACs and have my home player play back the files. Currently I burn DVD-Audio discs (up to 7 hours of 16/44.1 audio on ONE disc) so I don't have to burn tons of CDs. It has to be authored to DVD format though, which is time consuming and necessitates the burning of another disc. It is also uncompressed. If all the files were FLAC, I could probably fit about 12 hours on one disc.

Jabaxo
2007-08-29, 09:57 AM
FYI they have 36GB DVDs out now...... or coming out soon.

Let me ask you this. What happens when a better lossless compression format comes out? Something better than FLAC. And what happens when one comes out even better than that one 10 years from now?

Should we all re-rip shows from re-ripped shows?

Leaving everything in their original format is the way to trade. If you want to alter something that personally suits your hardware or your collection format, then fine, but dont share anything except the originals.

Its a 100% safe bet, you will start from the original and not something re-ripped 20 times down the road. Wouldn't you rather have an original roio then one you arent sure who had their hands on?

bodeaga
2007-08-29, 10:01 AM
and if left as shn like the taper/uploader intended them to be it would only be about 11.5 hours.
seams to me converting 7 gigs from shn to flac it a very large waste of time and ruins the integrity of that show.....
shn to flac is for your head only and not trading.... if you got the time to convert all that .... lucky you.... :clap:

Mooner
2007-08-29, 10:05 AM
if all this was posted in the Leecher'sDen, you'd all be wrong. But this is the Trader'sDen, and as TRADER'S we have a responsibility to maintain the integrity of what we trade... so that TRADERS that come after us can be assured we've passed on original, unfukdwith, boots.

Tubular
2007-08-29, 10:14 AM
Exactly, if a better open source lossless format came out in 10 years that reduced the size of a rock-n-roll .wav by 80% (doubtful), everything should be switched over to that. DVD+Rs and CD-Rs should be backed up anyway at least every ten years. FLAC is updated all the time so it achieves better compression.

And again, it doesn't ruin the intgrity of the show, just the integrity of the TTH and SHN .md5. If you have the .wav .md5 or .st5, you can prove all the data is the same.

I'm not suggesting that everyone convert all their stuff everytime a new version of FLAC comes out so they can get a .01% improvement in the compression. It's about compatibility, and FLAC is much more compatible than SHN in portable players and home server type players. FLAC is the best open source format now and for the forseeable future.

Tubular
2007-08-29, 10:22 AM
Also, I'm not talking about ripping audio CDs with EAC, then encoding to FLAC, or re-ripping. That changes the .wav .md5.

PS: It is possible to rip an audio CD with EAC and get .wav's that will match the originals, but you have to correct the read and write offset, but most people don't know about that. ;)

Five
2007-08-29, 10:33 AM
well, we require either ffp or st5 at this site. the 32 character hash from an ffp or st5 checksum will match on any perfect conversion from shn, flac, ape or wav.

shntool md5 (st5) is similar in principal to an md5 of the wav files, but more efficient.

who wants to argue with me? :lol

U2Lynne
2007-08-29, 11:01 AM
who wants to argue with me? :lol
Not me! http://img.photobucket.com/albums/v251/Valdis/sml/cwm31.gif

Tubular
2007-08-29, 11:45 AM
and if left as shn like the taper/uploader intended them to be it would only be about 11.5 hours.
seams to me converting 7 gigs from shn to flac it a very large waste of time and ruins the integrity of that show.....
shn to flac is for your head only and not trading.... if you got the time to convert all that .... lucky you.... :clap:

Yeah it'll take some time to convert if you already have the show. But if you don't have the show and are downloading it for the first time, and it is seeded in FLAC, not SHN, it saves you a lot of time. :thumbsup ;) Why not save the hundreds, or thousands of people who will grab the reseed the trouble of converting for playback on their portables or home servers or future disc players? Someone might say that they convert to .mp3 for playback on their portable anyway. Well that takes a lot of time too! If I had a 10 GB, or 20 GB or 30 GB player I'd rather save the time converting FLAC > .mp3 and just put the shows on my player as FLAC, and rotate out shows after I've listened to them a few times. I'm rambling, but if you have a show in lossless on your iPod, you can transfer it to your friend's comp if you are visiting, then they have a lossless copy of the show! :D

Tubular
2007-08-29, 07:49 PM
At the risk of :horse: here is another thing: the inclination to never change SHN .md5's and TTH roots can be used as justification to never fix SBE's or other problems. Someone gets a show, runs the len check and finds out there are SBE's. Then he fixes them before burning to CD, which consumes a little time and temporary disk space. A noob gets the same show, decodes, and burns a CD. There are pops between tracks, and he has just wasted a CD-R. :rolleyes: :disbelief You hard core never-convert people would at least agree that fixing SHN sets that have SBEs and convering to FLAC (since the TTH root is changed anyway) in a standard way should happen, right? The standard way of fixing SBEs could be: fix one set of .wav's at a time (for multiset shows), backward shift, pad last track with zero bytes.

Tubular
2007-08-29, 08:02 PM
Also, say someone converts a bunch of SHNs to FLAC and seeds them. Some time goes by, and other people who already have the SHNs want to convert to this same FLAC set as well. By this time, FLAC has updated to a newer version, so compressing with the newer version will give a different TTH root than the compression with the older version. No problem, sourceforge has old versions of FLAC that can be downloaded and installed, and will yield the same TTH root as compression originally done with the old version of FLAC. Also you can enter the same tags (if they had tags) and replay gain as the old FLAC version. :thumbsup

Mooner
2007-08-30, 04:30 PM
Tubular.

You have considered the personal preferences and idiosyncratic opinions of those who are determined to take standard, well founded trading practices and toss them out the window.
You haven't considered the firmly established trading community or how it maintains order and quality. You haven't considered how what you propose will affect the stability of the future trading community. You haven't considered the taper's decision of how a show is released. You haven't considered lineage or integrity.
I doubt I can change your mind on this topic, but it's important for those who read your posts to know that there are serious repercussions to the trading community at large when a commonly traded show suddenly surfaces in a new format. Rule #1 for any seasoned trader is "Never alter a recording and then reissue it to the community as 'original'".

Five
2007-08-30, 04:40 PM
you are confusing the audio for the container. nothing is being advertised as 'original'

a shntool md5 (st5) is generated from the decompressed audio. there is no need to be tied to SHN files that aren't seekable and associated md5 checksums. Mooner, you're preaching like it is still 2003. We're not talking about changing an single bit of the audio contained in the shn files.

Mooner
2007-08-30, 06:01 PM
No, perhaps we're not talking about changing a single bit of audio, but we're certainly talking about changing the lineage of (ultimately) hundreds of terabytes of traded shows, and making the original audio data obsolete. This presents nightmares of confusion for those who volunteer their time maintaining the integrity of traded music, and also for those who have spent years/decades collecting that music.
In order to preserve the music, one must also preserve the history.

Five
2007-08-30, 06:11 PM
you're posting hypothetical stuff here... converting from shn to flac has helped the community. the conversion of the SHN portion of a/b road to flac saves aprox 7GB of space and no confusion at all. please give some specific examples of where a shn to flac conversion has caused confusion and a loss of integrity in an audio files set.

Tubular
2007-08-30, 06:55 PM
There are tons of shows that circulate with sector boundary errors (SBEs), and they get reseeded all the time unchanged. The only reason for this that I can think of is that everyone is afraid to change the original data. For those who are experienced it is not much of a problem, they do a len check before burning a CD. But for those new to trading and torrenting lossless, they waste a lot of CD-Rs and experience a lot of frustration (was it the burn? did I not do it right? was it my download? just WTF is going on?) before they find out how to fix it (if they ever find out how). And it is all because there is no accepted, standard way to fix them, and people are hesitant to mess with history and the original data. This hesitation and reticence is a big loss to the community IMO.

The same can be said for converting SHN to FLAC. What if in 5 years most universal Blu-Ray/DVD/CD/MP3 players supported FLAC? Everyone's FLAC data discs could also be played back on their disc players, but none of their SHN discs could. So unseekable, SBE filled, header issue ridden SHNs should still be traded in 50 years just to preserve the original fileset? Give me a break. :rolleyes: Here is a list of players that currently support FLAC (not SHN): http://flac.sourceforge.net/links.html#hardware

Tubular
2007-08-30, 07:11 PM
A major consumer brand, Denon, supports FLAC:
http://gizmodo.com/gadgets/denon-line-show-2007/denon-launches-four-compact-s+series-21-systems-with-wi+fi-usb-ipod-and-other-options-281952.php

Some 2007 Denon AV Receivers support FLAC (kick ass IMO!!, means disc players are probably right around the corner):
http://crave.cnet.com/8301-1_105-9749863-1.html

direwolf-pgh
2007-08-30, 07:13 PM
:popcorn: im enjoying this..

the best part for me is that .shn is near obsolete - like .mkw files.

-wait till the community decides that any encoding less than 24bit is lame :clap: we get to re-rip and re-download all over again.

..sorry for the interruption..

mooner what 'history' are you talking about ? Im very interested to hear about it.

U2Lynne
2007-08-30, 07:21 PM
Whenever I have seeded a show where I fixed the SBEs, I have included the old fingerprints in the text file, along with the new fingerprints and the shntool len. And, of course, I note in the lineage that the show went "flac > xACT (fix SBEs) > flac".

Tubular
2007-08-31, 02:40 AM
I think Mooner is talking about that prehistoric period when Wooly Mammoths roamed the Earth and men were hunter/gatherers....

Ahhh 1998.....SHNs....yo queiro Taco Bell.....Gettin' Jiggy Wit It.... :lmao: :lol :lol :roflol:

Cars used to have carburetors, now they have fuel injection. Progress ;) :thumbsup

MourningStar
2007-11-29, 08:28 PM
hi - i need to do this conversion. however, i'm on a WinME machine and the foobar s/w requires a newer os. does anyone have a win-me compatible foobar version they can hook me up with? thnx!

MourningStar
2007-11-30, 02:20 AM
Nevermind - I found one.

patrick1963
2008-06-05, 04:28 PM
Using shntool ...

shntool conv -o flac *shn

using this to convert shn > flac but I would like to set flac level to 8. How?

roomful
2008-06-05, 05:50 PM
Trader's Little Helper will convert SHN > FLAC without decompressing to WAV first. Just drag your SHNs into TLH, select 'convert encoding format', FLAC level 8, then hit convert. Note that if there are any non-canonical headers ('h' in middle column of len check) or extra junk in the the header that these will be automatically stripped when encoding to FLAC. So if your original SHN set contained header errors, then converting to FLAC will change the WAV md5. It would be a good idea to note in the text file what version of FLAC was used (in TLH go to Help menu > About), the len check of the original SHNs, the len check of the FLAC conversion, and how you fixed SBE's if there were any and if you chose to fix them.

patrick1963
2008-06-05, 07:57 PM
^^ What version of TLH?

roomful
2008-06-05, 09:39 PM
I'm using version 2.3.1 of TLH but I'm sure the most recent version does it and more:

currently on version 2.4.0
http://tlh.easytree.org/

cmaz
2008-07-23, 11:03 AM
Here's the visual tutorial based on (and quoting from) these threads:
http://www.thetradersden.org/forums/showthread.php?t=761
http://www.thetradersden.org/forums/showthread.php?t=928

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):

$ifgreater($mod(%_length_samples%,588),0,$rgb(180,90,90,180,90,90)$num($mod(%_length_samples%,588),3),)

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.


note the nifty PacMan progress bar :D

Does this formatting string still work with foobar2000? i'm using v0.9.5.4 and Columns UI 0.3.4.1

In the playlist view i add a new column and paste this into the Scripts/Display window, but it doesn't seem to work. Am i doing something wrong?

Thanks!

cmaz
2008-07-23, 11:50 AM
Does this formatting string still work with foobar2000? i'm using v0.9.5.4 and Columns UI 0.3.4.1

In the playlist view i add a new column and paste this into the Scripts/Display window, but it doesn't seem to work. Am i doing something wrong?

Thanks!

Forget it, i finally figured it out. Apparantly, the "Apply" button does not really work. When pressed, it added the column to the playlist, but not the information in the column. You have to close foobar and restart it for that to happen.