HydrogenAudio

Lossless Audio Compression => FLAC => Topic started by: -Aze- on 2013-01-22 20:23:42

Title: Wanted: FLAC eksperts; Command lines for framerate/bitres?!
Post by: -Aze- on 2013-01-22 20:23:42
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.
Title: Wanted: FLAC eksperts; Command lines for framerate/bitres?!
Post by: julf on 2013-01-22 20:31:49
What you need is SoX (http://sox.sourceforge.net/)
Title: Wanted: FLAC eksperts; Command lines for framerate/bitres?!
Post by: db1989 on 2013-01-22 20:37:11
In other words, flac.exe itself cannot change sampling rate or bit-depth.
Title: Wanted: FLAC eksperts; Command lines for framerate/bitres?!
Post by: -Aze- on 2013-01-22 20:46:44
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.
Title: Wanted: FLAC eksperts; Command lines for framerate/bitres?!
Post by: phofman on 2013-01-22 21:40:23
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
Title: Wanted: FLAC eksperts; Command lines for framerate/bitres?!
Post by: -Aze- on 2013-01-22 22:27:06
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?
Title: Wanted: FLAC eksperts; Command lines for framerate/bitres?!
Post by: CoRoNe on 2013-01-22 23:26:12
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
Title: Wanted: FLAC eksperts; Command lines for framerate/bitres?!
Post by: phofman on 2013-01-23 07:19:43
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 (http://501post.com/audio/db/from%20aaron/DVDAExplorer2008.07.21/DVD-Audio%20Explorer%20User%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
Title: Wanted: FLAC eksperts; Command lines for framerate/bitres?!
Post by: -Aze- on 2013-01-23 21:47:16
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?

Title: Wanted: FLAC eksperts; Command lines for framerate/bitres?!
Post by: CoRoNe on 2013-01-23 21:58:37
After quickly looking through that manual: replace the first dash with %filepath% and see if it works.
Title: Wanted: FLAC eksperts; Command lines for framerate/bitres?!
Post by: -Aze- on 2013-01-27 11:38:26
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:

(http://s5.postimage.org/c2fm0o91z/MWSnap007.png) (http://postimage.org/)

(http://s5.postimage.org/5q0gqu5zr/MWSnap008.png) (http://postimage.org/)

(http://s5.postimage.org/jkyr9b0ev/MWSnap010.png) (http://postimage.org/)

(http://s5.postimage.org/aeggm0v6f/MWSnap011.png) (http://postimage.org/)

(http://s5.postimage.org/90otqpvx3/MWSnap012.png) (http://postimage.org/)

(http://s5.postimage.org/g56mzr36f/MWSnap013.png) (http://postimage.org/)
Title: Wanted: FLAC eksperts; Command lines for framerate/bitres?!
Post by: CoRoNe on 2013-01-27 12:07:27
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.
Title: Wanted: FLAC eksperts; Command lines for framerate/bitres?!
Post by: -Aze- on 2013-01-27 12:38:32
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...
Title: Wanted: FLAC eksperts; Command lines for framerate/bitres?!
Post by: CoRoNe on 2013-01-27 12:42:22
%filepath% ?
Title: Wanted: FLAC eksperts; Command lines for framerate/bitres?!
Post by: -Aze- on 2013-01-27 12:55:27
I thought the filepath was the sox.exe location?

Is it the place where the wav that should be converted is stored?
Title: Wanted: FLAC eksperts; Command lines for framerate/bitres?!
Post by: CoRoNe on 2013-01-27 12:59:57
No, you forgot to put "%filepath%" in your command-line. See [a href='index.php?act=findpost&pid=822140']Post #12[/a].
Title: Wanted: FLAC eksperts; Command lines for framerate/bitres?!
Post by: -Aze- on 2013-01-27 13:23:33
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:-(

Title: Wanted: FLAC eksperts; Command lines for framerate/bitres?!
Post by: CoRoNe on 2013-01-27 16:51:48
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!
Title: Wanted: FLAC eksperts; Command lines for framerate/bitres?!
Post by: phofman on 2013-01-27 19:02:36
The manual at http://501post.com/audio/db/from%20aaron/D...r%20Manual.html (http://501post.com/audio/db/from%20aaron/DVDAExplorer2008.07.21/DVD-Audio%20Explorer%20User%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?
Title: Wanted: FLAC eksperts; Command lines for framerate/bitres?!
Post by: CoRoNe on 2013-01-27 19:35:36
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?!
Title: Wanted: FLAC eksperts; Command lines for framerate/bitres?!
Post by: phofman on 2013-01-28 09:21:27
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.
Title: Wanted: FLAC eksperts; Command lines for framerate/bitres?!
Post by: -Aze- on 2013-01-28 21:45:32
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...