Author Topic: 2 wishes  (Read 8096 times)

tubescreamer

  • Jr. Member
  • **
  • Posts: 83
Hi,

currently I want to switch with many files from APE to FLAC format and conversion takes a while ... while converting the disk became full, because the source files do not get deleted once the conversion was successfully. I am missing an option for this scenario, when diskspace is "tight". Would it be possible for you to implement this ?

I would be glad, if the audio converter could get GPU support to be able to use the full power of my system when having big conversion batches. Am having a GTX 980. Tried FLACCL (http://www.cuetools.net/wiki/FLACCL) but unfortunately this does't work, am getting an error message when trying to convert a .wav file with it: "CreateDefaultContext: No OpenCL devices found that matched filter criteria."
Any plans to implement something like this ?

Pingaware

  • Sr. Member
  • ****
  • Posts: 1110
currently I want to switch with many files from APE to FLAC format and conversion takes a while ... while converting the disk became full, because the source files do not get deleted once the conversion was successfully. I am missing an option for this scenario, when diskspace is "tight". Would it be possible for you to implement this ?

This exists. Change the option to "Replace source file".
Bold words in my posts are links unless expressly stated otherwise.

tubescreamer

  • Jr. Member
  • **
  • Posts: 83
currently I want to switch with many files from APE to FLAC format and conversion takes a while ... while converting the disk became full, because the source files do not get deleted once the conversion was successfully. I am missing an option for this scenario, when diskspace is "tight". Would it be possible for you to implement this ?

This exists. Change the option to "Replace source file".

I used this option and I assume deleting the old .ape files will be done last ... but then the disk is already full and all gets stuck.

tubescreamer

  • Jr. Member
  • **
  • Posts: 83
Update: maybe I should post this now to an issue thread, as this has nothing to do with wishlist.

In regards to CUETools.FLACCL.cmd.exe ... FLAC converter with OpenCL support.

I found the issue, I used the wrong command line parameters.

Nevertheless I still experience the problem, that this converter does not run inside MusicBee, on the DOS Box it runs very well and performant.

The results are amazing: the converter converts a 310 MB wave file in 2.8 seconds using ~20% of my GPU (GTX980).

I am currently using MusicBee 2.4.5404.

I copied the executeable of all DLLs which belong to the program to the codec subdirectory.
I also copied all the DLLs to the \Windows\system32 folder and rebooted.
Nothing helps so far.
I copied and pasted the commandline arguments between MusicBee Converter setup and the commandline to verify, that no synthat error occurrs. No luck so far.

When I start the conversion by right clicking to a file inside MusicBee Playlist (-> send to -> Format-converter), then I get after conversion the following error message in the right column "Status" of the File Converter Windows "Fehlgeschlagen: No output file was produced: check the encodeing command line parameters which may be incorrectly configured in the File Converter preferences".

The converter settings I use now for FLAC
-q -8 --opencl-type GPU --opencl-platform "NVIDIA CUDA" -o [outputfile] -

If you want to try this on your own

Homepage of author:
http://audiophilesoft.ru/load/coders_utils/flaccl/7-1-0-68

Download Link for latest version 2.1.6:
http://audiophilesoft.ru/commandline/flaccl/FLACCL_2.1.6.7z

Possible commandline options:
http://audiophilesoft.ru/commandline/flaccl/switches.txt

Discussion thread on the forum:
http://www.hydrogenaud.io/forums/index.php?showtopic=64628
Last Edit: April 06, 2015, 11:03:57 AM by tubescreamer

redwing

  • Guest
Why don't you ask about it to HydrogenAudio forum yourself as testing it requires some specific hardware?

tubescreamer

  • Jr. Member
  • **
  • Posts: 83
I asked on their forum as well. But as the converter works on the commandline I assume this could also be a MusicBee related issue. So I hope for support on this forum as well, be it to get info how to be able to troubleshoot this better or maybe a pointer towards a working solution ...

I personally have 2 suspicions .. maybe somebody from this forum has an idea
1. maybe there is a problem to load the DLLs which are required for the converter.
2. maybe there is a problem with the commandline option
--opencl-platform "NVIDIA CUDA"
which has a space in it ...

Unfortunately MusicBee doesn't write something useful to the error log which can be viewed via "Help -> Support -> Show Error-Log" (translated from German, might be not 100% accurate).

Do you know perhaps where its possible to enabled some more verbose logging ?
I tried the latest release candidate 2.5.5524, problem persists.
Last Edit: April 06, 2015, 11:55:04 AM by tubescreamer

redwing

  • Guest
What happens just with this?

-q -8 -o [outputfile] -

Or try using a single quote around the platform name.

tubescreamer

  • Jr. Member
  • **
  • Posts: 83
I tried it already with single quotes, no change. On the commandline both is possible, either single or double quotes.

The tool defaults to use the GPU ( --opencl-type GPU). If I do not specify which platform to use (amd or nvidia) then this happens:

Win7>CUETools.FLACCL.cmd.exe -o audio.flac audio.wav
[...]
Error: no OpenCL devices found that matched filter criteria.

In the DOS box I validated already, that reading input from a pipeline works using these commands. Doesn't work inside MusicBee though ..
type audio.wav | CUETools.FLACCL.cmd.exe -q -8 --opencl-platform "NVIDIA CUDA" -o audio.flac -
type audio.wav | CUETools.FLACCL.cmd.exe -q -8  --opencl-type GPU --opencl-platform "NVIDIA CUDA" -o audio.flac -

An additional idea, I try to use the CPU for conversion, then I do not require to specify the platform type,
which has the space in it ("NVIDIA CUDA") to exclude any problem in regards to potential quoting issues inside MusicBee.
But this also does not change anything.  I tested it with these argument
-q -8 --opencl-type CPU - -o [outputfile]

Location of the minus sign "-" can be before or after the -o option, this I tested already on the command line.
So its also not the order of the arguments.

I have a certain feeling that it has to do with the DLL files.
Do you think MusicBee finds them in this directory ? C:\Program Files (x86)\MusicBee\Codec ??

EDIT: I copied now the 4 DLLs (CUETools.Codecs.dll, CUETools.Codecs.FLACCL.dll, CUETools.Codecs.FLAKE.dll, OpenCLNet.dll) even to the Windows System folder. As I was not sure, whether those files are 32 or 64bit I copied them to both directories (System32 and SysWOW64) and rebooted. No change still doesn't work.

BTW registration of those DLLs - should this be required - in both directories using the proper tool failed as well.
Error message was: "Das Modul C:\Windows\System32\CUETools.Codecs.dll wurde geladen, aber der DllRegister-Eingangspunkt wurde nicht gefunden. Stellen Sie sicher, dass C:\Windows\System32\CUETools.Codecs.dll eine gültige .DLL oder .OCX Datei ist, und wiederholen Sie den Vorgang."

REM If the DLL is 32 bit: Copy the DLL to C:\Windows\SysWoW64\
%windir%\SysWoW64\regsvr32.exe %windir%\SysWoW64\CUETools.Codecs.dll
%windir%\SysWoW64\regsvr32.exe %windir%\SysWoW64\CUETools.Codecs.FLACCL.dll
%windir%\SysWoW64\regsvr32.exe %windir%\SysWoW64\CUETools.Codecs.FLAKE.dll
%windir%\SysWoW64\regsvr32.exe %windir%\SysWoW64\OpenCLNet.dll
REM if the DLL is 64 bit: Copy the DLL to C:\Windows\System32\
%windir%\System32\regsvr32.exe %windir%\System32\CUETools.Codecs.dll
%windir%\System32\regsvr32.exe %windir%\System32\CUETools.Codecs.FLACCL.dll
%windir%\System32\regsvr32.exe %windir%\System32\CUETools.Codecs.FLAKE.dll
%windir%\System32\regsvr32.exe %windir%\System32\OpenCLNet.dll

EDIT2: I found out via google that the regsvr32 error message appears, because these DLLs seem to be plain "C DLLs" no "OLE DLLs". So normal "C DLLs" do not need to be registered, they will be found automatically in \windows\system32 ....
Last Edit: April 06, 2015, 03:36:09 PM by tubescreamer

redwing

  • Guest
I tried the encoder, and it seems the tool just doesn't support stdin for input file.

I verified this argument successfully converting in command prompt window, but couldn't make it to work with whatever file converter settings.

cuetools.flaccl.cmd -q -8 a.wav -o b.flac

The dll files can just be placed under codec folder.

tubescreamer

  • Jr. Member
  • **
  • Posts: 83
I found the solution. See also the last posts in this thread, where somebody supported me.
http://www.hydrogenaud.io/forums/index.php?showtopic=64628&st=425&start=425

There are several issues which hindered the program to run properly inside of MusicBee:

1. besides the DLL files also flac.cl is required. Its looks like C Code, so I thought this is only for docu purposes, but its actually used during runtime

2. I copied the 4 DLL files to 4 different places in the hope to get it work...
C:\Program Files (x86)\MusicBee\Codec
C:\Program Files (x86)\MusicBee
C:\Windows\System32
C:\Windows\SysWOW64
I additionally copied now the flac.cl to these 4 location. Its still an open topic for me to identify, whether codec directory is sufficient.

3. it turned out when using the converter on the commandline, then also higher optimizations (-9 - -11) are possible. But then additionally the -lax option needds to be set. Higher optimization/compression than -8 turned out not to be possible when being called from within MusicBee.

4. when being called from within Musicbee then you need another commandline option, which was not required when being used in the DOS box. On the DOS box the converter can even read properly from stdin, without the need of the additional option --ignore-chunk-sizes.

5. inside of Musicbee you need to use --ignore-chunk-sizes as parameter, and higher levels than -8 are not possible, then conversion doesnt run.

The settings inside of MusicBee to make it work were for me (-> Settings -> File Converter):
- maximum Encoder Threads: 6 up to 9 (I would say this is CPU and Disk i/o dependend)
- use the converter from within MusicBees codec subdirectory where the converter, the DLLs and the flac.cl (!!) need to reside (remember my open topic, I need to validate, that it can be this directory exclusively, at the moment I have this spread around 4 locations):
   C:\Program Files (x86)\MusicBee\Codec\CUETools.FLACCL.cmd.exe
- use the following arguments: -q -8 --ignore-chunk-sizes --opencl-type GPU --opencl-platform "NVIDIA CUDA" - -o [outputfile]

6. If you have an AMD graphic card, then you might need another cmd line option: --opencl-platform "AMD Accelerated Parallel Processing"

First findings in regards to performance.

With my GTX 980 I am getting an avg. GPU utilization up to 14% with few peaks up to 20%, depends on the number of encoder threads.
When converting the same APE files to FLAC with Encoders from 1..9 for my machine ~7 encoders utilize CPU and GPU best.
Using 8-9 encoders results still in some more files, but not that dramatic.
With 1 encoders I get 18, with 2 encoders I get 32 files converted within a minute.
The difference between using 6-9 encoders is only within 4-10 files more per additional encoder.

I made a 1st real life performance test by looking how many of my APE files I get converted within 4 minutes.
With FLACCL I get 314 files of 7,36 GB size in total. CPU utilization between 51-73, GPU between 2-14%.
With normal FLAC I get only 185 files of 4,47 GB size in total. CPU utilization between 37-68%, GPU of course 0%.

To convert 314 files, which FLACCL did in 4 minutes, the normal FLAC programm needs 6m35s, which is 65% more.
The size difference between the 314 files is very low 7,36 GB (FLACCL) vs 7,37 GB (flac).

So the only motivation to use this program is for speed if you have a big conversion job or if you simply like the idea being able to offload work to the GPU.

Thanks for your response and I hope you get it running as well, as it appears to me that you also spend some time on this.




redwing

  • Guest
Thanks. I got it working as well.

- Originally used the official 0.3 version. Now 2.1.5 version from the thread you linked seems to support stdin.
- As you said, --ignore-chunk-sizes option was required.

I put those files just in codec folder and used "-q -8 --ignore-chunk-sizes - -o [outputfile]" argument.