HydrogenAudio

CD-R and Audio Hardware => CUETools => Topic started by: Adil on 2021-08-09 15:12:22

Title: Add my compiled FLAC to CUERipper - is that possible?
Post by: Adil on 2021-08-09 15:12:22
Is there a possibility for me to add or change some FLAC encoder to CUERipper?

I ask this because I would like to add my own build from version 1.3.3.

Thanks in advance.
Title: Re: Add my compiled FLAC to CUERipper - is that possible?
Post by: korth on 2021-08-10 02:02:46
You didn't say whether the compiled FLAC is exe or dll and you did not specify what version of CUERipper.
I'll assume exe and CUERipper 2.1.9

An easier approach has been requested.
https://hydrogenaud.io/index.php?topic=118915.0#post_CUERipper

Start by adding the encoder to CUETools and testing it.



The settings shown assume you copied the exe to the CUETools main folder. Alternately you could add the path to the file (e.g. C:\flac\flac.exe) or add the location to the %path% in the Windows Environment Variables.
Make sure you adjust the slider to a compression setting before testing or you'll receive an error message.
Exit CUETools

Next open the CUETools settings.txt file (in %APPDATA%\CUE Tools or if running as portable you'll find it in the \CUE Tools subfolder)
Find your new encoder

Code: [Select]
Advanced={
=  "encoders": [

[...]

=    {
=      "$type": "CUETools.Codecs.CommandLine.EncoderSettings, CUETools.Codecs",
=      "Name": "qaac.exe (tvbr)",
=      "Extension": "m4a",
=      "SupportedModes": "10 20 30 40 50 60 70 80 90 100 110 127",
=      "EncoderMode": "80",
=      "Path": "qaac.exe",
=      "Parameters": "-s -V %M -q 2 - -o %O"
=    },
=    {
=      "$type": "CUETools.Codecs.CommandLine.EncoderSettings, CUETools.Codecs",
=      "Name": "my flac",
=      "Extension": "flac",
=      "Lossless": true,
=      "SupportedModes": "0 1 2 3 4 5 6 7 8",
=      "Path": "flac.exe",
=      "Parameters": "-%M - -o %O"
=    }
=  ],
=  "decoders":

copy the text including the comma after the closing curly bracket from the previous encoder settings

Code: [Select]
,
=    {
=      "$type": "CUETools.Codecs.CommandLine.EncoderSettings, CUETools.Codecs",
=      "Name": "my flac",
=      "Extension": "flac",
=      "Lossless": true,
=      "SupportedModes": "0 1 2 3 4 5 6 7 8",
=      "Path": "flac.exe",
=      "Parameters": "-%M - -o %O"
=    }

(you should probably save a copy of the CUERipper settings.txt file before this step)
open the CUERipper settings.txt file (in %APPDATA%\CUERipper or if running as portable you'll find it in the \CUERipper subfolder)
Find the last encoder

Code: [Select]
=    {
=      "$type": "CUETools.Codecs.CommandLine.EncoderSettings, CUETools.Codecs",
=      "Name": "qaac.exe (tvbr)",
=      "Extension": "m4a",
=      "SupportedModes": "10 20 30 40 50 60 70 80 90 100 110 127",
=      "EncoderMode": "80",
=      "Path": "qaac.exe",
=      "Parameters": "-s -V %M -q 2 - -o %O"
=    }
=  ],
=  "decoders": [

paste the text you copied after the closing curly bracket of the last encoder (including that comma)

Code: [Select]
=    {
=      "$type": "CUETools.Codecs.CommandLine.EncoderSettings, CUETools.Codecs",
=      "Name": "qaac.exe (tvbr)",
=      "Extension": "m4a",
=      "SupportedModes": "10 20 30 40 50 60 70 80 90 100 110 127",
=      "EncoderMode": "80",
=      "Path": "qaac.exe",
=      "Parameters": "-s -V %M -q 2 - -o %O"
=    },
=    {
=      "$type": "CUETools.Codecs.CommandLine.EncoderSettings, CUETools.Codecs",
=      "Name": "my flac",
=      "Extension": "flac",
=      "Lossless": true,
=      "SupportedModes": "0 1 2 3 4 5 6 7 8",
=      "Path": "flac.exe",
=      "Parameters": "-%M - -o %O"
=    }
=  ],
=  "decoders": [

Save the settings.txt file for CUERipper
Open CUERipper and test the encoder.
Title: Re: Add my compiled FLAC to CUERipper - is that possible?
Post by: Adil on 2021-08-10 03:11:09
@korth

You solved my doubt with honor.

Thank you so much for your brilliant dedication to this topic!
Title: Re: Add my compiled FLAC to CUERipper - is that possible?
Post by: Adil on 2021-08-10 13:45:32
And, not abusing your good will, one last question:

If I just wanted to add the compiled DLL (libFLAC) file, would the procedure be the same?
Title: Re: Add my compiled FLAC to CUERipper - is that possible?
Post by: korth on 2021-08-10 17:57:38
No.
Appropriate versions of libFLAC_dynamic.dll are found in
\CUETools_2.1.9\plugins\Win32\
and
\CUETools_2.1.9\plugins\x64\
There has been limited success replacing these with other versions (e.g. https://www.rarewares.org/lossless.php#flac-dll) but I'm not recommending that you try that.
Title: Re: Add my compiled FLAC to CUERipper - is that possible?
Post by: Adil on 2021-08-10 18:05:58
That's all I needed to know.

Once again, my sincere thanks!