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: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda) (Read 468237 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)

Reply #426
There you go: http://www.hydrogenaud.io/forums/index.php?showtopic=106446


Thanks a lot!

I had been wondering about this one a lot. I was worried all the official sites were too outdated.
Though, it shouldn't stop me from learning to compile it myself.

NVidia just updated it's WQHL drivers today, too.
So I think I'll set some times aside to have fun with this.
I like to use "HD audio" in PaulStretch. "HD audio", lol.

FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)

Reply #427
I just tried some benchmarks with an overclocked r9 290, and the CPU is the bottleneck. With -11 I'm getting over 2300x realtime encoding speed. It took less than 16 seconds to encode 10 hours of audio. -0 and -8 both get about 2500x. The CPU (4770K @ 4.4 GHz) actually appears to be the bottleneck. The encoder won't use more than 2 or 3 cores depending on if --fast-gpu is enabled or not. Enabling --no-md5 and --no-seektable gets the speed of -11 up to 2550x, -8 to 5000x, and -0 to 6200x. That means it took less than 5.9 seconds to encode a 10 hour audio file. Not bad for a GPU that cost $200. Anybody know anything else to reduce the work done by the CPU threads?

FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)

Reply #428
*looks at his puny 270x encoding speed*
Those numbers are insane. A question though, were the files you tested CD images or single tracks?

FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)

Reply #429
*looks at his puny 270x encoding speed*
Those numbers are insane. A question though, were the files you tested CD images or single tracks?

I was using a 10 hour long audio file for testing. Anything shorter would have encoded too quickly.

FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)

Reply #430
It's just that my tests showed encoding 6h of separate tracks is slower than encoding one 6h long file.

FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)

Reply #431
It's just that my tests showed encoding 6h of separate tracks is slower than encoding one 6h long file.

Compiling the kernels does take some time.

FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)

Reply #432
Hello everybody.
1st of all many thanks to Gregory for CUETOOLS.FLACCL, its awesome.

I am getting impressive encoding results with version 2.1.6 and using a nVIDIA GTX 980 (MSI 4G Gaming).

Source file: audio.wav, 16bit 310 MByte.

CUETools.FLACCL.cmd.exe -8 --opencl-type GPU --opencl-platform "NVIDIA CUDA" audio.wav -o audio-FLACCL-GPU-8.flac
Results : 784,59x; 107929761 bytes in 00:00:02.2464040 seconds;

CUETools.FLACCL.cmd.exe -11 --lax --opencl-type GPU --opencl-platform "NVIDIA CUDA" audio.wav -o audio-FLACCL-GPU-11.flac
Results : 610,71x; 107240029 bytes in 00:00:02.8860051 seconds;

Generated output files:
107.240.029 audio-FLACCL-GPU-11.flac
107.929.761 audio-FLACCL-GPU-8.flac

Comparison to normal FLAC program:
flac-eac.exe -f audio.wav -o audio-FLAC-5.flac (~8 Sec)
flac 1.2.1, Copyright © 2000,2001,2002,2003,2004,2005,2006,2007  Josh Coalson
audio.wav: wrote 109444345 bytes, ratio=0,352

flac-eac.exe -8 -f audio.wav -o audio-FLAC-8.flac (~23 Sec)
audio.wav: wrote 108639615 bytes, ratio=0,349

So if I compare now old FLAC encoder with FLACCL, then these are the differencies in time and file size.
FLAC -8:          23,0 Sekunden, 108.639.615 Bytes
FLACCL -11:      2,8 Sekunden,  107.240.029 Bytes (with GPU Support, GTX980)

The only remaining major problem that I have is, that I can't get FLACCL to work as format converter in MusicBee, my favorite Music manager.

All that it tells me in the status column: "Fehlgeschlagen: No output file was produced: check the encodeing command line parameters which may be incorrectly configured in the File Converter preferences"

I use currently these setting which are tested on Commandline (DOS Box):
-q -8 --opencl-type GPU --opencl-platform "NVIDIA CUDA" - -o [outputfile]

I copied the executeable and all DLLs from the 7z archive to MusicBees codec directory, where all converter reside.
I even copied all DLLs to the Windows system directory and restarted as I thought maybe it has to do with DLL issues.
If I didn't make a nasty mistake, which I do not believe, then I am clueless how to make it to work.

Gregory, would it perhaps be possible to produce a statically linked executeable, where everything is in one exe file ?

Another suspicion is, that the commandline gets stored in XML format, it looks in the MusicBee ini file like this:
<EncodingParameters>-q -8 --opencl-type GPU --opencl-platform &quot;NVIDIA CUDA&quot; - -o [outputfile]</EncodingParameters>

Could it be the case that this "&quot" is somehow disturbing ?
Would it be possible, that you change the commandline option to something without a space in the option, so that it could look like this:
<EncodingParameters>-q -8 --opencl-type GPU --opencl-platform nvCUDA - -o [outputfile]</EncodingParameters>

FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)

Reply #433
You need the following files:

flac.cl
CUETools.Codecs.dll
CUETools.Codecs.FLACCL.dll
CUETools.Codecs.FLAKE.dll
OpenCLNet.dll
CUETools.FLACCL.cmd.exe

You can also add --ignore-chunk-sizes  option.

Also, I'm not sure that --opencl-type and --opencl-platform are necessary in your case.

FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)

Reply #434
You need the following files:

flac.cl
CUETools.Codecs.dll
CUETools.Codecs.FLACCL.dll
CUETools.Codecs.FLAKE.dll
OpenCLNet.dll
CUETools.FLACCL.cmd.exe

You can also add --ignore-chunk-sizes  option.

Also, I'm not sure that --opencl-type and --opencl-platform are necessary in your case.


Hurray it works now, many thanks. I didn't know that flac.cl is also required.
I only need to identify now which the proper location for the DLLs / flac.cl file is ...
I copied it now to these 4 locations in the hope something will work...

C:\Program Files (x86)\MusicBee\Codec
C:\Program Files (x86)\MusicBee
C:\Windows\System32
C:\Windows\SysWOW64

Many thanks !

FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)

Reply #435
Other question, how "error proof" is this converter ?

Do you use it for your "production use" ? Does it have the maturity of the normal flac converter ?

Somebody in another forum "claimed" this software would be relatively old ... am not sure about this.

Is FLACCL 2.6.1 based on the most up to date FLAC sources ?

Would you convert 6000+ files from .ape to .flac with FLACCL 2.6.1 ?

What is the exact purpose of --verify ? Does it validate 100% that the FLAC file results in the same .wav file ?
Would it change the exit status of the converter so that an Application like MusicBee would get knowledge
that something went wrong during conversion ?
I intend to make a full run under MusicBee and enable the option to overwrite the .ape "sources".
Afterwards it will be impossible for me to validate, whether conversion of all 6000+ files are really ok.

So .. based on this information, is FLACCL mature and stable enough like flac v1.2.1 from Josh Coalson ?

Many thanks for giving me an advice for this.



FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)

Reply #436
Short answer: of course it is not as mature as reference libFLAC. There have been at least three instances of bugs that caused invalid compression. All known bugs are fixed at this point, but there's always a chance there's still an unknown bug lurking somewhere. Almost all of the bugs had to do with high-res audio and/or compression levels 9-11 though, the standard cd audio with compression levels 0-8 is much more mature.

I would recommend using --verify at all times, if for nothing else then just for the fact that there can always be errors caused by overclocked, overheated or defective GPU - those are on average somewhat less reliable that CPUs.

--verify guarantees that each encoded frame can be decoded using the same software (cuetools.flake).

Personally, i use for "production use" with  --verify;

You have to make sure the calling software correctly detects the non-zero return code from encoder though.
CUETools 2.1.6

FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)

Reply #437
Thanks a lot for your kind response. I posted a summary in the MusicBee forum, how you can bring it to work.
http://getmusicbee.com/forum/index.php?top...g92043#msg92043

I played around with different # of encoder settings, with 6-9 you can convert fastest. 6 appears to be for me the best setting not to load the system too much, as the delta of converted files decreases with each converter more.

I found out that the normal flac converter needs 65% more time to convert 314 ape files to flac using MusicBee.
The space consumption is about the same.

I am running out of time today, so tests with -verify are not possible for my anymore.

Many thanks for this nice converter, I like OpenCL and to offload some work to the GPU which is mostly idle.

FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)

Reply #438
I upgraded to FLACCL 2.1.6 on GTX 970 (Forceware 350.12). When I try to encode test file i get the following error:
Quote
CUETools.FLACCL.cmd.exe -11 --lax test.wav
Error: no opencl platforms found.

FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)

Reply #439
Was it working with a previous cuetools-version or driver-version with that card?

FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)

Reply #440
Yes, it is working with the same gpu+drivers and flaccl 2.1.5 just fine.

FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)

Reply #441
Hi Gregory, have been following yours and the fpflac implementation and noted there is one important missing feature (at least for me): the --test option.

Checking an existing flac file like you do with  -v option but without the wav requirement and no output, just verifying if the calculated MD5 matches the stored signature.
I suppose in your implementation the idea would be a bit different than the work you have been done up to now since the point is not checking if the output matches the input with your new gpu encoding but making use of the GPU to calculate faster the MD5 hash, independent of the flac "enconding".

Just with that and a batch file you would make an entire 3TB audio database verification a matter of minutes instead of hours.

FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)

Reply #442
GPU is not very good at decoding flac or calculating MD5 hash.
CUETools 2.1.6

FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)

Reply #443
Have seen GPU being used for hash calcs (https://hashcat.net/oclhashcat/), but wasn't sure for the decoding part... so that would fit better in fpflac, don't you?

On the other hand, your implementation also uses multiple CPUs with the right options, could something along those lines work?

FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)

Reply #444
Have seen GPU being used for hash calcs (https://hashcat.net/oclhashcat/), but wasn't sure for the decoding part... so that would fit better in fpflac, don't you?

On the other hand, your implementation also uses multiple CPUs with the right options, could something along those lines work?

hashcat calculates multiple hashes separately. with flac you hash all the data serially. hence it is slow.

FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)

Reply #445
Checking an existing flac file like you do with  -v option but without the wav requirement and no output, just verifying if the calculated MD5 matches the stored signature.
I suppose in your implementation the idea would be a bit different than the work you have been done up to now since the point is not checking if the output matches the input with your new gpu encoding but making use of the GPU to calculate faster the MD5 hash, independent of the flac "enconding".

Did you try Audiotester? It can use multiple cores of CPU.

FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)

Reply #446
I finally found the support page.  =)

Might I ask for a feature - ReplayGain calculation? Typically, people, who create lossless audio, don't have the opportunity of tuning sensitivity; consequently lossless audio is quiet/loud. Normalization will increase noise and distortion, therefore ReplayGain is the lesser evil here.

P.S.
Downloaded flacCL from here (), found:

CUETools FLACCL 2.1.6, Copyright © 2010-2013 Grigory Chudov.

FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)

Reply #447
FlacCL refuse to convert WAV with 8-bit/22.05 kHz.

flacCL from here.

FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)

Reply #448
CUETools doesn't support 24-bit/192 kHz (even 2.1.6).

FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)

Reply #449
This critic came up more than once but CUEtools is doing fine since it is created to handle cds. You may use the flac encoders standalone for other samplerates.
Is troll-adiposity coming from feederism?
With 24bit music you can listen to silence much louder!