Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: lossyWAV 1.3.0 Delphi to C++ Translation Thread (Read 158767 times) previous topic - next topic
0 Members and 3 Guests are viewing this topic.

lossyWAV 1.3.0 Delphi to C++ Translation Thread

Reply #101
I will be using lossywav ONLY for movie soundtracks.

lossyWAV 1.3.0 Delphi to C++ Translation Thread

Reply #102
Btw What exactly .dll does lossywav need to use FFTW? libfftw3-3.dll , libfftw3f-3.dll or libfftw3l-3.dll ?
libfftw3-3.dll (double precision).

One more thing. You forgot to include pthreadGC2.dll in package.
I will remove the dependency on it (multi-threading on hold at the moment).
lossyWAV -q X -a 4 -s h -A --feedback 2 --limit 15848 --scale 0.5 | FLAC -5 -e -p -b 512 -P=4096 -S- (having set foobar to output 24-bit PCM; scaling by 0.5 gives the ANS headroom to work)

lossyWAV 1.3.0 Delphi to C++ Translation Thread

Reply #103
Quote
I will remove the dependency on it (multi-threading on hold at the moment).

So I guess I will have to find a workaround for this . I'm thinking about using --skip and --until options in flac decoder. The idea is to run four tasks at the same time and each task (FLAC -> lossywav -> FLAC) will encode it's own chunk.

example
Code: [Select]
flac.exe -d "E:\Avatar.2009.BluRay.REMUX.1080p.AVC.DTS-HD.MA5.1.flac" --skip 0 --until 1000 --force-wave64-format --stdout --silent | lossywav - --stdout | flac - -b 512 -8 --silent -o "C:\chunk1.flac"


Code: [Select]
flac.exe -d "E:\Avatar.2009.BluRay.REMUX.1080p.AVC.DTS-HD.MA5.1.flac" --skip 1001 --until 2000 --force-wave64-format --stdout --silent | lossywav - --stdout | flac - -b 512 -8 --silent -o "C:\chunk2.flac"


and so on. Do you know maybe how to determine number of samples in flac file and also how to properly combine all chunks in one flac file?

lossyWAV 1.3.0 Delphi to C++ Translation Thread

Reply #104
Number of samples = Duration * Sample-Rate. Use metaflac --show-sample-rate to output the sample-rate of the file and --show-total-samples for total number of samples.

You can specify an exact sample reference for both --skip and --until. Sample reference should be an exact multiple of the lossyWAV block size corresponding to the sample rate of the audio. If in doubt, use a multiple of 4096;

Please ensure that the value used in conjunction with "-b" (512 in this case) is appropriate for the sample-rate of the audio. 512 for 25.6kHz <= f < 51.2kHz; 1024 for 51.2kHz <= f < 102.4kHz, etc (up to 4096);

There must be a way to join FLAC files together in this manner.... (I believe that shntool can achieve this (although not sure if it is compatible with WAVE64)).

[edits]

[more edits] 8192 should have been 4096.
lossyWAV -q X -a 4 -s h -A --feedback 2 --limit 15848 --scale 0.5 | FLAC -5 -e -p -b 512 -P=4096 -S- (having set foobar to output 24-bit PCM; scaling by 0.5 gives the ANS headroom to work)

lossyWAV 1.3.0 Delphi to C++ Translation Thread

Reply #105
Ok thanks for help !

lossyWAV 1.3.0 Delphi to C++ Translation Thread

Reply #106
There must be a way to join FLAC files together in this manner.... (I believe that shntool can achieve this (although not sure if it is compatible with WAVE64)).


With FLAC, I do something like this:

Code: [Select]
flac -d -c --force-raw-format --endian=little --sign=signed *.flac | flac -s -o 'album.flac' -P 8192 --best --endian=little --sign=signed --channels=2 --bps=16 --sample-rate=44100 -

lossyWAV 1.3.0 Delphi to C++ Translation Thread

Reply #107
so far i could not find tool which could merge flacs without re-encoding process. it really sucks that ogg vorbis can be easly losslessly splited/joined but not lossless flac format.

i still have last crazy idea. muxing flacs into .mka using mkvtoolnix and then demuxing back to .flac

lossyWAV 1.3.0 Delphi to C++ Translation Thread

Reply #108
lossyWAV beta 1.3.1a attached to post #1 in this thread.
lossyWAV -q X -a 4 -s h -A --feedback 2 --limit 15848 --scale 0.5 | FLAC -5 -e -p -b 512 -P=4096 -S- (having set foobar to output 24-bit PCM; scaling by 0.5 gives the ANS headroom to work)

lossyWAV 1.3.0 Delphi to C++ Translation Thread

Reply #109
lossyWAV beta 1.3.1b attached to post #1 in this thread.
lossyWAV -q X -a 4 -s h -A --feedback 2 --limit 15848 --scale 0.5 | FLAC -5 -e -p -b 512 -P=4096 -S- (having set foobar to output 24-bit PCM; scaling by 0.5 gives the ANS headroom to work)

lossyWAV 1.3.0 Delphi to C++ Translation Thread

Reply #110
lossyWAV beta 1.3.1b attached to post #1 in this thread.


I just found out that my foobar2000 v1.2.9 stops working for this version. It used to work fine.

Please help, anyone?

The parameters are:
Code: [Select]
C:\Windows\System32\cmd.exe /d /c lossyWAV.exe - --quality standard --silent --stdout|flac.exe - -b 512 -5 -f -o%d --ignore-chunk-sizes


lossyWAV 1.3.0 Delphi to C++ Translation Thread

Reply #111
Many thanks for the bug report. Did beta 1.3.1b function correctly with foobar2000 v1.2.8? (I upgraded to check your report and now cannot downgrade).

I will attempt to determine what has changed and create a fix.

Thanks again,

Nick.
lossyWAV -q X -a 4 -s h -A --feedback 2 --limit 15848 --scale 0.5 | FLAC -5 -e -p -b 512 -P=4096 -S- (having set foobar to output 24-bit PCM; scaling by 0.5 gives the ANS headroom to work)

lossyWAV 1.3.0 Delphi to C++ Translation Thread

Reply #112
Just attempted to run 1.3.1b and got:

Code: [Select]
%lossyWAV Error%: Program has reached expiry date.
Please contact Nick.C for a new version.

What is this?
Doesn't happen with Delphi 1.3.0

PS: Maybe it's the same issue with Musique-Rabbit?

lossyWAV 1.3.0 Delphi to C++ Translation Thread

Reply #113
What is this?
Doesn't happen with Delphi 1.3.0

PS: Maybe it's the same issue with Musique-Rabbit?

It probably is - my mistake. Thanks for posting the finding.

I have introduced a drop-dead-date for beta versions so that versions with potential errors in the method will expire over time.

lossyWAV beta 1.3.1c attached to post #1 of this thread.
lossyWAV -q X -a 4 -s h -A --feedback 2 --limit 15848 --scale 0.5 | FLAC -5 -e -p -b 512 -P=4096 -S- (having set foobar to output 24-bit PCM; scaling by 0.5 gives the ANS headroom to work)


lossyWAV 1.3.0 Delphi to C++ Translation Thread

Reply #115
lossyWAV beta 1.3.1d attached to post #1 in this thread.
lossyWAV -q X -a 4 -s h -A --feedback 2 --limit 15848 --scale 0.5 | FLAC -5 -e -p -b 512 -P=4096 -S- (having set foobar to output 24-bit PCM; scaling by 0.5 gives the ANS headroom to work)

lossyWAV 1.3.0 Delphi to C++ Translation Thread

Reply #116
lossyWAV beta 1.3.1e attached to post #1 in this thread.
lossyWAV -q X -a 4 -s h -A --feedback 2 --limit 15848 --scale 0.5 | FLAC -5 -e -p -b 512 -P=4096 -S- (having set foobar to output 24-bit PCM; scaling by 0.5 gives the ANS headroom to work)

lossyWAV 1.3.0 Delphi to C++ Translation Thread

Reply #117
lossyWAV beta 1.3.1e attached to post #1 in this thread.


Hey Nick,

Unfortunately, the latest version of lossyWAV seems to be faulty. It just won't work for some reason. Can you check it out when you have the time.

Thanks. Great job by the way.

Alex
lossyWAV -q H | FLAC -5 ~= 480kbps
QAAC 320kbps

lossyWAV 1.3.0 Delphi to C++ Translation Thread

Reply #118
Thanks for the report Alex.

Can you provide a little more detail as to the nature of the error?

Thanks.

Nick.
lossyWAV -q X -a 4 -s h -A --feedback 2 --limit 15848 --scale 0.5 | FLAC -5 -e -p -b 512 -P=4096 -S- (having set foobar to output 24-bit PCM; scaling by 0.5 gives the ANS headroom to work)

lossyWAV 1.3.0 Delphi to C++ Translation Thread

Reply #119
Thanks for the report Alex.

Can you provide a little more detail as to the nature of the error?

Thanks.

Nick.



Sure, Nick. The converter status report from Foobar 2000 is below. Please note that 1.3.1.4 works perfectly with the normal parameters (I use --quality high).

Alex


1 out of 1 tracks converted with major problems.

Source: "C:\Users\Alex Akin\Music\Main\Elbow\Asleep In The Back\01 Elbow - Any Day Now.flac"
  An error occurred while writing to file (The encoder has terminated prematurely with code 1 (0x00000001); please re-check parameters) : "C:\Users\Alex Akin\Downloads\Portable Music\Elbow\Asleep In The Back\01 Elbow - Any Day Now.lossy.flac"
  Additional information:
  Encoder stream format: 44100Hz / 2ch / 16bps
  Command line: "C:\Windows\System32\cmd.exe" /d /c C:\"Program Files"\bin\lossywav - --quality high --silent --stdout|C:\"Program Files"\bin\flac - -b 512 -5 -f -o"01 Elbow - Any Day Now.lossy.flac" --ignore-chunk-sizes
  Working folder: C:\Users\Alex Akin\Downloads\Portable Music\Elbow\Asleep In The Back\
 
  Conversion failed: The encoder has terminated prematurely with code 1 (0x00000001); please re-check parameters
lossyWAV -q H | FLAC -5 ~= 480kbps
QAAC 320kbps

lossyWAV 1.3.0 Delphi to C++ Translation Thread

Reply #120
Sure, Nick. The converter status report from Foobar 2000 is below. Please note that 1.3.1.4 works perfectly with the normal parameters (I use --quality high).

Alex

I tried to emulate the error with no success. It could be down any of the following (as well as being a bug in lossyWAV that has before now not deigned to rear its head):

1) No space left on drive C;
2) System date incorrectly set;
3) Either lossyWAV.exe or FLAC.exe missing from directory pointed to in command line.

Another possibility - have you tried any other tracks, and if so have you had any success with them? During the development of adaptive noise shaping, there were three John Lennon tracks from Imagine that caused a divide by zero error in the Levinson algorithm when creating the noise shaping filter and this only showed up during a mass test encode.
lossyWAV -q X -a 4 -s h -A --feedback 2 --limit 15848 --scale 0.5 | FLAC -5 -e -p -b 512 -P=4096 -S- (having set foobar to output 24-bit PCM; scaling by 0.5 gives the ANS headroom to work)

lossyWAV 1.3.0 Delphi to C++ Translation Thread

Reply #121
It's baffling. Like I said previously, only version 1.3.1.5 isn't behaving. Version 1.3.1.4 does the job smoothly, without breaking a sweat.

I've tried a range of tracks just to pinpoint the problem - all to no avail. I can confirm that there's abundant space left on drive C; system date is correct; and both lossyWAV.exe and FLAC.exe were present in folder "bin" in Program Files.
lossyWAV -q H | FLAC -5 ~= 480kbps
QAAC 320kbps

lossyWAV 1.3.0 Delphi to C++ Translation Thread

Reply #122
Thanks again Alex. I'll break out the bug-hunting gear and make a start.

I may be some time....
lossyWAV -q X -a 4 -s h -A --feedback 2 --limit 15848 --scale 0.5 | FLAC -5 -e -p -b 512 -P=4096 -S- (having set foobar to output 24-bit PCM; scaling by 0.5 gives the ANS headroom to work)

lossyWAV 1.3.0 Delphi to C++ Translation Thread

Reply #123
lossyWAV beta 1.3.1f attached to post #1 in this thread.
lossyWAV -q X -a 4 -s h -A --feedback 2 --limit 15848 --scale 0.5 | FLAC -5 -e -p -b 512 -P=4096 -S- (having set foobar to output 24-bit PCM; scaling by 0.5 gives the ANS headroom to work)

lossyWAV 1.3.0 Delphi to C++ Translation Thread

Reply #124
lossyWAV beta 1.3.1f attached to post #1 in this thread.


Hello Nick,

I still haven't been able to get the latest beta version of LossyWav 1.3.1 to work on any of my systems (Windows 8 and 7 respectively). Same error as the last version.

Can you confirm that the following parameters still apply:

/d /c C:\"Program Files"\bin\lossywav - --quality standard --silent --stdout|C:\"Program Files"\bin\flac - -b 512 -5 -f -o%d --ignore-chunk-sizes

Thanks,

Alex
lossyWAV -q H | FLAC -5 ~= 480kbps
QAAC 320kbps