lossyWAV 1.2.0 released, Added noise WAV bitdepth reduction method |
![]() ![]() |
lossyWAV 1.2.0 released, Added noise WAV bitdepth reduction method |
Jan 16 2010, 09:53
Post
#26
|
|
|
Group: Validating Posts: 2424 Joined: 21-May 08 Member No.: 53675 |
thanks for your help and program
I was using CueTools lossyFLAC feature for correction files, but now it's much easier for me Maybe all this parameters thing can be simplified? |
|
|
|
Jan 16 2010, 12:28
Post
#27
|
|
![]() Group: Members Posts: 375 Joined: 4-October 08 From: Ukraine Member No.: 59301 |
now it works great (with your modified batch script) +1. Thank you lossyFLAC.bat: CODE C:\"Program Files"\foobar2000\encoders\lossyWAV.exe %1 %3 %4 %5 %6 %7 %8 %9 --below --silent ren "%~N1.lwcdf.wav" "%~N2.lwcdf.wav" C:\"Program Files"\foobar2000\encoders\flac.exe -b 512 -l 6 -e -m -r 2 -f --totally-silent "%~N1.lossy.wav" -o"%~N2.flac" del "%~N1.lossy.wav" C:\"Program Files"\foobar2000\encoders\flac.exe -b 512 -l 6 -e -m -r 2 -f --totally-silent "%~N2.lwcdf.wav" -o"%~N2.lwcdf.flac" del "%~N2.lwcdf.wav" foobar2000: Encoder: C:\windows\system32\cmd.exe Extension: lossy.flac Parameters: C:\"Program Files"\foobar2000\encoders\lossyFLAC.bat %s %d --standard --correction This post has been edited by Steve Forte Rio: Jan 16 2010, 12:50 |
|
|
|
Jan 16 2010, 14:55
Post
#28
|
|
|
Group: Members Posts: 170 Joined: 7-January 05 From: Germany Member No.: 18891 |
@Steve Forte Rio
Thanks for the configuration and the batch file. I'm trying to figure out how the batch file has to look, if I'll want to join the created files? (correction file+ loosy.flac file) Any help would be appreciated. |
|
|
|
Jan 16 2010, 15:57
Post
#29
|
|
![]() Group: Members Posts: 375 Joined: 4-October 08 From: Ukraine Member No.: 59301 |
|
|
|
|
Jan 17 2010, 06:39
Post
#30
|
|
|
Group: Validating Posts: 2424 Joined: 21-May 08 Member No.: 53675 |
seems I posted wrong code
looking to it now, I'll post corrected later This post has been edited by 2E7AH: Jan 17 2010, 07:35 |
|
|
|
Jan 17 2010, 08:22
Post
#31
|
|
|
Group: Validating Posts: 2424 Joined: 21-May 08 Member No.: 53675 |
OK, nevermind the script, I'll post later as batch or if I can't as vbs, but the point was that merging input and correction files doesn't produce bit identical audio file
Why is that? |
|
|
|
Jan 17 2010, 10:45
Post
#32
|
|
|
Group: Validating Posts: 2424 Joined: 21-May 08 Member No.: 53675 |
if someone can delete above two post please do
Here is the script: lossyFLACcorr.bat CODE if not exist "%~n2.lwcdf.flac" goto bye c:\"Program Files"\encoders\flac.exe -d -s "%~n2.lwcdf.flac" c:\"Program Files"\encoders\lossywav.exe "%1" & "%~n2.lwcdf.wav" -M -Q --below --silent && del "%~n2.lwcdf.wav" c:\"Program Files"\encoders\flac.exe -s "%~n1.lossy.wav" -o "%~n2.fla" && del "%~n1.lossy.wav" :bye extension: fla parameters: /d /c c:\"Program Files"\encoders\lossyFLACcorr.bat %s %d problem with piping double extension destination file avoided with using .fla extension for merged file the script is just illustrative, it's not for usage - why lossyWAV.exe passes merged file to command line (so launches associated program) I don't know, as I don't know how to interpred below results, but I hope it's just mis-usage from my side: CODE Differences found in 11 out of 11 track pairs.
Comparing: "C:\Users\Dejan\Desktop\Autechre\Amber\01 - Foil.flac" "C:\Users\Dejan\Desktop\Autechre\Amber\01 - Foil.lossy.fla" Differences found: 22797065 sample(s), starting at 0.5340590 second(s), peak: 0.0116882 at 122.5063492 second(s), 1ch Comparing: "C:\Users\Dejan\Desktop\Autechre\Amber\02 - Montreal.flac" "C:\Users\Dejan\Desktop\Autechre\Amber\02 - Montreal.lossy.fla" Differences found: 35326575 sample(s), starting at 0.2089796 second(s), peak: 0.0116882 at 101.9486621 second(s), 2ch Comparing: "C:\Users\Dejan\Desktop\Autechre\Amber\03 - Silverside.flac" "C:\Users\Dejan\Desktop\Autechre\Amber\03 - Silverside.lossy.fla" Differences found: 24584537 sample(s), starting at 0.7663039 second(s), peak: 0.0058289 at 101.6905215 second(s), 1ch Comparing: "C:\Users\Dejan\Desktop\Autechre\Amber\04 - Slip.flac" "C:\Users\Dejan\Desktop\Autechre\Amber\04 - Slip.lossy.fla" Differences found: 27736629 sample(s), starting at 0.2089796 second(s), peak: 0.0116882 at 139.8723583 second(s), 1ch Comparing: "C:\Users\Dejan\Desktop\Autechre\Amber\05 - Glitch.flac" "C:\Users\Dejan\Desktop\Autechre\Amber\05 - Glitch.lossy.fla" Differences found: 26116572 sample(s), starting at 0.1973696 second(s), peak: 0.0058289 at 73.9867347 second(s), 1ch Comparing: "C:\Users\Dejan\Desktop\Autechre\Amber\06 - Piezo.flac" "C:\Users\Dejan\Desktop\Autechre\Amber\06 - Piezo.lossy.fla" Differences found: 38026252 sample(s), starting at 0.2438095 second(s), peak: 0.0116882 at 7.8182313 second(s), 2ch Comparing: "C:\Users\Dejan\Desktop\Autechre\Amber\07 - Nine.flac" "C:\Users\Dejan\Desktop\Autechre\Amber\07 - Nine.lossy.fla" Differences found: 11415531 sample(s), starting at 0.1973696 second(s), peak: 0.0007019 at 198.4041950 second(s), 1ch Comparing: "C:\Users\Dejan\Desktop\Autechre\Amber\08 - Further.flac" "C:\Users\Dejan\Desktop\Autechre\Amber\08 - Further.lossy.fla" Differences found: 43881419 sample(s), starting at 5.8979365 second(s), peak: 0.0058289 at 50.2095692 second(s), 2ch Comparing: "C:\Users\Dejan\Desktop\Autechre\Amber\09 - Yulquen.flac" "C:\Users\Dejan\Desktop\Autechre\Amber\09 - Yulquen.lossy.fla" Differences found: 22402111 sample(s), starting at 0.2786848 second(s), peak: 0.0003357 at 85.8327211 second(s), 1ch Comparing: "C:\Users\Dejan\Desktop\Autechre\Amber\10 - Nil.flac" "C:\Users\Dejan\Desktop\Autechre\Amber\10 - Nil.lossy.fla" Differences found: 34920537 sample(s), starting at 0.2205896 second(s), peak: 0.0234070 at 359.9393650 second(s), 1ch Comparing: "C:\Users\Dejan\Desktop\Autechre\Amber\11 - Teartear.flac" "C:\Users\Dejan\Desktop\Autechre\Amber\11 - Teartear.lossy.fla" Differences found: 31764609 sample(s), starting at 0.2322222 second(s), peak: 0.0116882 at 22.4264853 second(s), 1ch This post has been edited by 2E7AH: Jan 17 2010, 10:50 |
|
|
|
Jan 17 2010, 12:24
Post
#33
|
|
![]() lossyWAV Developer Group: Developer Posts: 1722 Joined: 11-April 07 From: Wherever here is Member No.: 42400 |
Using the command line:
CODE lossywav ..\samples\eig.wav -C produces two files: eig.lossy.wav and eig.lwcdf.wav in the current directory.Using the command line: CODE lossywav eig.lossy.wav --merge produces one file (if eig.lwcdf.wav is present in the same directory as eig.lossy.wav), i.e. eig.wav.Using the command line: CODE comp ..\samples\eig.wav eig.wav should result in "Files compare OK".
This post has been edited by Nick.C: Jan 17 2010, 12:26 -------------------- lossyWAV -q X | FLAC -8 ~= 308kbps
SGS III (Rooted) + 64GB |
|
|
|
Jan 17 2010, 12:51
Post
#34
|
|
|
Group: Validating Posts: 2424 Joined: 21-May 08 Member No.: 53675 |
So, what to do with FLAC?
If lossy.flac and lwcdf.flac are converted to corresponding wavs then run: CODE lossyWAV.exe lossy.wav -M equals:FACT Data missing (lossy.wav) I even downloaded source files to look for the error: CODE if (btrdchunk.fact.header.size=0) then lossyWAVerror('FACT Data missing (lossy.wav).',$12); Is there obligation for some wav header? runing: CODE lossyWAV.exe lossy.wav & lwcdf.wav -M produces desired file which isn't bit identical with the original file |
|
|
|
Jan 17 2010, 13:04
Post
#35
|
|
![]() lossyWAV Developer Group: Developer Posts: 1722 Joined: 11-April 07 From: Wherever here is Member No.: 42400 |
So, what to do with FLAC? If you create the lossyFLAC file using piped output to FLAC then the FACT chunk goes missing because FLAC will not store it. When creating FLAC from WAV, please remember to add "--keep-foreign-metadata" to the FLAC command line to preserve the FACT chunk. eg.: CODE @echo off
flac -d sample.lwcdf.flac --keep-foreign-metadata flac -d sample.lossy.flac --keep-foreign-metadata lossywav sample.lossy.wav -M --stdout|flac - -5 -osample.flac del sample.lossy.wav del sample.lwcdf.wav This post has been edited by Nick.C: Jan 17 2010, 13:10 -------------------- lossyWAV -q X | FLAC -8 ~= 308kbps
SGS III (Rooted) + 64GB |
|
|
|
Jan 17 2010, 13:09
Post
#36
|
|
|
Group: Validating Posts: 2424 Joined: 21-May 08 Member No.: 53675 |
well, I used your batch script which includes that switch:
CODE c:\programme\flac\lossyWAV.exe %1 %3 %4 %5 %6 %7 %8 %9 --below --silent if exist "%~N1.lwcdf.wav" c:\programme\flac\flac.exe -b 512 -l 6 -e -m -r 2 -f --totally-silent --keep-foreign-metadata "%~N1.lwcdf.wav" -o"%~N2.lwcdf.flac"&&del %~N1.lwcdf.wav c:\programme\flac\flac.exe -b 512 -l 6 -e -m -r 2 -f --totally-silent --keep-foreign-metadata "%~N1.lossy.wav" -o"%~N2.flac" del "%~N1.lossy.wav" [edit] OK, you edited after I posted It's working finally, thanks, but all this is too far from common user This post has been edited by 2E7AH: Jan 17 2010, 13:20 |
|
|
|
Jan 17 2010, 16:21
Post
#37
|
|
![]() Group: Members Posts: 191 Joined: 4-January 02 From: USA Member No.: 912 |
I finally got around to trying LossyWAV this weekend as my lossless FLAC music library is too big for my netbook's hard drive. I have to say that I am really impressed. I used the parameters in Nick's signature and I have not noticed a difference between the original lossless versions and the lossy ones (although I do have tin ears).
By the way, adding the libfftw3-3.dll library file to my LossyWAV directory produced an incredible speed up in LossyWAV processing. I would highly recommend it to anyone processing a lot of files. |
|
|
|
Jan 18 2010, 02:53
Post
#38
|
|
|
Group: Validating Posts: 2424 Joined: 21-May 08 Member No.: 53675 |
I got PMed about batch scripts, so I'm posting it here + to make life easier for others who want to try this and use foobar:
lossyFLAC.bat CODE goto %1 goto end :correction c:\"Program Files"\encoders\lossywav %2 %4 %5 %6 %7 %8 %9 --%1 --below --silent c:\"Program Files"\encoders\flac -b 512 -l 6 -e -m -r 2 -f --totally-silent --keep-foreign-metadata "%~n2.lwcdf.wav" -o"%~n3.lwcdf.flac" c:\"Program Files"\encoders\flac -b 512 -l 6 -e -m -r 2 -f --totally-silent --keep-foreign-metadata "%~n2.lossy.wav" -o"%~n3.flac" && del %~n2.lwcdf.wav %~n2.lossy.wav goto end :merge if not exist "%~n3.lwcdf.flac" goto end c:\"Program Files"\encoders\flac -s -d "%~n3.flac" "%~n3.lwcdf.flac" --keep-foreign-metadata && ren "%~n3.wav" "%~n3.lossy.wav" c:\"Program Files"\encoders\lossywav "%~n3.lossy.wav" -M --below --silent && del "%~n3.lossy.wav" "%~n3.lwcdf.wav" c:\"Program Files"\encoders\flac -s --ignore-chunk-sizes -5 "%~n3.wav" -o"%~n3.fla" :end correction part produces %filename%.lossy.flac and %filename%.lossy.lwcdf.flac: ![]() merge part produces %filename%.lossy.fla file which is identical to original file: ![]() QUOTE All tracks decoded fine, no differences found. notes: - because flacs aren't decoded with foobar (nevertheless temp wav is created then delated) but with flac.exe, don't forget that destination has to end in %filename% or equivalent when using merge (output file name format in converter dialog) - if this is done in foobar media library it's good to exclude *.lwcdf.flac file types from library - flac parameters for merged files are default foobar parameters for flac encoder, so they can be changed as desired correcting the last significant line in script - if it's not too obvious, first parameter passed to batch file tell the script what to do (correction, merge or nothing) have fun |
|
|
|
Jan 18 2010, 09:59
Post
#39
|
|
![]() Group: Developer Posts: 2983 Joined: 2-December 07 Member No.: 49183 |
By the way, adding the libfftw3-3.dll library file to my LossyWAV directory produced an incredible speed up in LossyWAV processing. Really? As far as I know FFTW library works faster with floats (4 bytes, single precision) than doubles. If single precision is enough it should significantly speed up FFT calculation. |
|
|
|
Jan 18 2010, 13:28
Post
#40
|
|
![]() lossyWAV Developer Group: Developer Posts: 1722 Joined: 11-April 07 From: Wherever here is Member No.: 42400 |
lossyWAV uses data type double for FFT calculations - this was due to early differences between the Matlab output and the Delphi output which were traced back to the FFT calculations.
-------------------- lossyWAV -q X | FLAC -8 ~= 308kbps
SGS III (Rooted) + 64GB |
|
|
|
Jan 18 2010, 14:17
Post
#41
|
|
![]() Group: Members Posts: 375 Joined: 4-October 08 From: Ukraine Member No.: 59301 |
|
|
|
|
Jan 18 2010, 14:31
Post
#42
|
|
|
Group: Members Posts: 170 Joined: 7-January 05 From: Germany Member No.: 18891 |
|
|
|
|
Jan 18 2010, 22:53
Post
#43
|
|
![]() lossyWAV Developer Group: Developer Posts: 1722 Joined: 11-April 07 From: Wherever here is Member No.: 42400 |
.... and from me too. The --correction / --merge parameters were implemented quite some time ago but I have not given much thought to re-integration using foobar2000, for example. Thanks for your efforts and patience in creating / testing the batch file.
-------------------- lossyWAV -q X | FLAC -8 ~= 308kbps
SGS III (Rooted) + 64GB |
|
|
|
Jan 19 2010, 05:07
Post
#44
|
|
![]() Group: Members Posts: 202 Joined: 8-September 07 From: Hamburg, GER Member No.: 46899 |
I got PMed about batch scripts, so I'm posting it here + to make life easier for others who want to try this and use foobar: Hi, I tried your script and the "correction"-part works great. I get the "lossy.flac"- and the "lossy.lwcdf.flac"-files... all fine. But when I try the "merge"-part I get the conversion-error (e.g.): QUOTE An error occured while finalizing the encoding process (Object not found) : "G:\Downloads\Alice In Chains - Black Gives Way To Blue\Alice In Chains - Black Gives Way To Blue - 02 Check My Brain.fla" This is my adjusted script: CODE goto %1 goto end :correction d:\Programme\foobar2000\Encoder\lossyWAV\lossyWAV %2 %4 %5 %6 %7 %8 %9 --%1 --below --silent d:\Programme\foobar2000\Encoder\Flac\flac -b 512 -l 6 -e -m -r 2 -f --totally-silent --keep-foreign-metadata "%~n2.lwcdf.wav" -o"%~n3.lwcdf.flac" d:\Programme\foobar2000\Encoder\Flac\flac -b 512 -l 6 -e -m -r 2 -f --totally-silent --keep-foreign-metadata "%~n2.lossy.wav" -o"%~n3.flac" && del %~n2.lwcdf.wav %~n2.lossy.wav goto end :merge if not exist "%~n3.lwcdf.flac" goto end d:\Programme\foobar2000\Encoder\Flac\flac -s -d "%~n3.flac" "%~n3.lwcdf.flac" --keep-foreign-metadata && ren "%~n3.wav" "%~n3.lossy.wav" d:\Programme\foobar2000\Encoder\lossyWAV\lossyWAV "%~n3.lossy.wav" -M --below --silent && del "%~n3.lossy.wav" "%~n3.lwcdf.wav" d:\Programme\foobar2000\Encoder\Flac\flac -s --ignore-chunk-sizes -5 "%~n3.wav" -o"%~n3.fla" :end And here the encoder settings: Encoder: C:\WINDOWS\system32\cmd.exe Extension: fla Parameters: /d /c d:\Programme\foobar2000\Encoder\lossyFLAC.bat merge %s %d What could be the problem? And what do you mean exactly with "- ... don't forget that destination has to end in %filename% or equivalent when using merge (output file name format in converter dialog)"? Is here the point? Thanks in advance. |
|
|
|
Jan 19 2010, 06:26
Post
#45
|
|
|
Group: Validating Posts: 2424 Joined: 21-May 08 Member No.: 53675 |
thanks to all for their feedback on the script, I redirect that to the program author and people involved in it
while I doubted if I should post here (as it is Validated News forum) or open new thread, it seems that I should have opened new thread @Bollerkopp: I guess you run merge on original file (%filename%.flac) and not the lossy one (%filename%.lossy.flac) line: if not exist "%~n3.lwcdf.flac" goto end checks if "%filename%.lwcdf.flac" exists, and if it doesn't it ends the script %~n3 is the name part of the destination file (%d in converter) that you enter here: ![]() I modified my converter dialog, but you'll get the point |
|
|
|
Jan 19 2010, 07:34
Post
#46
|
|
![]() Group: Members Posts: 202 Joined: 8-September 07 From: Hamburg, GER Member No.: 46899 |
Thanks for your answer.
But no, I used it on the lossy ones (.lossy.flac). This is how I have done: 1. Convert an album from my Media Library (Monkey's Audio-files... Path: "F:\Musik\A-C\Alice In Chains - Black Gives Way To Blue") to ".lossy.flac" (and ".lossy.lwcdf.flac") - the correction-part. 2. Then I put all the ".lossy.flac"-files from this folder in a playlist and select the merge-part in the converter. In the Converter-settings under "Output files" - "Convert each track to an individual file" it looks like this: CODE %artist% - %album%\$if2(%artist%,unknown artist) - $if2(%album%,unknown album) $if2('CD'%discnumber%,) - [%tracknumber%] %title%)
This post has been edited by Bollerkopp: Jan 19 2010, 07:35 |
|
|
|
Jan 19 2010, 07:50
Post
#47
|
|
|
Group: Validating Posts: 2424 Joined: 21-May 08 Member No.: 53675 |
you should run converter only on .lossy.flac files (excluding .lwcdf.flac files), and about output name format I won't repeat myself
|
|
|
|
Jan 19 2010, 09:28
Post
#48
|
|
|
Group: Validating Posts: 2424 Joined: 21-May 08 Member No.: 53675 |
also I just now noticed that I was merging in the source file folder, so maybe that's the problem, as I don't know of a way how foobar could give source file path to the encoder: %s gives destination path and %d gives destination name, or to put it differently - when using merge do this:
- "source track folder" must be selected for output path - %filename% must be name format of output file and somehow I forgot to clean up lossywav wav output so please add && del "%~n3.wav" to the last line: CODE c:\"Program Files"\encoders\flac -s --ignore-chunk-sizes -5 "%~n3.wav" -o"%~n3.fla" && del "%~n3.wav" |
|
|
|
Jan 19 2010, 15:39
Post
#49
|
|
![]() Group: Members Posts: 202 Joined: 8-September 07 From: Hamburg, GER Member No.: 46899 |
Yes, I run it on the ".lossy.flac."-files only. That was not the problem. The problem was the name format of the output file. Now I changed it to "%artist% - %album%\%filename%" and it works. Sorry for overlooking it.
I adjusted the last line... now all is fine. Thank you very much for your script and the effort. |
|
|
|
Jan 19 2010, 16:48
Post
#50
|
|
![]() Group: Developer Posts: 2983 Joined: 2-December 07 Member No.: 49183 |
|
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 22nd May 2013 - 15:18 |