View Single Post
  #28  
Old 2005-03-27, 04:19 PM
jazzbo jazzbo is offline
 
Join Date: Nov 2004
Re: Batch Files - "How to" + Recipes (add 'em if you got 'em!)

Quote:
Originally Posted by dancin_carrot
Does anyone know what level of FLAC compression is used with shntool? And is there a way to change it?
5 (the default) and yes.

You have to use the cust format in shntool:

For example, here's a SHN file on my harddrive. (Sorry, all of my examples are in a unix shell, but the examples should be applicable to a Windows machine, just follow the instructions in the shntool documention about quoting the curly braces. But the important thing is I marked the file sizes so you can see the higher compression level working.)

/data2/bwq1977feb7$ ls -la bwq1977feb7track01.shn
-rw-r--r-- 1 kevin kevin 3437861 2004-06-27 17:40 bwq1977feb7track01.shn


Now, default FLAC compression from shntool at level 5:

/data2/bwq1977feb7$ shntool conv -o flac bwq1977feb7track01.shn
converting 'bwq1977feb7track01.shn' to 'bwq1977feb7track01.flac' ... done.

/data2/bwq1977feb7$ ls -la bwq1977feb7track01.flac
-rw-r--r-- 1 kevin kevin 3354437 2005-03-27 17:02 bwq1977feb7track01.flac


Now, force level 8 with the cust format:

/data2/bwq1977feb7$ shntool conv -o cust ext=flac8 { flac - -8 -o %f } -d . *track01.shn
converting 'bwq1977feb7track01.shn' to './bwq1977feb7track01.custom' ... done.

/data2/bwq1977feb7$ ls -la bwq1977feb7track01.flac8
-rw-r--r-- 1 kevin kevin 3345563 2005-03-27 17:05 bwq1977feb7track01.flac8


The cust command here is forcing the output extension to be flac8 (just for comparison purposes while I was running the test) and passing STDIN ("-") to be compressed at level 8. I couldn't get it to work without explicitly stating I wanted output in the present path with the -d switch.

Once you get the cust format working on your setup, you can use it for output with any of shntool's modules. You can also use cust to incorporate new compression formats into shntool without the support being waiting for support to be added to shntool.
Reply With Quote Reply with Nested Quotes