Skip to main content

Topic: Wanted: FLAC eksperts; Command lines for framerate/bitres?! (Read 4476 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • -Aze-
  • [*]
Wanted: FLAC eksperts; Command lines for framerate/bitres?!
Hi guys.

First of all thank you for this great forum. I have found a lot of great info in here.

Now I'm stocked with a question that I just CAN'T find the answer for.

I have a DVD-Audio disc containing 3 demo/test songs, stored in 1 single "AOB"-file (DVD-Audio). It is in PCM 96kHz, 24 bit, 5.1ch.
As I would like to do some listening tests, I'm converting it to various file-formats including FLAC.

I'm using a very basic program called "DVD-Audio Explorer 2008" which can load the DVD-A structure (through the IFO of the DVD-folder), and "extract" the specific tracks from out of the complete .aob-file.
By design the program stores the extracted files as PCM wave, but using a command line for external encoder, I can can load the FLAC.exe, extracting directly to FLAC-files.
It works perfect, but as it is a very basic program, there's no option for changing the framerate, and bit-depth. Only option is for "stereo downmix", which works very well though.

Anyway, what I need is a command line that can "tell" the FLAC encoder, to convert the file to 16bit instead of 24bit, and 48kHz instead of 96kHz.
I have been searching through 100 different sites, trying many different (homemade) command lines, but no luck at all. I just CAN'T fint the correct command, for these changes. The FLAC FAQ doesn't says anything I can use, or if so I'm just blind to it?!

Can some of you guys help me out? It would make my day, really.

  • julf
  • [*][*][*][*]
Wanted: FLAC eksperts; Command lines for framerate/bitres?!
Reply #1
What you need is SoX

  • db1989
  • [*][*][*][*][*]
  • Global Moderator
Wanted: FLAC eksperts; Command lines for framerate/bitres?!
Reply #2
In other words, flac.exe itself cannot change sampling rate or bit-depth.

  • -Aze-
  • [*]
Wanted: FLAC eksperts; Command lines for framerate/bitres?!
Reply #3
Wow...Such fast response. You guys are the best.

I just downloaded Sox, but I have no idea how to use it? How can I tell the "DVD Audio Explorer 2008" to use the Sox for the process? And where to add the command lines?

Really hope that you can clear it out for me, as I really don't know much about this.

  • phofman
  • [*][*][*][*]
Wanted: FLAC eksperts; Command lines for framerate/bitres?!
Reply #4
First, create the flac, e.g. high-resolution.flac

Second, open cmd.exe and run the sox command line:

path-to-sox\sox.exe -V high-resolution.flac -r 44100 -b 16 441-16.flac

And sox will convert your high-resolution.flac file to 44.1/16 file called 441-16.flac

  • -Aze-
  • [*]
Wanted: FLAC eksperts; Command lines for framerate/bitres?!
Reply #5
Phofman: Thank you very much for the explanation.
I'm still not able to get it to work correctly.

The idea is to encode to FLAC 16/48(44.1) directly from the program "DVD-Audio Eplorer 2008". There's the "run command" line. Shall I clear this, adding the new "Sox-line" to it?
If I have to run the cmd.exe for each file, there's no idea in it, a this is the exact same than if just using any other converter. The idea is that it should be done directly from the program, using the command-line!
Do you get my point, or am I just crazy?

  • CoRoNe
  • [*][*][*]
Wanted: FLAC eksperts; Command lines for framerate/bitres?!
Reply #6
I take it "DVD-Audio Explorer 2008" uses stdout (pipe):
sox.exe - -r 44100 -b 16 output.flac (sox uses max flac compression level by default).
or if you want to pipe yet to another encoder:
sox.exe - -r 44100 -b 16 -t wav - | encoder.exe - [options] output.ext
DC-Bass Source Mod: http://reino.degeelebosch.nl

  • phofman
  • [*][*][*][*]
Wanted: FLAC eksperts; Command lines for framerate/bitres?!
Reply #7
There's the "run command" line. Shall I clear this, adding the new "Sox-line" to it?


The manual http://501post.com/audio/db/from%20aaron/D...r%20Manual.html explains the command line substitutions you have to use in your command line in the DVD-AE settings. The rest is just trial and error to get it right

  • -Aze-
  • [*]
Wanted: FLAC eksperts; Command lines for framerate/bitres?!
Reply #8
I'm really glad you guys are trying to help me...I'm a completely newbee in this field.

CoRoNe: I don't know what it means, if a program uses stdout (pipe)? Anyway I have added the sox.exe file to the folder where the FLAC.exe is also placed (in the DVD-AE bin folder), and added the command line "sox.exe - -r 44100 -b 16 output.flac".
I must be doing something completely wrong, as it not works still.

phofman: Great. I didn't even knew that there was a manual for it. I have been reading it, but still not sure what to add to the command-line field?


  • CoRoNe
  • [*][*][*]
Wanted: FLAC eksperts; Command lines for framerate/bitres?!
Reply #9
After quickly looking through that manual: replace the first dash with %filepath% and see if it works.
  • Last Edit: 23 January, 2013, 04:59:17 PM by CoRoNe
DC-Bass Source Mod: http://reino.degeelebosch.nl

  • -Aze-
  • [*]
Wanted: FLAC eksperts; Command lines for framerate/bitres?!
Reply #10
So sorry for the delay in my reply.

OK, I have tried everything now. None seems to work for me. I'm an idiot in this command-line thing.
No matter what I try, the result is still an 24/96 FLAC file.

I have made a stap-by-step picture series of the process I do. Hope you can tell me what I'm doing wrong:












  • CoRoNe
  • [*][*][*]
Wanted: FLAC eksperts; Command lines for framerate/bitres?!
Reply #11
You need to specify sox.exe's location and replace the first dash (stdin) with %filepath%, according to the manual:

"D:\Storage\Media\Binaries\SoX 14.3.2\sox.exe" %filepath% -r 44100 -b 16 output.flac

Change the path to sox.exe accordingly and you're free to change the name of the flac-file of course. Don't forget quotation marks when your path contains spaces.
DC-Bass Source Mod: http://reino.degeelebosch.nl

  • -Aze-
  • [*]
Wanted: FLAC eksperts; Command lines for framerate/bitres?!
Reply #12
Ok, I just don't get it...Sorry.

Have tried everyting.

I have installed the Sox to the bin-folder of DVDAE.

Is this the right command line to ad:
"C:\Users\CARMOD\Downloads\DVDAExplorer2008.07.21\bin\sox-14-4-0\sox.exe" -r 44100 -b 16 output.flac

The path should be correct, but it seems that Sox does not run at all...

  • CoRoNe
  • [*][*][*]
Wanted: FLAC eksperts; Command lines for framerate/bitres?!
Reply #13
%filepath% ?
DC-Bass Source Mod: http://reino.degeelebosch.nl

  • -Aze-
  • [*]
Wanted: FLAC eksperts; Command lines for framerate/bitres?!
Reply #14
I thought the filepath was the sox.exe location?

Is it the place where the wav that should be converted is stored?

  • CoRoNe
  • [*][*][*]
Wanted: FLAC eksperts; Command lines for framerate/bitres?!
Reply #15
No, you forgot to put "%filepath%" in your command-line. See [a href='index.php?act=findpost&pid=822140']Post #12[/a].
DC-Bass Source Mod: http://reino.degeelebosch.nl

  • -Aze-
  • [*]
Wanted: FLAC eksperts; Command lines for framerate/bitres?!
Reply #16
I have added this line: "C:\Users\CARMOD\Downloads\DVDAExplorer2008.07.21\bin\sox-14-4-0\sox.exe" %filepath% -r 44100 -b 16 output.flac

Isn't that correct? None the less, it doesn't do the trick:-(


  • CoRoNe
  • [*][*][*]
Wanted: FLAC eksperts; Command lines for framerate/bitres?!
Reply #17
I had never used this program before, and since you still couldn't get it to work, I decided to have a look myself.
- "[path]\sox.exe" %filepath% -r 44100 -b 16 output.flac didn't work.
- putting sox.exe in DVDAExplorer.exe's folder, as suggested by the manual, and: sox.exe %filepath% -r 44100 -b 16 output.flac didn't work.
- sox.exe %filepath% -r 44100 -b 16 %filebase%.flac didn't work.
- even flac.exe -8 %filepath% -o %filebase%.flac didn't work...

If you ask me, this whole features doesn't work!
DC-Bass Source Mod: http://reino.degeelebosch.nl

  • phofman
  • [*][*][*][*]
Wanted: FLAC eksperts; Command lines for framerate/bitres?!
Reply #18
The manual at http://501post.com/audio/db/from%20aaron/D...r%20Manual.html talks about DVDAExplorerEnc.log. What is in that file?

In linux I would wrap the command into a short script, logging all its parameters to a file. The windows command shell should be able to do the same  as the $@ expansion in bash.

Did you consider spaces in the path? Perhaps they are handled incorrectly. How about wrapping the %xxx% parameters into double quotes?

  • CoRoNe
  • [*][*][*]
Wanted: FLAC eksperts; Command lines for framerate/bitres?!
Reply #19
You're right. DVDAExplorerEnc.log:
Code: [Select]
D:\Storage\Media\Binaries\SoX 14.3.2\sox.exe FAIL formats: can't open input file `files/Audio/track-01-01[1]-03-[Downmix]-24-96000.wav': No such file or directory
"`files/" is part of directory with spaces in it.

"D:\Storage\Media\Binaries\SoX 14.3.2\sox.exe" "%filepath%" -r 44100 -b 16 "%path%/%filebase%".flac solves that issue.
Right after extraction sox crashes though, but that could a problem of my old computer. It happens more often.

I know this is old software, but in the end...what the point of having this "Run program"-feature when it doesn't make use of piping and the program still extracts the huge wav-files?!
DC-Bass Source Mod: http://reino.degeelebosch.nl

  • phofman
  • [*][*][*][*]
Wanted: FLAC eksperts; Command lines for framerate/bitres?!
Reply #20
I know this is old software, but in the end...what the point of having this "Run program"-feature when it doesn't make use of piping and the program still extracts the huge wav-files?!


IMO the existing solution is easier for the developer and makes the extension a bit more flexible. Piping is a blocking operation which the developer would have to take into account. Also, having a finished wav at the time of postprocessing could be useful for some tasks.

  • -Aze-
  • [*]
Wanted: FLAC eksperts; Command lines for framerate/bitres?!
Reply #21
Thank you guys so much for trying to help me out. I really appreciate your support. None the less it seems that it is not possible, to do what I want, right?

If so, I will convert to wave, and using DB poweramp or similar, converting to the FLAC files. I preferred to have the single-program solution though, but if not possible, that's just the way it is...